/* ==========================================================================
   WooCommerce Fast2SMS OTP — Premium Modern Design
   Glassmorphism, Inter font, polished micro-animations
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --f2s-primary: #25D366;
    --f2s-primary-dark: #128C7E;
    --f2s-primary-light: rgba(37, 211, 102, 0.07);
    --f2s-primary-glow: rgba(37, 211, 102, 0.2);
    --f2s-secondary: #6366f1;
    --f2s-secondary-dark: #4f46e5;
    --f2s-bg: #ffffff;
    --f2s-bg-subtle: #f7f8fc;
    --f2s-bg-glass: rgba(255,255,255,0.7);
    --f2s-border: #e5e7eb;
    --f2s-border-hover: #d1d5db;
    --f2s-text: #111827;
    --f2s-text-secondary: #374151;
    --f2s-text-muted: #6b7280;
    --f2s-text-light: #9ca3af;
    --f2s-danger: #ef4444;
    --f2s-danger-bg: #fef2f2;
    --f2s-success: #059669;
    --f2s-success-bg: #ecfdf5;
    --f2s-warning: #d97706;
    --f2s-warning-bg: #fffbeb;
    --f2s-radius: 16px;
    --f2s-radius-sm: 10px;
    --f2s-radius-xs: 6px;
    --f2s-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --f2s-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --f2s-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --f2s-shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --f2s-shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
    --f2s-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --f2s-transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --f2s-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ───── Auth Wrapper — full page card ───── */
.woo-f2s-auth-wrapper {
    font-family: var(--f2s-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.woo-f2s-auth-wrapper .u-columns,
.woo-f2s-auth-wrapper .u-column1,
.woo-f2s-auth-wrapper .u-column2 {
    max-width: 100% !important;
    flex: 1 !important;
}

/* Style the WooCommerce form containers as premium cards */
.woo-f2s-auth-wrapper .woocommerce-form-login,
.woo-f2s-auth-wrapper .woocommerce-form-register {
    background: var(--f2s-bg);
    border: 1px solid var(--f2s-border);
    border-radius: var(--f2s-radius);
    padding: 32px !important;
    box-shadow: var(--f2s-shadow-lg);
    position: relative;
    overflow: visible;
}

/* Subtle gradient border top */
.woo-f2s-auth-wrapper .woocommerce-form-login::before,
.woo-f2s-auth-wrapper .woocommerce-form-register::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--f2s-radius) var(--f2s-radius) 0 0;
    background: linear-gradient(90deg, var(--f2s-primary), var(--f2s-secondary));
}

/* ───── LOGIN HEADING ───── */
.woo-f2s-auth-wrapper h2 {
    font-family: var(--f2s-font) !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--f2s-text) !important;
    margin-bottom: 24px !important;
    letter-spacing: -0.02em;
}

/* ───── Tab Navigation ───── */
.woo-f2s-login-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    background: var(--f2s-bg-subtle);
    border-radius: var(--f2s-radius-sm);
    padding: 5px;
    border: 1px solid var(--f2s-border);
}

.woo-f2s-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border: none;
    background: transparent;
    color: var(--f2s-text-muted);
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--f2s-font);
    cursor: pointer;
    border-radius: var(--f2s-radius-xs);
    transition: var(--f2s-transition);
    white-space: nowrap;
    line-height: 1;
    position: relative;
    letter-spacing: -0.01em;
}

.woo-f2s-tab:hover {
    color: var(--f2s-text-secondary);
    background: rgba(255,255,255,0.5);
}

.woo-f2s-tab.active {
    background: var(--f2s-bg);
    color: var(--f2s-text);
    box-shadow: var(--f2s-shadow-md);
}

.woo-f2s-tab svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.woo-f2s-tab.active svg {
    opacity: 1;
}

/* ───── Tab Panels ───── */
.woo-f2s-tab-panel {
    animation: f2sFadeSlide 0.35s ease;
}

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

