/* Hide default WooCommerce login/registration fields */
/* These are still needed as inline styles in PHP for immediate application and override */

/* Main login box container */
.wc-otp-login-box {
    max-width: 450px; /* Adjust as needed */
    margin: 40px auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    text-align: center; /* Center content within the box */
}

.wc-otp-login-box h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #333;
}

.wc-otp-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
}
.wc-otp-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.wc-otp-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.wc-otp-form-group {
    margin-bottom: 20px;
}
.wc-otp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    text-align: left; /* Align labels to the left */
}
.wc-otp-form-group input[type="email"],
.wc-otp-form-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.wc-otp-form-group input[type="email"]:focus,
.wc-otp-form-group input[type="text"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* CAPTCHA specific styling */
.wc-otp-captcha-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center captcha elements */
}
.wc-otp-captcha-group label {
    text-align: center; /* Center captcha question */
}
.wc-otp-captcha-group input {
    max-width: 120px; /* Smaller width for captcha input */
    text-align: center;
}


.wc-otp-button {
    background-color: #007cba;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%; /* Full width button */
    box-sizing: border-box;
}
.wc-otp-button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}
.wc-otp-button:active {
    transform: translateY(0);
}
.wc-otp-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.wc-otp-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
}
.wc-otp-link:hover {
    text-decoration: underline;
}
.wc-otp-link:disabled {
    color: #a0a0a0;
    cursor: not-allowed;
}

.wc-otp-loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007cba;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    display: none; /* Hidden by default */
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* OTP Code Inputs (6 boxes) */
.wc-otp-code-inputs {
    display: flex;
    justify-content: center; /* Center the boxes */
    gap: 8px; /* Slightly reduced gap for better mobile fit */
    margin-bottom: 20px;
}

.wc-otp-code-inputs .otp-input {
    width: 40px; /* Adjusted width for mobile visibility */
    height: 40px; /* Adjusted height for mobile visibility */
    text-align: center;
    font-size: 20px; /* Slightly smaller font for better fit */
    font-weight: bold;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    /* Ensure numbers are clearly visible */
    line-height: 1; /* Remove extra line height */
    padding: 0; /* Remove padding that might push numbers */
}

.wc-otp-code-inputs .otp-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .wc-otp-login-box {
        margin: 20px auto;
        padding: 20px;
    }
    .wc-otp-login-box h3 {
        font-size: 20px;
    }
    .wc-otp-code-inputs {
        gap: 5px; /* Even smaller gap on very small screens */
    }
    .wc-otp-code-inputs .otp-input {
        width: 35px; /* Further reduce width */
        height: 35px; /* Further reduce height */
        font-size: 18px; /* Further reduce font size */
    }
	
	.wc-otp-form-group input[type="email"], .wc-otp-form-group input[type="text"]{
		padding: 12px 3px !important;
	}
}

/* Ensure the initial form is hidden when OTP verification is shown */
#wc-otp-login-form-wrapper {
    display: block; /* Default state */
}
#wc-otp-verify-form-wrapper {
    display: none; /* Default state, controlled by JS */
}

