/* Wing It On Wheels — Order Calculator (line-based) */

.nutri-calc {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 12px;
  padding: 28px 32px 30px;
  margin: 0 0 32px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.nutri-calc-header { margin-bottom: 22px; }

.nutri-calc-header h2 {
  margin: 0 0 6px !important;
  padding-bottom: 0 !important;
  border: none !important;
  font-size: 24px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.nutri-calc-header p {
  margin: 0;
  color: #555;
  font-size: 14.5px;
  line-height: 1.5;
}

.nutri-calc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1000px) {
  .nutri-calc { padding: 22px 24px 24px; }
  .nutri-calc-body {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nutri-calc { padding: 16px 14px 18px; margin-bottom: 24px; }
  .nutri-calc-body { grid-template-columns: 1fr; gap: 18px; }
  .nutri-calc-header { margin-bottom: 16px; }
  .nutri-calc-header h2 { font-size: 19px !important; }
  .nutri-calc-header p { font-size: 13px; }
}

/* ---- Lines ---- */

.nc-lines { margin-bottom: 14px; }

.nc-no-lines {
  margin: 0 0 14px;
  padding: 16px 18px;
  background: #f4f6f8;
  border-radius: 8px;
  color: #555;
  font-size: 14px;
  font-style: italic;
}

.nc-line {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.nc-line:focus-within {
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.08);
}

.nc-line-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

@media (max-width: 768px) {
  .nc-line-top {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .nc-line-top .nc-line-item { grid-column: 1 / 3; }
  .nc-line-top .nc-stepper { grid-column: 1 / 2; justify-self: start; }
  .nc-line-top .nc-remove { grid-column: 2 / 3; justify-self: end; }
}

.nc-line-item {
  font-size: 15px;
  padding: 10px 34px 10px 12px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  font-family: inherit;
  width: 100%;
  cursor: pointer;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #555 50%),
                    linear-gradient(135deg, #555 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
  overflow: hidden;
}

.nc-line-item:focus {
  outline: 2px solid #2c3e50;
  outline-offset: 1px;
  border-color: #2c3e50;
}

.nc-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nc-minus, .nc-plus {
  width: 36px;
  height: 36px;
  border: 1px solid #d8dde3;
  background: #f4f6f8;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  line-height: 1;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.nc-minus:hover, .nc-plus:hover {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

.nc-minus:active, .nc-plus:active { transform: scale(0.96); }

.nc-qty {
  min-width: 32px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
}

.nc-remove {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid #e5e8ec;
  color: #999;
  font-size: 22px;
  font-weight: 400;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  line-height: 1;
  transition: all 0.12s;
}

.nc-remove:hover {
  background: #fff5f5;
  border-color: #b00020;
  color: #b00020;
}

@media (max-width: 768px) {
  .nc-minus, .nc-plus { width: 40px; height: 40px; font-size: 20px; }
  .nc-qty { min-width: 32px; font-size: 16px; }
  .nc-remove { width: 36px; height: 36px; }
}

/* ---- Sauces under each line ---- */

.nc-sauces {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fafbfc;
  border-radius: 6px;
  border-left: 3px solid #e5e8ec;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nc-sauce {
  font-size: 14px;
  padding: 9px 34px 9px 12px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #555 50%),
                    linear-gradient(135deg, #555 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
  overflow: hidden;
}

.nc-sauce:focus {
  outline: 2px solid #2c3e50;
  outline-offset: 1px;
  border-color: #2c3e50;
}

@media (max-width: 768px) {
  .nc-sauce { font-size: 14px; padding: 10px 32px 10px 10px; }
}

.nc-split-note {
  font-size: 12px;
  color: #555;
  font-style: italic;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- Toggles (e.g. pickles on the sandwich) ---- */

.nc-toggles {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fafbfc;
  border-radius: 6px;
  border-left: 3px solid #e5e8ec;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.nc-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  accent-color: #2c3e50;
}

.nc-toggle:hover { color: #2c3e50; }

@media (max-width: 768px) {
  .nc-toggle { font-size: 14px; gap: 8px; }
  .nc-toggle input[type="checkbox"] { width: 20px; height: 20px; }
}

/* ---- Add Item button ---- */

.nc-add-line {
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: #fff;
  border: 2px dashed #d8dde3;
  border-radius: 8px;
  color: #2c3e50;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: all 0.12s;
}

.nc-add-line:hover {
  border-color: #2c3e50;
  background: #f4f6f8;
}

.nc-add-line:active { transform: scale(0.99); }

@media (max-width: 768px) {
  .nc-add-line { padding: 12px 16px; font-size: 14px; }
}

/* ---- Summary column ---- */

.nutri-calc-summary {
  background: #f4f6f8;
  border-radius: 10px;
  padding: 20px 22px;
  position: sticky;
  top: 110px;
}

@media (max-width: 768px) {
  .nutri-calc-summary { position: static; padding: 14px; border-radius: 8px; }
}

.nutri-calc-summary h3 {
  margin: 0 0 12px !important;
  padding-bottom: 0 !important;
  border: none !important;
  font-size: 17px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: normal !important;
  color: #1a1a1a !important;
  font-weight: 700 !important;
}

.nc-order-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.nc-order-list li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.nc-order-list li:last-child { border-bottom: none; }

.nc-sauce-tag { color: #555; font-size: 12.5px; }

.nc-empty {
  font-size: 13.5px;
  color: #555;
  font-style: italic;
  margin: 0 0 14px;
  padding: 8px 0;
}

.nc-totals-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 14px;
  font-size: 13.5px;
  background: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #e5e8ec;
}

.nc-totals-grid h4 {
  grid-column: 1 / 3;
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #2c3e50;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}

.nc-totals-grid .label { color: #555; align-self: center; }

.nc-totals-grid [data-key] {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
  align-self: center;
}

.nc-totals-grid .nc-cal-label {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 14.5px;
  padding-top: 4px;
}

.nc-totals-grid .nc-cal-value {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  padding-top: 4px;
}

.nc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nc-save, .nc-clear {
  flex: 1;
  min-width: 110px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  letter-spacing: 0.3px;
  transition: opacity 0.12s, background 0.12s;
}

.nc-save { background: #2c3e50; color: #fff; }
.nc-save:hover { opacity: 0.92; }
.nc-save:disabled { background: #ccc; cursor: not-allowed; opacity: 0.7; }

.nc-clear {
  background: #fff;
  color: #555;
  border-color: #d8dde3;
}
.nc-clear:hover:not(:disabled) { background: #f0f2f5; }
.nc-clear:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Export view (rendered off-screen) ---- */

.nc-export-view {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 480px;
  background: #fff;
  padding: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  box-sizing: border-box;
  line-height: 1.4;
}

.nc-export-view * { box-sizing: border-box; }

.nc-export-view .ev-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid #e31837;
}

.nc-export-view .ev-logo { width: 70px; height: 70px; object-fit: contain; }

.nc-export-view .ev-title h2 {
  margin: 0 0 2px;
  font-size: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: normal;
  font-weight: 700;
  color: #1a1a1a;
}

.nc-export-view .ev-title p { margin: 0; color: #555; font-size: 13px; }
.nc-export-view .ev-section { margin-bottom: 18px; }

.nc-export-view .ev-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #2c3e50;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}

.nc-export-view .ev-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.nc-export-view .ev-list li { padding: 6px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.1); }
.nc-export-view .ev-list li:last-child { border-bottom: none; }
.nc-export-view .ev-sauce { color: #555; font-size: 13px; }

.nc-export-view .ev-totals { width: 100%; border-collapse: collapse; font-size: 14px; }
.nc-export-view .ev-totals th {
  text-align: left;
  padding: 7px 0;
  font-weight: 400;
  color: #555;
  background: none;
  font-size: 13px;
  border: none;
}
.nc-export-view .ev-totals td {
  text-align: right;
  font-weight: 700;
  padding: 7px 0;
  font-variant-numeric: tabular-nums;
  border: none;
}
.nc-export-view .ev-totals tr { border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.nc-export-view .ev-totals tr:last-child { border-bottom: none; }
.nc-export-view .ev-totals .ev-cal { font-size: 18px; color: #2c3e50; }

.nc-export-view .ev-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #ddd;
  text-align: center;
  font-size: 12px;
  color: #555;
}
.nc-export-view .ev-footer p { margin: 2px 0; }
.nc-export-view .ev-disc { font-style: italic; font-size: 11px; color: #777; }
