/* ========================================
   SIGNUP.CSS
   Uses the EXACT same styles as the Keycloak
   registration page (login.css / variables.css)
   Only adds influencer-specific overrides
   ======================================== */

/* ---- Variables (same as Keycloak) ---- */
:root {
    --body-bg: #fff;
    --primary-font-color: #000;
    --light-grey-font-color: #666;
    --light-grey-font-color-2: #9C9999;
    --highlight-color: #F04C47;
    --primary-button-color: #000;
    --primary-button-hover-color: #f5f5f5;
    --primary-button-highlight-color-hover: #434343;
    --dark-grey-bg: #111827;
    --light-grey-bg: #F5F5F5;
    --input-border-color: #aaa;
    --max-width: 1650px;
    --header-height: 90px;
}

/* ---- Reset (same as Keycloak) ---- */
* {
    box-sizing: border-box;
}

img,
svg {
    line-height: 0;
}

body {
    padding: 0;
    margin: 0;
    font-size: 16px;
    color: var(--primary-font-color);
    background: var(--body-bg);
}

input,
select,
textarea {
    font-size: 17px;
}

html body,
html body * {
    font-family: "Inter", sans-serif;
}

.mandatory {
    color: red;
}

a.btns,
a.dark-btns {
    transition: all 300ms ease-in-out;
}

a.btns:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ========================================
   HEADER (exact Keycloak .header-page-back)
   ======================================== */
.header-page-back {
    padding: 20px 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 20px;
    flex-direction: column;
}

.header-page-back .logo-section {
    display: flex;
    width: 100%;
    justify-content: center;
}

.header-page-back a.back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000;
    font-size: 1.375rem;
}

.header-page-back .logo-section img {
    height: 44px;
    display: block;
}

.header-page-back .header-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background: var(--primary-button-color);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
}

/* ========================================
   MAIN LAYOUT (exact Keycloak structure)
   ======================================== */
.login-content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    width: 100%;
    min-height: calc(100vh - 72px);
}

