/* Estilos para los campos RUT */
.rut-valid {
    border-color: #28a745 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2328a745"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.rut-error {
    border-color: #dc3545 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23dc3545"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.rut-error-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* Estilos para el grupo de radio buttons de tipo de RUT */
.rut-type-selector {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.rut-type-selector label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: block;
}

.rut-type-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rut-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rut-type-option input[type="radio"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.rut-type-option label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Estilos para los campos de RUT individuales */
.rut-field-container {
    margin: 15px 0;
}

.rut-field-container label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    display: block;
}

.rut-field-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease-in-out;
}

.rut-field-container input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.rut-field-container .help-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
}

/* Estilo para el botón de envío */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d !important;
}

button[type="submit"]:not(:disabled) {
    background-color: #007bff;
    color: white;
    transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:not(:disabled):hover {
    background-color: #0056b3;
}

/* Indicador de validación en progreso */
.validating {
    position: relative;
}

.validating::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .rut-type-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .rut-field-container input {
        font-size: 16px; /* Prevenir zoom en iOS */
    }
}