/* Gantt Chart Styles */

.timeline-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.timeline-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

.timeline-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.gantt-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    overflow: auto;
    min-height: 400px;
    max-height: 600px;
}

.gantt-chart {
    position: relative;
    min-width: max-content;
    display: flex;
    flex-direction: column;
}

.gantt-header {
    display: flex;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.gantt-tasks-header {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.5rem;
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
}

.gantt-timeline-header {
    flex: 1;
    display: flex;
    overflow-x: visible;
    min-width: 0;
}

.gantt-day-header {
    min-width: 80px;
    width: 80px;
    flex-shrink: 0;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    border-left: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: visible;
}

.gantt-day-header.today {
    background: rgba(79, 70, 229, 0.1);
    font-weight: 600;
    color: var(--primary-color);
}

.gantt-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gantt-row {
    display: flex;
    align-items: center;
    min-height: 50px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.gantt-row:hover {
    background: var(--background);
}

.gantt-row:hover .gantt-task-name {
    background: var(--background);
}

.gantt-task-name {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    padding: 0.5rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
}

.gantt-timeline {
    flex: 1;
    position: relative;
    height: 40px;
    display: flex;
    min-width: 0;
}

.gantt-day-cell {
    min-width: 80px;
    width: 80px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-color);
    position: relative;
}

.gantt-day-cell.today {
    background: rgba(79, 70, 229, 0.05);
}

.gantt-bar {
    position: absolute;
    height: 32px;
    top: 4px;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.gantt-bar.single {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.gantt-bar.recurring {
    background: linear-gradient(135deg, var(--primary-color), #4338ca);
}

.gantt-bar-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-tooltip {
    position: absolute;
    background: var(--text-primary);
    color: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    min-width: 200px;
}

.gantt-tooltip.show {
    opacity: 1;
}

.gantt-tooltip-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gantt-tooltip-info {
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.6;
}

.gantt-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.gantt-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.gantt-legend-color.single {
    background: var(--success-color);
}

.gantt-legend-color.recurring {
    background: var(--primary-color);
}

.gantt-legend-color.today {
    background: rgba(79, 70, 229, 0.1);
    border: 2px solid var(--primary-color);
}

/* Empty state for timeline */
.gantt-container .empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Responsive */
@media (max-width: 768px) {
    .gantt-task-name {
        width: 120px;
        min-width: 120px;
        font-size: 0.875rem;
    }
    
    .gantt-tasks-header {
        width: 120px;
        min-width: 120px;
    }
    
    .gantt-day-cell {
        min-width: 60px;
        width: 60px;
    }
    
    .gantt-day-header {
        min-width: 60px;
        width: 60px;
        font-size: 0.75rem;
        padding: 0.25rem;
    }
}

