/**
 * Hojas de estilo públicas para los formularios de WhatsApp de WSFormPRO
 */

/* Formulario General */
.wsformpro-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.wsformpro-form * {
    box-sizing: border-box;
}

/* Grupos de Campos */
.ws-form-group {
    margin-bottom: 20px;
    position: relative;
}

.ws-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.ws-required {
    color: #e74c3c;
    margin-left: 2px;
}

/* Inputs, Textareas y Selects */
.ws-form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #2c3e50;
    background: #fafafa;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.25s ease-in-out;
}

.ws-form-input::placeholder {
    color: #a0aec0;
}

.ws-form-input:focus {
    border-color: #25D366;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.15);
}

.ws-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Opciones de Selección (Radio / Checkbox) */
.ws-radio-group, .ws-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.ws-radio-option, .ws-checkbox-option, .ws-checkbox-single {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ws-radio-input, .ws-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #25D366;
    cursor: pointer;
}

.ws-radio-label, .ws-checkbox-label {
    font-size: 14px;
    color: #4a5568;
    user-select: none;
    cursor: pointer;
}

/* Botón de Envío */
.wsformpro-submit-container {
    margin-top: 28px;
}

.wsformpro-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.wsformpro-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.wsformpro-submit-btn:active {
    transform: translateY(1px);
}

.wsformpro-submit-btn:disabled {
    background: #cbd5e0;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Animación del Spinner */
.wsformpro-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: ws-spin 0.8s ease-in-out infinite;
}

@keyframes ws-spin {
    to { transform: rotate(360deg); }
}

/* Mensajes de Validación y Estado */
.wsformpro-response {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.ws-response-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.ws-response-error {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

/* Errores específicos en los campos */
.ws-field-has-error .ws-form-input {
    border-color: #ff4d4f;
    background: #fffbfa;
}

.ws-field-error-msg {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* Rejilla Flexbox del Formulario */
.wsformpro-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 0;
}
.ws-form-group {
    padding: 0 10px;
    box-sizing: border-box;
}
.ws-col-100 { width: 100%; }
.ws-col-50 { width: 50%; }
.ws-col-33 { width: 33.333%; }
.ws-col-25 { width: 25%; }

/* Deslizador de Rango (Range Slider) */
.ws-range-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}
.ws-range-slider {
    flex: 1;
    accent-color: #25D366;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}
.ws-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #128C7E;
    cursor: pointer;
    transition: background 0.15s ease-in-out;
}
.ws-range-slider::-webkit-slider-thumb:hover {
    background: #25D366;
}

/* Calificación con Estrellas (Star Rating) */
.ws-rating-stars {
    display: flex;
    gap: 6px;
    color: #f1c40f;
    font-size: 24px;
    margin-top: 6px;
}
.ws-rating-stars .ws-star {
    cursor: pointer;
    transition: transform 0.1s ease;
}
.ws-rating-stars .ws-star:hover {
    transform: scale(1.15);
}

/* HTML Personalizado */
.ws-custom-html {
    width: 100%;
    margin-bottom: 10px;
}

/* Términos y Condiciones */
.ws-terms-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Contenedor de Dos Columnas */
.ws-two-columns-container {
    display: flex;
    gap: 15px;
    width: 100%;
}
.ws-two-columns-container .ws-form-input {
    flex: 1;
}

/* Línea de Separación */
.ws-separator {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
    width: 100%;
}
