/**
 * Sign-in pages (layout-auth/master.blade.php): login, sign-up, forgot and reset password.
 * A header over both columns, the wall of covers with the pitch on the left and the form on the right;
 * below 900px one column, with the wall as a band above the form. Buttons, module labels and the
 * EN / PT switch come from media-kit.css; the form controls get Cinema's colors from themes/cinema.css.
 * Behavior: public/js/components/auth-forms.js.
 */

/* ================== PAGE ================== */
.auth-page {
    min-height: 100vh;
    background: var(--surface-0);
    color-scheme: dark;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(440px, 1fr);
    min-height: 100vh;
}

/* ================== HEADER ================== */
.auth-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 88px;
    padding-inline: clamp(24px, 3.4vw, 56px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-1);
    text-decoration: none;
}

.auth-brand:hover {
    color: var(--text-1);
}

.auth-brand:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.auth-brand-icon {
    display: block;
    width: 34px;
    height: 34px;
}

.auth-brand-name {
    padding-top: 4px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: var(--font-display-weight);
    line-height: 30px;
    letter-spacing: 0.06em;
}

.auth-header-tools {
    display: flex;
    align-items: center;
    gap: 24px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: var(--text-2);
    text-decoration: none;
}

.auth-back:hover {
    color: var(--text-1);
}

.auth-back > i {
    font-size: 12px;
}

/* ================== POSTER WALL ================== */
.auth-marquee {
    position: relative;
    isolation: isolate;
    display: flex;
    overflow: hidden;
    background: var(--surface-0);
}

.auth-wall {
    position: absolute;
    inset: -14% -10% -14% -10%;
    z-index: -2;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
    transform: rotate(-6deg);
}

.auth-wall-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.auth-wall-column:nth-child(even) {
    transform: translateY(-110px);
}

.auth-poster {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-2);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}

/* A cover that failed to load (auth-forms.js) leaves its slot empty instead of a broken-image icon */
.auth-poster.is-broken {
    visibility: hidden;
}

/* Darkens the wall toward the form and the pitch */
.auth-marquee::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(11, 11, 14, 0.25) 0%, rgba(11, 11, 14, 0.5) 55%, rgba(11, 11, 14, 0.96) 100%),
        linear-gradient(0deg, var(--surface-0) 0%, rgba(11, 11, 14, 0.8) 34%, rgba(11, 11, 14, 0.35) 68%, rgba(11, 11, 14, 0.7) 100%);
}

.auth-marquee-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 36px;
    width: 100%;
    padding: 120px clamp(24px, 3.4vw, 56px) 48px;
}

.auth-pitch {
    max-width: 660px;
}

.auth-headline {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(56px, 5.6vw, 96px);
    font-weight: var(--font-display-weight);
    line-height: 0.9;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-wrap: balance;
    color: var(--text-1);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.auth-lead {
    max-width: 500px;
    margin: 20px 0 0;
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--cinema-text-nav, var(--text-1));
}

.auth-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.auth-note {
    max-width: 540px;
    padding: 14px 18px;
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: rgba(11, 11, 14, 0.78);
    backdrop-filter: blur(6px);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.auth-note p {
    margin: 0;
}

.auth-note .auth-note-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-weight: 700;
    color: var(--text-1);
}

.auth-note-title > i {
    font-size: 12px;
    color: var(--accent);
}

.auth-note ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 26px;
    margin: 6px 0 0;
    padding-left: 16px;
}

/* ================== FORM COLUMN ================== */
.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 88px clamp(24px, 3.4vw, 56px) 24px;
    border-left: 1px solid var(--line);
    background: var(--surface-0);
}

.auth-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 32px 0 48px;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    font-size: 12.5px;
    line-height: 18px;
    color: var(--text-2);
}

.auth-footer a {
    color: var(--text-2);
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--text-1);
}

.auth-kicker {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(44px, 3.6vw, 58px);
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--text-1);
}

.auth-text {
    margin: 12px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-2);
}

/* The account the sign-in of the THIRA app for Windows went through (auth/desktop-finish.blade.php, M-046) */
.auth-account {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-1);
}

.auth-account > i {
    flex: none;
    font-size: 30px;
    color: var(--accent);
}

.auth-account-text {
    min-width: 0;
}

.auth-account-label,
.auth-account-name,
.auth-account-email {
    margin: 0;
    overflow-wrap: anywhere;
}

.auth-account-label {
    font-size: 12px;
    line-height: 16px;
    color: var(--text-2);
}

.auth-account-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
    color: var(--text-1);
}

.auth-account-email {
    font-size: 13px;
    line-height: 18px;
    color: var(--text-2);
}

.auth-account-help {
    margin-top: 10px;
    text-align: center;
}

/* ================== MESSAGES ================== */
.auth-alert {
    --tone: var(--text-2);
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding: 13px 16px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tone) 12%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 42%, transparent);
    font-size: 14px;
    line-height: 20px;
    color: var(--text-1);
}

.auth-alert.is-error {
    --tone: var(--danger);
}

.auth-alert.is-success {
    --tone: var(--success);
}

.auth-alert.is-warning {
    --tone: var(--accent);
}

.auth-alert > i {
    flex: none;
    margin-top: 3px;
    color: var(--tone);
}

.auth-alert p {
    margin: 0;
}

.auth-alert ul {
    margin: 0;
    padding-left: 18px;
}