/* ───── WhatsApp Badge ───── */
.woo-f2s-form-header {
    margin-bottom: 24px;
}

.woo-f2s-whatsapp-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(37,211,102,0.08), rgba(37,211,102,0.03));
    border: 1px solid rgba(37,211,102,0.12);
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--f2s-primary-dark);
    letter-spacing: 0.01em;
}

.woo-f2s-whatsapp-badge svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ───── Input Group ───── */
.woo-f2s-input-group {
    margin-bottom: 20px;
}

.woo-f2s-input-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--f2s-text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.woo-f2s-input-group label .required {
    color: var(--f2s-danger);
    font-weight: 400;
}

/* ───── Phone Input ───── */
.woo-f2s-phone-input {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--f2s-border);
    border-radius: var(--f2s-radius-sm);
    overflow: hidden;
    transition: var(--f2s-transition);
    background: var(--f2s-bg);
}

.woo-f2s-phone-input:hover {
    border-color: var(--f2s-border-hover);
}

.woo-f2s-phone-input:focus-within {
    border-color: var(--f2s-primary);
    box-shadow: 0 0 0 3px var(--f2s-primary-glow);
}

.woo-f2s-country-code {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--f2s-bg-subtle);
    border-right: 1.5px solid var(--f2s-border);
    font-weight: 700;
    font-size: 14px;
    color: var(--f2s-text);
    user-select: none;
    letter-spacing: 0.02em;
}

.woo-f2s-phone-input input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    font-family: var(--f2s-font) !important;
    background: transparent !important;
    color: var(--f2s-text) !important;
    letter-spacing: 0.03em;
    margin: 0 !important;
    font-weight: 500;
}

.woo-f2s-phone-input input::placeholder {
    color: var(--f2s-text-light);
    font-weight: 400;
    letter-spacing: 0;
}

/* ───── OTP Digit Boxes ───── */
.woo-f2s-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

.woo-f2s-otp-inputs input {
    width: 50px !important;
    height: 58px !important;
    border: 1.5px solid var(--f2s-border) !important;
    border-radius: var(--f2s-radius-sm) !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    font-family: var(--f2s-font) !important;
    color: var(--f2s-text) !important;
    background: var(--f2s-bg) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: var(--f2s-transition) !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
    caret-color: var(--f2s-primary);
}

.woo-f2s-otp-inputs input::-webkit-outer-spin-button,
.woo-f2s-otp-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woo-f2s-otp-inputs input:hover {
    border-color: var(--f2s-border-hover) !important;
}

.woo-f2s-otp-inputs input:focus {
    border-color: var(--f2s-primary) !important;
    box-shadow: 0 0 0 3px var(--f2s-primary-glow) !important;
    background: var(--f2s-bg) !important;
}

.woo-f2s-otp-inputs input.filled {
    border-color: var(--f2s-primary) !important;
    background: linear-gradient(135deg, rgba(37,211,102,0.04), rgba(37,211,102,0.08)) !important;
    color: var(--f2s-primary-dark) !important;
}

/* ───── Buttons ───── */
.woo-f2s-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 24px;
    border: none;
    border-radius: var(--f2s-radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    font-family: var(--f2s-font);
    cursor: pointer;
    transition: var(--f2s-transition);
    overflow: hidden;
    letter-spacing: 0.01em;
    position: relative;
}

.woo-f2s-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.woo-f2s-btn-primary {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37,211,102,0.3), 0 1px 2px rgba(0,0,0,0.06);
}

.woo-f2s-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37,211,102,0.35), 0 2px 4px rgba(0,0,0,0.06);
}

.woo-f2s-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37,211,102,0.25);
}

.woo-f2s-btn-secondary {
    background: linear-gradient(135deg, var(--f2s-secondary), var(--f2s-secondary-dark));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3), 0 1px 2px rgba(0,0,0,0.06);
}

.woo-f2s-btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

/* ───── Spinner ───── */
.woo-f2s-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: f2sSpin 0.65s linear infinite;
}

