/* LEADERFOAM Interactive Mixed-Container & CBM Calculator (Editorial Packing Sheet) */
.calc-shell {
  border: 1px solid #CFC5B8;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: none;
}
.calc-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  background: #f2ede6;
  border-bottom: 1px solid #ddd4c8;
}
.calc-container-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #faf8f5;
  border: 1px solid #cfc5b8;
  gap: 3px;
}
.calc-container-btn {
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c534b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.calc-container-btn[aria-pressed="true"] {
  background: #1f1b18;
  color: #faf8f5;
}
.calc-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calc-chip-btn {
  padding: 7px 12px;
  border: 1px solid #c9bcae;
  border-radius: 8px;
  background: #faf8f5;
  color: #1f1b18;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.calc-chip-btn:hover { background: #e7dfd3; border-color: #1f1b18; }
.calc-chip-btn[hidden] { display: none !important; }

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 0;
}
.calc-picker {
  padding: 18px 24px 24px;
  border-right: 1px solid #ddd4c8;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calc-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.calc-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  width: 100%;
  border-bottom: 1px solid #eae5dc;
}
.calc-filter-tab {
  padding: 6px 0 9px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #6e655d;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.calc-filter-tab:hover { color: #1f1b18; }
.calc-filter-tab[aria-pressed="true"] {
  border-bottom-color: #1f1b18;
  color: #1f1b18;
  font-weight: 600;
}
.calc-model-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.calc-model-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border: 0;
  border-left: 2px solid transparent;
  border-bottom: 1px solid #eae5dc;
  border-radius: 0;
  background: transparent;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.calc-model-row.is-active {
  border-left-color: #8c5c39;
  background: #faf6f0;
}
.calc-model-row img {
  width: 56px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: #e7e5e4;
}
.calc-model-info { min-width: 0; }
.calc-model-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.calc-model-code {
  font-size: 11px;
  font-weight: 800;
  color: #8c5c39;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.calc-model-name {
  font-size: 13px;
  font-weight: 700;
  color: #1d1917;
}
.calc-model-specs {
  font-size: 11px;
  color: #78716c;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.calc-row-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.calc-qty-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfc5b8;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}
.calc-qty-group button {
  width: 28px;
  height: 30px;
  border: 0;
  background: #faf8f5;
  color: #1d1917;
  font-weight: 700;
  cursor: pointer;
}
.calc-qty-group button:hover { background: #eae5dc; }
.calc-qty-group input {
  width: 52px;
  height: 30px;
  border: 0;
  border-inline: 1px solid #eae5dc;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #1d1917;
  font-variant-numeric: tabular-nums;
}
.calc-fill-btn {
  padding: 5px 9px;
  border: 1px solid #cfc5b8;
  border-radius: 6px;
  background: #ffffff;
  color: #443e3a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.calc-fill-btn:hover { border-color: #1f1b18; color: #1d1917; }

/* Editorial Packing Summary Sidebar */
.calc-summary {
  padding: 22px 24px 24px;
  background: #faf8f5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.calc-meter-card {
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid #1f1b18;
  border-radius: 0;
  background: transparent;
  color: #1f1b18;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calc-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.calc-meter-label { font-size: 12px; color: #5c534b; font-weight: 600; letter-spacing: 0.02em; }
.calc-meter-pct { font-size: 30px; font-weight: 500; color: #1f1b18; font-variant-numeric: tabular-nums; line-height: 1; }
.calc-meter-track {
  height: 4px;
  border-radius: 0;
  background: #ddd4c8;
  overflow: hidden;
}
.calc-meter-bar {
  height: 100%;
  border-radius: 0;
  background: #8c5c39;
  transition: width 220ms ease, background-color 220ms ease;
}
.calc-meter-bar.is-optimal { background: #1f1b18; }
.calc-meter-bar.is-over { background: #a93c28; }
.calc-meter-status {
  font-size: 12px;
  color: #5c534b;
  line-height: 1.5;
}

.calc-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}
.calc-kpi {
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid #ddd4c8;
  border-radius: 0;
  background: transparent;
}
.calc-kpi-label { font-size: 11px; color: #78716c; display: block; }
.calc-kpi-value { font-size: 17px; font-weight: 600; color: #1d1917; font-variant-numeric: tabular-nums; margin-top: 3px; display: block; }

.calc-freight-box {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.calc-freight-box label {
  font-size: 12px;
  font-weight: 600;
  color: #1d1917;
}
.calc-freight-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-freight-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #cfc5b8;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.calc-freight-result {
  font-size: 12px;
  color: #8c5c39;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.calc-selected-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #443e3a;
  border-top: 1px solid #ddd4c8;
  padding-top: 12px;
}
.calc-selected-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.calc-submit-btn {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: #1f1b18;
  color: #faf8f5;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.calc-submit-btn:hover:not(:disabled) { background: #332c27; }
.calc-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.calc-fill-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.calc-disclaimer {
  font-size: 11px;
  color: #78716c;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-picker { border-right: 0; border-bottom: 1px solid #eae5dc; }
}
@media (max-width: 540px) {
  .calc-topbar, .calc-picker, .calc-summary { padding: 16px; }
  .calc-model-row { grid-template-columns: minmax(0, 1fr); }
  .calc-model-row img { display: none; }
  .calc-row-controls { justify-content: space-between; }
}
