/* ==========================================================================
   TaskFlow Pro - Gantt Chart & Weekly Timeline Styles
   ========================================================================== */

.gantt-container-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gantt-chart-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.gantt-table {
  min-width: 850px;
  display: flex;
  flex-direction: column;
}

.gantt-header-row {
  display: flex;
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gantt-col-task-name {
  width: 280px;
  min-width: 280px;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
}

.gantt-col-task-name:hover .gantt-task-title-text {
  color: var(--primary);
}

.gantt-task-title-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-task-meta-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-col-timeline {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
  min-height: 48px;
}

.gantt-week-col-header {
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--border-color);
  font-size: 0.8rem;
  white-space: nowrap;
}
.gantt-week-col-header:last-child {
  border-right: none;
}

/* Gantt Body & Rows */
.gantt-body {
  display: flex;
  flex-direction: column;
}

.gantt-row {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}
.gantt-row:hover {
  background: var(--bg-tertiary);
}

.gantt-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  pointer-events: none;
}

.gantt-grid-col {
  border-right: 1px dashed var(--border-subtle);
  height: 100%;
}
.gantt-grid-col:last-child {
  border-right: none;
}

/* Visual Bar */
.gantt-bar-item {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  z-index: 2;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.gantt-bar-item:hover {
  transform: translateY(-50%) scaleY(1.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.gantt-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.gantt-bar-label {
  position: relative;
  z-index: 3;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
}
