/**
 * Elementor OTP Verifier - Frontend Styles
 *
 * @package Elementor_OTP_Verifier
 */

/* Container principale */
.eov-otp-field-wrapper {
    width: 100%;
}

/* Riga input + pulsante */
.eov-otp-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* Input OTP - eredita stili dal form Elementor */
.eov-otp-field-wrapper input[type="text"] {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    letter-spacing: 3px;
    text-align: center;
}

/* ===========================================
   PULSANTE OTP
   =========================================== */

/* Stile base del pulsante - colori personalizzabili da Elementor Content */
.elementor-form .eov-send-otp-btn {
    flex-shrink: 0;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #61CE70;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-weight: 500;
}

/* Hover - scurisce leggermente */
.elementor-form .eov-send-otp-btn:hover:not(:disabled) {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* Focus */
.elementor-form .eov-send-otp-btn:focus {
    outline: 2px solid #61CE70;
    outline-offset: 2px;
}

/* Disabilitato */
.eov-send-otp-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Cooldown - grigio */
.eov-send-otp-btn.eov-cooldown {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

/* ===========================================
   Messaggio feedback
   =========================================== */

.eov-otp-message {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.eov-otp-message.eov-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 480px) {
    .eov-otp-input-row {
        flex-direction: column;
    }

    .eov-send-otp-btn {
        width: 100%;
    }
}

/* ===========================================
   Integrazione Elementor
   =========================================== */

/* Stili per diversi temi Elementor */
.elementor-field-group .eov-otp-field-wrapper {
    margin-bottom: 0;
}

/* Errori di validazione Elementor */
.eov-otp-field-wrapper .elementor-field-validation-error {
    display: block;
    margin-top: 8px;
    color: #cc0000;
    font-size: 13px;
}

.eov-otp-field-wrapper.elementor-error input[type="text"] {
    border-color: #cc0000;
}

/* Stili per campo con errore */
.eov-otp-field-wrapper input.elementor-error {
    border-color: #cc0000 !important;
}

/* ===========================================
   Supporto tema scuro
   =========================================== */

@media (prefers-color-scheme: dark) {
    .eov-otp-message.eov-success {
        background-color: #1e4620;
        color: #a3d9a5;
        border-color: #2d6a4f;
    }

    .eov-otp-message.eov-error {
        background-color: #4a1c24;
        color: #f5a3a3;
        border-color: #7a2c38;
    }
}
