/* NFH Freight Class Calculator – freight-calc.css */

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

.nfh-fcc-header { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid #1a3a5c; }
.nfh-fcc-header h2 { font-size: 24px; font-weight: 700; color: #1a3a5c; margin: 0 0 4px; }
.nfh-fcc-header p { font-size: 14px; color: #666; margin: 0; line-height: 1.5; }

.nfh-fcc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1.25rem; }
@media (max-width: 520px) {
  .nfh-fcc-grid { grid-template-columns: 1fr; }
  .nfh-fcc-result-top { flex-direction: column !important; }
  .nfh-fcc-result-class { flex: none !important; }
  .nfh-fcc-factors { grid-template-columns: 1fr 1fr !important; }
}

.nfh-fcc-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 1.15rem; }
.nfh-fcc-card h3 { font-size: 12px; font-weight: 700; color: #1a3a5c; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 .75rem; padding-bottom: 5px; border-bottom: 1px solid #eee; }

.nfh-fcc-field { margin-bottom: .85rem; }
.nfh-fcc-field:last-child { margin-bottom: 0; }
.nfh-fcc-field label { display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 4px; }
.nfh-fcc-help { display: block; font-size: 10px; color: #999; margin-top: 3px; line-height: 1.4; }
.nfh-fcc-iw { display: flex; align-items: stretch; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; background: #fff; transition: border-color 0.15s; }
.nfh-fcc-iw:focus-within { border-color: #1a3a5c; box-shadow: 0 0 0 3px rgba(26,58,92,0.08); }
.nfh-fcc-iw input { flex: 1; border: none; padding: 9px 12px; font-size: 15px; outline: none; color: #111; background: transparent; min-width: 0; }
.nfh-fcc-iw input::placeholder { color: #bbb; }
.nfh-fcc-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-fcc-dims { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.nfh-fcc-dims .nfh-fcc-field { margin-bottom: 0; }

.nfh-fcc-toggle { display: flex; gap: 0; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; margin-bottom: .75rem; }
.nfh-fcc-toggle button { flex: 1; padding: 6px 0; font-size: 11px; font-weight: 600; border: none; cursor: pointer; background: #f5f5f5; color: #888; transition: all 0.15s; }
.nfh-fcc-toggle button.on { background: #1a3a5c; color: #fff; }

.nfh-fcc-presets { display: flex; gap: 6px; margin-bottom: .75rem; flex-wrap: wrap; }
.nfh-fcc-preset { padding: 5px 10px; font-size: 11px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; background: #fff; color: #555; transition: all 0.15s; }
.nfh-fcc-preset:hover { border-color: #1a3a5c; color: #1a3a5c; }
.nfh-fcc-preset.on { background: #1a3a5c; color: #fff; border-color: #1a3a5c; }

.nfh-fcc-btn { display: block; width: 100%; padding: 12px; font-size: 15px; font-weight: 700; border: none; border-radius: 8px; cursor: pointer; background: #1a3a5c; color: #fff; transition: background 0.15s; margin-bottom: 1.5rem; }
.nfh-fcc-btn:hover { background: #0f2840; }

.nfh-fcc-result { display: none; margin-bottom: 1.5rem; }
.nfh-fcc-result.show { display: block; }
.nfh-fcc-result-top { display: flex; gap: 14px; margin-bottom: 14px; }
.nfh-fcc-result-class { flex: 0 0 140px; background: #1a3a5c; border-radius: 10px; padding: 1.15rem; text-align: center; color: #fff; }
.nfh-fcc-cn { font-size: 42px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.nfh-fcc-cl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }

.nfh-fcc-stats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nfh-fcc-st { background: #f8f9fa; border-radius: 8px; padding: 10px 12px; }
.nfh-fcc-sv { font-size: 17px; font-weight: 700; color: #1a3a5c; }
.nfh-fcc-sl { font-size: 10px; color: #888; margin-top: 2px; }

.nfh-fcc-bar-wrap { background: #f8f9fa; border-radius: 10px; padding: 1rem; margin-bottom: 14px; }
.nfh-fcc-bt { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.nfh-fcc-br { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 11px; }
.nfh-fcc-bl { width: 44px; text-align: right; font-weight: 600; color: #555; flex-shrink: 0; }
.nfh-fcc-btrack { flex: 1; height: 16px; background: #e8e8e8; border-radius: 3px; overflow: hidden; }
.nfh-fcc-bfill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.nfh-fcc-bd { font-size: 9px; color: #888; width: 60px; flex-shrink: 0; }
.nfh-fcc-br.act .nfh-fcc-bl { color: #C8622A; font-weight: 800; }
.nfh-fcc-br.act .nfh-fcc-bfill { background: #C8622A; }
.nfh-fcc-br:not(.act) .nfh-fcc-bfill { background: #ccd6e0; }
.nfh-fcc-br.act .nfh-fcc-bd { color: #C8622A; font-weight: 700; }

.nfh-fcc-tip { background: #faeee6; border: 1px solid #e8b99a; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #a34e20; line-height: 1.5; margin-bottom: 10px; }
.nfh-fcc-tip strong { color: #1a3a5c; }

.nfh-fcc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.nfh-fcc-abtn { padding: 8px 14px; font-size: 12px; 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; }
.nfh-fcc-abtn:hover { background: #f5f5f5; }
.nfh-fcc-abtn.primary { background: #C8622A; color: #fff; border-color: #C8622A; }
.nfh-fcc-abtn.primary:hover { background: #a34e20; }
.nfh-fcc-note { font-size: 11px; color: #999; line-height: 1.5; margin: 0; }

.nfh-fcc-section { margin-top: 1.5rem; }
.nfh-fcc-section h3 { font-size: 13px; font-weight: 700; color: #1a3a5c; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid #eee; }

.nfh-fcc-factors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 1.5rem; }
.nfh-fcc-factor { background: #f8f9fa; border-radius: 8px; padding: 12px 10px; text-align: center; }
.nfh-fcc-fi { font-size: 22px; margin-bottom: 6px; }
.nfh-fcc-fn { font-size: 12px; font-weight: 700; color: #1a3a5c; margin-bottom: 4px; }
.nfh-fcc-fd { font-size: 10px; color: #888; line-height: 1.4; }

.nfh-fcc-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1a3a5c; color: #fff; font-size: 13px; padding: 10px 20px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 99999; }
.nfh-fcc-toast.show { opacity: 1; }
