/**
 * Estilos para formularios personalizados
 */

/* Reset y normalización */
.custom-form-container *,
.custom-form-container *::before,
.custom-form-container *::after {
    box-sizing: border-box;
}

/* Barra de progreso para formularios individuales */
.form-progress-bar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
    border: none;
}

.form-progress-bar .progress-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
}

.form-progress-bar .current-step {
    font-weight: 600;
    color: #1B77BB;
    font-size: 20px;
}

.form-progress-bar .progress-percentage {
    color: #72B9E7;
    font-size: 16px;
    margin: 0;
    text-align: left;
    display: inline-block;
}

.form-progress-bar .progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.form-progress-bar .progress-fill {
    height: 100%;
    background: #8DBA38;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Contenedor para el porcentaje debajo de la barra */
.form-progress-bar .progress-percentage-container {
    margin-top: 8px;
    text-align: left;
}

/* Contenedor principal del formulario */
.custom-form-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow: visible;
    /* Cambiado a visible para permitir dropdowns */
    box-sizing: border-box;
}

/* Formulario */
.custom-form {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    /* Cambiado a visible para permitir dropdowns */
}

/* Filas del formulario */
.custom-form .form-fields {
    margin-bottom: 20px;
}

.custom-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    overflow: visible !important;
    /* Permitir que los dropdowns se muestren */
    /* Permitir que se envuelvan en pantallas pequeñas */
}

.custom-form-two-columns .form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    /* Alinear inputs por la parte inferior */
}

.custom-form-one-column .form-row {
    display: block;
}

.custom-form-one-column .form-field {
    margin-bottom: 20px;
}

/* Campos individuales */
.custom-form .form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Permite que flex items se encojan */
    max-width: 100%;
    box-sizing: border-box;
    justify-content: flex-end;
    /* Alinear contenido hacia abajo */
    overflow: visible !important;
    /* Permitir que el dropdown se muestre */
    position: relative;
    /* Para posicionar mensajes de error de forma absoluta */
}

/* Fila para campos de ancho completo */
.custom-form .form-row-full {
    display: flex;
    margin-bottom: 20px;
    width: 100%;
}

