/**
 * Siigo Integration Checkout Styles
 */

/* Estilos generales de campos */
.woocommerce-checkout .form-row {
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 1.5em !important;
}

.woocommerce-checkout .form-row.focused {
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

.woocommerce-checkout .form-row label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.woocommerce-checkout .form-row label .required {
    color: #e2401c;
    font-weight: 700;
    border: 0 !important;
    text-decoration: none;
    margin-left: 5px;
}

.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row select {
    padding: 12px 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: auto;
    line-height: 1.5;
}

.woocommerce-checkout .form-row input[type="text"]:focus,
.woocommerce-checkout .form-row input[type="tel"]:focus,
.woocommerce-checkout .form-row input[type="email"]:focus,
.woocommerce-checkout .form-row select:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.2);
    outline: none;
}

/* Campo con error */
.woocommerce-checkout .form-row input.siigo-field-error {
    border-color: #f44336;
    background-color: #fff8f8;
}

/* Hide document type field */
.siigo-hidden-field {
    display: none !important;
}

/* Validation message containers */
.siigo-validation-message {
    display: none;
    margin-top: 8px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error styles */
.siigo-error {
    background-color: #fce4e4;
    border-left: 3px solid #f44336;
    color: #d32f2f;
}

/* Notice styles (non-critical) */
.siigo-notice {
    background-color: #e8f4fd;
    border-left: 3px solid #2196f3;
    color: #0277bd;
}

/* Input field highlight for errors */
input.input-text:focus:invalid,
select:focus:invalid,
textarea:focus:invalid {
    border-color: #f44336;
    box-shadow: 0 0 0 1px #fce4e4;
}

/* Document number field */
#billing_document_number_field input {
    letter-spacing: 0.5px;
    font-family: monospace;
}

/* Phone field */
#billing_phone_field input {
    letter-spacing: 0.5px;
    font-family: monospace;
}

/* Animación para feedback visual */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.woocommerce-invalid .siigo-field-error {
    animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

/* Estilos para botón de finalizar compra */
#place_order {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

#place_order:hover {
    background-color: #0d47a1;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .siigo-validation-message {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .woocommerce-checkout .form-row input[type="text"],
    .woocommerce-checkout .form-row input[type="tel"],
    .woocommerce-checkout .form-row input[type="email"],
    .woocommerce-checkout .form-row select {
        padding: 10px;
    }
} 