/* L'arruzz - Estilos Personalizados */

/* Tipografía */
.font-fira {
    font-family: 'Fira Sans', sans-serif;
}

/* Color corporativo */
:root {
    --larruzz-orange: #F48D1E;
    --larruzz-orange-hover: #D97A0F;
    --larruzz-orange-light: #FFA040;
}

.text-larruzz-orange {
    color: var(--larruzz-orange);
}

.bg-larruzz-orange {
    background-color: var(--larruzz-orange);
}

.border-larruzz-orange {
    border-color: var(--larruzz-orange);
}

.hover\:bg-larruzz-orange:hover {
    background-color: var(--larruzz-orange);
}

.hover\:border-larruzz-orange:hover {
    border-color: var(--larruzz-orange);
}


/* Botones del Sidebar */
.sidebar-btn {
    font-weight: 600;
    color: white;
    position: relative;
    background-color: black;
    border: 2px solid var(--larruzz-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.sidebar-btn:hover {
    background-color: #1a1a1a;
    border-color: var(--larruzz-orange-light);
}

.sidebar-btn.active {
    background-color: var(--larruzz-orange) !important;
    border-color: var(--larruzz-orange) !important;
    color: white;
    font-weight: 700;
}

/* Botones circulares para móvil */
.mobile-circle-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 7.5px solid var(--larruzz-orange);
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 1.65px black, inset 0 0 0 1.65px black, 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.mobile-circle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 1.65px black, inset 0 0 0 1.65px black, 0 6px 20px rgba(255, 81, 0, 0.3);
    border-width: 9.5px;
}

.mobile-circle-btn:active {
    transform: scale(0.95);
}

.mobile-circle-btn span {
    font-size: 0.9rem; /* Texto un poco más grande y legible */
    font-weight: 700;
    color: black;
    text-align: center;
    line-height: 1.2;
    padding: 0 10px; /* Margen interno para que el texto no toque los bordes */
}

/* Layout responsivo */
@media (max-width: 768px) {
    body.home-background {
        background-image: url('images/fondo.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        background-repeat: no-repeat;
    }

    #sidebar {
        display: none;
    }
    
    #app-content {
        margin-left: 0 !important;
    }
}

/* Animaciones suaves */
.sidebar-btn {
    transition: all 0.2s ease;
}

/* Scrollbar personalizado para el sidebar */
#sidebar nav::-webkit-scrollbar {
    width: 6px;
}

#sidebar nav::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#sidebar nav::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 3px;
}

#sidebar nav::-webkit-scrollbar-thumb:hover {
    background: var(--larruzz-orange);
}

/* Transiciones suaves para el contenido */
#app-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras visuales para formularios */
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--larruzz-orange) !important;
    /* Forzar el anillo naranja reemplazando el azul por defecto */
    box-shadow: 0 0 0 3px rgba(244, 141, 30, 0.3) !important;
}

/* Personalización de controles nativos (fechas, checkbox, radio) */
input[type="date"], input[type="checkbox"], input[type="radio"] {
    accent-color: var(--larruzz-orange) !important;
}

/* Colorear el icono del calendario (solo navegadores WebKit como Chrome/Android) */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    /* Filtro calculado para convertir el icono negro a naranja #F48D1E */
    filter: invert(58%) sepia(61%) saturate(456%) hue-rotate(346deg) brightness(96%) contrast(94%);
}

/* Personalización Flatpickr (Calendario L'arruzz) */
.flatpickr-calendar {
    font-family: 'Fira Sans', sans-serif !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    border-radius: 12px !important;
}

.flatpickr-months .flatpickr-month {
    background: black !important;
    color: white !important;
    fill: white !important;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding-top: 15px !important;
    height: 60px !important;      /* Altura fija para evitar recortes */
    overflow: visible !important; /* Asegurar que nada se oculte */
}

.flatpickr-current-month {
    top: 10px !important; /* Centrar verticalmente */
    padding-top: 0 !important;
    font-size: 1.1rem !important;
}

.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    top: 15px !important; /* Alinear flechas con el texto */
    fill: white !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: black !important;
    font-weight: bold;
    appearance: none; /* Fix visual para móviles */
}

.flatpickr-weekdays {
    background: black !important;
}

span.flatpickr-weekday {
    background: black !important;
    color: var(--larruzz-orange) !important;
    font-weight: bold !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange {
    background: var(--larruzz-orange) !important;
    border-color: var(--larruzz-orange) !important;
    font-weight: bold;
}

/* Botones principales con color corporativo */
.btn-primary-larruzz {
    background-color: var(--larruzz-orange);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 81, 0, 0.2);
}

.btn-primary-larruzz:hover {
    background-color: var(--larruzz-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 81, 0, 0.3);
}