/* Campo de ancho completo */
.custom-form .form-field-full {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Inputs y selects de ancho completo - sobrescriben el width: 444px */
.custom-form .form-field-full input:not([type="checkbox"]):not([type="radio"]),
.custom-form .form-field-full select {
    width: 100% !important;
    max-width: 100% !important;
}

.custom-form .form-field-full textarea {
    width: 100% !important;
    max-width: 100% !important;
}

/* SlimSelect de ancho completo */
.custom-form .form-field-full .ss-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

.custom-form .form-field label {
    color: #4D5D97;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    display: block;
    text-align: left;
}

/* Inputs y selects */
.custom-form .form-field input:not([type="checkbox"]):not([type="radio"]),
.custom-form .form-field select {
    padding: 12px 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: #fff !important;
    width: 444px !important;
    height: 44px !important;
    box-sizing: border-box !important;
}

.custom-form .form-field textarea {
    padding: 12px 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: #fff !important;
    width: 444px !important;
    box-sizing: border-box !important;
}

/* Placeholders */
.custom-form .form-field input::placeholder,
.custom-form .form-field textarea::placeholder {
    color: #7985B1;
    opacity: 1;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0%;
}

.custom-form .form-field input::-webkit-input-placeholder,
.custom-form .form-field textarea::-webkit-input-placeholder {
    color: #7985B1;
    opacity: 1;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0%;
}

.custom-form .form-field input::-moz-placeholder,
.custom-form .form-field textarea::-moz-placeholder {
    color: #7985B1;
    opacity: 1;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0%;
}

.custom-form .form-field input:-ms-input-placeholder,
.custom-form .form-field textarea:-ms-input-placeholder {
    color: #7985B1;
    opacity: 1;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0%;
}

/* Selectores - opciones por defecto */
.custom-form .form-field select {
    color: #7985B1;
    font-weight: normal;
}

.custom-form .form-field select option {
    color: #333;
    font-weight: normal;
}

.custom-form .form-field select option:first-child {
    color: #7985B1;
    font-weight: normal;
}

.custom-form .form-field input:not([type="checkbox"]):not([type="radio"]):focus,
.custom-form .form-field select:focus,
.custom-form .form-field textarea:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

/* Mensajes de error para campos */
.custom-form .form-field .field-error-message {
    color: #dc3545;
    font-size: 12px;
    display: block;
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 2px;
    line-height: 1.4;
    z-index: 10;
    background: #fff;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    pointer-events: none;
}

.custom-form .form-field input:not([type="checkbox"]):not([type="radio"]).error:not(.valid),
.custom-form .form-field select.error:not(.valid),
.custom-form .form-field textarea.error:not(.valid),
.multi-step-form-container input.error:not(.valid),
.multi-step-form-container select.error:not(.valid),
.multi-step-form-container textarea.error:not(.valid),
.modal-multi-step-form-container input.error:not(.valid),
.modal-multi-step-form-container select.error:not(.valid),
.modal-multi-step-form-container textarea.error:not(.valid) {
    border-color: #b21010 !important;
    border-width: 2px !important;
    border-style: solid !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

/* Clase para campos válidos - sobrescribe el error */
.custom-form .form-field input.valid,
.custom-form .form-field select.valid,
.custom-form .form-field textarea.valid {
    border-color: #d1d5db !important;
    border-width: 1px !important;
    border-style: solid !important;
    box-shadow: none !important;
}

/* Estilos para Slim Select con error */
.ss-main.error,
.ss-main.slim-select-multiselect.error,
.custom-form .ss-main.error,
.multi-step-form-container .ss-main.error,
.modal-multi-step-form-container .ss-main.error {
    border-color: #b21010 !important;
    border-width: 2px !important;
    border-style: solid !important;
    box-shadow: 0 0 0 3px rgba(178, 16, 16, 0.1) !important;
}

/* Select personalizado */
.custom-form .form-field select {
    cursor: pointer;
    padding-right: 40px;
    /* Ocultar flecha nativa del navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Flecha personalizada */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

/* Slim Select Multiselect - Personalización según documentación oficial */
.ss-main {
    width: 100% !important;
    max-width: 444px !important;
    height: 44px !important;
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    background: #fff !important;
    font-size: 14px !important;
    overflow-y: auto !important;
}

/* SlimSelect de ancho completo - sobrescribe max-width: 444px */
.form-field-full .ss-main,
.custom-form .form-field-full .ss-main,
.multi-step-form-container .form-field-full .ss-main,
.multi-step-form-container .custom-form .form-field-full .ss-main {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

.ss-main .ss-values .ss-placeholder {
    font-family: 'Montserrat', sans-serif;
    color: #7985B1 !important;
}

.ss-main:focus {
    box-shadow: none !important;
}

.ss-main .ss-values .ss-value {
    background-color: #20347d !important;
}

.ss-content .ss-list .ss-option {
    color: #7985B1;
    font-size: 14px !important;
    font-family: 'Montserrat', sans-serif;
}

.ss-content .ss-list .ss-option.ss-highlighted,
.ss-content .ss-list .ss-option:not(.ss-disabled).ss-selected {
    background-color: #1967d2 !important;
}

.ss-content .ss-list .ss-option:hover {
    background-color: #1967d2 !important;
    color: #ffff !important;
}

.custom-form .form-field .ss-main:focus,
.custom-form .form-field .ss-main.ss-open-below,
.custom-form .form-field .ss-main.ss-open-above {
    border-color: #1a365d !important;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1) !important;
}

.custom-form .form-field .ss-main .ss-single {
    color: #333 !important;
    font-size: 14px !important;
}

.custom-form .form-field .ss-main .ss-placeholder {
    color: #7985B1 !important;
    font-size: 14px !important;
}

.custom-form .form-field .ss-main .ss-arrow {
    width: 20px !important;
    height: 20px !important;
}

.custom-form .form-field .ss-content {
    border: 2px solid #e2e8f0 !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    max-height: 200px !important;
    background: #fff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.custom-form .form-field .ss-content .ss-list {
    max-height: 200px !important;
    overflow-y: auto !important;
    background: #fff !important;
}

.custom-form .form-field .ss-content .ss-option {
    padding: 6px 12px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    background: #fff !important;
    color: #333 !important;
}

.custom-form .form-field .ss-content .ss-option:hover,
.custom-form .form-field .ss-content .ss-option.ss-highlighted {
    background-color: #f3f4f6 !important;
    color: #333 !important;
}

.custom-form .form-field .ss-content .ss-option.ss-option-selected {
    background-color: #1a365d !important;
    color: #fff !important;
}

.custom-form .form-field .ss-main .ss-multi-selected {
    background-color: #1a365d !important;
    border-color: #1a365d !important;
    color: #fff !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
    margin: 2px !important;
    border-radius: 4px !important;
}

.custom-form .form-field .ss-main .ss-multi-selected .ss-value {
    color: #fff !important;
}

.custom-form .form-field .ss-main .ss-multi-selected .ss-value-delete {
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    opacity: 0.8;
}

.custom-form .form-field .ss-main .ss-multi-selected .ss-value-delete:hover {
    opacity: 1;
}

/* Textarea */
.custom-form .form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons */
.custom-form .form-field .radio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.custom-form .radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
}

.custom-form .radio-option input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin-right: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 2px solid #e2e8f0 !important;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    border-radius: 50% !important;
}

.custom-form .radio-option input[type="radio"]:checked {
    background-color: #1a365d !important;
    border-color: #1a365d !important;
}

.custom-form .radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.custom-form .radio-option input[type="radio"]:hover {
    border-color: #1a365d !important;
}

.custom-form .radio-option input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1) !important;
}

