/* ABS OTP Styles */

/* ── Inline mobile + OTP button row ─────────────────────────────────────── */
.abs-mobile-otp-inline {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
}

.abs-mobile-otp-inline .abs-mobile-input {
    flex: 0 0 70%;
    width: 70% !important;
    border-radius: 5px 0 0 5px !important;
    border-right: none !important;
    box-sizing: border-box;
}

.abs-mobile-otp-inline .abs-inline-otp-btn {
    flex: 0 0 30%;
    width: 30% !important;
    border-radius: 0 5px 5px 0 !important;
    margin: 0 !important;
    padding: 0 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    box-sizing: border-box;
    height: auto;
    line-height: 1.3;
}

/* OTP mode — input becomes OTP entry */
.abs-mobile-input.abs-otp-mode {
    text-align: start;
    font-size: 16px !important;
    font-weight: bold;
    letter-spacing: 3px;
}

/* ── Resend OTP row — below the input, separate from Verify button ───────── */
.abs-resend-row {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

.abs-resend-timer {
    color: #888;
    font-size: 12px;
}

.abs-resend-link {
    color: #007cba;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.abs-resend-link:hover {
    text-decoration: underline;
    color: #005a87;

    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Inline field validation errors ─────────────────────────────────────── */
.abs-field-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    padding: 5px 10px;
    background: #fff5f5;
    border-left: 3px solid #dc3545;
    border-radius: 0 3px 3px 0;
}

.abs-input-error,
.abs-input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15) !important;
}

/* Send OTP Buttons */
.abs-send-otp-btn,
.abs-inline-otp-btn {
    border: 1px solid var(--bs-primary) !important; ;
    background: var(--bs-primary) !important;
    /* border-color: var(--bs-primary) !important; */
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.abs-send-otp-btn:hover,
.abs-inline-otp-btn:hover {
    color: var(--bs-secondary) !important;
    background: #fff !important;
    /* border-color: #1e7e34 !important; */
}

.abs-send-otp-btn:disabled,
.abs-inline-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Verify OTP Buttons (same button after OTP sent) */
.abs-verify-otp-btn {
    border: 1px solid var(--bs-primary) !important;
    background: var(--bs-primary) !important;
    /* border-color: #17a2b8 !important; */
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.abs-verify-otp-btn:hover {
    background: #fff !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-secondary) !important;
}

.abs-verify-otp-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Login/Verify Buttons */
#abs_login_with_otp,
#abs_login_with_email_otp {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
    font-weight: 600;
}

#abs_login_with_otp:hover,
#abs_login_with_email_otp:hover {
    background: #fff !important;
    border-color: var(--bs-primary) !important;
}
@media(max-width:967px) {
    .woocommerce-form-login {
        margin: 0;
    }
}

/* OTP Input Fields */
#reg_otp,
#login_otp,
#email_otp {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

#reg_otp:focus,
#login_otp:focus,
#email_otp:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Mobile Input Fields */
#reg_mobile,
#mobile_number,
#email_login {
    font-size: 16px;
        padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#reg_mobile:focus,
#mobile_number:focus,
#email_login:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Toggle Links */
.abs-toggle-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.abs-toggle-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Remove email-related styles */
.abs-email-login-section,
.abs-email-otp-section {
    display: none !important;
}

/* Form Sections Spacing */
.woocommerce-form-login p,
.woocommerce-form-register p {
    margin-bottom: 15px;
}

/* Success/Error States */
.abs-otp-status[style*="color: #28a745"] {
    background: #d4edda;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.abs-otp-status[style*="color: #dc3545"] {
    background: #f8d7da;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.abs-otp-status[style*="color: #0073aa"] {
    background: #cce5f0;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #a2d2e4;
}

/* Loading States */
.abs-send-otp-btn:disabled::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: abs-spin 1s linear infinite;
}

@keyframes abs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .abs-otp-input-section,
    .abs-email-otp-section,
    .abs-email-login-section {
        padding: 12px;
        margin-top: 12px;
    }
    
    #reg_otp,
    #login_otp,
    #email_otp {
        font-size: 16px;
        padding: 12px;
    }
    
    .abs-send-otp-btn,
    #abs_login_with_otp,
    #abs_login_with_email_otp {
        padding: 12px;
        font-size: 14px;
    }
}

/* Form Validation States */
.woocommerce-form-row input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.woocommerce-form-row input.success {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

/* Hide/Show Animation — reserved for future use */

/* Improved Button Styling */
.woocommerce-Button.button {
    border-radius: 5px;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
}

/* Form Labels */
.woocommerce-form-row label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

/* OTP Verified Section */
.abs-otp-verified-section {
    margin-top: 15px;
    display: none;
}

.abs-otp-success-message {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
    padding: 12px 15px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 15px !important;
}

/* Name Input Field */
#reg_name {
    font-size: 16px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#reg_name:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}
/* Required Field Indicator */
.required {
    color: #dc3545;
}

/* Verified Button State */
.abs-verify-otp-btn[style*="background: #28a745"] {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Form Field Spacing */
.woocommerce-form-register p {
    margin-bottom: 15px;
}

/* Mobile Responsive for New Elements */
@media (max-width: 768px) {
    .abs-otp-success-message {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
    
    .abs-verify-otp-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Password Field Enhancements — WooCommerce native .show-password-input is used */
/* Ensure the native eye icon sits correctly inside the password-input span */
#reg_password_otp {
    font-size: 16px;
    padding: 12px 45px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

#reg_password_otp:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Make the WooCommerce show-password button look consistent */
#reg_password_otp ~ .show-password-input,
.password-input .show-password-input {
    color: #555 !important;
    font-size: 16px !important;
}

/* Password strength indicator */
.abs-password-strength {
    font-size: 12px;
    margin-top: 5px;
    display: block;
    padding: 5px 8px;
    border-radius: 3px;
}

/* Password strength color states */
.abs-password-strength span[style*="color: #28a745"] {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.abs-password-strength span[style*="color: #ffc107"] {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.abs-password-strength span[style*="color: #dc3545"] {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Login form password field — WooCommerce handles the eye icon */
.woocommerce-form-login p {
    position: relative;
}

@media (max-width: 768px) {
    #reg_password_otp {
        padding-right: 40px;
    }
}

/* ── Change Number link ──────────────────────────────────────────────────── */
.abs-change-number-link {
    color: #dc3545;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    margin-left: 10px;
}

.abs-change-number-link:hover {
    text-decoration: underline;
    color: #a71d2a;
}

/* Separator dot between Resend and Change Number */
.abs-resend-row .abs-resend-link + .abs-change-number-link::before,
.abs-resend-row .abs-resend-timer + .abs-change-number-link::before {
    content: ' · ';
    color: #aaa;
    margin-right: 2px;
}
