/* 開發時程推算頁面樣式 — 全部以 .tlfc- 前綴或 .tlfc-wrapper 包裹隔離，只用設計系統 CSS 變數 */

.tlfc-wrapper .tlfc-selector-row {
  display: flex;
  gap: 24px;
  align-items: start;
  flex-wrap: wrap;
  padding: 16px 24px 12px 24px;
}

.tlfc-wrapper .tlfc-status {
  padding: 8px 24px 16px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tlfc-wrapper .tlfc-status.error {
  color: var(--error);
}

.tlfc-wrapper .tlfc-section-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.tlfc-wrapper .tlfc-note {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.tlfc-wrapper .tlfc-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- 參考遊戲 chips --- */
.tlfc-wrapper .tlfc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.tlfc-wrapper .tlfc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-input);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 260px;
}

.tlfc-wrapper .tlfc-chip .tlfc-chip-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tlfc-wrapper .tlfc-chip .tlfc-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tlfc-wrapper .tlfc-chip .tlfc-chip-state {
  flex-shrink: 0;
  font-size: 0.72rem;
}

.tlfc-wrapper .tlfc-chip.loading .tlfc-chip-state {
  display: inline-block;
  animation: tlfc-spin 1s linear infinite;
}

@keyframes tlfc-spin {
  to { transform: rotate(360deg); }
}

.tlfc-wrapper .tlfc-chip.error {
  border-color: var(--error);
  color: var(--error);
  cursor: pointer;
}

.tlfc-wrapper .tlfc-chip.done .tlfc-chip-state {
  color: var(--success, #10b981);
}

.tlfc-wrapper .tlfc-chip .tlfc-chip-x {
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 2px;
}

.tlfc-wrapper .tlfc-chip .tlfc-chip-x:hover {
  color: var(--error);
}

/* --- 反推時間軸 --- */
.tlfc-wrapper .tlfc-tl {
  min-width: 640px;
}

.tlfc-wrapper .tlfc-tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.tlfc-wrapper .tlfc-tl-label {
  flex: 0 0 170px;
  font-size: 0.8rem;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tlfc-wrapper .tlfc-tl-track {
  flex: 1;
  position: relative;
  height: 22px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: visible;
}

.tlfc-wrapper .tlfc-tl-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 3px;
  min-width: 4px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.tlfc-wrapper .tlfc-tl-bar.excluded {
  opacity: 0.45;
}

.tlfc-wrapper .tlfc-tl-bar-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.tlfc-wrapper .tlfc-tl-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed var(--border-color);
}

.tlfc-wrapper .tlfc-tl-tick span {
  display: none;
}

/* 標線：目標 Release（紅實線）與建議開發完成日（警示色虛線） */
.tlfc-wrapper .tlfc-tl-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: auto;
}

.tlfc-wrapper .tlfc-tl-marker.release {
  border-left: 2px solid var(--error);
}

.tlfc-wrapper .tlfc-tl-marker.devend {
  border-left: 2px dashed var(--warning, #d29922);
}

.tlfc-wrapper .tlfc-tl-marker-date {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

/* 兩條標線日期錯行，避免 Release 與開發完成日相近時文字重疊 */
.tlfc-wrapper .tlfc-tl-marker.devend .tlfc-tl-marker-date {
  top: 14px;
}

.tlfc-wrapper .tlfc-tl-marker.release .tlfc-tl-marker-date {
  color: var(--error);
}

.tlfc-wrapper .tlfc-tl-marker.devend .tlfc-tl-marker-date {
  color: var(--warning, #d29922);
}

.tlfc-wrapper .tlfc-tl-axis {
  height: 44px;
  background: transparent;
  overflow: visible;
}

.tlfc-wrapper .tlfc-tl-axis .tlfc-tl-tick span {
  display: block;
  position: absolute;
  top: 30px;
  left: 2px;
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tlfc-wrapper .tlfc-tl-dates {
  flex: 0 0 175px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

/* --- 表格 --- */
.tlfc-wrapper .tlfc-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tlfc-wrapper .tlfc-tbl th {
  padding: 8px 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  white-space: nowrap;
}

.tlfc-wrapper .tlfc-tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
}

.tlfc-wrapper .tlfc-mono {
  font-family: var(--font-mono);
}

/* --- 參數調整輸入框與已調整標記 --- */
.tlfc-wrapper .tlfc-adj-input {
  width: 72px;
  padding: 4px 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.tlfc-wrapper .tlfc-badge-adj {
  background: rgba(210, 153, 34, 0.15);
  color: var(--warning, #d29922);
}

.tlfc-wrapper .tlfc-row-adj td {
  background: rgba(210, 153, 34, 0.05);
}

/* --- 警告區 --- */
.tlfc-wrapper .tlfc-warnings {
  border-left: 4px solid var(--warning, #d29922);
  background: rgba(210, 153, 34, 0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