.custom-form .radio-option span {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    flex: 1;
}

/* Checkboxes */
.custom-form .form-field .checkbox-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
}

.custom-form .checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
}

.custom-form .checkbox-option input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin-right: 12px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 4px !important;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.custom-form .checkbox-option input[type="checkbox"]:checked {
    background-color: #1a365d !important;
    border-color: #1a365d !important;
}

.custom-form .checkbox-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -60%) rotate(45deg);
    transform: translate(-50%, -60%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.custom-form .checkbox-option input[type="checkbox"]:hover {
    border-color: #1a365d !important;
}

.custom-form .checkbox-option input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1) !important;
}

.custom-form .checkbox-option span {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    flex: 1;
}

.form-required-notice {
  color: #333;
  font-size: 12px;
  text-align: center;
}

/* Botón de envío */
.custom-form .form-submit {
    text-align: center;
    margin-top: 20px;
}

.custom-form-submit-btn {
    background: #1a365d;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.custom-form-submit-btn:hover {
    background: #2c5282;
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
}

.custom-form-submit-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* Mensajes */
.custom-form .form-messages {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.custom-form .form-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
    border-left: 4px solid #16a34a;
}

.custom-form .form-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #f87171;
    border-left: 4px solid #dc2626;
}

/* Iconos para los mensajes en custom forms */
.custom-form .form-error::before {
    content: "⚠️";
    font-size: 18px;
    margin-right: 5px;
}

.custom-form .form-success::before {
    content: "✅";
    font-size: 18px;
    margin-right: 5px;
}

