/* === WC Auth Modal === */
:root {
    --wc-teal: #1a7a7a;
    --wc-teal-dark: #155f5f;
    --wc-teal-light: #e8f5f5;
    --wc-border: #d0e8e8;
    --wc-text: #1a1a1a;
    --wc-text-light: #666;
    --wc-error: #d63638;
    --wc-radius: 16px;
}

.wc-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Only apply flex layout when visible */
.wc-auth-overlay[style*="display: flex"],
.wc-auth-overlay[style*="display:flex"] {
    display: flex !important;
}

@keyframes wcFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wc-auth-modal {
    background: #fff;
    border-radius: var(--wc-radius);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: wcSlideUp 0.25s ease;
    position: relative;
}

@keyframes wcSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.wc-auth-modal__header {
    background: linear-gradient(135deg, var(--wc-teal) 0%, #2a9d8f 100%);
    padding: 16px 20px;
    border-radius: var(--wc-radius) var(--wc-radius) 0 0;
    position: relative;
}

.wc-auth-modal__header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 32px; /* space for X button */
}

.wc-auth-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.wc-auth-modal__close:hover {
    background: rgba(255,255,255,0.35);
}

.wc-auth-modal__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}
.wc-auth-modal__icon svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.wc-auth-modal__header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wc-auth-modal__title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    font-family: Georgia, serif;
    line-height: 1.2;
}

.wc-auth-modal__subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    margin: 0;
}

/* Body */
.wc-auth-modal__body {
    padding: 14px 20px 18px;
}

/* Tabs */
.wc-auth-tabs {
    display: flex;
    background: #f4f4f4;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 12px;
    gap: 3px;
}

.wc-auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 7px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wc-text-light);
    cursor: pointer;
    transition: all 0.15s;
}
.wc-auth-tab.active {
    background: #fff;
    color: var(--wc-teal);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Panels */
.wc-auth-panel {
    display: none;
}
.wc-auth-panel.active {
    display: block;
}

.wc-auth-panel h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--wc-text);
    margin: 0 0 10px;
}

/* Recommended — styled like OR divider */
.wc-auth-recommended {
    text-align: center;
    margin: 0 0 8px;
    position: relative;
    color: #999;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.wc-auth-recommended::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
}
.wc-auth-recommended span {
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

/* Benefits — 2-per-row full width pills */
.wc-auth-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}
.wc-auth-benefits span {
    font-size: 15px;
    font-weight: 500;
    color: var(--wc-teal-dark);
    background: #f0fafa;
    border: 1px solid #cce8e8;
    border-radius: 20px;
    padding: 7px 10px;
    text-align: center;
    display: block;
}

/* Hide verbose panel headings — tabs already label each panel */
.wc-auth-panel h3 {
    display: none;
}
.wc-auth-field {
    margin-bottom: 8px;
}
.wc-auth-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d8d8d8;
    border-radius: 8px;
    font-size: 14px;
    color: var(--wc-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    outline: none;
}
.wc-auth-field input:focus {
    border-color: var(--wc-teal);
    box-shadow: 0 0 0 3px rgba(26,122,122,0.12);
}
.wc-auth-field input::placeholder {
    color: #aaa;
}

/* Error */
.wc-auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--wc-error);
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Buttons — both identical size */
.wc-auth-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.15s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.wc-auth-btn--primary {
    background: var(--wc-teal) !important;
    color: #fff !important;
    margin-bottom: 0 !important;
}
.wc-auth-btn--primary:hover:not(:disabled) {
    background: var(--wc-teal-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(26,122,122,0.3) !important;
}
.wc-auth-btn--primary:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.wc-auth-btn--ghost {
    background: #fff !important;
    color: var(--wc-text) !important;
    border: 1.5px solid #d0d0d0 !important;
    margin-bottom: 0 !important;
}
.wc-auth-btn--ghost:hover {
    border-color: var(--wc-teal) !important;
    color: var(--wc-teal) !important;
}

/* Sign In link */
.wc-auth-signin-prompt {
    text-align: center;
    font-size: 12px;
    color: var(--wc-text-light);
    margin: 0 0 4px;
}
.wc-auth-signin-prompt a,
.wc-auth-forgot a {
    color: var(--wc-teal);
    text-decoration: none;
    font-weight: 600;
}
.wc-auth-signin-prompt a:hover,
.wc-auth-forgot a:hover {
    text-decoration: underline;
}

.wc-auth-forgot {
    text-align: center;
    font-size: 12px;
    margin: 8px 0 0;
    color: var(--wc-text-light);
}

/* Divider */
.wc-auth-divider {
    text-align: center;
    margin: 10px 0;
    position: relative;
    color: #bbb;
    font-size: 12px;
}
.wc-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
}
.wc-auth-divider span {
    background: #fff;
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

/* Guest note */
.wc-auth-guest-note {
    text-align: center;
    font-size: 11px;
    color: #aaa;
    margin: 5px 0 0;
}

/* Success state */
.wc-auth-success {
    text-align: center;
    padding: 16px 0;
}
.wc-auth-success svg {
    width: 44px;
    height: 44px;
    color: var(--wc-teal);
    margin-bottom: 10px;
}
.wc-auth-success h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}
.wc-auth-success p {
    color: var(--wc-text-light);
    font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
    .wc-auth-modal__header {
        padding: 14px 16px;
    }
    .wc-auth-modal__body {
        padding: 14px 16px 18px;
    }
    .wc-auth-modal__title {
        font-size: 18px;
    }
}
