/*
 * Netroa / Alastyr Auth Pages (PRO v6)
 * WHMCS 8.13
 *
 * v6 updates (requested):
 * - Register page: LEFT panel is truly fixed (never scrolls).
 * - Right side (form) scrolls normally with the page.
 * - Left panel refreshed (logo position + subtle pattern) for a more professional look.
 */

/* === Strip site chrome on auth pages (login/register/pwreset) === */
body.nuhost-showing-auth {
    background: #ffffff !important;
    overflow-x: hidden !important;
}

/* Keep auth pages clean */
body.nuhost-showing-auth #header,
body.nuhost-showing-auth section.footer-coodiv-thm,
body.nuhost-showing-auth #footer,
body.nuhost-showing-auth .header-animation,
body.nuhost-showing-auth .header-top-menu,
body.nuhost-showing-auth .top-header-nav-home {
    display: none !important;
}

body.nuhost-showing-auth section#main-body {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh;
    background: #ffffff !important;
}

body.nuhost-showing-auth section#main-body > .container,
body.nuhost-showing-auth section#main-body > .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

body.nuhost-showing-auth section#main-body > .container > .row,
body.nuhost-showing-auth section#main-body > .container-fluid > .row {
    margin: 0 !important;
}

body.nuhost-showing-auth section#main-body .main-content {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 100vh;
}

/* Remove legacy constraints from other login styles */
body.nuhost-showing-auth .logincontainer,
body.nuhost-showing-auth #registration {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === Split layout === */
.alastyr-auth {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: #ffffff;

}

/* IMPORTANT: stop width+padding overflow */
.alastyr-auth,
.alastyr-auth * {
    box-sizing: border-box;
}

.alastyr-auth__left,
.alastyr-auth__right {
    flex: 1 1 0;
    min-width: 0;
}