/* Animaciones para custom forms */
@keyframes slideInDown {
    from {
        opacity: 0;
        -webkit-transform: translateY(-10px);
        transform: translateY(-10px);
    }

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

.custom-form .form-messages.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    to {
        opacity: 0;
        -webkit-transform: translateY(-10px);
        transform: translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .custom-form .form-row {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .custom-form .form-field {
        margin-bottom: 15px;
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    /* En móviles, mantener el comportamiento de campos full width */
    .custom-form .form-field-full {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .custom-form-container {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .custom-form {
        width: 100%;
        max-width: 100%;
    }

    /* Font-size 16px para inputs y selects en móviles para evitar zoom en iOS */
    .custom-form .form-field input:not([type="checkbox"]):not([type="radio"]),
    .custom-form .form-field select,
    .custom-form .form-field textarea {
        font-size: 16px !important;
    }

    /* SlimSelect también debe tener font-size 16px en móviles */
    .custom-form .form-field .ss-main,
    .custom-form .form-field .ss-main .ss-single-selected,
    .custom-form .form-field .ss-content .ss-option {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .custom-form-container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .custom-form {
        width: 100%;
        max-width: 100%;
    }

    .custom-form .form-field input:not([type="checkbox"]):not([type="radio"]),
    .custom-form .form-field select {
        padding: 10px 12px;
        font-size: 16px;
        width: 100%;
        max-width: 444px;
        height: 44px;
        box-sizing: border-box;
        /* Evita zoom en iOS */
    }

    .custom-form .form-field textarea {
        padding: 10px 12px;
        font-size: 16px;
        width: 100%;
        max-width: 444px;
        box-sizing: border-box;
        /* Evita zoom en iOS */
    }


    .custom-form-submit-btn {
        width: 100%;
        padding: 14px 20px;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Estilos para campos requeridos */
.custom-form .form-field label:after {
    content: '';
}

.custom-form .form-field label[data-required="true"]:after {
    content: ' *';
    color: #e53e3e;
}

/* Estilos para el admin de WordPress - Evitar desbordamiento */
.meta-box-sortables input,
.meta-box-sortables select,
.meta-box-sortables textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.form-table td {
    max-width: 0;
    overflow: hidden;
    word-wrap: break-word;
}

.form-table td input,
.form-table td select,
.form-table td textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Estilos específicos para textareas en el admin */
.form-table td textarea {
    max-width: 100%;
    width: 100%;
    resize: vertical;
    box-sizing: border-box;
}

/* Estilos para campos de URL y email en el admin */
.form-table td input[type="url"],
.form-table td input[type="email"] {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Estilos adicionales para meta boxes */
.postbox .inside {
    max-width: 100%;
    overflow: hidden;
}

.postbox .inside .form-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.postbox .inside .form-table th {
    width: 30%;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.postbox .inside .form-table td {
    width: 70%;
    max-width: none;
    overflow: visible;
}

/* Estilos para campos específicos del formulario */
#form_settings .form-table td input,
#form_settings .form-table td textarea,
#form_settings .form-table td select {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive para admin */
@media (max-width: 1200px) {
    .postbox .inside .form-table th {
        width: 25%;
        max-width: 150px;
    }

    .postbox .inside .form-table td {
        width: 75%;
    }
}

@media (max-width: 768px) {
    .postbox .inside .form-table {
        display: block;
    }

    .postbox .inside .form-table tr {
        display: block;
        margin-bottom: 15px;
    }

    .postbox .inside .form-table th,
    .postbox .inside .form-table td {
        width: 100%;
        max-width: 100%;
        display: block;
    }

    .postbox .inside .form-table th {
        margin-bottom: 5px;
        font-weight: bold;
    }
}

/* Animaciones */
.custom-form .form-field {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }

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

/* Estados de carga */
.custom-form.loading .form-field {
    opacity: 0.6;
    pointer-events: none;
}

/* Excepción: permitir clics en Slim Select incluso cuando el formulario está cargando */
.custom-form.loading .ss-main {
    pointer-events: auto !important;
    opacity: 1 !important;
}

.custom-form.loading .custom-form-submit-btn {
    background: #a0aec0;
    cursor: not-allowed;
}

/* Selectores dependientes */
.custom-form .form-field select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.custom-form .form-field select:disabled option {
    color: #9ca3af;
}

/* Indicador de carga para selectores */
.custom-form .form-field select[data-loading="true"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3e%3ccircle cx='12' cy='12' r='10' stroke='%236b7280' stroke-width='4'/%3e%3cpath d='m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z' fill='%236b7280'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* Estilos para campos de país y ciudad - heredan del selector general */

/* Mensaje de estado para selectores dependientes */
.custom-form .form-field .field-status {
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
}

.custom-form .form-field .field-status.loading {
    background: #fef3c7;
    color: #92400e;
    display: block;
}

.custom-form .form-field .field-status.error {
    background: #fee2e2;
    color: #dc2626;
    display: block;
}

.custom-form .form-field .field-status.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}

/* Indicador de guardado automático */
.auto-save-indicator {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.auto-save-indicator .auto-save-icon {
    font-size: 16px;
}

.auto-save-indicator.success {
    background: #d1fae5;
    border-color: #9ae6b4;
    color: #065f46;
}

.auto-save-indicator.error {
    background: #fee2e2;
    border-color: #feb2b2;
    color: #dc2626;
}

.auto-save-indicator.info {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* Estilos para el contenido textual del formulario */
.custom-form-content {
    margin-bottom: 0px;
}

.custom-form-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.custom-form-content h1,
.custom-form-content h2,
.custom-form-content h3,
.custom-form-content h4,
.custom-form-content h5,
.custom-form-content h6 {
    margin-top: 8px;
    margin-bottom: 0px;
    /*   font-weight: 600; */
}

.custom-form-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}

.custom-form-content ul,
.custom-form-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.custom-form-content li {
    margin-bottom: 8px;
}