/* =========================================================
   Astrobilge Register Page Stylesheet
   Harmonized to perfectly match login layout & styling
   ========================================================= */

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative;
    overscroll-behavior-x: none !important;
    -webkit-text-size-adjust: 100%;
}

.login-auth-shell {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Terms and KVKK checkbox & link formatting */
.terms-link-custom,
.terms-accept-custom {
    white-space: normal !important;
    word-break: break-word !important;
}

.terms-text-wrapper {
    flex-wrap: wrap !important;
    max-width: 100% !important;
}

.terms-checkbox-wrapper {
    max-width: 100% !important;
}

.birth-place-dropdown {
    z-index: 1050;
    max-height: 220px;
}

/* =========================================================
   Kayıt Ol Submit Button
   Corners (border-radius) match the social buttons below (6px)
   Colors, hover and active states preserved 100%
   ========================================================= */
body.register-page #register-submit-btn,
body.register-page .btn-register {
    background-color: #0F5A4F !important;
    border: 2px solid #0F5A4F !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px !important;
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(15, 90, 79, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

body.register-page #register-submit-btn:hover,
body.register-page .btn-register:hover {
    background-color: #093831 !important;
    border-color: #093831 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 90, 79, 0.35);
}

body.register-page #register-submit-btn:focus,
body.register-page #register-submit-btn:active,
body.register-page .btn-register:focus,
body.register-page .btn-register:active {
    background-color: #0F5A4F !important;
    border-color: #0F5A4F !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(15, 90, 79, 0.2) !important;
}

body.register-page #register-submit-btn:disabled,
body.register-page .btn-register:disabled {
    background-color: #0F5A4F !important;
    border-color: #0F5A4F !important;
    color: #ffffff !important;
    opacity: 0.65;
}

/* =========================================================
   Desktop Split Screen (992px and above)
   Left: Animation (50%, #DCE0D9, no scroll)
   Right: Registration Form (50%, #ffffff, single page fit, enlarged +30%, logo +40%)
   ========================================================= */
@media (min-width: 992px) {
    body.register-page .login-auth-shell {
        height: 100vh !important;
        overflow: hidden !important;
    }

    body.register-page .login-auth-row {
        height: 100% !important;
    }

    body.register-page .login-graphic-section {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        height: 100% !important;
        background-color: #DCE0D9 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    body.register-page .login-form-section {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background-color: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem 1.5rem !important;
    }

    body.register-page .login-form-section::-webkit-scrollbar {
        width: 6px;
    }

    body.register-page .login-form-section::-webkit-scrollbar-thumb {
        background-color: rgba(15, 90, 79, 0.3);
        border-radius: 4px;
    }

    body.register-page .login-wrapper {
        padding: 0.5rem !important;
        max-width: 520px !important;
        width: 100% !important;
    }

    /* Logo: +20% enlarged (from 60px to 72px) */
    body.register-page .login-logo-img {
        max-height: 72px !important;
        width: auto !important;
    }
    body.register-page .login-wrapper > div:first-child {
        margin-bottom: 22px !important; /* +10px gap to title */
    }

    /* Title: Centered and +10px gap to form */
    body.register-page .login-heading-color {
        font-size: 1.3rem !important;
        text-align: center !important;
        margin-bottom: 22px !important; /* +10px gap to form */
    }

    /* Inputs & Selects: +30% enlarged (height 46px) */
    body.register-page .login-input,
    body.register-page .form-control,
    body.register-page .form-select {
        min-height: 46px !important;
        height: 46px !important;
        padding: 0.45rem 0.8rem !important;
        font-size: 0.95rem !important;
    }
    body.register-page .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* Form Sections & Rows: +30% breathing room */
    body.register-page .form-section {
        margin-bottom: 6px !important;
    }
    body.register-page .row.g-2 {
        --bs-gutter-y: 6px !important;
        --bs-gutter-x: 10px !important;
        margin-bottom: 0 !important;
    }

    /* Unknown birth time checkbox */
    body.register-page #birth_time ~ div,
    body.register-page .birth-time-mask ~ div {
        margin-top: 4px !important;
    }
    body.register-page .form-check-label {
        font-size: 0.82rem !important;
    }
    body.register-page .form-check-input {
        min-width: 17px !important;
        min-height: 17px !important;
        margin-top: 0.2rem !important;
    }

    /* Password hint */
    body.register-page .password-hint-text {
        font-size: 0.75rem !important;
        margin-top: 2px !important;
    }

    /* Terms */
    body.register-page .terms-checkbox-wrapper {
        margin-bottom: 0.65rem !important;
    }
    body.register-page .terms-label-custom {
        font-size: 0.8rem !important;
        line-height: 1.35 !important;
    }

    /* Kayıt Ol Submit Button: +30% (height 48px) */
    body.register-page #register-submit-btn,
    body.register-page .btn-register {
        min-height: 48px !important;
        height: 48px !important;
        padding: 0.5rem 1.25rem !important;
        font-size: 1.05rem !important;
        margin-bottom: 0.65rem !important;
        border-radius: 6px !important;
    }

    /* Divider */
    body.register-page .login-form > div.position-relative {
        margin-bottom: 0.65rem !important;
    }
    body.register-page .login-form hr {
        margin: 0.35rem 0 !important;
    }
    body.register-page .login-form > div.position-relative span {
        font-size: 0.85rem !important;
        padding: 0 0.85rem !important;
    }

    /* Social buttons: +30% (height 44px) */
    body.register-page .login-form > div.row.g-2:last-of-type,
    body.register-page .login-form .row.g-2:has(a[href*="google"]) {
        margin-bottom: 0.65rem !important;
    }
    body.register-page a[href*="google"],
    body.register-page a[href*="facebook"] {
        padding-top: 0.45rem !important;
        padding-bottom: 0.45rem !important;
        min-height: 44px !important;
        height: 44px !important;
        font-size: 0.9rem !important;
        border-radius: 6px !important;
    }

    /* Special Invite Alert Banner */
    body.register-page .register-invite-banner {
        padding: 0.3rem 0.75rem !important;
        margin-bottom: 0.35rem !important;
        font-size: 0.82rem !important;
        line-height: 1.35 !important;
    }

    body.register-page.has-invite-banner .login-logo-img,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-logo-img {
        max-height: 66px !important;
    }

    body.register-page.has-invite-banner .login-wrapper > div:first-child,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-wrapper > div:first-child {
        margin-bottom: 10px !important;
    }

    body.register-page.has-invite-banner .login-heading-color,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-heading-color {
        margin-bottom: 10px !important;
    }

    body.register-page.has-invite-banner .login-form-section,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-form-section {
        padding: 0.45rem 1.5rem !important;
    }

    body.register-page #referralCodeFeedback {
        margin-top: 2px !important;
        font-size: 0.75rem !important;
        line-height: 1.1 !important;
    }

    body.register-page.has-invite-banner .form-section,
    body.register-page:has(.register-invite-banner:not(.d-none)) .form-section {
        margin-bottom: 4px !important;
    }

    body.register-page.has-invite-banner #register-submit-btn,
    body.register-page:has(.register-invite-banner:not(.d-none)) #register-submit-btn {
        margin-bottom: 0.45rem !important;
    }

    body.register-page.has-invite-banner .login-form > div.position-relative,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-form > div.position-relative {
        margin-bottom: 0.45rem !important;
    }

    body.register-page.has-invite-banner .login-form > div.row.g-2:last-of-type,
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-form > div.row.g-2:last-of-type,
    body.register-page.has-invite-banner .login-form .row.g-2:has(a[href*="google"]),
    body.register-page:has(.register-invite-banner:not(.d-none)) .login-form .row.g-2:has(a[href*="google"]) {
        margin-bottom: 0.45rem !important;
    }

    /* Bottom login text: +25% enlarged (from 0.65rem to 0.8125rem / ~13px) */
    body.register-page .signup-text {
        font-size: 0.8125rem !important;
        margin-bottom: 0 !important;
    }
    body.register-page .signup-text .signup-link {
        font-size: 0.8125rem !important;
    }
}

@media (min-width: 992px) and (max-height: 920px) {
    body.register-page .login-wrapper > div:first-child {
        margin-bottom: 12px !important;
    }
    body.register-page .login-heading-color {
        margin-bottom: 12px !important;
    }
    body.register-page .login-form-section {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    body.register-page .form-section {
        margin-bottom: 4px !important;
    }
    body.register-page #register-submit-btn,
    body.register-page .btn-register {
        margin-bottom: 0.45rem !important;
    }
    body.register-page .login-form > div.position-relative {
        margin-bottom: 0.45rem !important;
    }
    body.register-page .login-form > div.row.g-2:last-of-type,
    body.register-page .login-form .row.g-2:has(a[href*="google"]) {
        margin-bottom: 0.45rem !important;
    }
}

@media (min-width: 992px) and (max-height: 800px) {
    body.register-page .login-wrapper {
        padding: 0.15rem !important;
    }
    body.register-page .register-invite-banner {
        padding: 0.25rem 0.5rem !important;
        margin-bottom: 0.35rem !important;
        font-size: 0.78rem !important;
    }
    body.register-page .login-logo-img {
        max-height: 40px !important;
    }
    body.register-page.has-invite-banner .login-wrapper > div:first-child,
    body.register-page .login-wrapper > div:first-child {
        margin-bottom: 4px !important;
    }
    body.register-page.has-invite-banner .login-heading-color,
    body.register-page .login-heading-color {
        font-size: 1.15rem !important;
        margin-bottom: 4px !important;
    }
    body.register-page .login-form-section {
        padding-top: 0.15rem !important;
        padding-bottom: 0.15rem !important;
    }
    body.register-page .login-input,
    body.register-page .form-control,
    body.register-page .form-select {
        min-height: 38px !important;
        height: 38px !important;
        padding: 0.3rem 0.65rem !important;
        font-size: 0.88rem !important;
    }
    body.register-page .form-label {
        font-size: 0.82rem !important;
        margin-bottom: 0.15rem !important;
    }
    body.register-page .form-section {
        margin-bottom: 2px !important;
    }
    body.register-page .row.g-2 {
        --bs-gutter-y: 3px !important;
    }
    body.register-page .terms-checkbox-wrapper {
        margin-bottom: 0.25rem !important;
    }
    body.register-page #register-submit-btn,
    body.register-page .btn-register {
        min-height: 40px !important;
        height: 40px !important;
        font-size: 0.95rem !important;
        margin-bottom: 0.25rem !important;
    }
    body.register-page .login-form hr {
        margin: 0.2rem 0 !important;
    }
    body.register-page .login-form > div.position-relative {
        margin-bottom: 0.35rem !important;
    }
    body.register-page a[href*="google"],
    body.register-page a[href*="facebook"] {
        min-height: 38px !important;
        height: 38px !important;
        font-size: 0.82rem !important;
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }
    body.register-page .login-form > div.row.g-2:last-of-type,
    body.register-page .login-form .row.g-2:has(a[href*="google"]) {
        margin-bottom: 0.35rem !important;
    }
}

/* =========================================================
   Mobile View (under 992px)
   ========================================================= */
@media (max-width: 991.98px) {
    html {
        height: auto !important;
        min-height: 100% !important;
        display: block !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: auto !important;
        overscroll-behavior-y: auto !important;
    }

    body.register-page,
    body.login-page.register-page {
        height: auto !important;
        min-height: 100% !important;
        display: block !important;
        background-color: #ffffff !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: auto !important;
        overscroll-behavior-y: auto !important;
        position: static !important;
    }

    body.register-page .login-auth-shell,
    body.login-page.register-page .login-auth-shell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        overscroll-behavior: auto !important;
        overscroll-behavior-y: auto !important;
        flex: none !important;
    }

    body.register-page .login-auth-row,
    body.login-page.register-page .login-auth-row {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        flex: none !important;
    }

    body.register-page .login-form-section,
    body.login-page.register-page .login-form-section {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        height: auto !important;
        min-height: auto !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding-top: 1rem !important;
        padding-bottom: 5rem !important;
        overflow: visible !important;
        background-color: #ffffff !important;
    }

    body.register-page .login-graphic-section,
    body.login-page.register-page .login-graphic-section {
        display: none !important;
    }

    body.register-page .login-wrapper,
    body.login-page.register-page .login-wrapper {
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0.75rem 1rem 2rem 1rem !important;
    }

    body.register-page .signup-text,
    body.login-page.register-page .signup-text {
        margin-bottom: 2.5rem !important;
    }
}

@media (max-width: 767.98px) {
    .login-form-section {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .login-form {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .login-input,
    .form-control,
    .form-select {
        font-size: 16px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   Mobile Form Input-to-Text Vertical Spacing (-5px)
   ========================================================= */
@media (max-width: 575.98px) {
    body.register-page .col-12.mb-3 {
        margin-bottom: 11px !important;
    }
}

body.register-page .form-section {
    margin-bottom: 3px !important;
}

body.register-page #birth_time ~ div,
body.register-page .birth-time-mask ~ div {
    margin-top: 3px !important;
}

body.register-page .password-hint-text {
    margin-top: 0 !important;
}

body.register-page .signup-text,
body.register-page .signup-text .signup-link {
    font-size: 0.8125rem !important;
}
