/* =================================================
   SegmentaAds Form Widget Datos Extra - Estilos base
   Defaults. Los controles de Elementor los sobreescriben.
   ================================================= */

.safwx-form-wrapper {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    box-sizing: border-box;
}

.safwx-form-wrapper *,
.safwx-form-wrapper *::before,
.safwx-form-wrapper *::after {
    box-sizing: border-box;
}

.safwx-form-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 40px 36px;
    width: 100%;
}

.safwx-form-card.safwx-has-shadow {
    box-shadow:
        0 25px 60px -15px rgba(10, 21, 37, 0.25),
        0 8px 20px -8px rgba(10, 21, 37, 0.15);
}

.safwx-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.safwx-field-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============ LABELS ============ */
.safwx-label {
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #5a6478;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
    display: block;
}

.safwx-required-mark {
    color: #e15555;
    margin-left: 4px;
    font-weight: 700;
}

/* ============ INPUTS ============ */
.safwx-input,
.safwx-textarea {
    width: 100%;
    background: #f7f8ff;
    border: 1.5px solid #d5d6f0;
    border-radius: 50px;
    padding: 16px 22px;
    font-family: inherit;
    font-size: 16px;
    color: #1a2332;
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.safwx-textarea {
    border-radius: 20px;
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
    font-family: inherit;
}

.safwx-input::placeholder,
.safwx-textarea::placeholder {
    color: #a0a4b8;
    opacity: 1;
}

.safwx-input:focus,
.safwx-textarea:focus {
    border-color: #7b7fea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(123, 127, 234, 0.12);
}

.safwx-input.safwx-error,
.safwx-textarea.safwx-error {
    border-color: #e15555;
    background: #fef5f5;
}

/* ============ CHECKBOX PRIVACIDAD ============ */
.safwx-privacy-group {
    margin: 8px 0 4px;
}

.safwx-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}

.safwx-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.safwx-checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 2px solid #d5d6f0;
    border-radius: 50%;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 2px;
}

.safwx-checkmark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2.5px 2.5px 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.safwx-checkbox:checked + .safwx-checkmark {
    background: #7b7fea;
    border-color: #7b7fea;
}

.safwx-checkbox:checked + .safwx-checkmark::after {
    opacity: 1;
}

.safwx-checkbox:focus-visible + .safwx-checkmark {
    box-shadow: 0 0 0 4px rgba(123, 127, 234, 0.25);
}

.safwx-privacy-text {
    flex: 1;
    font-size: 15px;
    color: #3a4250;
    line-height: 1.55;
}

.safwx-privacy-text a {
    color: inherit;
    text-decoration: underline;
}

/* ============ BOTÓN ENVIAR ============ */
.safwx-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.safwx-submit-btn {
    width: 100%;
    background: #0a1525;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 20px 32px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.safwx-submit-btn:hover {
    background: #1a2540;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -8px rgba(10, 21, 37, 0.4);
}

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

.safwx-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.safwx-btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: safwx-spin 0.8s linear infinite;
}

.safwx-submit-btn.is-loading .safwx-btn-loader {
    display: inline-block;
}

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

/* ============ MENSAJES ============ */
.safwx-form-message {
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 15px;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

.safwx-form-message.is-success {
    background: #e8f5ee;
    color: #1e7a3e;
    border: 1px solid #c2e6cd;
}

.safwx-form-message.is-error {
    background: #fde8e8;
    color: #b42424;
    border: 1px solid #f5c2c2;
}

/* =================================================
   RESPONSIVE - fallbacks si no se usan controles
   ================================================= */
@media (max-width: 480px) {
    .safwx-input,
    .safwx-textarea {
        /* font-size mínimo 16px evita zoom automático en iOS */
        font-size: 16px;
    }
}

/* =================================================
   ACCESIBILIDAD - Reducir movimiento
   ================================================= */
@media (prefers-reduced-motion: reduce) {
    .safwx-input,
    .safwx-textarea,
    .safwx-checkmark,
    .safwx-checkmark::after,
    .safwx-submit-btn,
    .safwx-btn-loader {
        transition: none;
        animation: none;
    }
}
