/**
 * Estilos públicos - Formularios de WhatsApp
 * 
 * Estilos limpios, responsivos y amigables para móviles
 */

/* Contenedor principal del formulario */
.waf-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Formulario */
.waf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cada campo del formulario */
.waf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Etiquetas */
.waf-field label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 2px;
}

/* Indicador de campo requerido */
.waf-required {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 2px;
}

/* Inputs de texto, email, tel */
.waf-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    color: #333333;
    background-color: #fafafa;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    outline: none;
}

.waf-input:focus {
    background-color: #ffffff;
    border-color: #25d366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.waf-input::placeholder {
    color: #aaaaaa;
    font-size: 14px;
}

/* Textarea */
.waf-input-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Select */
.waf-input-select {
    appearance: auto;
    cursor: pointer;
    height: 44px;
    padding: 10px 14px;
}

/* Checkbox group */
.waf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.waf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    color: #444444;
}

.waf-input-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #25d366;
    cursor: pointer;
}

/* Botón de envío - Estilo WhatsApp */
.waf-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #25d366;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: 8px;
}

.waf-submit-btn:hover {
    background-color: #128c7e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.waf-submit-btn:active {
    transform: translateY(0);
}

.waf-submit-btn:disabled {
    background-color: #a8e6bf;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Icono dentro del botón */
.waf-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.waf-btn-icon svg {
    width: 100%;
    height: 100%;
}

/* Mensajes de error */
.waf-error {
    color: #e74c3c;
    font-size: 14px;
    padding: 10px 14px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 0;
}

.waf-error-messages {
    margin-bottom: 16px;
}

.waf-error-messages .waf-error {
    margin-bottom: 8px;
}

.waf-error-messages .waf-error:last-child {
    margin-bottom: 0;
}

/* Campo con error de validación */
.waf-field.waf-field-error .waf-input {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.waf-field.waf-field-error .waf-input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.waf-field-error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
}

/* Animación al enviar */
@keyframes waf-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.waf-submitting .waf-submit-btn {
    animation: waf-pulse 1s infinite;
}

/* Mensajes inline de exito e info */
.waf-inline-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.waf-inline-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.waf-inline-info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive - Tablet */
@media screen and (max-width: 768px) {
    .waf-form-container {
        padding: 16px;
        margin: 0 10px;
    }

    .waf-input {
        padding: 11px 12px;
        font-size: 16px; /* Evitar zoom en iOS */
    }

    .waf-submit-btn {
        padding: 13px 20px;
        font-size: 15px;
    }
}

/* Responsive - Móvil */
@media screen and (max-width: 480px) {
    .waf-form-container {
        padding: 14px;
        margin: 0 5px;
        border-radius: 6px;
    }

    .waf-form {
        gap: 14px;
    }

    .waf-field label {
        font-size: 13px;
    }

    .waf-input {
        padding: 10px 12px;
        font-size: 16px; /* Previene zoom en Safari iOS */
    }

    .waf-submit-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}