.alastyr-auth__left {
    background: linear-gradient(180deg, #f7f9ff 0%, #f4f7ff 100%);
    position: relative;
    overflow: hidden;
}

/* Match reference: keep the left panel clean (no dot overlay / no extra glow) */
.alastyr-auth__left::before,
.alastyr-auth__left::after {
    content: none;
}

.alastyr-auth__left-inner {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 76px 56px;
    z-index: 1;
}

/* Logo: top-center like reference */
/* Logo: closer to Alastyr ref (top-left) */
.alastyr-auth__brand {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.alastyr-auth__brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.alastyr-auth__logo {
    height: 44px;
    width: auto;
}

/* === Mobile header/footer (shown only on small screens) === */
.alastyr-auth__mobile-top,
.alastyr-auth__mobile-bottom {
    display: none;
}

.alastyr-auth__mobile-top {
    width: 100%;
    justify-content: center;
    margin: 0 0 18px;
}

.alastyr-auth__mobile-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.alastyr-auth__mobile-logo {
    height: 42px;
    width: auto;
}

.alastyr-auth__mobile-bottom {
    margin-top: 18px;
    text-align: center;
}

.alastyr-auth__mobile-bottom-title {
    font-size: 13px;
    font-weight: 900;
    color: #42566b;
    margin-bottom: 10px;
}

.alastyr-auth__mobile-bottom-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.alastyr-auth__mobile-bottom-copy {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(107, 124, 147, 0.95);
}

.alastyr-auth__illustration {
    width: min(520px, 88%);
    margin-top: 30px;
}

.alastyr-auth__illustration img {
    width: 100%;
    height: auto;
    display: block;
}

.alastyr-auth__social {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 78px;
    transform: translateX(-50%);
    width: min(520px, calc(100% - 112px));
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.08);
    backdrop-filter: blur(10px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .alastyr-auth__social {
        background: rgba(255, 255, 255, 0.92);
    }
}

.alastyr-auth__social-title {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 900;
    color: #0b2a4a;
}

.alastyr-auth__social-desc {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7c93;
}

.alastyr-auth__social-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Rounder, more premium social buttons */
.alastyr-auth__social-link {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(11, 42, 74, 0.14);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.alastyr-auth__social-link.is-facebook { background: #1877f2; }
.alastyr-auth__social-link.is-twitter { background: #1da1f2; }
.alastyr-auth__social-link.is-instagram { background: #e1306c; }

.alastyr-auth__social-link:hover,
.alastyr-auth__social-link:focus {
    transform: translateY(-1px);
    filter: brightness(0.98);
    text-decoration: none;
    color: #ffffff;
}

.alastyr-auth__copyright {
    position: absolute;
    left: 56px;
    bottom: 28px;
    font-size: 12px;
    color: rgba(107, 124, 147, 0.9);
}

/* Right side */
.alastyr-auth__right {
    display: flex;
    /*
     * IMPORTANT:
     * Auth pages can contain multiple blocks on mobile (mobile logo + card + mobile footer).
     * Flex defaults to "row"; forcing a column layout prevents horizontal overflow.
     */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 52px;
    background: #ffffff;
}

.alastyr-auth__card {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.10);
    padding: 36px;
}

.alastyr-auth__card--register {
    max-width: 720px;
}

.alastyr-auth__head {
    margin-bottom: 18px;
}

.alastyr-auth__title {
    margin: 0;
    font-size: 40px;
    line-height: 1.08;
    font-weight: 900;
    color: #0b2a4a;
}

.alastyr-auth__subtitle {
    margin-top: 10px;
    font-size: 14px;
    color: #6b7c93;
}

/* === Form === */
.alastyr-form__group {
    margin-bottom: 14px;
}

.alastyr-form__label {
    font-size: 13px;
    font-weight: 800;
    color: #42566b;
    margin-bottom: 8px;
}

.alastyr-form__labelrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.alastyr-form__control {
    height: 50px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    box-shadow: none;
    padding: 12px 14px;
    font-size: 14px;
    color: #0b2a4a;
}

.alastyr-form__control:focus {
    border-color: rgba(13, 120, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(13, 120, 255, 0.14);
}

.alastyr-form__password {
    position: relative;
}

.alastyr-form__password .alastyr-form__control {
    padding-right: 44px;
}

.alastyr-form__toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7c93;
    cursor: pointer;
}

.alastyr-form__toggle:hover,
.alastyr-form__toggle:focus {
    color: #0b2a4a;
    outline: none;
}

.alastyr-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 16px;
}

.alastyr-form__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #42566b;
    cursor: pointer;
    user-select: none;
}

.alastyr-form__checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.alastyr-form__captcha {
    margin: 14px 0 10px;
}

.alastyr-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    letter-spacing: 0.4px;
    background: linear-gradient(90deg, #19b8ff, #0d78ff);
    color: #fff;
    box-shadow: 0 16px 36px rgba(13, 120, 255, 0.24);
}

.alastyr-btn-primary:hover,
.alastyr-btn-primary:focus {
    color: #fff;
    filter: brightness(0.98);
}

.alastyr-auth__links {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
}

.alastyr-auth__links--secondary {
    margin-top: 14px;
    color: #6b7c93;
}

.alastyr-auth__link {
    color: #0d78ff;
    font-weight: 800;
    text-decoration: none;
}

.alastyr-auth__link:hover,
.alastyr-auth__link:focus {
    text-decoration: underline;
}

.alastyr-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    color: rgba(107, 124, 147, 0.9);
    font-size: 12px;
    font-weight: 800;
}

.alastyr-auth__divider:before,
.alastyr-auth__divider:after {
    content: "";
    height: 1px;
    background: rgba(15, 23, 42, 0.10);
    flex: 1;
}

/* === Registration form specifics === */
.alastyr-section-title {
    margin: 18px 0 12px;
    font-size: 14px;
    font-weight: 900;
    color: #0b2a4a;
}

.alastyr-form__help {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7c93;
}

.alastyr-auth__card #registration .row {
    margin-left: -10px;
    margin-right: -10px;
}

.alastyr-auth__card #registration .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

/* Inputs/selects in registration: keep consistent look */
.alastyr-auth__card #registration select.form-control,
.alastyr-auth__card #registration textarea.form-control,
.alastyr-auth__card #registration input.form-control {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    box-shadow: none;
    font-size: 14px;
    color: #0b2a4a;
}

.alastyr-auth__card #registration select.form-control,
.alastyr-auth__card #registration input.form-control {
    height: 48px;
}

.alastyr-auth__card #registration textarea.form-control {
    min-height: 110px;
    padding: 12px 14px;
}

/* IMPORTANT: do NOT override intl-tel-input padding-left */
.alastyr-auth__card #registration input.form-control:not([type="tel"]) {
    padding: 12px 14px;
}

