/* /avisos/assets/formularios.css v1 - FORMULARIOS MÓDULO AVISOS */

/* ===== FORMULARIOS INLINE ===== */
.form-accion {
    display: inline-block;
    margin: 0;
}

.acciones-papelera {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ===== BOTONES DE FORMULARIO ===== */
.btn-form {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.2;
}

.btn-form:focus {
    outline: 2px solid rgba(0,123,255,0.5);
    outline-offset: 2px;
}

/* ===== VARIANTES DE BOTONES ===== */
.btn-restaurar {
    background: #28a745;
    color: white;
}

.btn-restaurar:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-eliminar {
    background: #dc3545;
    color: white;
}

.btn-eliminar:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-guardar {
    background: #007bff;
    color: white;
}

.btn-guardar:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-cancelar {
    background: #6c757d;
    color: white;
}

.btn-cancelar:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* ===== BOTÓN VOLVER ===== */
.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-volver:hover {
    background: #e9ecef;
    color: #212529;
    text-decoration: none;
    transform: translateX(-2px);
}

/* ===== FORMULARIOS PRINCIPALES ===== */
.formulario-aviso {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.grupo-campo {
    margin-bottom: 16px;
}

.etiqueta-campo {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.campo-entrada {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.campo-entrada:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.campo-textarea {
    resize: vertical;
    min-height: 80px;
}

.campo-select {
    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 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* ===== ESTADOS DE VALIDACIÓN ===== */
.campo-entrada.error {
    border-color: #dc3545;
}

.campo-entrada.exito {
    border-color: #28a745;
}

.mensaje-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.mensaje-exito {
    color: #28a745;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== CHECKBOXES Y RADIOS ===== */
.grupo-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.checkbox-personalizado {
    width: 18px;
    height: 18px;
    accent-color: #007bff;
}

.etiqueta-checkbox {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    font-weight: normal;
}

/* ===== INFO Y ALERTAS ===== */
.info-papelera {
    background: #fff3cd;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-bottom: 16px;
    font-size: 14px;
}

.alerta-exito {
    background: #d1edff;
    color: #0c5460;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
    margin-bottom: 16px;
    font-size: 14px;
}

.alerta-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .formulario-aviso {
        padding: 16px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .acciones-papelera {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    
    .btn-form {
        justify-content: center;
        width: 100%;
    }
    
    .btn-volver {
        margin: 10px;
        justify-content: center;
    }
    
    .grupo-campo {
        margin-bottom: 12px;
    }
    
    .campo-entrada {
        padding: 8px 10px;
    }
}

/* ===== LOADING STATES ===== */
.btn-form:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-form.cargando::after {
    content: "...";
    animation: puntos 1s infinite;
}

@keyframes puntos {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}