/* Shared in-page login modal (store landing + guest dashboard shell).
   Design: store-open-flow-real-progress.md §5.5 — self-contained overlay/card
   styles; deliberately independent of auth.css (its body-level rules pollute
   host pages — guest-shell v2.2 precedent). */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
}
.auth-modal.is-open { display: flex; }

.auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.auth-modal__card {
    position: relative;
    width: min(400px, calc(100vw - 32px));
    padding: 28px 26px 20px;
    border-radius: 16px;
    background: var(--surface-color, #fff);
    color: var(--text-color, #1c1c1e);
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    animation: auth-modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes auth-modal-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.auth-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary, #888);
    font-size: 20px;
    cursor: pointer;
}
.auth-modal__close:hover { background: rgba(128, 128, 128, 0.12); }

.auth-modal__card h2 {
    margin: 0 0 18px;
    font-size: 18px;
    text-align: center;
}

.auth-modal__oauth { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.auth-modal__oauth-btn {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.25));
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.auth-modal__oauth-btn:hover { background: rgba(128, 128, 128, 0.08); }

.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 4px;
    color: var(--text-secondary, #999);
    font-size: 12px;
}
.auth-modal__divider::before,
.auth-modal__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color, rgba(128, 128, 128, 0.2));
}

.auth-modal__form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.auth-modal__form input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(128, 128, 128, 0.25));
    background: var(--bg-secondary, rgba(128, 128, 128, 0.06));
    color: inherit;
    font-size: 14px;
}
.auth-modal__form input:focus {
    outline: 2px solid var(--accent-color, #6366f1);
    outline-offset: 1px;
}
.auth-modal__turnstile { min-height: 0; }

.auth-modal__submit {
    margin-top: 4px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: var(--accent-color, #6366f1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.auth-modal__submit:disabled { opacity: 0.6; cursor: default; }

.auth-modal__error {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(220, 60, 60, 0.1);
    color: #d33c3c;
    font-size: 13px;
}
.auth-modal__error a { color: inherit; text-decoration: underline; }

.auth-modal__links {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary, #888);
}
.auth-modal__links a { color: var(--accent-color, #6366f1); text-decoration: none; }
.auth-modal__links a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .auth-modal__card { animation: none; }
}
