/* ============================================
   Nierika Admin Portal - Utilidades CSS Mínimas
   ============================================
   
   Este archivo contiene SOLO las utilidades CSS
   que Bootstrap no cubre. La mayoría del diseño
   debe usar clases de Bootstrap directamente.
   ============================================ */

/* ============================================
   1. Variables CSS Globales
   ============================================ */
:root {
    /* Colores principales (extienden Bootstrap) */
    --bs-primary: #0056b3;
    --bs-primary-rgb: 0, 86, 179;
    
    --bs-success: #1f7a4c;
    --bs-success-rgb: 31, 122, 76;
    
    --bs-danger: #b42318;
    --bs-danger-rgb: 180, 35, 24;
    
    /* Colores personalizados (no cubiertos por Bootstrap) */
    --admin-sidebar-bg: #1a1c23;
    --admin-app-bg: #f4f7f6;
    --admin-border-color: #d9e0e4;
    
    /* Espaciado adicional */
    --admin-spacing-xs: 0.25rem;
    --admin-spacing-sm: 0.5rem;
    --admin-spacing-md: 1rem;
    --admin-spacing-lg: 1.5rem;
    --admin-spacing-xl: 2rem;
}

/* ============================================
   2. Utilidades de Texto
   ============================================ */

/* Letter spacing aumentado */
.ls-wider {
    letter-spacing: 0.08em;
}

/* Ellipsis para texto largo */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Line height personalizado */
.lh-lg {
    line-height: 1.65;
}

/* ============================================
   3. Utilidades de Interacción
   ============================================ */

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* ============================================
   4. Overrides de Bootstrap Específicos
   ============================================ */

/* Input groups con mejor borde */
.input-group-text.border-end-0 + .form-control.border-start-0 {
    border-left: 1px solid transparent !important;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: rgba(var(--bs-primary-rgb), 0.5);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
}

/* Cards con sombra suave */
.card.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075);
}

/* ============================================
   5. Componentes de Tabla y Modales (FluentUI overrides)
   ============================================ */

/* Modales con márgenes superior e inferior siempre */
fluent-dialog::part(control) {
    max-height: calc(100vh - 5rem) !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

fluent-dialog::part(content) {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100vh - 8rem) !important;
    overflow: hidden !important;
}

/* Asegurar que los body y footer de diálogos se comporten correctamente */
fluent-dialog fluent-dialog-body {
    flex: 1 1 auto !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

fluent-dialog fluent-dialog-footer {
    flex-shrink: 0 !important;
    border-top: 1px solid rgba(208, 213, 221, 0.8) !important;
}

/* Tablas con FluentDataGrid */
.admin-table ::deep table {
    width: 100%;
    margin-bottom: 0;
}

.admin-table ::deep th {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--admin-border-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
}

.admin-table ::deep td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--admin-border-color);
}

.admin-table ::deep tr:hover td {
    background-color: #f8f9fa;
}

/* ============================================
   6. Utilidades de Layout Flexbox/Grid
   ============================================ */

/* Max width para contenido de lectura */
.max-w-prose {
    max-width: 58rem;
}

/* Sticky footer para páginas */
.min-vh-100 {
    min-height: 100vh;
}

/* ============================================
   7. Animaciones Suaves
   ============================================ */

.transition-all {
    transition: all 0.2s ease-in-out;
}

.transition-opacity {
    transition: opacity 0.2s ease-in-out;
}

/* Sidebar open/close animation */
.fluent-nav-menu {
    transition: width 0.25s ease, min-width 0.25s ease;
    overflow: hidden;
}

/* ============================================
   8. Scrollbar Personalizado (opcional)
   ============================================ */

.admin-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.admin-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-scrollbar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.admin-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   NOTA: Si necesitas agregar más estilos,
   considera primero si Bootstrap ya los tiene.
   Consulta: https://getbootstrap.com/docs/5.3/utilities/
   ============================================ */
