/* Gantt chart (/gantt-chart): the task list, timeline, bars, today line and project list.
   Stage, panels, fields and buttons come from the app kit (css/app-kit, docs/app-kit.md);
   the accent is the time category's violet. Loaded only on this app's page (StylePaths). */
.gc-landing-stage {
    display: flex;
    flex-direction: column;
    min-height: 36rem;
}

.gc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.55rem;
}

.gc-board.ak-panel,
.gc-board {
    display: grid !important;
    grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 28rem;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
}

.gc-list-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--ak-border, #e2e8f0);
    min-width: 0;
}

.gc-list-head,
.gc-head {
    height: 2.4rem;
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    font-weight: 700;
    border-bottom: 1px solid var(--ak-border, #e2e8f0);
    background: color-mix(in srgb, var(--ak-panel, #fff) 88%, var(--ak-accent, #7c3aed) 12%);
    overflow: hidden;
}

.gc-list {
    overflow: auto;
    flex: 1 1 auto;
}

.gc-row {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    height: 36px;
    padding-left: calc(0.4rem + (var(--gc-depth, 0) * 0.85rem));
    padding-right: 0.4rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ak-border, #e2e8f0) 70%, transparent);
    box-sizing: border-box;
}

.gc-row.is-selected,
.gc-lane.is-selected {
    background: color-mix(in srgb, var(--ak-accent, #7c3aed) 14%, transparent);
}

.gc-row.is-conflict .gc-row-title,
.gc-row.is-conflict {
    box-shadow: inset 3px 0 0 #be123c;
}

.gc-row.is-group .gc-row-title {
    font-weight: 700;
}

.gc-row-title {
    flex: 1 1 auto;
    text-align: start;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-toggle {
    flex: 0 0 auto;
}

.gc-toggle-spacer {
    width: 1.6rem;
    flex: 0 0 auto;
}

.gc-chart-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.gc-head,
.gc-chart {
    overflow-x: auto;
    overflow-y: hidden;
}

.gc-chart {
    flex: 1 1 auto;
    overflow: auto;
    position: relative;
}

.gc-head-inner,
.gc-chart-inner {
    position: relative;
    min-height: 2.4rem;
}

.gc-chart-inner {
    min-height: 100%;
}

.gc-tick {
    position: absolute;
    top: 0;
    height: 100%;
    box-sizing: border-box;
    border-right: 1px solid color-mix(in srgb, var(--ak-border, #e2e8f0) 80%, transparent);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ak-muted, #64748b);
    white-space: nowrap;
}

.gc-lane {
    position: relative;
    height: 36px;
    border-bottom: 1px solid color-mix(in srgb, var(--ak-border, #e2e8f0) 70%, transparent);
    box-sizing: border-box;
}

.gc-bar,
.gc-diamond {
    position: absolute;
    top: 6px;
    height: 24px;
    border: 0;
    cursor: grab;
    padding: 0;
}

.gc-bar {
    border-radius: 7px;
    background: var(--gc-bar, #7c3aed);
    min-width: 8px;
    overflow: hidden;
}

.gc-bar.is-group {
    height: 16px;
    top: 10px;
    border-radius: 3px;
    opacity: 0.85;
}

.gc-bar-progress {
    display: block;
    height: 100%;
    background: color-mix(in srgb, #fff 35%, transparent);
    pointer-events: none;
}

.gc-bar-handle {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
}

.gc-bar-handle--start { left: 0; }
.gc-bar-handle--end { right: 0; }

.gc-diamond {
    width: 16px;
    height: 16px;
    top: 10px;
    margin-left: -8px;
    background: var(--gc-bar, #7c3aed);
    transform: rotate(45deg);
    border-radius: 2px;
}

.gc-deps {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    overflow: visible;
}

.gc-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e11d48;
    pointer-events: none;
    z-index: 2;
}

.gc-head .gc-today-line {
    bottom: 0;
    height: 100%;
}

.gc-project-list {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.gc-project {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.gc-project-name {
    flex: 1 1 auto;
    text-align: start;
}

.gc-project.is-current .gc-project-name {
    font-weight: 700;
}

.gc-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gc-swatch {
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--ak-swatch);
    cursor: pointer;
}

.gc-swatch--auto {
    background: var(--ak-panel);
    color: var(--ak-text);
    font-size: 0.75rem;
    font-weight: 700;
}

.gc-swatch[aria-pressed="true"] {
    border-color: var(--ak-text);
    box-shadow: 0 0 0 2px var(--ak-bg), 0 0 0 4px var(--ak-swatch, var(--ak-accent));
}

@media (max-width: 700px) {
    .gc-landing-stage,
    .gc-board {
        min-height: 22rem;
    }
    .gc-board {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(8rem, 12rem) minmax(12rem, 1fr);
    }
    .gc-list-col {
        border-right: 0;
        border-bottom: 1px solid var(--ak-border, #e2e8f0);
    }
}