.auth-alert-title {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
}

.auth-alert .auth-alert-meta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-2);
}

.auth-alert-meta time {
    font-weight: 600;
    color: var(--text-1);
}

.auth-resend {
    margin-top: 12px;
}

/* ================== FIELDS ================== */
.auth-form,
.auth-fieldset {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form {
    margin-top: 28px;
}

.auth-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.auth-fieldset:disabled {
    opacity: 0.55;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.auth-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
}

.auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.auth-page .auth-label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: var(--text-1);
}

.auth-label small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
}

.auth-page .auth-form .form-control {
    min-height: 48px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 15px;
}

.auth-page .auth-form .form-control[readonly] {
    background-color: var(--surface-1);
    color: var(--text-2);
}

.auth-page .auth-form .form-control.is-invalid,
.auth-page .auth-form .form-control.is-valid {
    padding-right: 14px;
    background-image: none;
}

.auth-page .auth-form .form-control.is-invalid {
    border-color: var(--danger);
}

.auth-page .auth-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 28%, transparent);
}

.auth-page .auth-form .form-control.is-valid {
    border-color: color-mix(in srgb, var(--success) 65%, var(--field-line));
}

.auth-page .auth-form .form-control.is-valid:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 24%, transparent);
}

/* Chrome paints autofilled fields light; keep them in the field colors */
.auth-page .auth-form .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 100px var(--field-bg) inset;
    -webkit-text-fill-color: var(--text-1);
    caret-color: var(--text-1);
}

.auth-page .auth-form .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px var(--field-bg) inset, 0 0 0 3px var(--accent-soft);
}

.auth-help,
.auth-field-error {
    margin: 0;
    font-size: 12.5px;
    line-height: 18px;
}

.auth-help {
    color: var(--text-2);
}

.auth-field-error {
    color: var(--danger);
}

.auth-field-error[hidden] {
    display: none;
}

/* Password with the show / hide button */
.auth-password {
    position: relative;
}

.auth-page .auth-form .auth-password .form-control {
    padding-right: 50px;
}

.auth-password .form-control::-ms-reveal {
    display: none;
}

.auth-reveal {
    position: absolute;
    top: 50%;
    right: 5px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-2);
    transform: translateY(-50%);
    cursor: pointer;
}

.auth-reveal:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.auth-reveal[aria-pressed="true"] {
    color: var(--accent);
}

.auth-reveal:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 0;
}

.auth-page .auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.auth-page .auth-check .form-check-input {
    flex: none;
    float: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
}

.auth-page .auth-check .form-check-input.is-invalid {
    border-color: var(--danger);
}

.auth-page .auth-check .form-check-label,
.auth-page .auth-check .form-check-input.is-invalid ~ .form-check-label {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-2);
}

.auth-captcha {
    align-self: flex-start;
    min-height: 78px;
    border-radius: 4px;
}

.auth-captcha.is-invalid {
    outline: 2px solid var(--danger);
    outline-offset: 3px;
}

/* ================== ACTIONS ================== */
.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    border-radius: 24px;
    font-size: 15px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-2);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Google's dark button */
.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 1px solid #8e918f;
    border-radius: 24px;
    background: #131314;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    color: #e3e3e3;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-google:hover {
    border-color: #b4b7b5;
    background: #1c1c1f;
    color: #ffffff;
}

.auth-google:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.auth-google svg {
    flex: none;
    width: 20px;
    height: 20px;
}

.auth-google.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-link {
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.auth-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-link.is-quiet {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.auth-link.is-quiet:hover {
    color: var(--text-1);
}

.auth-link > i {
    margin-right: 8px;
    font-size: 12px;
}

.auth-switch {
    margin: 24px 0 0;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--text-2);
}

.auth-switch.is-tight {
    margin-top: 8px;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 1199.98px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
    }

    .auth-note ul {
        display: block;
    }
}

@media (max-width: 899.98px) {
    .auth-shell {
        display: block;
        min-height: 0;
    }

    .auth-header {
        height: 64px;
        padding-inline: 16px;
    }

    .auth-brand-icon {
        width: 30px;
        height: 30px;
    }

    .auth-brand-name {
        font-size: 26px;
        line-height: 26px;
    }

    .auth-back {
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 17px;
        background: rgba(11, 11, 14, 0.6);
        box-shadow: inset 0 0 0 1px var(--line-strong);
    }

    .auth-back-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .auth-header-tools {
        gap: 16px;
    }

    .auth-wall {
        inset: -40px -20% auto -20%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .auth-wall-column {
        gap: 10px;
    }

    .auth-wall-column:nth-child(n+5),
    .auth-poster:nth-child(n+4) {
        display: none;
    }

    .auth-wall-column:nth-child(even) {
        transform: translateY(-60px);
    }

    .auth-marquee-inner {
        gap: 0;
        padding: 128px 16px 26px;
    }

    .auth-headline {
        font-size: clamp(40px, 11vw, 60px);
    }

    .auth-lead,
    .auth-modules,
    .auth-note {
        display: none;
    }

    .auth-main {
        padding: 0 16px 24px;
        border-left: 0;
    }

    .auth-content {
        max-width: 480px;
        padding: 28px 0 40px;
    }
}

@media (max-width: 479.98px) {
    .auth-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 359.98px) {
    .auth-captcha {
        transform: scale(0.88);
        transform-origin: left top;
    }
}
