/* gantt.css — Phase 8: Timeline/Gantt layout + styles */

/* ---- Gantt shell (reuses .board as outer wrapper) ---- */
.gantt {
    /* inherits from .board: flex column, height 100%, overflow hidden */
}

/* ---- Two-panel body ---- */
.gantt__body {
    display: flex;
    flex: 1;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
}

/* ---- Left: fixed label panel ---- */
.gantt__labels {
    width: 220px;
    flex-shrink: 0;
    overflow: hidden;               /* no scroll — synced with chart */
    border-right: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
}

.gantt__label-header {
    flex-shrink: 0;
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
}

.gantt__label-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.12s;
}

.gantt__label-row:hover {
    background: color-mix(in srgb, var(--color-accent) 6%, transparent) !important;
}

.gantt__label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gantt__label-text {
    font-size: var(--font-size-sm);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* ---- Right: scrollable chart ---- */
.gantt__chart-wrap {
    flex: 1;
    overflow: auto;
    position: relative;
    background: var(--color-bg);
}

/* SVG text defaults */
.gantt__chart-wrap svg text {
    dominant-baseline: auto;
    pointer-events: none;
    user-select: none;
}

/* ---- Tooltip ---- */
.gantt__tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 100;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    padding: var(--space-2) var(--space-3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gantt__tooltip-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt__tooltip-status {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gantt__tooltip-due {
    font-size: 11px;
    color: var(--color-text-secondary);
}

/* ---- Timeline axis (rendered in SVG but styled here for reference) ---- */
.timeline-axis {
    /* SVG group — styling via SVG attributes in gantt.js */
}

/* ---- Mobile responsive: gantt timeline ---- */
@media (max-width: 639px) {
    .gantt__labels {
        width: 140px;
    }

    .gantt__label-header,
    .gantt__label-row {
        padding: 0 var(--space-2);
    }

    .gantt__label-text {
        font-size: 11px;
    }

    .gantt__tooltip {
        max-width: 160px;
        font-size: 11px;
        padding: var(--space-1) var(--space-2);
    }
}
