/* Formulario Dinámico - Estilos Públicos */
.formulario-dinamico-container {
    width: 60% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Asegurar que el contenedor padre también respete el ancho */
body .formulario-dinamico-container {
    width: 60% !important;
    max-width: 800px !important;
}

.formulario-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.formulario-titulo {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.formulario-descripcion {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
}

.formulario-dinamico {
    padding: 20px 0;
}

.form-group {
    margin-bottom: 25px;
}

.control-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: #16a085;
    box-shadow: 0 0 0 0.2rem rgba(22, 160, 133, 0.25);
    outline: none;
}

.form-control.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-check-group {
    margin-top: 10px;
}

.form-check {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check-label {
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

.form-control-file {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-control-file:hover {
    border-color: #16a085;
    background: #f1f8f7;
}

.form-control-file.is-invalid {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-text {
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #e74c3c;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(45deg, #16a085, #1abc9c);
    border: none;
    border-radius: 8px;
    padding: 15px 40px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #138d75, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(22, 160, 133, 0.4);
}

.alert {
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
    text-align: center;
}

.alert-success i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #28a745;
}

.has-error .form-control {
    border-color: #e74c3c;
}

/* Campo específicos */
.campo-date .form-control,
.campo-time .form-control,
.campo-datetime-local .form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23666' d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3e%3cpath fill='%23666' d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.campo-number .form-control {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .formulario-dinamico-container,
    body .formulario-dinamico-container {
        width: 95% !important;
        margin: 10px auto !important;
        padding: 15px !important;
    }
}
    
    .formulario-titulo {
        font-size: 1.5rem;
    }
    
    .formulario-descripcion {
        font-size: 1rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
    }
}