@keyframes f2sSpin {
    to { transform: rotate(360deg); }
}

.woo-f2s-btn-loader {
    margin-left: 10px;
}

/* ───── Links ───── */
.woo-f2s-link {
    background: none;
    border: none;
    color: var(--f2s-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-family: var(--f2s-font);
    transition: var(--f2s-transition);
}

.woo-f2s-link:hover {
    color: var(--f2s-secondary-dark);
    text-decoration: underline;
}

/* ───── OTP Sent Info Bar ───── */
.woo-f2s-otp-sent-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37,211,102,0.06), rgba(37,211,102,0.02));
    border: 1px solid rgba(37,211,102,0.1);
    border-radius: var(--f2s-radius-sm);
    margin-bottom: 20px;
}

.woo-f2s-otp-sent-info p {
    margin: 0;
    font-size: 13px;
    color: var(--f2s-text-secondary);
    font-weight: 500;
}

.woo-f2s-otp-sent-info strong {
    color: var(--f2s-primary-dark);
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ───── Resend Row ───── */
.woo-f2s-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 28px;
}

.woo-f2s-timer {
    font-size: 13px;
    color: var(--f2s-text-light);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ───── Status Messages ───── */
.woo-f2s-message {
    padding: 13px 16px;
    border-radius: var(--f2s-radius-xs);
    font-size: 13px;
    font-weight: 500;
    margin-top: 20px;
    animation: f2sFadeSlide 0.3s ease;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.woo-f2s-message.success {
    background: var(--f2s-success-bg);
    color: var(--f2s-success);
    border: 1px solid rgba(5,150,105,0.15);
}

.woo-f2s-message.error {
    background: var(--f2s-danger-bg);
    color: var(--f2s-danger);
    border: 1px solid rgba(239,68,68,0.15);
}

.woo-f2s-message.warning {
    background: var(--f2s-warning-bg);
    color: var(--f2s-warning);
    border: 1px solid rgba(217,119,6,0.15);
}

/* ───── Verified Badge ───── */
.woo-f2s-verified-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(5,150,105,0.06), rgba(5,150,105,0.02));
    border: 1px solid rgba(5,150,105,0.15);
    border-radius: var(--f2s-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--f2s-success);
}

.woo-f2s-verified-badge span:first-of-type {
    color: var(--f2s-text);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.woo-f2s-verified-text {
    margin-left: auto;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 3px 10px;
    background: rgba(5,150,105,0.1);
    border-radius: 100px;
}

/* ───── Divider ───── */
.woo-f2s-divider {
    display: flex;
    align-items: center;
    margin: 28px 0 24px;
    gap: 16px;
}

.woo-f2s-divider::before,
.woo-f2s-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--f2s-border), transparent);
}

.woo-f2s-divider span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--f2s-text-light);
    white-space: nowrap;
}

/* ───── Register OTP Section ───── */
.woo-f2s-register-otp-section {
    background: linear-gradient(135deg, var(--f2s-bg-subtle), rgba(255,255,255,0.8));
    border: 1px solid var(--f2s-border);
    border-radius: var(--f2s-radius);
    padding: 28px;
    margin-bottom: 8px;
    position: relative;
}

.woo-f2s-register-otp-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--f2s-secondary), var(--f2s-primary));
    border-radius: var(--f2s-radius) var(--f2s-radius) 0 0;
}

/* ───── Step animations ───── */
.woo-f2s-step {
    animation: f2sFadeSlide 0.35s ease;
}

/* ───── Style WooCommerce default fields ───── */
.woo-f2s-auth-wrapper .woocommerce-form-row label,
.woo-f2s-auth-wrapper .form-row label {
    font-family: var(--f2s-font) !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: var(--f2s-text-secondary) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    margin-bottom: 7px !important;
}

