/* Fixed Operations Reports -- page rules on top of the Scorecard layer.
   scorecard.css and app.css are COPIED from CC-DT_Inventory and stay unedited
   (docs/design/SCORECARD-SOURCE.md); everything this site adds lives here.
   Every colour is a --sc-* token. Breakpoints are the Scorecard's:
   >840 desktop (rail pinned) · 641-840 tablet · <=640 phone. Plus one of our
   own: the prior-month block on Fixed Ops Performance shows at >=1280 only. */

/* ---- the "coming" state ------------------------------------------------------
   A metric whose lane has not landed prints the state word, lower-case and grey,
   never a zero. On the dark strip and store header it drops to a quiet size so
   a row of "coming" does not shout like a row of figures. */
.fo-word { font-weight: 400; color: var(--sc-label); }
.fo-word--dark { color: var(--sc-on-dark); }
.sc-strip__value .fo-word { font-size: 18px; letter-spacing: 0; }
.sc-kpi__value .fo-word { font-size: 14px; }
.sc-c .fo-word, .sc-c.sc-word { font-size: 12px; }

/* ---- disabled CSV export: the button's place is final, the file is not yet ---- */
.sc-export.sc-export--off { background: var(--sc-fill); color: var(--sc-label) !important; cursor: not-allowed; }
.sc-export.sc-export--off:hover { background: var(--sc-fill); }
input.sc-ctl:disabled { background: var(--sc-head); color: var(--sc-foot); }

/* ---- Overview doorways ------------------------------------------------------------ */
.ov-tile__fig.fo-fig-coming { font-size: 20px; font-weight: 400; letter-spacing: 0; color: var(--sc-label); }
.fo-ov-grid--service { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 22px; }
.fo-ov-grid--parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .fo-ov-grid--service, .fo-ov-grid--parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fo-ov-grid--service { margin-bottom: 16px; }
  .fo-ov-grid--service, .fo-ov-grid--parts { grid-template-columns: 1fr 1fr; }
  .ov-tile__fig.fo-fig-coming { font-size: 16px; }
}

/* ---- Fixed Ops Performance (report) --------------------------------------------------
   841-1279: name + 6 month-to-date + 2 open-RO columns.
   >=1280:   name + 6 MTD + 5 prior-month + 2 open-RO columns.
   641-840:  name + 4 MTD + Open 7+ (sc-tab-hide drops % prev., Hours/RO, Open 14+). */
.fo-ops { --sc-rcols: minmax(140px, 1.5fr) repeat(8, minmax(0, 1fr));
          --sc-rcols-tab: minmax(0, 1.4fr) repeat(5, minmax(0, 1fr)); }
@media (min-width: 1280px) {
  .fo-ops { --sc-rcols: minmax(150px, 1.5fr) repeat(13, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  .fo-wide { display: none !important; }
}
.fo-ops .sc-c { padding: 0 6px; }
.fo-ops .sc-rhead > div { padding: 0 6px; }
.fo-ops .sc-rhead > .sc-rhead__title { padding-left: 0; }
.fo-ops .sc-rrow__name .sc-sub { font-weight: 400; }

/* the column-group row above the header: Month to date | Prior month | Open ROs */
.fo-ops .fo-rgroup { border-bottom: 0; padding-bottom: 0; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--sc-label); font-weight: 700; }
.fo-ops .fo-rgroup > div:not(:first-child) { text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--sc-rule-card); margin: 0 6px; }
.fo-span-mtd { grid-column: span 6; }
.fo-span-prior { grid-column: span 5; }
.fo-span-open { grid-column: span 2; }
@media (min-width: 641px) and (max-width: 840px) {
  .fo-span-mtd { grid-column: span 4; }
  .fo-span-open { grid-column: span 1; }
}
/* a hairline before each block */
.fo-ops .sc-rrow > .fo-prior-first, .fo-ops .sc-rrow > .fo-open-first,
.fo-ops .sc-rhead:not(.fo-rgroup) > .fo-prior-first, .fo-ops .sc-rhead:not(.fo-rgroup) > .fo-open-first {
  align-self: stretch; display: flex; align-items: center; justify-content: flex-end;
  border-left: 1px solid var(--sc-rule-row); }
.fo-ops .fo-grouptotal { background: var(--sc-head); }
.fo-wide-note { display: none; }
@media (min-width: 641px) and (max-width: 1279px) { .fo-wide-note { display: block; } }

/* phone: one row per store, name then a 3-up grid of mini-cells */
.fo-ops-ph .fo-prow { --sc-pcols: minmax(0, 1fr); }
.fo-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; line-height: 1.2; }
.fo-mini { background: var(--sc-fill); border-radius: 4px; padding: 6px 8px; min-width: 0; }
.fo-mini__l { display: block; font-size: 10px; letter-spacing: .5px; text-transform: uppercase; color: var(--sc-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mini__v { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-mini__v .fo-word { font-size: 13px; }
.sc-ptotal .fo-mini { background: var(--sc-card); }

/* ---- Parts Overview store cards --------------------------------------------------------- */
.fo-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fo-metric { padding: 10px 18px; min-width: 0; border-top: 1px solid var(--sc-rule-row); }
.fo-metric__label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--sc-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-metric__label a { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.fo-metric__label a:hover { color: var(--sc-link); }
.fo-metric__value { font-size: 16px; font-weight: 700; color: var(--sc-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-metric--coming .fo-metric__value { font-size: 13px; }
.fo-metric-ph .fo-metric { border-top: 1px solid var(--sc-rule-row); }
@media (max-width: 1200px) {
  .fo-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fo-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-metric { padding: 8px 12px; }
  .fo-metric__label { letter-spacing: .5px; }
}

/* ---- "What these figures mean": the one definition/source slot per metric ---------------- */
.fo-defs { padding: 12px 18px 6px; }
.fo-defs__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--sc-label); margin-bottom: 4px; }
.fo-defs__list { margin: 0; }
.fo-defs__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2px 16px; padding: 7px 0; border-top: 1px solid var(--sc-rule-row); }
.fo-defs__row dt { font-weight: 600; color: var(--sc-ink); }
.fo-defs__row dd { margin: 0; color: var(--sc-sec); min-width: 0; }
.fo-defs__src { display: block; font-size: 11px; color: var(--sc-foot); }
.fo-defs__status { color: var(--sc-amber); }
@media (max-width: 640px) {
  .fo-defs { padding: 10px 12px 4px; }
  .fo-defs__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---- parts lists ------------------------------------------------------------------------ */
.fo-list .sc-lhead > div { overflow: hidden; text-overflow: ellipsis; }
.fo-list .sc-coming { border-top: 0; padding: 12px 18px; }
@media (max-width: 840px) {
  .fo-list .sc-coming { padding: 10px 12px; }
}

/* Parts store header carries four KPIs (DT's carry three): wrap it from 1200
   down rather than DT's 1000, or the fourth clips at 1001-1200 with the rail. */
@media (min-width: 841px) and (max-width: 1200px) {
  .fo-store .sc-shead { flex-wrap: wrap; row-gap: 8px; }
  .fo-store .sc-shead__kpis { flex-wrap: wrap; row-gap: 8px; }
}
