/* ============================================================
   NFH Landed Cost Calculator — landed-calc.css
   Version: 1.0.0
   Scoped to #nfh-lcc-app — does not affect rest of WordPress site
   ============================================================ */

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

/* ── Header ── */
.nfh-lcc-header { margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 2px solid #071626; }
.nfh-lcc-header h2 { font-size: 26px; font-weight: 700; color: #071626; margin: 0 0 6px; }
.nfh-lcc-header p { font-size: 15px; color: #666; margin: 0; line-height: 1.6; }

/* ── Step bar ── */
.nfh-lcc-steps { display: flex; margin-bottom: 1.5rem; border-radius: 10px; overflow: hidden; border: 1px solid #d4dae2; }
.nfh-lcc-step { flex: 1; padding: 10px 6px; text-align: center; font-size: 11px; font-weight: 600; color: #888; background: #f8f9fa; border-right: 1px solid #d4dae2; cursor: default; transition: all 0.15s; line-height: 1.3; user-select: none; }
.nfh-lcc-step:last-child { border-right: none; }
.nfh-lcc-step.clickable { cursor: pointer; }
.nfh-lcc-step.clickable:hover { background: #eef2f7; }
.nfh-lcc-step.active { background: #071626; color: #fff; }
.nfh-lcc-step.done { background: #dde6f0; color: #2a5080; }
.nfh-lcc-step-num { display: block; font-size: 17px; font-weight: 800; margin-bottom: 2px; line-height: 1; }

/* ── Panels ── */
.nfh-lcc-panel { display: none; }
.nfh-lcc-panel.active { display: block; }

/* ── Cards ── */
.nfh-lcc-card { background: #fff; border: 1px solid #e0e6ed; border-radius: 10px; padding: 1.35rem; margin-bottom: 1rem; }
.nfh-lcc-card-title { font-size: 12px; font-weight: 700; color: #071626; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 1rem; padding-bottom: 7px; border-bottom: 1px solid #eee; }

/* ── Grids ── */
.nfh-lcc-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nfh-lcc-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── Freight compare columns ── */
.nfh-lcc-freight-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nfh-lcc-freight-col { background: #f8f9fa; border: 1px solid #e0e6ed; border-radius: 10px; padding: 1.1rem; }
.nfh-lcc-freight-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; padding-bottom: 8px; border-bottom: 1px solid #e0e6ed; }
.nfh-lcc-freight-col-icon { font-size: 22px; line-height: 1; }
.nfh-lcc-freight-col-label { font-size: 14px; font-weight: 700; color: #071626; }
.nfh-lcc-freight-col-sub { font-size: 11px; color: #888; margin-top: 1px; }
.nfh-lcc-ocean-col .nfh-lcc-freight-col-head { border-color: #c2d4e8; }
.nfh-lcc-air-col   .nfh-lcc-freight-col-head { border-color: #d4c4e0; }
.nfh-lcc-ocean-col { border-color: #b8ccdf; }
.nfh-lcc-air-col   { border-color: #cdb8df; }

/* ── Fields ── */
.nfh-lcc-field { margin-bottom: .9rem; }
.nfh-lcc-field:last-child { margin-bottom: 0; }
.nfh-lcc-field label { display: block; font-size: 12px; font-weight: 600; color: #444; margin-bottom: 4px; }
.nfh-lcc-help { display: block; font-size: 11px; color: #999; margin-top: 3px; line-height: 1.4; }

/* ── Input wrapper ── */
.nfh-lcc-iw { display: flex; align-items: stretch; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; transition: border-color 0.15s; }
.nfh-lcc-iw:focus-within { border-color: #071626; box-shadow: 0 0 0 3px rgba(7,22,38,0.07); }
.nfh-lcc-iw input, .nfh-lcc-iw select { flex: 1; border: none; padding: 9px 12px; font-size: 15px; outline: none; color: #111; background: transparent; min-width: 0; }
.nfh-lcc-iw input::placeholder { color: #ccc; }
.nfh-lcc-iw select { cursor: pointer; }
.nfh-lcc-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; }
.nfh-lcc-pre { padding: 9px 10px; background: #f5f5f5; font-size: 13px; font-weight: 700; color: #555; display: flex; align-items: center; border-right: 1px solid #eee; }

/* Optional badge */
.nfh-lcc-opt { font-size: 9px; font-weight: 700; color: #C98221; background: #fef3e2; border: 1px solid #f0d090; border-radius: 3px; padding: 1px 4px; margin-left: 5px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Nav buttons ── */
.nfh-lcc-nav { display: flex; gap: 10px; align-items: center; margin-top: 1.25rem; }
.nfh-lcc-btn-next { flex: 1; padding: 13px; font-size: 15px; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; background: #071626; color: #fff; transition: background 0.15s; }
.nfh-lcc-btn-next:hover { background: #0d2540; }
.nfh-lcc-btn-back { padding: 13px 20px; font-size: 13px; font-weight: 600; border: 1px solid #ccc; border-radius: 8px; cursor: pointer; background: #fff; color: #555; transition: all 0.15s; white-space: nowrap; }
.nfh-lcc-btn-back:hover { background: #f5f5f5; border-color: #aaa; }
.nfh-lcc-btn-calc { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; background: #C98221; color: #fff; transition: background 0.15s; margin-top: 0.25rem; }
.nfh-lcc-btn-calc:hover { background: #a86918; }

/* ── Results ── */
.nfh-lcc-result { display: none; }
.nfh-lcc-result.show { display: block; }
.nfh-lcc-edit-link { font-size: 13px; color: #2a5080; cursor: pointer; text-decoration: underline; margin-bottom: 1.25rem; display: inline-block; }
.nfh-lcc-edit-link:hover { color: #071626; }

/* Winner banner */
.nfh-lcc-winner { border-radius: 10px; padding: 14px 18px; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 12px; }
.nfh-lcc-winner.ocean { background: #071626; color: #fff; }
.nfh-lcc-winner.air   { background: #3a1a5a; color: #fff; }
.nfh-lcc-winner.tie   { background: #2a4a2a; color: #fff; }
.nfh-lcc-winner-icon { font-size: 28px; line-height: 1; }
.nfh-lcc-winner-text { flex: 1; }
.nfh-lcc-winner-title { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.nfh-lcc-winner-sub { font-size: 13px; opacity: 0.75; }
.nfh-lcc-winner-savings { font-size: 22px; font-weight: 800; color: #C98221; white-space: nowrap; }

/* Side-by-side result columns */
.nfh-lcc-compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1.25rem; }
.nfh-lcc-rcol { border-radius: 10px; overflow: hidden; border: 2px solid transparent; }
.nfh-lcc-rcol.winner { border-color: #C98221; }
.nfh-lcc-rcol-head { padding: 14px 16px; display: flex; align-items: center; gap: 8px; }
.nfh-lcc-rcol-head .icon { font-size: 20px; }
.nfh-lcc-rcol-head .label { font-size: 13px; font-weight: 700; }
.nfh-lcc-rcol-head .badge { margin-left: auto; font-size: 10px; font-weight: 700; background: #C98221; color: #fff; border-radius: 4px; padding: 2px 7px; letter-spacing: 0.04em; text-transform: uppercase; }
.nfh-lcc-rcol.ocean .nfh-lcc-rcol-head { background: #071626; color: #fff; }
.nfh-lcc-rcol.air   .nfh-lcc-rcol-head { background: #2a1045; color: #fff; }
.nfh-lcc-rcol-body { background: #fff; padding: 16px; border: 1px solid #e0e6ed; border-top: none; border-radius: 0 0 8px 8px; }
.nfh-lcc-rcol-total { font-size: 30px; font-weight: 800; color: #071626; line-height: 1; margin-bottom: 4px; }
.nfh-lcc-rcol-cpu { font-size: 14px; color: #666; margin-bottom: 14px; }
.nfh-lcc-rcol-cpu strong { color: #071626; font-size: 16px; }
.nfh-lcc-rcol-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.nfh-lcc-rs { background: #f8f9fa; border-radius: 6px; padding: 8px 10px; }
.nfh-lcc-rs-val { font-size: 14px; font-weight: 700; color: #071626; }
.nfh-lcc-rs-lbl { font-size: 10px; color: #888; margin-top: 1px; text-transform: uppercase; letter-spacing: 0.03em; }
.nfh-lcc-rcol-markup { font-size: 13px; color: #666; padding-top: 10px; border-top: 1px solid #eee; }
.nfh-lcc-rcol-markup strong { color: #071626; }

/* Breakdown card */
.nfh-lcc-breakdown-card { background: #fff; border: 1px solid #e0e6ed; border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.nfh-lcc-bd-title { font-size: 12px; font-weight: 700; color: #071626; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; padding-bottom: 6px; border-bottom: 1px solid #eee; }

/* Stacked bars */
.nfh-lcc-bd-mode { margin-bottom: 16px; }
.nfh-lcc-bd-mode:last-child { margin-bottom: 0; }
.nfh-lcc-bd-mode-label { font-size: 12px; font-weight: 700; color: #555; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.nfh-lcc-bar-stack { height: 28px; border-radius: 6px; overflow: hidden; display: flex; margin-bottom: 10px; }
.nfh-lcc-bar-seg { height: 100%; transition: width 0.6s ease; cursor: default; }
.nfh-lcc-bar-seg:first-child { border-radius: 6px 0 0 6px; }
.nfh-lcc-bar-seg:last-child { border-radius: 0 6px 6px 0; }
.nfh-lcc-bar-seg:only-child { border-radius: 6px; }

/* Breakdown rows */
.nfh-lcc-bd-rows {}
.nfh-lcc-bd-row { display: grid; grid-template-columns: 14px 1fr 90px 90px 44px; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.nfh-lcc-bd-dot { width: 12px; height: 12px; border-radius: 3px; }
.nfh-lcc-bd-name { color: #444; }
.nfh-lcc-bd-ocean { font-weight: 600; color: #071626; text-align: right; }
.nfh-lcc-bd-air   { font-weight: 600; color: #2a1045; text-align: right; }
.nfh-lcc-bd-pct   { font-size: 11px; color: #aaa; text-align: right; }
.nfh-lcc-bd-header { font-size: 10px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 8px; }

/* Segment colors */
.seg-product   { background: #1a3a5c; }
.seg-freight   { background: #2e6aaa; }
.seg-insurance { background: #4a8aca; }
.seg-duty      { background: #C98221; }
.seg-broker    { background: #e0a840; }
.seg-drayage   { background: #3a7a3a; }
.seg-warehouse { background: #5a9a5a; }
.seg-pickpack  { background: #7aba7a; }
.seg-lastmile  { background: #9a8040; }

/* Tip box */
.nfh-lcc-tip { background: #fef3e2; border: 1px solid #f0d090; border-radius: 8px; padding: 14px 16px; font-size: 14px; color: #7a5010; line-height: 1.6; margin-bottom: 1rem; }
.nfh-lcc-tip strong { color: #071626; }
.nfh-lcc-tip a { color: #1a4a7a; }

/* Action buttons */
.nfh-lcc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.nfh-lcc-abtn { padding: 9px 16px; font-size: 13px; font-weight: 600; border-radius: 8px; cursor: pointer; border: 1px solid #ccc; background: #fff; color: #555; transition: background 0.15s; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.nfh-lcc-abtn:hover { background: #f5f5f5; }
.nfh-lcc-abtn.primary { background: #C98221; color: #fff; border-color: #C98221; }
.nfh-lcc-abtn.primary:hover { background: #a86918; }
.nfh-lcc-abtn.dark { background: #071626; color: #fff; border-color: #071626; }
.nfh-lcc-abtn.dark:hover { background: #0d2540; }

.nfh-lcc-note { font-size: 11px; color: #999; line-height: 1.5; margin: 0; }

/* Toast */
.nfh-lcc-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; }
.nfh-lcc-toast.show { opacity: 1; }

/* N/A dimmed state */
.nfh-lcc-na { opacity: 0.35; font-style: italic; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .nfh-lcc-g2,
  .nfh-lcc-freight-cols,
  .nfh-lcc-compare-cols { grid-template-columns: 1fr; }
  .nfh-lcc-g3 { grid-template-columns: 1fr 1fr; }
  .nfh-lcc-steps { flex-wrap: wrap; }
  .nfh-lcc-step { flex: 0 0 33.333%; }
  .nfh-lcc-bd-row { grid-template-columns: 14px 1fr 80px 80px; }
  .nfh-lcc-bd-pct { display: none; }
  .nfh-lcc-winner-savings { font-size: 18px; }
}