.login-content-wrapper .left-box {
    width: 50%;
    padding: 30px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-content-wrapper .left-box.full-width {
    width: 100%;
    padding:10px 20px 20px 20px;
    align-items: flex-start;
    justify-content: center;
}

/* ========================================
   LOGIN BOX (exact Keycloak .login-box)
   ======================================== */
.login-content-wrapper .left-box .login-box {
    width: 100%;
    max-width: 380px;
}

.login-content-wrapper .left-box .login-box.signup {
    /* max-width: 700px; */
    max-width: var(--max-width);
}

.login-content-wrapper .left-box .login-box.signup .register-top-section-wrapper{
    max-width: 600px;
    margin: 0 auto;
}

.login-content-wrapper .left-box .login-box h2 {
    margin: 0;
    padding: 30px 0 10px 0;
    font-size: 1.375rem;
}

.login-content-wrapper .left-box.full-width .login-box h2 {
    text-align: center;
    padding: 0px 0 20px 0;
    font-size: 2.185rem;
    max-width: 400px;
    margin: 0 auto;
    font-size:1.375rem;
}

.login-content-wrapper .left-box .login-box p.step-subtitle {
    text-align: center;
    margin: 10px 0;
}

/* ========================================
   FORM FIELDS (exact Keycloak .form-box)
   ======================================== */
.login-content-wrapper .left-box .login-box .form-box {
    padding: 10px 0;
}

.login-content-wrapper .left-box .login-box .form-box label {
    font-size: 1rem;
    font-weight: 500;
    display: block;
    padding-bottom: 5px;
}

.login-content-wrapper .left-box .login-box .form-box input {
    width: 100%;
    padding: 10px;
    font-size: 17px;
}

.login-content-wrapper .left-box .login-box .form-box-half {
    flex-wrap: wrap;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.login-content-wrapper .left-box .login-box .form-box-half .form-box {
    width: calc(50% - 10px);
}

/* ========================================
   BUTTONS (exact Keycloak .form-buttons)
   ======================================== */
.login-content-wrapper .left-box .login-box .form-buttons {
    padding: 10px 0 20px 0;
    display: flex;
    justify-content: center;
}

.login-content-wrapper .left-box .login-box .form-buttons a {
    width: 100%;
    padding: 10px;
    background: var(--highlight-color);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    text-align: center;
    max-width: 300px;
    justify-content: center;
}

/* ========================================
   OR DIVIDER (exact Keycloak .or-text)
   ======================================== */
.login-content-wrapper .left-box .login-box .or-text {
    padding: 30px 0;
    text-align: center;
    margin-bottom: 20px;
    border-bottom: solid 1px #ddd;
}

/* ========================================
   SSO LINKS (exact Keycloak .sso-links)
   ======================================== */
.login-content-wrapper .left-box .login-box .sso-links {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 10px;
}

.login-content-wrapper .left-box .login-box .sso-links a {
    width: 100%;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    border: solid 1px #ddd;
}

/* ========================================
   FOOTER TEXT (exact Keycloak .footer-text)
   ======================================== */
.login-content-wrapper .left-box .login-box .footer-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.875rem;
    padding: 50px 0 0 0;
    text-align: center;
}

.login-content-wrapper .left-box .login-box .footer-text a {
    color: #4A90D9;
    text-decoration: underline;
}

/* ========================================
   OTHER LINKS (exact Keycloak .other-links)
   ======================================== */
.login-content-wrapper .left-box .login-box .other-links {
    margin: 0;
    padding: 3px 0;
    color: #666;
}

.login-content-wrapper .left-box .login-box .other-links a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

.login-content-wrapper .left-box .login-box .other-links a:hover {
    text-decoration: underline;
}

/* ========================================
   STEP TRANSITIONS
   ======================================== */
.step-content {
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SEARCH BOX (exact same as home.css .banner .search-box)
   ======================================== */
.influencer-search-wrapper {
    position: relative;
}

.influencer-search-wrapper .search-box {
    background: #fff;
    height: 60px;
    padding: 0 10px;
    display: flex;
    width: 100%;
    align-items: center;
    border-radius: 30px;
    border: solid 1px var(--input-border-color);
    gap: 10px;
    position: relative;
    flex-direction: row;
}

.influencer-search-wrapper .search-box input {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: none;
    box-shadow: none;
    height: 40px;
    border: 0;
    width: calc(100% - 92px);
    font-size: 17px;
    outline: none;
}

.influencer-search-wrapper .search-box input:focus {
    outline: 0 !important;
}

.search-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.search-clear-btn:hover {
    color: #000;
}

/* Dropdown (same as home.css .search-results) */
.influencer-search-wrapper .search-box .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    z-index: 20;
    padding: 0;
}

/* ========================================
   INFLUENCER DROPDOWN ITEMS
   ======================================== */

.influencer-dropdown-list {
    padding:0;
}

.influencer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 12px;
}

.influencer-item:hover {
    background: #f5f5f5;
}

.influencer-item.selected {
    background: #f0f0f0;
}

.influencer-avatar-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.influencer-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.influencer-avatar-initials {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #374151;
    text-transform: uppercase;
}

.influencer-info {
    flex: 1;
    min-width: 0;
}

.influencer-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.influencer-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.influencer-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ensure influencer descriptions are left-aligned inside chips/dropdowns,
   overriding generic centered paragraph styles in the signup layout. */
.influencer-dropdown-list .influencer-description,
.selected-influencer-chip .influencer-description {
    text-align: left;
}

.influencer-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: #555;
    background: #f3f4f6;
    padding: 1px 8px;
    border-radius: 9999px;
}

.dropdown-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 0.875rem;
}

.dropdown-empty p {
    text-align: center;
    padding: 0;
}

