/**
 * Waookytchen — Auth UI Override
 * Overrides Xootix (mobile-login-woocommerce) default styles
 * and adds premium card + tab design consistent with the brand.
 */

/* ─── Reset & Container ──────────────────────────────────────────── */
.woocommerce-account .woocommerce,
.woocommerce-page .woocommerce {
    max-width: 480px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* ─── Outer Card ─────────────────────────────────────────────────── */
.waoo-auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: 'Figtree', 'Inter', sans-serif;
}

/* ─── Brand Header ───────────────────────────────────────────────── */
.waoo-auth-header {
    background: linear-gradient(135deg, #0d4f3c 0%, #1a7a5e 60%, #22a87a 100%);
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.waoo-auth-header::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.waoo-auth-header::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -20px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.waoo-auth-logo {
    font-family: 'Roboto Slab', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 0.3rem;
    position: relative;
    z-index: 1;
}

.waoo-auth-logo span {
    color: #a8e6cf;
}

.waoo-auth-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* ─── Tab Switcher ───────────────────────────────────────────────── */
.waoo-auth-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.waoo-auth-tab {
    flex: 1;
    padding: 0.85rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.waoo-auth-tab:hover {
    color: #0d4f3c;
    background: #f5faf8;
}

.waoo-auth-tab.active {
    color: #0d4f3c;
    border-bottom-color: #0d4f3c;
    background: #fff;
}

.waoo-auth-tab svg {
    display: inline-block;
    vertical-align: -3px;
    margin-right: 6px;
}

/* ─── Tab Panels ─────────────────────────────────────────────────── */
.waoo-tab-panel {
    display: none;
    padding: 1.75rem 2rem;
    animation: waooFadeIn 0.25s ease;
}

.waoo-tab-panel.active {
    display: block;
}

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

/* ─── Section Labels ─────────────────────────────────────────────── */
.waoo-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #aaa;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ─── Divider ────────────────────────────────────────────────────── */
.waoo-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #ccc;
    font-size: 0.8rem;
}
.waoo-divider::before,
.waoo-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

/* ─── Google Button ──────────────────────────────────────────────── */
.waoo-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Figtree', sans-serif;
}

.waoo-google-btn:hover {
    border-color: #4285f4;
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66,133,244,0.15);
    color: #333;
    text-decoration: none;
}

.waoo-google-btn svg {
    flex-shrink: 0;
}

/* ─── Trust Note ─────────────────────────────────────────────────── */
.waoo-trust-note {
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.waoo-trust-note a {
    color: #0d4f3c;
    text-decoration: underline;
}

/* ─── Override Xootix Default Styles ────────────────────────────── */
/* Hide Xootix's own card/panel wrapper so ours takes over */
.xoo-ml-form-container {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Inputs */
.xoo-ml-form-container input[type="text"],
.xoo-ml-form-container input[type="email"],
.xoo-ml-form-container input[type="password"],
.xoo-ml-form-container input[type="tel"],
.xoo-ml-phone-input,
.xoo-ml-otp-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1.5px solid #e8e8e8 !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-family: 'Figtree', sans-serif !important;
    color: #1a1a1a !important;
    background: #fafafa !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
}

.xoo-ml-form-container input:focus,
.xoo-ml-phone-input:focus,
.xoo-ml-otp-input:focus {
    border-color: #0d4f3c !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(13,79,60,0.08) !important;
}

/* Phone row with flag */
.xoo-ml-ph-row {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: stretch !important;
}

.xoo-ml-flags-select {
    min-width: 90px !important;
    border: 1.5px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.5rem !important;
    font-size: 0.9rem !important;
    background: #fafafa !important;
    cursor: pointer !important;
}

/* Labels */
.xoo-ml-form-container label {
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #555 !important;
    margin-bottom: 0.4rem !important;
    letter-spacing: 0.01em !important;
}

/* Field groups */
.xoo-ml-form-container .form-row,
.xoo-ml-form-container .xoo-ml-field-wrap {
    margin-bottom: 1rem !important;
}

/* Primary submit buttons */
.xoo-ml-form-container button[type="submit"],
.xoo-ml-form-container .xoo-ml-send-otp-btn,
.xoo-ml-form-container .xoo-ml-verify-btn,
button.xoo-ml-login-btn,
button.xoo-ml-register-btn {
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    background: linear-gradient(135deg, #0d4f3c, #1a7a5e) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    font-family: 'Figtree', sans-serif !important;
    cursor: pointer !important;
    letter-spacing: 0.02em !important;
    transition: all 0.2s ease !important;
    margin-top: 0.5rem !important;
}

.xoo-ml-form-container button[type="submit"]:hover,
.xoo-ml-form-container .xoo-ml-send-otp-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(13,79,60,0.3) !important;
}

/* ─── Hide ONLY the Xootix switcher buttons we don't want ──────────── */
/* DO NOT add [class*="switch"] or broad selectors — they break the     */
/* OTP verify section that Xootix shows after phone submit.             */

/* The top tab-style button group (Login with OTP / Login with Email) */
.xoo-ml-form-container .xoo-ml-ub-btns-wrap {
    display: none !important;
}

/* "Login with Email & Password" switch link at the bottom of the form */
.xoo-ml-form-container .xoo-ml-login-email-toggle,
.xoo-ml-form-container .xoo-ml-switch-to-email,
.xoo-ml-form-container a.xoo-ml-switch-form,
.xoo-ml-form-container button.xoo-ml-switch-btn {
    display: none !important;
}


.xoo-ml-otp-inputs-wrap {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    margin: 1rem 0 !important;
}

.xoo-ml-otp-inputs-wrap input {
    width: 44px !important;
    height: 52px !important;
    text-align: center !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

/* Error/Success messages */
.xoo-ml-error {
    background: #fff5f5 !important;
    border: 1px solid #fca5a5 !important;
    color: #b91c1c !important;
    border-radius: 8px !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.85rem !important;
    margin-top: 0.75rem !important;
}

.xoo-ml-success {
    background: #f0fdf4 !important;
    border: 1px solid #86efac !important;
    color: #166534 !important;
    border-radius: 8px !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.85rem !important;
    margin-top: 0.75rem !important;
}

/* ─── Hide Xootix Tab Nav (we use ours) ──────────────────────────── */
.xoo-ml-tabs {
    display: none !important;
}

/* ─── Hide the WooCommerce default form-login columns ────────────── */
.woocommerce-account .col2-set,
.woocommerce-page .col2-set {
    display: block !important;
}
.woocommerce-account .col2-set .col-1,
.woocommerce-account .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
}

/* Hide default WooCommerce H2 headings in the login page */
.waoo-auth-card ~ h2,
.woocommerce-account h2.woocommerce-column__title {
    display: none;
}

/* ─── Panel hint text ────────────────────────────────────────────── */
.waoo-panel-hint {
    font-size: 0.82rem;
    color: #888;
    text-align: center;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* ─── OTP form: let Xootix's styles show, just clean up wrapper ──── */
.waoo-otp-form {
    margin: 0;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .woocommerce-account .woocommerce,
    .woocommerce-page .woocommerce {
        margin: 1rem auto;
    }

    .waoo-tab-panel {
        padding: 1.5rem 1.25rem;
    }

    .waoo-auth-header {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}
