/* =========================================================================
   Email Verification Code — Frontend Styles
   ========================================================================= */

/* --- Fix: permitir que los formularios crezcan al añadir campos --- */
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    height: auto !important;
}

/* --- Aviso informativo --- */
.wcev-info-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
    padding: 12px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #3730a3;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.wcev-info-icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.3;
}

/* --- Wrapper del código --- */
.wcev-code-wrapper {
    margin: 14px 0 12px;
    padding: 14px;
    background: #f8f9ff;
    border: 1px solid #e0e4f5;
    border-radius: 8px;
    animation: wcev-fade-in 0.35s ease;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@keyframes wcev-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcev-code-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1e1b4b;
}

/* --- Input group --- */
.wcev-code-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.wcev-code-input-group input[type="text"] {
    flex: 1 1 0%;
    min-width: 0 !important;
    width: 0 !important;
    font-size: 16px !important;
    letter-spacing: 4px;
    text-align: center;
    font-weight: 700;
    padding: 10px 8px !important;
    border: 2px solid #c7d2fe !important;
    border-radius: 6px !important;
    background: #fff !important;
    transition: border-color 0.2s;
    box-sizing: border-box !important;
}

.wcev-code-input-group input[type="text"]:focus {
    border-color: #4f46e5 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* --- Resend button --- */
.wcev-resend-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.wcev-resend-btn:hover:not(:disabled) {
    background: #eef2ff;
    border-color: #4f46e5;
}

.wcev-resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Messages --- */
.wcev-code-message {
    display: none;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
    word-break: break-word;
}

.wcev-msg-success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.wcev-msg-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================================
   Estilos específicos para wp-login.php
   ========================================================================= */

#loginform .wcev-info-notice,
#registerform .wcev-info-notice {
    margin: 16px 0;
    font-size: 12.5px;
    padding: 10px 12px;
}

#loginform .wcev-code-wrapper,
#registerform .wcev-code-wrapper {
    margin: 16px 0 12px;
    padding: 12px;
}

#loginform .wcev-code-wrapper label,
#registerform .wcev-code-wrapper label {
    font-size: 13px;
    margin-bottom: 6px;
    color: #3c434a;
}

#loginform .wcev-code-input-group,
#registerform .wcev-code-input-group {
    flex-direction: column;
    gap: 6px;
}

#loginform .wcev-code-input-group input[type="text"],
#registerform .wcev-code-input-group input[type="text"] {
    width: 100% !important;
    font-size: 15px !important;
    padding: 8px 6px !important;
    letter-spacing: 3px;
}

#loginform .wcev-resend-btn,
#registerform .wcev-resend-btn {
    align-self: flex-start;
    padding: 6px 10px;
    font-size: 12px;
}

#loginform .wcev-code-message,
#registerform .wcev-code-message {
    font-size: 12px;
    margin-top: 8px;
}