.dropdown-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    color: #999;
    font-size: 0.875rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   SELECTED INFLUENCER CHIP (Step 2)
   ======================================== */
.selected-influencer-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    max-width: 700px;
    margin: 0 auto 24px auto;
}

.selected-influencer-chip .influencer-avatar-wrapper {
    width: 48px;
    height: 48px;
}

.selected-influencer-chip .influencer-info {
    min-width: 0;
}

.chip-change-btn {
    margin-left: auto;
    padding: 4px 12px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.chip-change-btn:hover {
    border-color: #000;
    color: #000;
}

/* ========================================
   PLAN CARDS OVERRIDES (Step 2)
   ======================================== */
.login-box .plans-section {
    padding: 0;
}

.login-box .plans-grid-wrapper {
    padding: 0;
    background: transparent;
    margin:10px 0 0 0;
    overflow: visible;
}

.login-box .plan-card-full {
    cursor: pointer;
    user-select: none;
    background: #fff;
}

.login-box .plan-card-full.plan-selected {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.login-box .plan-card-full .plan-action {
    display: none;
}

.plan-radio-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.plan-card-full.plan-selected .plan-radio-indicator {
    background: #000;
    border-color: #000;
}

.plan-radio-indicator svg {
    display: none;
    color: #fff;
}

.plan-card-full.plan-selected .plan-radio-indicator svg {
    display: block;
}

/* ========================================
   REGISTRATION SUMMARY (Step 3)
   ======================================== */
.registration-summary {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 0;
    margin: 10px 0;
}

.summary-row {
    display: flex;
    padding: 0;
}

.summary-row+.summary-row {
    border-top: 1px solid var(--border-light);
}

.summary-row-label {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-body);
    border-right: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 90px;
    flex-shrink: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    width: 122px;
}

.summary-row-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #000;
    width: calc(100% - 122px);
    padding: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.summary-row-value .summary-detail {
    font-weight: 400;
    color: #666;
    font-size: 0.8125rem;
    display: block;
    margin-top: 2px;
}

.registration-note {
    text-align: center;
    font-size: 0.8125rem;
    color: #999;
    padding: 0 0 10px 0;
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
    color: #999;
    font-size: 0.875rem;
}

.loading-indicator .spinner {
    width: 28px;
    height: 28px;
}

.empty-state-inline {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE (same breakpoints as Keycloak)
   ======================================== */
@media (max-width: 1400px) {
    .login-content-wrapper .left-box {
        padding: 20px;
        width: 500px;
    }

    .header-page-back {
        padding: 20px;
    }
}

@media (max-width: 1022px) {
    .login-content-wrapper .left-box {
        width: 100%;
        padding-top: 0;
    }

    .header-page-back .header-links {
        display: none;
    }

    .header-page-back .logo-section {
        width: 100%;
        justify-content: center;
        display: flex;
    }

    .login-content-wrapper .left-box.full-width .login-box h2 {
        font-size: 1.375rem;
    }

    .login-content-wrapper .left-box .login-box .or-text {
        padding: 20px 0;
    }

    .login-content-wrapper .left-box .login-box .logo-section {
        text-align: center;
    }

    .login-content-wrapper .left-box .login-box h2 {
        text-align: center;
    }
}

@media (max-width: 600px) {
    .login-content-wrapper .left-box .login-box .form-box-half .form-box {
        width: 100%;
    }

    .login-box .plan-card-full {
        width: 100%;
    }

    .influencer-dropdown {
        max-height: 240px;
    }
    .influencer-header-row{
        gap: 5px;
        margin-bottom: 5px;
        flex-wrap: wrap;
    }
    .influencer-item{
        flex-direction: column;
        align-items: flex-start;
    }
    .selected-influencer-chip{
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        border-radius: 20px;
    }
    .summary-row-label,
    .summary-row-value{
        padding: 10px;
    }
    .summary-row-label{
        width: 105px;
    }
    .summary-row-value{
        width: calc(100% - 105px);
    }
}