/**
 * Speedy Login Modern Frontend UI
 */
:root {
    --spdlep-primary-color: #111827; /* Dynamically overridden by Customizer */
    --spdlep-form-border-radius: 16px; /* Dynamically overridden by Customizer */
    --spdlep-button-border-radius: 8px; /* Dynamically overridden by Customizer */
    --spdlep-border-radius: 8px;    /* Dynamically overridden by Customizer */
}

body .spdlep-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.spdlep-woo-account-override .spdlep-auth-container {
    padding: 15px 0;
}

.spdlep-woo-account-override .spdlep-auth-card {
    max-width: 100%;
}

.spdlep-auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    border-radius: var(--spdlep-form-border-radius, 16px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.03);
    padding: 32px;
    border: 1px solid #eaeaea;
}

.spdlep-frontend-help {
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: #0f766e;
    padding: 12px 16px;
    border-radius: var(--spdlep-form-border-radius, 8px);
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
}

.spdlep-frontend-help p {
    margin: 0 0 10px 0;
}

.spdlep-frontend-help p:last-child {
    margin-bottom: 0;
}

.spdlep-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.spdlep-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

/* Ensure rich formatting aligns well */
.spdlep-auth-title p,
.spdlep-auth-title h1,
.spdlep-auth-title h2,
.spdlep-auth-title h3 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.spdlep-auth-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.spdlep-auth-subtitle p {
    margin: 0;
    color: inherit;
}

/* =========================================================================
 * [FEATURE: STEP PROGRESS INDICATOR / DOTS]
 * ========================================================================= */
.spdlep-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
}

.spdlep-step-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: #e5e7eb;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.spdlep-step-dot.active {
    width: 22px;
    background: var(--spdlep-primary-color, #111827);
}

/* =========================================================================
 * [FEATURE: STEPS VIEWPORT & FLUID HEIGHT TRANSITION]
 * ========================================================================= */
