/* ============================================
   Modern Login/Register UI - PhDevApps OTP
   ============================================ */

/* ----- Reset & Container ----- */
.wcfb-login-wrapper {
    max-width: 480px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 2rem 1.8rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ----- Tabs ----- */
.wcfb-tabs {
    display: flex;
    gap: 4px;
    background: #f5f7fa;
    border-radius: 40px;
    padding: 4px;
    margin-bottom: 2rem;
    border: 1px solid #eef2f6;
}

.wcfb-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5b6778;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    background: #ffffff !important;
    color: #252525 !important;
    min-width: fit-content;
}

.wcfb-tab-btn:hover {
    color: #fff !important;
    background: #1d2327 !important;
}

.wcfb-tab-btn.active {
    background: var(--e-global-color-primary) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.12);
}

/* ----- Tab Content ----- */
.wcfb-tab-content {
    display: none;
    animation: fadeSlideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wcfb-tab-content.active {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Typography ----- */
.wcfb-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d2327;
    text-align: center;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.3px;
}

.wcfb-login-title small {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: #6c7a8a;
    margin-top: 4px;
}

/* ----- Form Elements ----- */
.wcfb-input-group {
    margin-bottom: 1.2rem;
}

.wcfb-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    transition: all 0.2s ease;
    color: #1d2327;
    box-sizing: border-box;
}

.wcfb-input::placeholder {
    color: #94a3b8;
}

.wcfb-input:focus {
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 124, 186, 0.08);
    outline: none;
}

.wcfb-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ----- Buttons ----- */
.wcfb-button {
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.2px;
    width: 100%;
    box-sizing: border-box;
}

.wcfb-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wcfb-primary {
    background: linear-gradient(145deg, #007cba, #0062a0);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.25);
}

.wcfb-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.wcfb-primary:active:not(:disabled) {
    transform: translateY(0);
}

.wcfb-success {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: #fff;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

.wcfb-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.wcfb-link {
    background: transparent;
    color: #007cba;
    text-decoration: underline;
    padding: 10px 12px;
    width: auto;
    font-weight: 500;
}

.wcfb-link:hover {
    color: #005a87;
    text-decoration: none;
}

/* ----- OTP Verification Section ----- */
.wcfb-otp-verification {
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: 2px dashed #e9edf2;
}

.wcfb-otp-verification .wcfb-input-group:last-child {
    margin-bottom: 0;
}

#wcfb-resend-otp {
    display: none;
    margin: 0.5rem auto 0;
}

/* ----- Status Messages ----- */
.wcfb-status-message {
    margin-top: 1.2rem;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    animation: fadeSlideUp 0.3s ease;
}

.wcfb-status-message.wcfb-success {
    background: #e6f7e6;
    color: #0a5e2a;
    border-left: 4px solid #28a745;
}

.wcfb-status-message.wcfb-error {
    background: #fee9e7;
    color: #a8221a;
    border-left: 4px solid #dc3545;
}

.wcfb-status-message.wcfb-info {
    background: #e2f0fb;
    color: #005c8a;
    border-left: 4px solid #007cba;
}

/* ----- Email Login Extra Links ----- */
.wcfb-email-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wcfb-email-extra a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.wcfb-email-extra a:hover {
    text-decoration: underline;
}

.wcfb-register-link {
    color: #4a5b6e;
}

.wcfb-lost-password {
    font-size: 0.9rem;
}

/* ----- Register Note (OTP tab) ----- */
.wcfb-register-note {
    margin-top: 1.8rem;
    padding: 14px 18px;
    background: #f0f7fe;
    border-radius: 10px;
    color: #005c8a;
    font-size: 0.95rem;
    text-align: center;
    border: 1px solid #d8e8fa;
}

/* ----- Loading Overlay ----- */
.wcfb-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.wcfb-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ----- Responsive ----- */
@media (max-width: 550px) {
    .wcfb-login-wrapper {
        padding: 1.5rem 1.2rem;
        margin: 1rem 0.5rem;
        border-radius: 12px;
    }

    .wcfb-login-title {
        font-size: 1.2rem;
    }

    .wcfb-input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .wcfb-button {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .wcfb-tab-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .wcfb-email-extra {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
    }
}

/* ----- WooCommerce Compatibility ----- */
.woocommerce-account-login-container {
    max-width: 100%;
}