.woo-f2s-auth-wrapper .woocommerce-form-row input[type="text"],
.woo-f2s-auth-wrapper .woocommerce-form-row input[type="email"],
.woo-f2s-auth-wrapper .woocommerce-form-row input[type="password"],
.woo-f2s-auth-wrapper .form-row input[type="text"],
.woo-f2s-auth-wrapper .form-row input[type="email"],
.woo-f2s-auth-wrapper .form-row input[type="password"] {
    font-family: var(--f2s-font) !important;
    border: 1.5px solid var(--f2s-border) !important;
    border-radius: var(--f2s-radius-sm) !important;
    padding: 13px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--f2s-text) !important;
    background: var(--f2s-bg) !important;
    transition: var(--f2s-transition) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.woo-f2s-auth-wrapper .woocommerce-form-row input:hover,
.woo-f2s-auth-wrapper .form-row input:hover {
    border-color: var(--f2s-border-hover) !important;
}

.woo-f2s-auth-wrapper .woocommerce-form-row input:focus,
.woo-f2s-auth-wrapper .form-row input:focus {
    border-color: var(--f2s-secondary) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12) !important;
}

/* WooCommerce buttons */
.woo-f2s-auth-wrapper button[type="submit"],
.woo-f2s-auth-wrapper .woocommerce-button,
.woo-f2s-auth-wrapper .button {
    font-family: var(--f2s-font) !important;
    background: linear-gradient(135deg, var(--f2s-secondary), var(--f2s-secondary-dark)) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--f2s-radius-sm) !important;
    padding: 14px 24px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: var(--f2s-transition) !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3) !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
}

.woo-f2s-auth-wrapper button[type="submit"]:hover,
.woo-f2s-auth-wrapper .woocommerce-button:hover,
.woo-f2s-auth-wrapper .button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(99,102,241,0.35) !important;
}

/* Lost password link */
.woo-f2s-auth-wrapper .woocommerce-LostPassword {
    margin-top: 16px !important;
    text-align: center !important;
}

.woo-f2s-auth-wrapper .woocommerce-LostPassword a {
    font-family: var(--f2s-font) !important;
    color: var(--f2s-secondary) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: var(--f2s-transition) !important;
}

.woo-f2s-auth-wrapper .woocommerce-LostPassword a:hover {
    color: var(--f2s-secondary-dark) !important;
    text-decoration: underline !important;
}

/* Remember me checkbox */
.woo-f2s-auth-wrapper .woocommerce-form__label-for-checkbox {
    font-family: var(--f2s-font) !important;
    font-size: 13px !important;
    color: var(--f2s-text-muted) !important;
    font-weight: 500 !important;
}

/* ───── Responsive ───── */
@media (max-width: 600px) {
    .woo-f2s-auth-wrapper .woocommerce-form-login,
    .woo-f2s-auth-wrapper .woocommerce-form-register {
        padding: 24px !important;
        border-radius: var(--f2s-radius-sm);
    }

    .woo-f2s-login-tabs {
        flex-direction: row;
    }

    .woo-f2s-otp-inputs {
        gap: 7px;
    }

    .woo-f2s-otp-inputs input {
        width: 42px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    .woo-f2s-tab {
        padding: 11px 14px;
        font-size: 13px;
    }

    .woo-f2s-register-otp-section {
        padding: 20px;
    }
}

@media (max-width: 380px) {
    .woo-f2s-otp-inputs input {
        width: 36px !important;
        height: 44px !important;
        font-size: 18px !important;
        border-radius: var(--f2s-radius-xs) !important;
    }
    .woo-f2s-otp-inputs { gap: 5px; }
}

/* ───── Animations ───── */
@keyframes f2sShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.woo-f2s-shake {
    animation: f2sShake 0.45s ease;
}

@keyframes f2sPulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.3); }
    70% { box-shadow: 0 0 0 12px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.woo-f2s-btn-primary.pulse {
    animation: f2sPulse 2s infinite;
}

/* ───── Hide WooCommerce notices styling conflicts ───── */
.woo-f2s-auth-wrapper .woocommerce-notices-wrapper:empty {
    display: none;
}