.alastyr-auth__card #registration input.form-control[type="tel"] {
    padding-top: 12px;
    padding-bottom: 12px;
    padding-right: 14px;
}

.alastyr-auth__card #registration .intl-tel-input {
    width: 100%;
    display: block;
}

.alastyr-auth__card #registration .intl-tel-input .selected-flag {
    height: 48px;
}

/* Buttons inside registration */
.alastyr-auth__card #registration .btn,
.alastyr-auth__card #registration input.btn {
    border-radius: 999px;
    font-weight: 900;
}

.alastyr-auth__card #registration .btn.btn-primary,
.alastyr-auth__card #registration input.btn.btn-primary {
    background: linear-gradient(90deg, #19b8ff, #0d78ff);
    border: 0;
    box-shadow: 0 16px 36px rgba(13, 120, 255, 0.24);
}

/* === Desktop: keep left panel fixed while the page scrolls === */
@media (min-width: 992px) {
    /*
     * Desktop: TRUE fixed left panel.
     * - Left side never moves.
     * - The page scroll happens on the right side content.
     */

    .alastyr-auth {
        display: block;
    }

    .alastyr-auth__left {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 50%;
        height: 100vh;
        z-index: 0;
    }

    .alastyr-auth__left-inner {
        min-height: 100%;
    }

    .alastyr-auth__right {
        margin-left: 50%;
        width: 50%;
        min-height: 100vh;
    }

    /* Login: vertically centered */
    body.nuhost-showing-login.nuhost-showing-auth .alastyr-auth__right {
        align-items: center;
        justify-content: center;
    }

    /* Register: top aligned and roomy spacing */
    body.nuhost-showing-register.nuhost-showing-auth .alastyr-auth__right {
        align-items: flex-start;
        justify-content: center;
        padding-top: 64px;
        padding-bottom: 64px;
    }

    /* Ensure there's some breathing room after long forms */
    body.nuhost-showing-register.nuhost-showing-auth .alastyr-auth__card {
        margin-bottom: 64px;
    }

    /* Password reset: centered, but can grow */
    body.nuhost-showing-pwreset.nuhost-showing-auth .alastyr-auth__right {
        align-items: center;
        justify-content: center;
    }
}

/* === Responsive === */
@media (max-width: 991.98px) {
    /* Mobile / Tablet: keep the form simple + show logo */

    body.nuhost-showing-auth {
        /* Prevent side-scrolling if any widget (captcha, etc.) overflows */
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    body.nuhost-showing-auth section#main-body {
        background: #f7f9ff !important;
    }

    .alastyr-auth {
        min-height: 100vh;
        height: auto;
    }

    /* Hide the heavy left panel on mobile (logo comes from mobile header) */
    .alastyr-auth__left {
        display: none;
    }

    .alastyr-auth__right {
        height: auto;
        overflow: visible;
        padding: calc(34px + env(safe-area-inset-top)) 18px calc(42px + env(safe-area-inset-bottom));
        background: #f7f9ff;
        align-items: stretch;
        justify-content: flex-start;
    }

    .alastyr-auth__mobile-top {
        display: flex;
    }

    .alastyr-auth__mobile-bottom {
        display: block;
    }

    .alastyr-auth__card {
        max-width: 560px;
        width: 100%;
        padding: 26px;
        margin: 0 auto;
    }

    .alastyr-auth__title {
        font-size: 34px;
    }

    /* Prevent captcha overflow on narrow screens */
    .alastyr-form__captcha {
        overflow: hidden;
    }

    .alastyr-form__captcha iframe,
    .alastyr-form__captcha .g-recaptcha,
    .alastyr-form__captcha .h-captcha {
        max-width: 100%;
    }

}

@media (max-width: 360px) {
    /* Very small phones: scale down reCAPTCHA slightly */
    body.nuhost-showing-auth .alastyr-form__captcha .g-recaptcha {
        transform: scale(0.92);
        transform-origin: 0 0;
    }
}

@media (max-width: 575.98px) {
    .alastyr-auth__right {
        padding: 26px 14px;
    }

    .alastyr-auth__card {
        padding: 22px;
        border-radius: 16px;
    }

    .alastyr-auth__title {
        font-size: 30px;
    }
}
