/**
 * Phone OTP Login Styles
 *
 * @package WC_Phone_OTP_Login
 */

.wc-phone-otp-login-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wc-phone-otp-login-wrapper h2,
.wc-phone-otp-login-wrapper h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

.wc-phone-otp-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.wc-phone-otp-form {
    margin-bottom: 20px;
}

.wc-phone-otp-form .form-row {
    margin-bottom: 20px;
}

.wc-phone-otp-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.wc-phone-otp-form .required {
    color: #e74c3c;
}

.wc-phone-otp-form input[type="tel"],
.wc-phone-otp-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.wc-phone-otp-form input[type="tel"]:focus,
.wc-phone-otp-form input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

.wc-phone-otp-form input[type="tel"]::placeholder,
.wc-phone-otp-form input[type="text"]::placeholder {
    color: #999;
}

.wc-phone-otp-form small.description {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #777;
}

.wc-phone-otp-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #3498db;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.wc-phone-otp-button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.wc-phone-otp-button:active {
    transform: translateY(0);
}

.wc-phone-otp-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.wc-phone-otp-button.loading {
    position: relative;
    color: transparent;
}

.wc-phone-otp-button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wc-phone-otp-spin 0.6s linear infinite;
}

@keyframes wc-phone-otp-spin {
    to {
        transform: rotate(360deg);
    }
}

.wc-phone-otp-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.wc-phone-otp-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wc-phone-otp-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wc-phone-otp-message.info {
    display: block;
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.wc-phone-otp-link {
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.wc-phone-otp-link:hover {
    text-decoration: underline;
}

.wc-phone-otp-link:disabled {
    color: #95a5a6;
    cursor: not-allowed;
    pointer-events: none;
}

.separator {
    margin: 0 10px;
    color: #ddd;
}

/* OTP Input Styling */
#wc_otp_code {
    text-align: center;
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 600px) {
    .wc-phone-otp-login-wrapper {
        padding: 20px;
        margin: 10px;
    }

    .wc-phone-otp-login-wrapper h2,
    .wc-phone-otp-login-wrapper h3 {
        font-size: 20px;
    }

    .wc-phone-otp-button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Hide default WooCommerce forms - Backup CSS */
.woocommerce-form-login,
.woocommerce-form-register {
    display: none !important;
}