/* ============================================================
   FsC_CSS.css - Estilos completos
   ============================================================ */

/* Animaciones */
.fra-spin-9 {
    animation: fra-spin 0.9s linear infinite;
}

@keyframes fra-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert {
    animation: slideDown 0.2s ease;
}

/* Mensajes */
#VerMensaje_global {
    position: sticky;
    top: 8px;
    z-index: 9999;
    max-width: 800px;
    margin: 0 auto 8px auto;
}

[id^="VerMensaje_"] {
    margin-bottom: 8px;
}

.alert {
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    margin-bottom: 0.5rem !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    backdrop-filter: blur(8px) !important;
}

.alert i {
    flex-shrink: 0 !important;
    font-size: 1.1rem !important;
}

.alert .flex-grow-1 {
    flex: 1 !important;
}

.alert .btn-close {
    flex-shrink: 0 !important;
    padding: 0.25rem !important;
    font-size: 0.7rem !important;
    opacity: 0.5 !important;
    transition: opacity 0.2s !important;
}

.alert .btn-close:hover {
    opacity: 1 !important;
}

.alert-success {
    background: rgba(240, 253, 244, 0.85) !important;
    color: #166534 !important;
    border-left: 3px solid #22c55e !important;
}

.alert-danger {
    background: rgba(254, 242, 242, 0.85) !important;
    color: #991b1b !important;
    border-left: 3px solid #ef4444 !important;
}

.alert-warning {
    background: rgba(255, 251, 235, 0.85) !important;
    color: #92400e !important;
    border-left: 3px solid #f59e0b !important;
}

.alert-info {
    background: rgba(239, 246, 255, 0.85) !important;
    color: #1e40af !important;
    border-left: 3px solid #3b82f6 !important;
}

.alert-primary {
    background: rgba(238, 242, 255, 0.85) !important;
    color: #3730a3 !important;
    border-left: 3px solid #6366f1 !important;
}

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
    .alert-success {
        background: rgba(22, 101, 52, 0.75) !important;
        color: #86efac !important;
        border-left: 3px solid #22c55e !important;
    }
    .alert-danger {
        background: rgba(153, 27, 27, 0.75) !important;
        color: #fca5a5 !important;
        border-left: 3px solid #ef4444 !important;
    }
    .alert-warning {
        background: rgba(146, 64, 14, 0.75) !important;
        color: #fcd34d !important;
        border-left: 3px solid #f59e0b !important;
    }
    .alert-info {
        background: rgba(30, 64, 175, 0.75) !important;
        color: #93c5fd !important;
        border-left: 3px solid #3b82f6 !important;
    }
    .alert-primary {
        background: rgba(55, 48, 163, 0.75) !important;
        color: #a5b4fc !important;
        border-left: 3px solid #6366f1 !important;
    }
    .alert .btn-close {
        filter: brightness(0) invert(1) !important;
        opacity: 0.6 !important;
    }
    .alert .btn-close:hover {
        opacity: 1 !important;
    }
}

/* Confirmación personalizada */
#ModalConfirmacion .modal-dialog {
    transform: scale(0.9);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#ModalConfirmacion.show .modal-dialog {
    transform: scale(1);
}

#ModalConfirmacion .modal-backdrop {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
}

#ModalConfirmacion .modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden;
}

#ModalConfirmacion .btn-light:hover {
    background-color: #e9ecef !important;
}

#ModalConfirmacion .btn-danger:hover,
#ModalConfirmacion .btn-warning:hover,
#ModalConfirmacion .btn-info:hover,
#ModalConfirmacion .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#ModalConfirmacion .rounded-circle {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Laterales y modales */
.offcanvas {
    max-width: 100% !important;
    transition: width 0.3s ease !important;
}

.offcanvas-header {
    padding: 0.6rem 1.2rem !important;
}

.offcanvas-header .offcanvas-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.offcanvas-body {
    padding: 0 !important;
}

.modal-header {
    padding: 0.6rem 1.2rem !important;
}

.modal-header .modal-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.modal-body {
    padding: 0 !important;
}

/* Contenedores */
#contenedorAjax {
    min-height: 150px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

/* Loaders */
.loading-indicator {
    padding: 30px 0;
    text-align: center;
}

.loading-indicator i {
    font-size: 2.5rem;
}

.loading-indicator .text-muted {
    font-size: 0.85rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .alert {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
        gap: 6px !important;
    }
    .alert i {
        font-size: 0.9rem !important;
    }
    #VerMensaje_global {
        top: 4px;
        margin: 0 4px 4px 4px;
    }
    .offcanvas-header {
        padding: 0.4rem 0.8rem !important;
    }
    .modal-header {
        padding: 0.4rem 0.8rem !important;
    }
    #ModalConfirmacion .modal-dialog {
        margin: 0.5rem;
    }
    #ModalConfirmacion .modal-content {
        border-radius: 12px !important;
    }
}