/* Guest auth (login, register, OTP) — uses app.css theme tokens only */

.guest-auth {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.guest-auth__head {
    text-align: left;
    margin-bottom: 26px;
}

.guest-auth__head .guest-page__logo {
    width: auto;
    margin: 0 0 14px;
}

.guest-auth__tagline {
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.5;
    margin: 0;
}

.guest-auth__card {
    width: 100%;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .guest-auth__card {
    box-shadow: none;
}

.guest-auth__card .ed-input-group:last-of-type {
    margin-bottom: 0;
}

.guest-auth__card .ed-btn {
    margin-top: 8px;
}

.guest-auth__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.guest-auth__field-head .ed-input-label {
    margin-bottom: 0;
}

.guest-auth__text-link {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    font-family: var(--font);
    color: var(--text-3);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guest-auth__text-link:hover {
    color: var(--accent);
}

.guest-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 17px;
    color: var(--text-4);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guest-auth__divider::before,
.guest-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.guest-auth__alt {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guest-auth__oauth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.guest-auth__oauth--stacked {
    grid-template-columns: 1fr;
    margin-bottom: 18px;
}

.guest-auth__field-hint {
    margin: 7px 0 0;
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.5;
}

.guest-auth__field-hint--error { color: var(--red); }

/* Essential form copy must remain readable in both themes, including on phones. */
.guest-page .ed-input-label,
.guest-auth__tagline,
.guest-page .guest-auth__terms,
.guest-auth__text-link { color: var(--text-2); }

.guest-page .ed-input-label { font-size: 12px; }
.guest-page .guest-auth__terms { font-size: 13px; }
.guest-page .ed-input { font-size: 16px; }
.guest-page .ed-input::placeholder { color: var(--text-2); opacity: 1; }

.guest-auth__terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.guest-auth__terms input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--accent);
}

.guest-auth__terms button {
    padding: 0;
    color: var(--text-2);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    border: 0;
    background: none;
}

.guest-auth__oauth .ed-btn-outline {
    padding: 12px 10px;
    font-size: 13px;
}

.guest-auth__sent {
    padding: 8px 0 4px;
    text-align: center;
}

.guest-auth__sent-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 8px;
}

.guest-auth__sent-sub {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

/* Sent confirmations only: login/register/OTP forms keep their existing layout. */
.guest-page.guest-page--centered {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    padding-block: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-bottom, 0px));
}

.guest-auth--confirmation {
    min-height: 0;
    justify-content: center;
}

.guest-auth--confirmation .guest-auth__confirmation {
    width: 100%;
    min-width: 0;
    padding: clamp(24px, 5vw, 40px) 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: center;
}

.guest-auth--confirmation .guest-auth__confirmation-brand {
    display: inline-flex;
    justify-content: center;
    margin: 0 0 42px;
    color: var(--text-0);
    font-size: clamp(23px, 6vw, 28px);
    font-weight: 750;
}

.guest-auth--confirmation .guest-auth__confirmation-label {
    margin: 0 0 12px;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
}

.guest-auth--confirmation .guest-auth__confirmation-title {
    margin: 0 0 18px;
    color: var(--text-0);
    font-size: clamp(27px, 7vw, 32px);
    font-weight: 550;
    line-height: 1.18;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

.guest-auth--confirmation .guest-auth__confirmation-description {
    margin: 0 auto;
    max-width: 34ch;
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.guest-auth--confirmation .guest-auth__confirmation-hint {
    margin: 25px auto 28px;
    max-width: 37ch;
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.65;
}

.guest-auth--confirmation .guest-auth__confirmation-back {
    min-height: 44px;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--text-0);
    color: var(--bg-0);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.guest-auth__confirmation-device-hint {
    margin: 14px auto 0;
    max-width: 38ch;
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.65;
}

.guest-auth--confirmation .guest-auth__confirmation-back:hover {
    border-color: var(--text-2);
}

.guest-auth--confirmation .guest-auth__confirmation-back:focus-visible {
    outline: 2px solid var(--text-0);
    outline-offset: 4px;
}

.guest-auth--confirmation .guest-auth__pairing .ed-input-label {
    display: block;
    margin-top: 16px;
}

.guest-auth--confirmation .guest-auth__pairing .ed-btn,
.guest-auth--confirmation .guest-auth__pairing .guest-auth__confirmation-back {
    margin-top: 12px;
}

@media (max-height: 600px) {
    .guest-auth--confirmation { min-height: 0; }
    .guest-auth--confirmation .guest-auth__confirmation { padding-block: 24px; }
    .guest-auth--confirmation .guest-auth__confirmation-brand { margin-bottom: 28px; }
}

.theme-toggle--guest {
    gap: 4px;
    padding: 3px;
    border-radius: 4px;
}

.theme-toggle--guest .theme-toggle-btn {
    padding: 7px 10px;
    font-size: 11px;
    border-radius: 3px;
}

.guest-page .ed-form-link {
    margin-top: 22px;
}

.guest-page .guest-auth__route {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-1);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.guest-page .guest-auth__route:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.guest-page .guest-auth__route:disabled {
    cursor: wait;
    opacity: .65;
}

@media (max-height: 740px) {
    .guest-auth__head { margin-bottom: 20px; }
    .guest-auth__head .guest-page__logo { width: auto; margin-bottom: 9px; }
    .guest-auth__tagline { font-size: 13px; }
    .guest-auth__card { padding: 17px; }
    .guest-auth__divider { margin: 17px 0 13px; }
    .guest-page .ed-form-link { margin-top: 17px; }
}

@media (max-width: 380px) {
    .guest-auth__oauth {
        grid-template-columns: 1fr;
    }
}

/* Loading: tek BenefitLoader — arka plandaki hero/form/footer üst üste binmesin */
.guest-auth--busy-host.guest-auth--busy {
    min-height: min(72vh, 520px);
}

.guest-auth--busy-host.guest-auth--busy > *:not(.action-busy-overlay) {
    visibility: hidden;
    pointer-events: none;
}

.guest-auth--busy-host.guest-auth--busy .action-busy-overlay--contained {
    background: color-mix(in srgb, var(--bg-0) 94%, transparent);
    backdrop-filter: blur(20px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.guest-page:has(.guest-auth--busy) .app-footer {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.guest-auth__pairing-code {
    display: inline-block;
    margin-inline: .35rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: .16em;
    color: var(--color-primary, #1b9b68);
}
