/*
 * NFH Warehouse Cost Estimator — nfh-warehouse-cost-estimator.css
 * Version:  1.0.0
 * Author:   National Freight Hub
 *
 * All styles scoped to #nfh-wce-app to prevent any bleed
 * into the WordPress theme or other page elements.
 *
 * BRAND TOKENS (do not change):
 *   Primary dark navy : #071626
 *   Accent orange     : #C98221
 *   Focus ring        : rgba(7, 22, 38, 0.08)
 */

/* ============================================================
   SCOPED PLUGIN CSS — #nfh-wce-app
   ============================================================ */
#nfh-wce-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-wce-app *, #nfh-wce-app *::before, #nfh-wce-app *::after {
  box-sizing: border-box;
}

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

/* ---- STEP BAR ---- */
.wce-steps {
  display: flex;
  margin-bottom: 1.75rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.wce-step {
  flex: 1;
  padding: 11px 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;
  line-height: 1.3;
}
.wce-step:last-child { border-right: none; }
.wce-step.active { background: #071626; color: #fff; }
.wce-step.done { background: #e8f0f8; color: #071626; cursor: pointer; }
.wce-step.done:hover { background: #d0e0f0; }
.wce-step-num {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
}
.wce-step.active .wce-step-num { color: #fff; }
.wce-step.done .wce-step-num { color: #071626; }
.wce-step-lbl {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 540px) {
  .wce-step-lbl { display: none; }
  .wce-step { padding: 10px 4px; }
  .wce-step-num { font-size: 15px; }
}

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

/* ---- CARD ---- */
.wce-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}
.wce-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: #071626;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* ---- GRID LAYOUTS ---- */
.wce-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.wce-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .wce-grid-2 { grid-template-columns: 1fr; }
  .wce-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .wce-grid-3 { grid-template-columns: 1fr; }
}

/* ---- FORM FIELDS ---- */
.wce-field { display: flex; flex-direction: column; gap: 5px; }
.wce-field label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.wce-optional {
  font-weight: 400;
  color: #999;
  font-size: 12px;
}
.wce-helper {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  line-height: 1.4;
}
.wce-iw { position: relative; }
.wce-iw input,
.wce-iw select {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  color: #111;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
.wce-iw input:focus,
.wce-iw select:focus {
  border-color: #071626;
  box-shadow: 0 0 0 3px rgba(7,22,38,0.08);
}
.wce-iw input::placeholder { color: #bbb; }
.wce-sel-arrow {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #888;
  font-size: 11px;
}

/* ---- SERVICE TOGGLES ---- */
.wce-services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 500px) {
  .wce-services-grid { grid-template-columns: 1fr; }
}
.wce-svc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.13s;
  background: #fff;
  user-select: none;
}
.wce-svc-row:hover { border-color: #071626; background: #f8f9fa; }
.wce-svc-row.selected { border-color: #071626; background: #f0f4f8; }
.wce-svc-cb {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.13s;
  background: #fff;
}
.wce-svc-row.selected .wce-svc-cb {
  background: #071626;
  border-color: #071626;
}
.wce-svc-cb-tick {
  display: none;
  width: 9px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.wce-svc-row.selected .wce-svc-cb-tick { display: block; }
.wce-svc-name { font-size: 13px; color: #333; font-weight: 500; line-height: 1.3; }
.wce-svc-note { font-size: 11px; color: #888; margin-top: 1px; }

/* ---- NAVIGATION BUTTONS ---- */
.wce-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  gap: 10px;
}
.wce-btn-next {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #071626;
  color: #fff;
  transition: background 0.15s;
  font-family: inherit;
}
.wce-btn-next:hover { background: #0d2640; }
.wce-btn-back {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: background 0.15s;
  font-family: inherit;
}
.wce-btn-back:hover { background: #f5f5f5; }
.wce-btn-calc {
  padding: 13px 36px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #C98221;
  color: #fff;
  transition: background 0.15s;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.wce-btn-calc:hover { background: #a86b18; }

/* ---- ERROR BANNER ---- */
.wce-error {
  display: none;
  background: #fef0f0;
  border: 1px solid #f5c6c6;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-top: 12px;
}
.wce-error.show { display: block; }

/* ---- RESULTS: HERO CARD ---- */
.wce-result-hero {
  background: #071626;
  border-radius: 12px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}
.wce-result-badge {
  background: #C98221;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 5px;
  margin-bottom: 10px;
  display: inline-block;
}
.wce-result-range {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}
.wce-result-range-lbl {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}
.wce-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .wce-result-stats { grid-template-columns: 1fr 1fr; }
}
.wce-rstat {
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: center;
}
.wce-rstat-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 5px;
}
.wce-rstat-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- ASSUMPTION BAR ---- */
.wce-assumption-bar {
  background: #fff8ee;
  border: 1px solid #f0d8a0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #7a5000;
  margin-bottom: 1rem;
  line-height: 1.6;
}
.wce-assumption-bar strong { color: #5a3800; }

/* ---- BREAKDOWN TABLE ---- */
.wce-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 6px;
}
.wce-breakdown-table thead tr { background: #f0f4f8; }
.wce-breakdown-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
  border-bottom: 2px solid #ddd;
}
.wce-breakdown-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
  vertical-align: middle;
}
.wce-breakdown-table tr:last-child td { border-bottom: none; }
.wce-breakdown-table tr:hover td { background: #f8f9fa; }
.wce-breakdown-table .total-row td {
  font-weight: 700;
  color: #071626;
  border-top: 2px solid #ddd;
  background: #f0f4f8;
}
.wce-bar-wrap {
  width: 80px;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.wce-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #C98221;
}
@media (max-width: 580px) {
  .wce-breakdown-table th:nth-child(3),
  .wce-breakdown-table td:nth-child(3) { display: none; }
}

/* ---- COST DRIVERS CARD ---- */
.wce-drivers {
  background: #f0f4f8;
  border: 1px solid #d0dae5;
  border-radius: 9px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.wce-drivers-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #071626;
  margin-bottom: 10px;
}
.wce-driver-item {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 7px;
  align-items: flex-start;
}
.wce-driver-item:last-child { margin-bottom: 0; }
.wce-driver-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C98221;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ---- QUESTIONS LIST ---- */
.wce-questions-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.wce-questions-list li {
  font-size: 13px;
  color: #333;
  padding: 6px 0 6px 18px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  line-height: 1.5;
}
.wce-questions-list li:last-child { border-bottom: none; }
.wce-questions-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #071626;
}

/* ---- INLINE RESULTS CTA ---- */
.wce-result-cta {
  background: #071626;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}
.wce-result-cta h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.wce-result-cta p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 14px;
  line-height: 1.6;
}
.wce-cta-links { display: flex; flex-wrap: wrap; gap: 8px; }
.wce-cta-link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.15s;
}
.wce-cta-link.primary { background: #C98221; color: #fff; }
.wce-cta-link.primary:hover { background: #a86b18; }
.wce-cta-link.outline { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.wce-cta-link.outline:hover { background: rgba(255,255,255,0.08); }

/* ---- RESULT ACTIONS ---- */
.wce-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
  margin-bottom: 1rem;
}
.wce-btn-reset {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 7px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: background 0.15s;
  font-family: inherit;
}
.wce-btn-reset:hover { background: #f5f5f5; }
.wce-btn-copy {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  background: #071626;
  color: #fff;
  transition: background 0.15s;
  font-family: inherit;
}
.wce-btn-copy:hover { background: #0d2640; }
.wce-btn-print {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 7px;
  cursor: pointer;
  background: #fff;
  color: #555;
  transition: background 0.15s;
  font-family: inherit;
}
.wce-btn-print:hover { background: #f5f5f5; }
.wce-copy-toast {
  display: none;
  font-size: 12px;
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 6px;
  padding: 6px 12px;
  align-items: center;
  font-weight: 600;
}
.wce-copy-toast.show { display: flex; }

/* ---- DISCLAIMER ---- */
.wce-disclaimer {
  font-size: 12px;
  color: #999;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: 12px;
  margin-top: 8px;
  line-height: 1.6;
}
