.demo .wx-cell[data-col-id='status'] {
    
    height: 38px;
    line-height: 38px;
    width: 80px;
    border-bottom: var(--wx-table-cell-border);
  }

.demo .wx-cell[data-col-id='contracted'] {
    height: 38px;
    line-height: 38px;
    width: 100px;
    border-bottom: var(--wx-table-cell-border);
  }

  .demo .wx-cell[data-col-id='actual'] {
    height: 38px;
    line-height: 38px;
    width: 50px;
    border-bottom: var(--wx-table-cell-border);
  }

  .demo .wx-cell[data-col-id='time remaining'] {
    height: 38px;
    line-height: 38px;
    width: 50px;
    border-bottom: var(--wx-table-cell-border);
  }

/* Estilos para las tareas contraídas */
.collapsed-tasks-container {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2px;
    padding: 2px;
/*    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);*/
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.collapsed-task-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 60px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.collapsed-task-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.collapsed-task-bar.complete {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.collapsed-task-bar.in-progress {
    background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
}

.collapsed-task-bar.not-started {
    background: linear-gradient(135deg, #F44336 0%, #d32f2f 100%);
}

/* Tooltip personalizado */
.collapsed-task-bar::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.collapsed-task-bar:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 🆕 NUEVO: Estilos para drag & drop */
.wx-task {
    cursor: grab !important;
    transition: all 0.2s ease;
}

.wx-task:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.wx-task:active {
    cursor: grabbing !important;
    transform: scale(1.02);
}

/* Hacer las barras de tareas más visibles para drag & drop */
.demo .wx-bar {
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.demo .wx-bar:hover {
    border-color: #4a90e2;
    cursor: grab;
}

.demo .wx-bar:active {
    cursor: grabbing;
    opacity: 0.8;
}

/* Animación de entrada */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.collapsed-tasks-container {
    animation: slideIn 0.3s ease-out;
}

/* 🆕 STICKY HEADERS: Hacer que los encabezados queden fijos al hacer scroll */

/* Asegurar que el Gantt tenga una altura máxima y scroll */
.wx-gantt {
    max-height: calc(100vh - 300px) !important;
    overflow: hidden !important;
}

/* El contenedor de scroll debe tener altura y overflow */
.wx-layout {
    max-height: calc(100vh - 300px) !important;
}

/* Headers de la tabla izquierda sticky */
.wx-table-wrapper .wx-header-wrapper {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: var(--wx-background) !important;
}

/* Area de scroll para el contenido */
.wx-chart .wx-scroll {
    overflow-y: auto !important;
    max-height: calc(100vh - 350px) !important;
}

/* Wrapper de la tabla con scroll */
.wx-table-wrapper .wx-wrapper-scroll-y {
    overflow-y: auto !important;
    max-height: calc(100vh - 350px) !important;
}

/* 🆕 WEEKEND STYLING: CSS-based approach for wx-react-gantt */

/* Target timeline cells by date patterns - assuming cells have date attributes */
/* Saturday (6) and Sunday (0) detection using various attribute patterns */

/* Weekend styling - wx-react-gantt highlightTime function */
.wx-weekend {
    background-color: #f5f5f5 !important;
    opacity: 0.8 !important;
}

/* Legacy weekend styling (fallback) */
.weekend-cell[data-weekend="true"] {
    background-color: #f5f5f5 !important;
    opacity: 0.8 !important;
    border-left: 1px solid #e0e0e0 !important;
    border-right: 1px solid #e0e0e0 !important;
}

/* Alternative: target by cell content or position */
/* This is a fallback that might work if cells contain day numbers */
/* Note: :has-text() might not be supported in all browsers */

/* Try targeting cells with specific data attributes that might indicate weekends */
[data-weekend="true"],
[data-day-of-week="0"], /* Sunday */
[data-day-of-week="6"], /* Saturday */
[data-dow="0"], /* Sunday */
[data-dow="6"] { /* Saturday */
    background-color: #f5f5f5 !important;
    opacity: 0.7 !important;
}

/* Try targeting by date string patterns in attributes */
[data-date$="-0"], /* Sunday (day 0 of month) - not reliable */
[data-date$="-6"], /* Saturday (day 6 of month) - not reliable */
[data-start$="-0"],
[data-start$="-6"] {
    background-color: #f5f5f5 !important;
    opacity: 0.7 !important;
}

/* wx-react-gantt specific selectors */
.wx-gantt .wx-timeline .wx-cell[title*="Saturday"],
.wx-gantt .wx-timeline .wx-cell[title*="Sunday"],
.wx-gantt .wx-timeline .wx-cell[aria-label*="Saturday"],
.wx-gantt .wx-timeline .wx-cell[aria-label*="Sunday"] {
    background-color: #f5f5f5 !important;
    opacity: 0.7 !important;
}
