/* ============================================================
   NFH 3PL Comparison Scorecard — nfh-3pl-comparison-scorecard.css
   All selectors scoped to #nfh-scs-app to prevent theme conflicts.
   Version: 1.0.1
   
   BRAND TOKENS (do not change these):
     Primary dark navy : #071626
     Accent orange     : #C8622A
     Focus ring        : rgba(7, 22, 38, 0.08)
   ============================================================ */

#nfh-scs-app {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #111;
  font-size: 15px;
  line-height: 1.5;
  box-sizing: border-box;
}
#nfh-scs-app *, #nfh-scs-app *::before, #nfh-scs-app *::after {
  box-sizing: border-box;
}

/* ---- HEADER ---- */
.scs-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid #071626;
}
.scs-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #071626;
  margin: 0 0 6px;
}
.scs-header p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  max-width: 700px;
  margin: 0;
}

/* ---- STEP BAR ---- */
.scs-steps {
  display: flex;
  margin-bottom: 2rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.scs-step {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #aaa;
  border-right: 1px solid #eee;
  transition: background 0.15s, color 0.15s;
  cursor: default;
  user-select: none;
}
.scs-step:last-child { border-right: none; }
/* CORRECTED: active step uses brand primary #071626 */
.scs-step.active { background: #071626; color: #fff; }
.scs-step.done { background: #e8f0f8; color: #071626; cursor: pointer; }
.scs-step.done:hover { background: #d0e0f0; }
.scs-step-num { display: block; font-size: 18px; font-weight: 800; line-height: 1; margin-bottom: 3px; }
.scs-step-lbl { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- PANELS ---- */
.scs-panel { display: none; }
.scs-panel.active { display: block; }

/* ---- CARD ---- */
.scs-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
/* CORRECTED: card titles use brand primary #071626, not mid-navy */
.scs-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #071626;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}

/* ---- GRIDS ---- */
.scs-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scs-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ---- FIELDS ---- */
.scs-field { margin-bottom: 0.85rem; }
.scs-field:last-child { margin-bottom: 0; }
.scs-field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.scs-help { display: block; font-size: 11px; color: #999; margin-top: 3px; line-height: 1.4; }

/* CORRECTED: focus ring uses rgba derived from #071626 */
.scs-iw {
  display: flex;
  align-items: stretch;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s;
}
.scs-iw:focus-within {
  border-color: #071626;
  box-shadow: 0 0 0 3px rgba(7, 22, 38, 0.08);
}
.scs-iw input,
.scs-iw select {
  flex: 1;
  border: none;
  padding: 9px 12px;
  font-size: 15px;
  outline: none;
  color: #111;
  background: transparent;
  min-width: 0;
}
.scs-iw input[type="text"] { font-size: 14px; }
.scs-iw input::placeholder { color: #bbb; }
.scs-u {
  padding: 9px 10px;
  background: #f5f5f5;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  display: flex;
  align-items: center;
  border-left: 1px solid #eee;
  white-space: nowrap;
  flex-shrink: 0;
}
.scs-u-pre { border-left: none; border-right: 1px solid #eee; }
.scs-select-wrap {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
/* CORRECTED: select focus ring uses brand primary */
.scs-select-wrap:focus-within {
  border-color: #071626;
  box-shadow: 0 0 0 3px rgba(7, 22, 38, 0.08);
}
.scs-select-wrap select {
  flex: 1;
  border: none;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  color: #111;
  background: #fff;
  cursor: pointer;
}

/* ---- TOGGLE ---- */
.scs-toggle {
  display: flex;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}
.scs-toggle button {
  flex: 1;
  padding: 7px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: #f5f5f5;
  color: #888;
  transition: all 0.15s;
}
/* CORRECTED: active toggle state uses brand primary #071626 */
.scs-toggle button.on { background: #071626; color: #fff; }

/* ---- PROVIDER TABS ---- */
.scs-ptab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.scs-ptab {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
/* CORRECTED: active provider tab uses brand primary #071626 */
.scs-ptab.active { background: #071626; color: #fff; border-color: #071626; }
.scs-ptab-close { font-size: 16px; line-height: 1; opacity: 0.7; margin-left: 2px; }
.scs-ptab-close:hover { opacity: 1; }
.scs-add-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border: 1px dashed #C8622A;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  color: #C8622A;
  transition: all 0.15s;
}
.scs-add-btn:hover:not(:disabled) { background: #faeee6; }
.scs-add-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- PROVIDER SUB-PANELS ---- */
.scs-ppanel { display: none; }
.scs-ppanel.active { display: block; }

/* ---- STAR RATINGS ---- */
.scs-rating-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.scs-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f5f5f5;
}
.scs-rating-row:last-child { border-bottom: none; }
.scs-rating-label { font-size: 13px; color: #555; flex: 1; min-width: 0; }
.scs-stars { display: flex; gap: 2px; flex-shrink: 0; }
.scs-star {
  font-size: 20px;
  cursor: pointer;
  color: #ddd;
  transition: color 0.1s;
  line-height: 1;
  user-select: none;
}
.scs-star.on { color: #C8622A; }
.scs-star.hover { color: #e8b99a; }
.scs-rating-num { font-size: 12px; font-weight: 700; color: #888; min-width: 28px; text-align: right; flex-shrink: 0; }

/* ---- WEIGHT TABLE ---- */
.scs-wt-table { width: 100%; border-collapse: collapse; }
.scs-wt-table th {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-bottom: 2px solid #eee;
  text-align: left;
}
.scs-wt-table td { padding: 7px 10px; border-bottom: 1px solid #f5f5f5; vertical-align: middle; font-size: 14px; color: #444; }
.scs-wt-table tr:last-child td { border-bottom: none; }
.scs-wt-input {
  width: 68px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  outline: none;
  color: #111;
  transition: border-color 0.15s;
}
/* CORRECTED: weight input focus uses brand primary */
.scs-wt-input:focus { border-color: #071626; box-shadow: 0 0 0 3px rgba(7, 22, 38, 0.08); }
/* CORRECTED: weight bar fill uses brand primary #071626 */
.scs-wt-bar-track { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.scs-wt-bar-fill { height: 100%; border-radius: 4px; background: #071626; transition: width 0.25s; }
.scs-wt-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  flex-wrap: wrap;
  gap: 8px;
}
.scs-wt-total-row.ok   { background: #e8f5ec; color: #2a7a3b; }
.scs-wt-total-row.warn { background: #faeee6; color: #C8622A; }
.scs-wt-total-row.over { background: #fdecea; color: #b91c1c; }
.scs-wt-diff { font-size: 12px; font-weight: 600; }
/* CORRECTED: reset button label uses brand primary */
.scs-wt-reset {
  font-size: 12px;
  font-weight: 600;
  color: #071626;
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}
.scs-wt-reset:hover { background: #f5f5f5; }

/* ---- BUTTONS ---- */
/* CORRECTED: all buttons standardised to 12px 22px padding, 8px radius, weight 700 */
.scs-btn {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.scs-btn-primary { background: #071626; color: #fff; }
.scs-btn-primary:hover { background: #0d2236; }
.scs-btn-full { display: block; width: 100%; text-align: center; padding: 14px 22px; font-size: 15px; margin-bottom: 1.5rem; }
.scs-btn-flex { flex: 1; }
.scs-btn-secondary { background: #f5f5f5; color: #555; border: 1px solid #ddd; }
.scs-btn-secondary:hover { background: #e8e8e8; }
.scs-btn-calc {
  background: #C8622A;
  color: #fff;
  border: none;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.scs-btn-calc:hover { background: #a34e20; }
.scs-nav-row { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* ---- RESULTS SECTION ---- */
.scs-result-section { display: none; }
.scs-result-section.show { display: block; }

/* RECOMMENDATION CARD */
.scs-rec-card {
  background: #071626;
  border-radius: 12px;
  padding: 1.5rem;
  color: #fff;
  margin-bottom: 1.25rem;
}
.scs-rec-badge {
  display: inline-block;
  background: #C8622A;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.scs-rec-name { font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.scs-rec-tagline { font-size: 14px; opacity: 0.75; margin-bottom: 14px; }
.scs-rec-stats { display: flex; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.scs-rec-stat-val { font-size: 24px; font-weight: 800; line-height: 1; }
.scs-rec-stat-lbl { font-size: 11px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; }
.scs-rec-why {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 12px;
  margin-top: 4px;
}
.scs-rec-verify { margin-top: 8px; font-size: 13px; opacity: 0.7; font-style: italic; }

/* RANK TABLE */
.scs-rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scs-rank-table th {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
  text-align: left;
}
.scs-rank-table td { padding: 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.scs-rank-table tr:last-child td { border-bottom: none; }
.scs-rank-table tr:hover td { background: #fafafa; }
.scs-rank-num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
/* Rank 1 = accent orange, rank 2 = brand primary, rest = grey scale */
.rn-1 { background: #C8622A; }
.rn-2 { background: #071626; }
.rn-3 { background: #6b7280; }
.rn-4, .rn-5 { background: #9ca3af; }
.scs-bar-wrap { display: flex; align-items: center; gap: 6px; }
.scs-bar-track { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; min-width: 50px; }
/* CORRECTED: default bars use brand primary; rank-1 row keeps accent orange */
.scs-bar-fill { height: 100%; border-radius: 4px; background: #071626; }
.scs-rank-1 .scs-bar-fill { background: #C8622A; }

/* VOLUME TABLE */
.scs-vol-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.scs-vol-table th {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  border-bottom: 2px solid #eee;
  text-align: right;
}
.scs-vol-table th:first-child { text-align: left; }
.scs-vol-table td { padding: 9px 10px; border-bottom: 1px solid #f0f0f0; text-align: right; font-weight: 600; }
/* CORRECTED: volume table label uses brand primary */
.scs-vol-table td:first-child { text-align: left; font-weight: 700; color: #071626; }
.scs-vol-table tr:last-child td { border-bottom: none; }
.scs-vol-best { color: #2a7a3b; font-weight: 800; }
.scs-vol-lbl { font-size: 10px; color: #2a7a3b; margin-left: 3px; font-weight: 600; }

/* COST DRIVERS */
.scs-driver-block { margin-bottom: 1.25rem; }
.scs-driver-block:last-child { margin-bottom: 0; }
/* CORRECTED: driver provider name uses brand primary */
.scs-driver-pname { font-size: 13px; font-weight: 700; color: #071626; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #f0f0f0; }
.scs-driver-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; }
.scs-driver-lbl { width: 110px; color: #666; flex-shrink: 0; }
.scs-driver-track { flex: 1; height: 14px; background: #eee; border-radius: 3px; overflow: hidden; }
/* CORRECTED: driver bars use brand primary #071626 */
.scs-driver-fill { height: 100%; border-radius: 3px; background: #071626; transition: width 0.4s; }
.scs-driver-val { width: 62px; text-align: right; font-weight: 700; color: #333; flex-shrink: 0; }
.scs-min-note { font-size: 11px; color: #C8622A; margin-top: 4px; }

/* FLAGS */
.scs-flag-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.scs-flag-item:last-child { margin-bottom: 0; }
.scs-flag-warn { background: #faeee6; border: 1px solid #e8b99a; color: #a34e20; }
.scs-flag-info { background: #e8f0f8; border: 1px solid #b8cfe8; color: #071626; }
.scs-flag-icon { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

/* QUESTIONS */
.scs-q-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; color: #444; line-height: 1.5; }
.scs-q-item:last-child { border-bottom: none; }
.scs-q-num { font-size: 12px; font-weight: 800; color: #C8622A; flex-shrink: 0; padding-top: 1px; min-width: 20px; }

/* SUMMARY BOX */
.scs-summary-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px;
  font-size: 12px;
  font-family: monospace;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1rem;
  color: #333;
}

/* ACTION BUTTONS */
/* CORRECTED: .scs-abtn padding standardised to 12px 22px to match brand CTA buttons */
.scs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.25rem; }
.scs-abtn {
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  color: #555;
  transition: background 0.15s;
}
.scs-abtn:hover { background: #f5f5f5; }
.scs-abtn.primary { background: #C8622A; color: #fff; border-color: #C8622A; }
.scs-abtn.primary:hover { background: #a34e20; }

/* DISCLAIMER */
/* CORRECTED: matches brand standard — font-size: 13px; color: #888; line-height: 1.6 */
.scs-disclaimer {
  font-size: 13px;
  color: #888;
  line-height: 1.6;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* TOAST */
.scs-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #071626;
  color: #fff;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 99999;
  white-space: nowrap;
}
.scs-toast.show { opacity: 1; }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .scs-grid-2, .scs-grid-3 { grid-template-columns: 1fr 1fr; }
  .scs-rating-grid { grid-template-columns: 1fr; }
  .scs-rec-stats { gap: 16px; }
}
@media (max-width: 480px) {
  .scs-grid-2, .scs-grid-3 { grid-template-columns: 1fr; }
  .scs-step-lbl { display: none; }
  .scs-header h2 { font-size: 22px; }
  .scs-rec-name { font-size: 24px; }
}

/* ---- PRINT ---- */
@media print {
  body { background: #fff !important; }
  .scs-steps,
  .scs-nav-row,
  .scs-actions,
  .scs-toast { display: none !important; }
  .scs-panel,
  .scs-result-section { display: block !important; }
  .scs-card { break-inside: avoid; }
  .scs-rec-card {
    background: #071626 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
