/**
 * Manyflights authentication — passwordless sign in / sign up.
 */

.page-auth .main {
    background: linear-gradient(180deg, #eef4ff 0%, #f5fafa 52%, #f5fafa 100%);
    min-height: calc(100vh - 72px);
}

.mf-auth {
    position: relative;
    padding: 48px 0 72px;
    overflow: visible;
}

@media (min-width: 992px) {
    .mf-auth {
        padding: 72px 0 96px;
    }
}

/* Flight Deals hero clouds — same assets, auth-specific placement */
.page-auth .flight-deals-hero-clouds {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.page-auth .flight-deals-hero-cloud {
    position: absolute;
    display: block;
    height: auto;
    user-select: none;
    background-color: var(--brand-logo, #3d5b73);
    opacity: 0.24;
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.page-auth .flight-deals-hero-cloud--ur {
    top: 7%;
    left: clamp(12px, 6vw, 9%);
    width: min(148px, 30vw);
    aspect-ratio: 345 / 112;
    opacity: 0.22;
    -webkit-mask-image: url('../flight-deals/img/clouds/cloud-a.png');
    mask-image: url('../flight-deals/img/clouds/cloud-a.png');
}

.page-auth .flight-deals-hero-cloud--mr {
    top: 18%;
    right: clamp(12px, 7vw, 10%);
    width: min(88px, 22vw);
    aspect-ratio: 643 / 168;
    opacity: 0.20;
    transform: scaleX(-1);
    -webkit-mask-image: url('../flight-deals/img/clouds/cloud-b.png');
    mask-image: url('../flight-deals/img/clouds/cloud-b.png');
}

/* Lower-left — beside lower half of card, clear of the auth shell */
.page-auth .flight-deals-hero-cloud--ll {
    top: 66%;
    left: clamp(8px, 4vw, 7%);
    width: min(132px, 30vw);
    aspect-ratio: 643 / 168;
    opacity: 0.20;
    -webkit-mask-image: url('../flight-deals/img/clouds/cloud-b.png');
    mask-image: url('../flight-deals/img/clouds/cloud-b.png');
}

/* Lower-right — asymmetric counterpart, slightly smaller / lower */
.page-auth .flight-deals-hero-cloud--lr {
    top: 72%;
    right: clamp(10px, 5vw, 8%);
    width: min(110px, 26vw);
    aspect-ratio: 345 / 112;
    opacity: 0.22;
    transform: scaleX(-1);
    -webkit-mask-image: url('../flight-deals/img/clouds/cloud-a.png');
    mask-image: url('../flight-deals/img/clouds/cloud-a.png');
}

@media (min-width: 992px) {
    .page-auth .flight-deals-hero-cloud--ur {
        top: 8%;
        left: max(24px, calc(50% - 380px));
        width: 158px;
        opacity: 0.24;
    }

    .page-auth .flight-deals-hero-cloud--mr {
        top: 16%;
        right: max(24px, calc(50% - 360px));
        width: 92px;
        opacity: 0.22;
    }

    .page-auth .flight-deals-hero-cloud--ll {
        top: 62%;
        left: max(28px, calc(50% - 420px));
        width: 138px;
        opacity: 0.22;
    }

    .page-auth .flight-deals-hero-cloud--lr {
        top: 70%;
        right: max(28px, calc(50% - 390px));
        width: 118px;
        opacity: 0.24;
    }
}

@media (min-width: 1400px) {
    .page-auth .flight-deals-hero-cloud--ur { width: 172px; }
    .page-auth .flight-deals-hero-cloud--mr { width: 100px; }
    .page-auth .flight-deals-hero-cloud--ll { width: 148px; }
    .page-auth .flight-deals-hero-cloud--lr { width: 128px; }
}

.mf-auth__shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 max(20px, var(--page-gutter, 20px));
}

.mf-auth__card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-shadow: none;
}

@media (min-width: 768px) {
    .mf-auth__card {
        padding: 32px 32px 28px;
    }
}

.mf-auth__logo {
    display: inline-flex;
    justify-content: center;
    margin: 0 auto 20px;
}

.mf-auth__logo img {
    display: block;
    height: auto;
    max-width: 148px;
}

.mf-auth__title {
    margin: 0 0 10px;
    font-family: Overpass, sans-serif;
    font-size: clamp(26px, 4vw, 32px);
    font-weight: 700;
    line-height: 115%;
    letter-spacing: -0.4px;
    color: var(--text-color-primary, #383838);
    text-wrap: balance;
}

.mf-auth__lead {
    margin: 0 0 24px;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 160%;
    color: var(--text-color-secondary, #4B5563);
    text-wrap: pretty;
}

.mf-auth__alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff4f4;
    border: 1px solid #fecaca;
    color: #9f1239;
    font-size: 14px;
    line-height: 150%;
    text-align: left;
}

.mf-auth__google {
    gap: 10px;
    margin-bottom: 0;
}

.mf-auth__google-icon {
    flex: 0 0 auto;
}

.mf-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 20px;
    color: var(--text-color-muted, #6b7280);
    font-size: 13px;
    line-height: 1.4;
}

.mf-auth__divider::before,
.mf-auth__divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e5eaf2;
}

.mf-auth__form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    text-align: left;
}

.mf-auth__label {
    display: block;
    margin: 0 0 8px;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color-label, #9CA3AF);
}

.mf-auth__input {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #e6edf5;
    border-radius: 12px;
    background: #f8fbfe;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #10374c;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mf-auth__input::placeholder {
    color: #c3cdd2;
    font-weight: 400;
}

.mf-auth__input:focus {
    outline: none;
    background: #fff;
    border-color: #005fff;
    box-shadow: 0 0 0 4px rgba(0, 95, 255, 0.12);
}

.mf-auth__submit {
    margin-top: 4px;
}

/* Beat .page-manyflights p (inherits 16px / secondary #4B5563) so these stay clearly secondary */
.page-manyflights.page-auth p.mf-auth__hint {
    margin: 12px 0 0;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 140%;
    color: var(--text-color-muted, #6b7280);
    text-align: center;
}

.page-manyflights.page-auth p.mf-auth__legal {
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
    font-family: "Open Sans", sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 150%;
    color: var(--text-color-muted, #6b7280);
    text-align: center;
}

.page-manyflights.page-auth p.mf-auth__legal a {
    color: #005fff;
    font-weight: 400;
    text-decoration: none;
}

.page-manyflights.page-auth p.mf-auth__legal a:hover {
    text-decoration: underline;
}

/* Success state */
.mf-auth__success-eyebrow {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color-secondary, #4B5563);
}

.mf-auth__sent-email-label {
    margin: 20px 0 6px;
    font-size: 14px;
    color: var(--text-color-muted, #6b7280);
}

.mf-auth__sent-email {
    margin: 0 0 18px;
    font-family: Overpass, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 130%;
    color: var(--text-color-primary, #383838);
    word-break: break-word;
}

.mf-auth__cooldown {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-color-muted, #6b7280);
}

.mf-auth__resend-form {
    margin: 0 0 14px;
}

.mf-auth__resend-form.is-disabled {
    opacity: 0.72;
}

.mf-auth__change-email {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #005fff;
    text-decoration: none;
}

.mf-auth__change-email:hover {
    text-decoration: underline;
}

/* Buttons (aligned with Plans) */
.page-auth .mf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 22px;
    border-radius: 11px;
    font-family: "Open Sans", sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0.3px;
    text-decoration: none;
    border: 1px solid transparent;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.page-auth .mf-btn--primary {
    background: var(--primary-color, #005fff);
    color: #fff !important;
}

.page-auth .mf-btn--primary:hover {
    background: #0046cc;
    color: #fff !important;
    transform: translateY(-1px);
}

.page-auth .mf-btn--secondary {
    background: #fff;
    color: var(--text-color-primary, #383838) !important;
    border-color: #dae3f5;
}

.page-auth .mf-btn--secondary:hover {
    background: var(--bg-color-primary, #F5FAFA);
}

@media (max-width: 767px) {
    .page-auth .header {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .mf-auth__card {
        border-left: 0;
        border-right: 0;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-auth .mf-btn--primary:hover {
        transform: none;
    }
}