.btn-primary-larruzz:active {
    transform: translateY(0);
}

/* Grid de botones circulares para móvil */
.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .mobile-menu-grid {
        display: none;
    }
}

/* ============================================
   ESTILOS DE IMPRESIÓN - ULTRA SIMPLE
   ============================================ */
@media print {
    @page {
        size: A4 landscape;
        /* Márgenes personalizados para centrado perfecto */
        margin-top: 1.85cm !important;      /* 18.5mm */
        margin-right: 1.8cm !important;      /* 18mm */
        margin-bottom: 0.1cm !important;     /* 1mm */
        margin-left: 1.8cm !important;       /* 18mm */
    }

    /* Forzar colores */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Reset total para eliminar el 'aire' extra */
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background-color: white !important;
    }

    /* Ocultar sidebar */
    #sidebar {
        display: none !important;
    }
    
    /* Ocultar navegación dentro del contenedor */
    .container.mx-auto.max-w-7xl > div:not(#area-impresion-exclusiva) {
        display: none !important;
    }

    #area-impresion-exclusiva {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* ELIMINAR sombras, bordes redondeados y padding del contenedor */
    #area-impresion-exclusiva > div {
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    /* Ocultar selectores */
    select {
        display: none !important;
    }

    /* FORZAR CENTRADO VERTICAL REAL */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        border-bottom: none !important;  /* Sin borde inferior en la tabla */
        border-left: none !important;    /* Sin borde lateral izquierdo */
        border-right: none !important;   /* Sin borde lateral derecho */
    }

    td, th {
        height: 60px !important; /* Altura fija para control total */
        vertical-align: middle !important;
        text-align: center !important;
        padding: 0 !important;
        border-width: 3px 2px !important;  /* Horizontal 3px, Vertical 2px */
        border-style: solid !important;
        border-color: #F48D1E !important;
        overflow: hidden !important;
    }

    /* Estilo para los turnos convertidos a texto */
    .turno-text {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1 !important;           /* Cada turno ocupa la mitad del espacio disponible */
        min-height: 29px !important;  /* Mínimo 29px (60px celda ÷ 2 - 1px línea) */
        width: 100% !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }
    
    /* Contenedor flex de los turnos */
    td > div.flex.flex-col {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        width: 100% !important;
    }
    
    /* Línea separadora de turnos (mañana/tarde) → 1px para mejor visibilidad */
    td > div.flex.flex-col > div {
        height: 1px !important;
        min-height: 1px !important;
        background-color: #F48D1E !important;
        margin: 0 !important;
    }
    
    /* TAMAÑOS DE FUENTE PERSONALIZADOS PARA PDF */
    
    /* Mes y fechas en el encabezado → 20px */
    thead th {
        font-size: 20px !important;
    }
    
    /* Bordes laterales gruesos en el encabezado */
    thead tr th:first-child {
        border-left: 6px solid #F48D1E !important;
    }
    
    thead tr th:last-child {
        border-right: 6px solid #F48D1E !important;
    }
    
    /* Nombres de empleados (primera columna) → 20px */
    tbody td:first-child {
        font-size: 20px !important;
    }
    
    /* Columna de horas (última columna) → 20px + color negro */
    tbody td:last-child input,
    tbody td:last-child {
        font-size: 20px !important;
        font-weight: 700 !important;  /* Texto grueso */
        color: black !important;      /* Color negro */
    }
    
    /* Bordes laterales gruesos (6px) SOLO en zona de empleados */
    tbody tr td:first-child {
        border-left: 6px solid #F48D1E !important;   /* Primera columna (nombres) */
    }
    
    tbody tr td:last-child {
        border-right: 6px solid #F48D1E !important;  /* Última columna (horas) */
    }
    
    /* Última fila de empleados con borde inferior grueso (cierre de tabla) */
    tbody tr:last-child td {
        border-bottom: 6px solid #F48D1E !important;
    }
    
    /* Contadores (tfoot) sin bordes visibles → blancos para simular invisibilidad */
    tfoot td,
    tfoot tr td,
    table tfoot td,
    table tfoot tr td {
        border-top-color: white !important;
        border-top-width: 3px !important;
        border-top-style: solid !important;
        
        border-bottom-color: white !important;
        border-bottom-width: 3px !important;
        border-bottom-style: solid !important;
        
        border-left-color: white !important;
        border-left-width: 2px !important;
        border-left-style: solid !important;
        
        border-right-color: white !important;
        border-right-width: 2px !important;
        border-right-style: solid !important;
    }

    /* Eliminar TODAS las sombras y filtros */
    * {
        box-shadow: none !important;
        filter: none !important;
        text-shadow: none !important;
    }
}