.spdlep-steps-viewport {
    position: relative;
    /* overflow: hidden; */
    transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.spdlep-step {
    display: none;
    width: 100%;
}

.spdlep-step.active {
    display: block;
    animation: spdlepSlideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.spdlep-step.active.slide-back {
    animation: spdlepSlideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spdlepSlideInRight {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spdlepSlideInLeft {
    from { opacity: 0; transform: translateX(-18px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Input Wrappers & Form Labels */
.spdlep-input-wrapper {
    position: relative;
    margin-bottom: 20px;
    text-align: start;
}

.spdlep-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    text-align: start;
}

body .spdlep-auth-container .spdlep-text-input {
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================================
 * [FEATURE: LIVE FIELD VALIDITY INDICATOR & RELATIVE INPUT]
 * ========================================================================= */
.spdlep-input-relative {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

body .spdlep-auth-container .spdlep-input-relative input.spdlep-text-input,
.spdlep-input-relative input {
    padding-right: 44px !important;
}

.spdlep-valid-badge {
    position: absolute;
    right: 14px !important;
    left: auto !important;
    top: 50%;
    transform: translateY(-50%) scale(0.4);
    opacity: 0;
    pointer-events: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.spdlep-valid-badge.is-valid {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.rtl .spdlep-valid-badge,
[dir="rtl"] .spdlep-valid-badge {
    right: 14px !important;
    left: auto !important;
}

/* =========================================================================
 * [FEATURE: SEGMENTED PIN-BOX OTP INPUT & SHAKE ANIMATION]
 * ========================================================================= */
.spdlep-pin-wrapper {
    position: relative;
    width: 100%;
}

.spdlep-pin-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    direction: ltr !important;
    margin: 6px 0 12px;
    width: 100%;
}

body .spdlep-auth-container .spdlep-pin-container .spdlep-pin-box,
body .spdlep-auth-container input.spdlep-pin-box,
.spdlep-pin-container .spdlep-pin-box {
    display: inline-block !important;
    flex: 1 1 0% !important;
    width: 46px !important;
    max-width: 48px !important;
    min-width: 36px !important;
    height: 52px !important;
    min-height: 52px !important;
    line-height: 50px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    text-align: center !important;
    color: #111827 !important;
    background-color: #ffffff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: var(--spdlep-button-border-radius, 8px) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    outline: none !important;
    direction: ltr !important;
    letter-spacing: normal !important;
    text-indent: 0 !important;
    caret-color: var(--spdlep-primary-color, #111827) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    vertical-align: middle !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    transition: border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.18s ease !important;
}

body .spdlep-auth-container .spdlep-pin-box::-webkit-outer-spin-button,
body .spdlep-auth-container .spdlep-pin-box::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

body .spdlep-auth-container .spdlep-pin-box:hover:not(:disabled) {
    border-color: #9ca3af !important;
}

body .spdlep-auth-container .spdlep-pin-box:focus,
body .spdlep-auth-container .spdlep-pin-box.has-focus,
.spdlep-pin-container .spdlep-pin-box:focus {
    border-color: var(--spdlep-primary-color, #111827) !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12) !important;
    background-color: #ffffff !important;
    color: #111827 !important;
    transform: translateY(-1px) !important;
}

body .spdlep-auth-container .spdlep-pin-box.is-filled,
.spdlep-pin-container .spdlep-pin-box.is-filled {
    border-color: #374151 !important;
    background-color: #f9fafb !important;
    color: #111827 !important;
}

body .spdlep-auth-container .spdlep-pin-box.is-error,
.spdlep-pin-container .spdlep-pin-box.is-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* Shake Animation for Invalid OTP or Form Error */
.spdlep-shake {
    animation: spdlepShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes spdlepShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.spdlep-hidden-otp {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* =========================================================================
 * [FEATURE: PASSWORD STRENGTH METER & LIVE REQUIREMENT HINTS]
 * ========================================================================= */
.spdlep-password-strength-wrap {
    margin-top: 8px;
    width: 100%;
}

.spdlep-password-strength-bars {
    display: flex;
    gap: 4px;
    height: 4px;
    width: 100%;
    border-radius: 2px;
    overflow: hidden;
    background: #e5e7eb;
    margin-bottom: 6px;
}

.spdlep-pwd-bar {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: transparent;
    transition: background 0.25s ease;
}

.spdlep-pwd-bar.active-weak {
    background: #ef4444;
}

.spdlep-pwd-bar.active-fair {
    background: #f59e0b;
}

.spdlep-pwd-bar.active-strong {
    background: #10b981;
}

.spdlep-password-strength-status {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-align: start;
    min-height: 16px;
    transition: color 0.2s ease;
}

.spdlep-password-strength-status.status-weak {
    color: #ef4444;
}

.spdlep-password-strength-status.status-fair {
    color: #f59e0b;
}

.spdlep-password-strength-status.status-strong {
    color: #10b981;
}

/* =========================================================================
 * [FEATURE: INLINE FIELD SLIDE-DOWN ERROR LABELS]
 * ========================================================================= */
.spdlep-inline-error {
    font-size: 12.5px;
    color: #ef4444;
    font-weight: 500;
    margin-top: 0;
    text-align: start;
    /* max-height: 0; */
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: max-height 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, transform 0.2s ease, margin-top 0.2s ease;
}

.spdlep-inline-error.visible {
    /* max-height: 40px; */
    opacity: 1;
    transform: translateY(0);
    margin-top: 5px;
}

.spdlep-input-error .spdlep-text-input {
    border-color: #ef4444 !important;
    background-color: #fffafb !important;
}

.spdlep-input-error .spdlep-text-input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Enforce LTR on all Email, Mobile, Password, and Code/OTP fields */
body .spdlep-auth-container input[type="email"],
body .spdlep-auth-container input[type="tel"],
body .spdlep-auth-container input[type="password"],
body .spdlep-auth-container input[name="spdlep_identifier"],
body .spdlep-auth-container input[name="spdlep_new_email"],
body .spdlep-auth-container input[name="spdlep_new_mobile"],
body .spdlep-auth-container input[name="spdlep_password"],
body .spdlep-auth-container input[name="spdlep_new_password"],
body .spdlep-auth-container .spdlep-otp-input,
body .spdlep-auth-container .spdlep-password-input,
body .spdlep-auth-container .spdlep-ltr-input,
.rtl body .spdlep-auth-container input[type="email"],
.rtl body .spdlep-auth-container input[type="tel"],
.rtl body .spdlep-auth-container input[type="password"],
.rtl body .spdlep-auth-container input[name="spdlep_identifier"],
.rtl body .spdlep-auth-container input[name="spdlep_new_email"],
.rtl body .spdlep-auth-container input[name="spdlep_new_mobile"],
.rtl body .spdlep-auth-container input[name="spdlep_password"],
.rtl body .spdlep-auth-container input[name="spdlep_new_password"],
.rtl body .spdlep-auth-container .spdlep-otp-input,
.rtl body .spdlep-auth-container .spdlep-password-input,
.rtl body .spdlep-auth-container .spdlep-ltr-input,
[dir="rtl"] body .spdlep-auth-container input[type="email"],
[dir="rtl"] body .spdlep-auth-container input[type="tel"],
[dir="rtl"] body .spdlep-auth-container input[type="password"],
[dir="rtl"] body .spdlep-auth-container input[name="spdlep_identifier"],
[dir="rtl"] body .spdlep-auth-container input[name="spdlep_new_email"],
[dir="rtl"] body .spdlep-auth-container input[name="spdlep_new_mobile"],
[dir="rtl"] body .spdlep-auth-container input[name="spdlep_password"],
[dir="rtl"] body .spdlep-auth-container input[name="spdlep_new_password"],
[dir="rtl"] body .spdlep-auth-container .spdlep-otp-input,
[dir="rtl"] body .spdlep-auth-container .spdlep-password-input,
[dir="rtl"] body .spdlep-auth-container .spdlep-ltr-input {
    direction: ltr !important;
    text-align: left;
    unicode-bidi: embed;
}

body .spdlep-auth-container .spdlep-otp-input,
.rtl body .spdlep-auth-container .spdlep-otp-input,
[dir="rtl"] body .spdlep-auth-container .spdlep-otp-input {
    direction: ltr !important;
    letter-spacing: 4px;
    font-weight: 600;
    text-align: center !important;
}

/* Password Input & Visibility Toggle */
.spdlep-password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    direction: ltr !important;
}

body .spdlep-auth-container .spdlep-password-input-wrap .spdlep-text-input,
.rtl body .spdlep-auth-container .spdlep-password-input-wrap .spdlep-text-input,
[dir="rtl"] body .spdlep-auth-container .spdlep-password-input-wrap .spdlep-text-input {
    padding-right: 42px !important;
    padding-left: 14px !important;
    direction: ltr !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

body .spdlep-auth-container .spdlep-toggle-password,
.rtl body .spdlep-auth-container .spdlep-toggle-password,
[dir="rtl"] body .spdlep-auth-container .spdlep-toggle-password {
    position: absolute;
    right: 8px !important;
    left: auto !important;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    padding: 6px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #9ca3af !important;
    box-shadow: none !important;
    border-radius: 4px;
    transition: color 0.15s ease;
    z-index: 2;
}

body .spdlep-auth-container .spdlep-toggle-password:hover,
body .spdlep-auth-container .spdlep-toggle-password:focus {
    color: #374151 !important;
}

.spdlep-toggle-password svg {
    display: block;
    overflow: visible !important;
}

/* =========================================================================
 * [FEATURE: PASSWORD VISIBILITY TOGGLE (CLOSED BY DEFAULT, OPEN ON CLICK)]
 * ========================================================================= */
body .spdlep-auth-container .spdlep-toggle-password .spdlep-eye-icon,
.spdlep-toggle-password .spdlep-eye-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
    color: #9ca3af;
}

body .spdlep-auth-container .spdlep-toggle-password .spdlep-eye-icon.spdlep-hidden,
.spdlep-toggle-password .spdlep-eye-icon.spdlep-hidden {
    display: none !important;
}

body .spdlep-auth-container .spdlep-toggle-password:hover .spdlep-eye-icon,
body .spdlep-auth-container .spdlep-toggle-password:focus .spdlep-eye-icon {
    color: var(--spdlep-primary-color, #111827);
}

.spdlep-toggle-password .spdlep-eye-icon:not(.spdlep-hidden) {
    animation: spdlepEyeScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spdlepEyeScaleIn {
    from {
        transform: scale(0.8);
        opacity: 0.4;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Back to Password Link */
.spdlep-back-to-pwd {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.spdlep-back-to-pwd a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--spdlep-button-border-radius, 8px);
    transition: all 0.2s ease;
    display: inline-block;
}

.spdlep-back-to-pwd a:hover {
    color: var(--spdlep-primary-color, #111827);
    background-color: rgba(0, 0, 0, 0.04);
}

/* User Badge for Step 2 */
.spdlep-user-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: var(--spdlep-form-border-radius, 8px);
    margin-bottom: 20px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* =========================================================================
 * Button Design System
 * ========================================================================= */

/* Base Button */
body .spdlep-auth-container .spdlep-btn {
    width: 100% !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--spdlep-button-border-radius, 8px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1.4;
    outline: none;
    border: 1px solid transparent;
}

/* =========================================================================
 * [FEATURE: BUTTON MICRO-INTERACTIONS & SUCCESS CHECKMARK ANIMATION]
 * ========================================================================= */

/* Base Button */
body .spdlep-auth-container .spdlep-btn {
    width: 100% !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--spdlep-button-border-radius, 8px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1.4;
    outline: none;
    border: 1px solid transparent;
    user-select: none;
}

body .spdlep-auth-container .spdlep-btn:active:not(:disabled):not(.is-loading):not(.is-success) {
    transform: scale(0.98) !important;
}

/* 1. Primary Button (High Priority Actions) */
body .spdlep-auth-container .spdlep-btn-primary {
    background-color: var(--spdlep-primary-color, #111827) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

body .spdlep-auth-container .spdlep-btn-primary:hover:not(:disabled):not(.is-loading):not(.is-success) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body .spdlep-auth-container .spdlep-btn-primary:active:not(:disabled):not(.is-loading):not(.is-success) {
    transform: scale(0.98) !important;
    opacity: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Button Success State (Morph to Emerald with Animated SVG Checkmark) */
body .spdlep-auth-container .spdlep-btn.is-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    pointer-events: none;
}

body .spdlep-auth-container .spdlep-btn.is-success .spdlep-btn-text,
body .spdlep-auth-container .spdlep-btn.is-success .spdlep-spinner {
    display: none !important;
}

.spdlep-btn-success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    animation: spdlepPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.spdlep-checkmark-draw {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: spdlepDrawCheck 0.35s 0.08s ease forwards;
}

@keyframes spdlepDrawCheck {
    to { stroke-dashoffset: 0; }
}

@keyframes spdlepPopIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* 2. Secondary Button (Alternative Full-Width Actions) */
body .spdlep-auth-container .spdlep-btn-secondary {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body .spdlep-auth-container .spdlep-btn-secondary:hover:not(.disabled-state):not(:disabled) {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

body .spdlep-auth-container .spdlep-btn-secondary:active:not(.disabled-state):not(:disabled) {
    transform: scale(0.98) !important;
    background-color: #f3f4f6 !important;
}

body .spdlep-auth-container .spdlep-btn-secondary.disabled-state,
body .spdlep-auth-container .spdlep-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    box-shadow: none !important;
    transform: none !important;
}

/* =========================================================================
 * [FEATURE: RESEND BUTTON & COOLDOWN PROGRESS BAR]
 * ========================================================================= */
.spdlep-resend-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    margin: 4px 0 10px;
}

body .spdlep-auth-container .spdlep-btn-tertiary,
body .spdlep-auth-container .spdlep-btn-resend,
body .spdlep-auth-container button[id^="spdlep_resend_"] {
    width: auto !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    margin: 4px auto 0 !important;
    align-self: center !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #4b5563 !important;
    padding: 8px 16px !important;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none !important;
    border-radius: var(--spdlep-button-border-radius, 8px);
}

body .spdlep-auth-container .spdlep-btn-tertiary .spdlep-btn-text,
body .spdlep-auth-container .spdlep-btn-resend .spdlep-btn-text,
body .spdlep-auth-container button[id^="spdlep_resend_"] .spdlep-btn-text {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
}

body .spdlep-auth-container .spdlep-btn-tertiary:hover:not(.disabled-state):not(:disabled),
body .spdlep-auth-container .spdlep-btn-resend:hover:not(.disabled-state):not(:disabled),
body .spdlep-auth-container button[id^="spdlep_resend_"]:hover:not(.disabled-state):not(:disabled) {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--spdlep-primary-color, #111827) !important;
}

body .spdlep-auth-container .spdlep-btn-tertiary.disabled-state,
body .spdlep-auth-container .spdlep-btn-tertiary:disabled,
body .spdlep-auth-container .spdlep-btn-resend.disabled-state,
body .spdlep-auth-container .spdlep-btn-resend:disabled,
body .spdlep-auth-container button[id^="spdlep_resend_"].disabled-state,
body .spdlep-auth-container button[id^="spdlep_resend_"]:disabled {
    background: transparent !important;
    color: #9ca3af !important;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.spdlep-resend-progress-wrap {
    width: 140px;
    height: 3px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.spdlep-resend-progress-wrap.active {
    opacity: 1;
}

.spdlep-resend-progress-bar {
    height: 100%;
    width: 100%;
    background: var(--spdlep-primary-color, #111827);
    border-radius: 9999px;
    transition: width 0.3s linear;
}

.spdlep-pulse-ready {
    animation: spdlepPulseReady 1.2s ease 2;
}

@keyframes spdlepPulseReady {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); color: var(--spdlep-primary-color, #111827); }
}

/* 4. Edit Button (Badge-Embedded Action) */
body .spdlep-auth-container .spdlep-btn-edit {
    background: transparent;
    border: 1px solid transparent;
    color: var(--spdlep-primary-color, #111827);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: calc(var(--spdlep-button-border-radius, 8px) / 2);
    transition: all 0.15s ease;
    line-height: 1.2;
}

body .spdlep-auth-container .spdlep-btn-edit:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--spdlep-primary-color, #111827);
}

/* Loading Spinner */
body .spdlep-auth-container .spdlep-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spdlepSpin 0.8s linear infinite;
}

body .spdlep-auth-container .spdlep-btn.is-loading .spdlep-btn-text {
    display: none;
}

body .spdlep-auth-container .spdlep-btn.is-loading .spdlep-spinner {
    display: block;
}

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

/* Toast Notifications (Bottom Center) */
.spdlep-toast-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
    max-width: 90vw;
}

.spdlep-toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 300px;
    max-width: 460px;
    width: auto;
    padding: 12px 16px 12px 14px;
    background-color: #222222;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #ffffff;
    pointer-events: auto;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.spdlep-toast.spdlep-toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.spdlep-toast.spdlep-toast-hiding {
    opacity: 0;
    transform: translateY(14px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* State specific radial ambient glow */
.spdlep-toast-success {
    background: radial-gradient(circle at 26px 50%, rgba(34, 197, 94, 0.22) 0%, rgba(34, 197, 94, 0.04) 50%, transparent 75%), #202020;
}

.spdlep-toast-error {
    background: radial-gradient(circle at 26px 50%, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.04) 50%, transparent 75%), #202020;
}

.spdlep-toast-warning {
    background: radial-gradient(circle at 26px 50%, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.04) 50%, transparent 75%), #202020;
}

.spdlep-toast-info {
    background: radial-gradient(circle at 26px 50%, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 75%), #202020;
}

.spdlep-toast-other {
    background: radial-gradient(circle at 26px 50%, rgba(148, 163, 184, 0.2) 0%, rgba(148, 163, 184, 0.04) 50%, transparent 75%), #202020;
}

/* Icon badge */
.spdlep-toast-icon-wrap {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.spdlep-toast-success .spdlep-toast-icon-wrap { background: #22c55e; }
.spdlep-toast-error .spdlep-toast-icon-wrap { background: #ef4444; }
.spdlep-toast-warning .spdlep-toast-icon-wrap { background: #f59e0b; }
.spdlep-toast-info .spdlep-toast-icon-wrap { background: #3b82f6; }
.spdlep-toast-other .spdlep-toast-icon-wrap { background: #64748b; }

.spdlep-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.spdlep-toast-icon svg {
    display: block;
}

/* Message */
.spdlep-toast-message {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: #f9fafb;
    font-weight: 500;
    word-break: break-word;
    text-align: start;
}

/* Close button */
.spdlep-toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 6px;
    margin-inline-start: 4px;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
    line-height: 1;
}

.spdlep-toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.spdlep-toast-close svg {
    display: block;
}

/* RTL Support */
[dir="rtl"] .spdlep-toast-container,
.rtl .spdlep-toast-container {
    left: 50%;
    transform: translateX(-50%);
}

[dir="rtl"] .spdlep-toast,
.rtl .spdlep-toast {
    text-align: right;
}

[dir="rtl"] .spdlep-toast-success,
.rtl .spdlep-toast-success {
    background: radial-gradient(circle at calc(100% - 26px) 50%, rgba(34, 197, 94, 0.22) 0%, rgba(34, 197, 94, 0.04) 50%, transparent 75%), #202020;
}

[dir="rtl"] .spdlep-toast-error,
.rtl .spdlep-toast-error {
    background: radial-gradient(circle at calc(100% - 26px) 50%, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.04) 50%, transparent 75%), #202020;
}

[dir="rtl"] .spdlep-toast-warning,
.rtl .spdlep-toast-warning {
    background: radial-gradient(circle at calc(100% - 26px) 50%, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.04) 50%, transparent 75%), #202020;
}

[dir="rtl"] .spdlep-toast-info,
.rtl .spdlep-toast-info {
    background: radial-gradient(circle at calc(100% - 26px) 50%, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 75%), #202020;
}

[dir="rtl"] .spdlep-toast-other,
.rtl .spdlep-toast-other {
    background: radial-gradient(circle at calc(100% - 26px) 50%, rgba(148, 163, 184, 0.2) 0%, rgba(148, 163, 184, 0.04) 50%, transparent 75%), #202020;
}

.spdlep-debug-box {
    background: #fffbeb;
    border: 1px dashed #f59e0b;
    color: #b45309;
    padding: 12px;
    border-radius: var(--spdlep-form-border-radius, 8px);
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.spdlep-mb-12 { margin-bottom: 12px; }
.spdlep-mb-20 { margin-bottom: 20px; }
.spdlep-mt-24 { margin-top: 24px; }
.spdlep-hidden { display: none !important; }
.spdlep-step-h4 { margin-top: 0; font-size: 18px; color: #111827; }
.spdlep-spinner-dark { border-top-color: #111827 !important; }

/* -------------------------------------------------------------------------
 * 5. Country Code Selector (intl-tel-input) Overrides
 * ------------------------------------------------------------------------- */
.iti {
    width: 100%;
}

.spdlep-input-wrapper.spdlep-phone-active .spdlep-text-input,
.spdlep-input-wrapper.spdlep-email-mode .spdlep-text-input {
    padding-left: 52px !important;
}

/* RTL Support */
.rtl .spdlep-input-wrapper.spdlep-phone-active .spdlep-text-input,
.rtl .spdlep-input-wrapper.spdlep-email-mode .spdlep-text-input,
[dir="rtl"] .spdlep-input-wrapper.spdlep-phone-active .spdlep-text-input,
[dir="rtl"] .spdlep-input-wrapper.spdlep-email-mode .spdlep-text-input {
    padding-right: 52px !important;
    padding-left: 16px !important;
}

/* Email Mode Icon Styling */
.spdlep-input-wrapper.spdlep-email-mode .iti__flag,
.spdlep-input-wrapper.spdlep-email-mode .iti__arrow,
.spdlep-input-wrapper.spdlep-email-mode .iti__selected-dial-code {
    display: none !important;
}

.spdlep-input-wrapper.spdlep-email-mode .iti__selected-country {
    pointer-events: none;
    width: 52px !important;
}

.spdlep-input-wrapper.spdlep-email-mode .iti__selected-country::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    color: #9ca3af;
    margin: 0 auto;
}

.iti__country-list {
    border-radius: var(--spdlep-form-border-radius, 8px) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    z-index: 100 !important;
}

.iti__selected-country {
    border-radius: var(--spdlep-form-border-radius, 8px) 0 0 var(--spdlep-form-border-radius, 8px) !important;
}

/* Single Country Optimization Overrides */
.spdlep-input-wrapper.spdlep-single-country .iti__selected-country {
    display: none !important;
}

.spdlep-input-wrapper.spdlep-single-country .spdlep-text-input {
    padding-left: 16px !important;
}

/* RTL overrides for single country */
.rtl .spdlep-input-wrapper.spdlep-single-country .spdlep-text-input,
[dir="rtl"] .spdlep-input-wrapper.spdlep-single-country .spdlep-text-input {
    padding-right: 16px !important;
    padding-left: 16px !important;
}

/* WooCommerce Checkout Read-Only / Locked Billing Phone */
.spdlep-wc-readonly-phone input#billing_phone,
input#billing_phone[readonly],
input#billing_phone.spdlep-wc-locked-phone,
.spdlep-wc-locked-phone input#billing_phone {
    background-color: #f1f5f9 !important;
    cursor: not-allowed !important;
    opacity: 0.88 !important;
    user-select: none !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

/* =========================================================================
 * [FEATURE: MODAL GLASSMORPHISM & SCALE-IN ANIMATION]
 * ========================================================================= */
.spdlep-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.spdlep-modal-overlay.spdlep-hidden {
	display: none !important;
	opacity: 0;
	visibility: hidden;
}

.spdlep-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin: auto;
	animation: spdlepModalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spdlepModalScaleIn {
	from { opacity: 0; transform: scale(0.95); }
	to { opacity: 1; transform: scale(1); }
}

.spdlep-modal-close-btn {
	position: absolute;
	top: 12px;
	right: 16px;
	background: transparent;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: #ffffff;
	cursor: pointer;
	z-index: 10;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.spdlep-modal-close-btn:hover {
	color: #0f172a;
	background-color: #f1f5f9;
	transform: scale(1.05);
}

.rtl .spdlep-modal-close-btn,
[dir="rtl"] .spdlep-modal-close-btn {
	right: auto;
	left: 16px;
}