/* Shared storefront auth modal — matches Account login card (compact, minimal). */

:root {
    --site-auth-primary: #2563eb;
    --site-auth-primary-hover: #1d4ed8;
}

.site-auth-modal-dialog {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 1.5rem);
}

.site-auth-modal {
    --auth-tab-count: 2;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    background: #fff;
}

.site-auth-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 5;
    opacity: 0.55;
}

.site-auth-modal-close:hover {
    opacity: 1;
}

.site-auth-modal-body {
    padding: 1.75rem 1.5rem 1.5rem;
}

.site-auth-brand {
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.1;
}

.site-auth-brand-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.site-auth-modal .form-label {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
}

.site-auth-tabs {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.875rem;
    padding: 0.3rem;
    position: relative;
    gap: 0;
}

.site-auth-tab-highlight {
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    right: 0.3rem;
    width: calc((100% - 0.6rem) / var(--auth-tab-count, 1));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease;
    z-index: 0;
    pointer-events: none;
}

.site-auth-tab-btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0.625rem;
    padding: 0.55rem 0.25rem;
    position: relative;
    z-index: 1;
}

.site-auth-tab-btn.active {
    color: #0f172a;
    font-weight: 700;
}

.am-auth-panel {
    display: none;
}

.am-auth-panel.active {
    display: block;
}

.site-auth-field-icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.site-auth-input {
    padding-right: 2.6rem;
    padding-left: 2.6rem;
    border-radius: 0.75rem;
    border-color: #e2e8f0;
    background: #f8fafc;
    min-height: 46px;
    font-size: 0.95rem;
}

.site-auth-input:focus {
    background: #fff;
    border-color: var(--site-auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.site-auth-input--otp {
    padding-left: 6.5rem;
}

.site-auth-toggle-password,
.site-auth-send-otp {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.site-auth-toggle-password {
    text-decoration: none;
    padding: 0.25rem 0.5rem;
}

.site-auth-send-otp {
    font-size: 0.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 0.5rem;
}

.site-auth-otp-channel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.25rem;
    gap: 0.25rem;
}

.site-auth-otp-channel .btn {
    flex: 1;
    border: 0;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    background: transparent;
    color: #64748b;
}

.site-auth-otp-channel .btn.active {
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.site-auth-submit,
#amAuthSubmitBtn {
    background: var(--site-auth-primary);
    border-color: var(--site-auth-primary);
    border-radius: 0.75rem;
    min-height: 48px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.site-auth-submit:hover,
#amAuthSubmitBtn:hover {
    background: var(--site-auth-primary-hover);
    border-color: var(--site-auth-primary-hover);
}

#amAuthFooterToggle {
    color: var(--site-auth-primary);
}

.am-forgot-link {
    color: var(--site-auth-primary) !important;
}

@media (max-width: 480px) {
    .site-auth-modal-body {
        padding: 1.5rem 1.15rem 1.25rem;
    }

    .site-auth-brand {
        font-size: 1.65rem !important;
    }
}
