/* Schedule Review workspace: mode tabs, planning handoff summary and stage switching.
   Existing tool styling (upload panels, compare slots, lookahead report) lives in site.css. */
.schedule-modes {
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.schedule-modes .view-tab { min-height: 44px; font-size: 16px; }
.schedule-feedback:empty { display: none; }
.schedule-feedback { margin: 0 0 16px; overflow-wrap: anywhere; }
.gantt-inner { --label-width: 340px; }
.schedule-stage[hidden] { display: none !important; }
.plan-selection .button { min-height: 44px; }
.schedule-stage[hidden] {
  display: none;
}
@media print {
  .schedule-modes, .schedule-feedback, .plan-selection { display: none !important; }
}
.plan-selection {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.plan-selection .plan-selection-summary {
  max-width: 64ch;
}
.compare-baseline .compare-drop-hint {
  min-height: 56px;
}
.lookahead-table .table-activity { width: 100%; color: inherit; }
.lookahead-table .table-activity > span,
.lookahead-table .table-activity > strong { font-size: inherit; }
.lookahead-table .table-activity > strong { font-weight: 600; }
@media screen {
  .lookahead-table tbody tr { cursor: pointer; scroll-margin-block: 60px; }
  .lookahead-table tr[aria-current="true"] > td { background: var(--soft); }
  .lookahead-table tr[aria-current="true"] > td:first-child { box-shadow: inset 4px 0 var(--green); }
}
@media (max-width: 700px) {
  .plan-selection {
    flex-direction: column;
    align-items: stretch;
  }
  .plan-selection .button {
    align-self: flex-start;
  }
}
@media (max-width: 599px) {
  .gantt-inner { --label-width: 190px; }
}

/* Keep the imported schedule close to the top, with one shared control bar. */
@media screen {
  .schedule-desk { min-width: 0; }
  .schedule-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
  .schedule-project-slot { min-width: 0; }
  .schedule-toolbar .project-controls-row { flex-wrap: nowrap; }
  .schedule-toolbar .project-remember { font-size: 13px; }
  .schedule-toolbar .schedule-modes { justify-self: end; flex-wrap: nowrap; overflow-x: auto; min-width: 0; margin: 0; }
  .schedule-toolbar .view-tab { min-height: 44px; padding: 10px 12px; font-size: 14px; white-space: nowrap; }
  .schedule-desk[data-loaded="true"] .workspace { border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
  body:has(.schedule-desk[data-loaded="true"]) .tool-page-heading { padding-top: 12px; margin-bottom: 12px; }
  body:has(.schedule-desk[data-loaded="true"]) .tool-page-heading :is(.breadcrumb, .tool-heading-row p) { display: none; }
  body:has(.schedule-desk[data-loaded="true"]) .tool-heading-row h1 { font-size: 28px; }
  .schedule-desk .file-toolbar { min-height: 52px; gap: 12px; padding: 4px 12px; }
  .schedule-desk .file-meta { gap: 8px; }
  .schedule-desk .file-meta strong { font-size: 14px; }
  .schedule-desk .file-meta span { margin-top: 2px; font-size: 11px; }
  .schedule-desk .file-actions { gap: 8px; }
  .schedule-desk :is(.file-actions, .lookahead-actions) .button { min-height: 44px; padding: 8px 12px; font-size: 14px; }
  .schedule-desk .plan-selection { margin: 0; gap: 8px; }
  .schedule-desk .plan-selection:has(button:enabled) .plan-selection-summary { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .schedule-desk .plan-selection-summary { max-width: 34ch; font-size: 12px; }
  .schedule-desk .workspace-stats { padding: 8px 12px; gap: 12px; }
  .schedule-desk .workspace-stats > div { gap: 4px; padding-right: 12px; }
  .schedule-desk .workspace-stats strong { font-size: 26px; }
  .schedule-desk .workspace-stats strong.date-stat { font-size: 20px; padding: 3px 0; }
  .schedule-desk .workspace-stats :is(span, small) { font-size: 11px; line-height: 1.35; }
  .schedule-desk .filter-bar { padding: 6px 12px; }
  .schedule-desk .view-toolbar { padding-inline: 12px; }
  .schedule-desk .view-options { padding-block: 4px; }
  .lookahead-config { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
  .lookahead-config-grid { flex: 1 1 580px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .lookahead-config .compare-select { gap: 4px; font-size: 12px; }
  .lookahead-config :is(input, select) { width: 100%; min-width: 0; min-height: 40px; padding: 8px; font-size: 14px; }
  .lookahead-presets { margin: 0; gap: 6px; }
  .lookahead-presets .preset-chip { min-height: 44px; padding: 8px 10px; font-size: 14px; }
  .lookahead-report-head { min-height: 52px; padding: 4px 12px; gap: 8px 12px; }
  .lookahead-report-summary { flex: 1 1 260px; min-width: 0; }
  .lookahead-report-head .lookahead-window-status { margin: 0; font-size: 13px; line-height: 1.5; }
  .lookahead-actions { gap: 6px; align-items: center; }
  .lookahead-counts { grid-template-columns: repeat(7, minmax(118px, 1fr)); gap: 0; padding: 8px 0; overflow-x: auto; }
  .lookahead-counts > div { min-width: 0; padding: 4px 12px; border-right: 1px solid var(--line); }
  .lookahead-counts > div:last-child { border-right: 0; }
  .lookahead-counts strong { font-size: 24px; }
  .lookahead-counts span { margin-top: 4px; font-size: 12px; line-height: 1.35; }
  .schedule-feedback { margin: 8px 12px; }
  .schedule-desk.viewer-expanded { border-radius: 0; }
  .schedule-desk.viewer-expanded .schedule-toolbar { border-radius: 0; }
}
@media screen and (max-width: 999px) {
  .schedule-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .schedule-toolbar .workspace-expand { grid-column: 2; grid-row: 1; }
  .schedule-toolbar .schedule-modes { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .schedule-toolbar .project-controls-row { flex-wrap: wrap; }
}
@media screen and (max-width: 700px) {
  .lookahead-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-desk .file-toolbar { flex-wrap: wrap; }
  .schedule-desk .file-meta strong { max-width: 75vw; }
  .schedule-desk .file-meta span { max-width: none; }
  .schedule-desk .file-actions { flex-wrap: wrap; }
  .schedule-desk .plan-selection { align-items: flex-start; }
  .lookahead-workspace .file-toolbar { flex-wrap: nowrap; }
  .lookahead-workspace .file-meta { flex: 1; }
  .lookahead-workspace .file-meta :is(strong, span) { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lookahead-workspace .file-actions { flex: none; }
  .lookahead-workspace .file-actions [data-action="open"] { width: 44px; min-width: 44px; padding: 10px; }
  .lookahead-workspace .file-replace-label { display: none; }
  .schedule-desk .lookahead-actions .button { padding: 8px; font-size: 13px; }
}
@media print {
  .schedule-toolbar, .schedule-project-status { display: none !important; }
  .schedule-desk.viewer-expanded { position: static; display: block; width: auto; height: auto; overflow: visible; padding: 0; }
  html.viewer-expanded-page:has(.schedule-desk), html.viewer-expanded-page:has(.schedule-desk) body { overflow: visible; }
}
