/* ============================================================
   Nextwave Trade Quote Builder  |  nwtq-style.css v1.1.0
   Matches the original Quote Builder visual style.
   ============================================================ */

/* ── Theme isolation reset ──────────────────────────────── */
#nwtq-app button {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  line-height: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: inherit !important;
  text-decoration: none !important;
  text-shadow: none !important;
  text-transform: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  outline: none !important;
}

#nwtq-app .nwtq-btn,
#nwtq-app .nwtq-qty-btn { box-sizing: border-box !important; }

#nwtq-app *,
#nwtq-app *::before,
#nwtq-app *::after { box-sizing: border-box; }

#nwtq-app {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #1e293b;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 12px 40px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Progress indicator ─────────────────────────────────── */
.nwtq-progress {
  display: flex;
  justify-content: center;
  margin: 24px 0 30px;
  position: relative;
}
.nwtq-progress::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}
.nwtq-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  z-index: 1;
}
.nwtq-step-dot .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  transition: background .3s, color .3s;
}
.nwtq-step-dot.active .dot { background: #0f172a; color: #fff; }
.nwtq-step-dot.done   .dot { background: #16a34a; color: #fff; font-size: 14px; }
.nwtq-step-dot .dot-label {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
}
.nwtq-step-dot.active .dot-label { color: #0f172a; font-weight: 600; }

/* ── Steps ──────────────────────────────────────────────── */
.nwtq-step { display: none; }
.nwtq-step.active { display: block; }

/* ── Card ───────────────────────────────────────────────── */
.nwtq-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.nwtq-card h2 {
  margin: 0 0 4px;
  font-size: 21px;
  color: #0f172a;
  font-weight: 700;
}
.nwtq-subtitle {
  color: #64748b;
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Trade Terms box ────────────────────────────────────── */
.nwtq-trade-terms {
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.nwtq-terms-heading {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}
.nwtq-trade-terms ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.9;
}
.nwtq-trade-terms ul li strong { color: #92400e; }

/* ── Agreement checkbox ─────────────────────────────────── */
.nwtq-agree-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  margin: 16px 0 0;
  line-height: 1.5;
}
.nwtq-agree-wrap input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: #0f172a;
  cursor: pointer;
}

/* ── Catalogue ──────────────────────────────────────────── */
.nwtq-cat-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 9px;
  overflow: hidden;
}
.nwtq-cat-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.nwtq-cat-hdr:hover { background: #f1f5f9; }
.nwtq-cat-hdr .c-icon  { font-size: 18px; flex-shrink: 0; }
.nwtq-cat-hdr .c-name  { font-weight: 600; font-size: 14px; flex: 1; color: #1e293b; }
.nwtq-cat-hdr .c-count {
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  display: none;
}
.nwtq-cat-hdr .c-count.show { display: inline-block; }
.nwtq-cat-hdr .c-chevron {
  color: #94a3b8;
  font-size: 11px;
  transition: transform .2s;
  flex-shrink: 0;
}
.nwtq-cat-hdr.open .c-chevron { transform: rotate(180deg); }

.nwtq-cat-body { display: none; padding: 4px 16px 14px; background: #fff; }
.nwtq-cat-body.open { display: block; }

/* ── Item rows ──────────────────────────────────────────── */
.nwtq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.nwtq-item:last-child { border-bottom: none; }

.nwtq-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #0f172a;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.nwtq-item label {
  flex: 1;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}
.nwtq-item .i-price {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  flex-shrink: 0;
}
.nwtq-item select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.nwtq-item select:focus { outline: none; border-color: #0f172a; }

.nwtq-qty-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#nwtq-app .nwtq-qty-btn {
  width: 26px !important;
  height: 26px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  cursor: pointer !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  color: #334155 !important;
  transition: background .15s, color .15s, border-color .15s !important;
  padding: 0 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  min-width: 0 !important;
}
#nwtq-app .nwtq-qty-btn:hover {
  background: #0f172a !important;
  color: #fff !important;
  border-color: #0f172a !important;
}
.nwtq-qty-val { font-size: 13px; font-weight: 700; min-width: 22px; text-align: center; color: #0f172a; }

.nwtq-poa-tag {
  font-size: 11px;
  color: #d97706;
  font-weight: 700;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Running total bar ──────────────────────────────────── */
.nwtq-total-bar {
  position: sticky;
  bottom: 0;
  background: #0f172a;
  color: #fff;
  padding: 13px 20px;
  border-radius: 10px;
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.18);
}
.nwtq-total-bar.visible  { display: flex; }
.nwtq-total-bar .tb-left  { display: flex; flex-direction: column; gap: 1px; }
.nwtq-total-bar .tb-label  { font-size: 11px; color: #94a3b8; font-weight: 400; }
.nwtq-total-bar .tb-amount { font-size: 20px; font-weight: 700; }
.nwtq-total-bar .tb-right  { text-align: right; }
#nwtq-bar-disc { color: #86efac; }

/* ── Contact form ───────────────────────────────────────── */
.nwtq-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (min-width: 480px) {
  .nwtq-form-grid.two { grid-template-columns: 1fr 1fr; }
}
.nwtq-form-group { display: flex; flex-direction: column; gap: 5px; }
.nwtq-form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.nwtq-form-group input,
.nwtq-form-group textarea {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  color: #1e293b;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.nwtq-form-group input:focus,
.nwtq-form-group textarea:focus {
  outline: none;
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.nwtq-form-group textarea { resize: vertical; min-height: 90px; }

/* ── Error notice ───────────────────────────────────────── */
.nwtq-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

/* ── Contact chip ───────────────────────────────────────── */
.nwtq-contact-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
  line-height: 1.6;
}
.nwtq-contact-chip strong { color: #0f172a; }

/* ── Summary table ──────────────────────────────────────── */
.nwtq-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 16px;
}
.nwtq-summary-table td { padding: 9px 4px; border-bottom: 1px solid #f1f5f9; }
.nwtq-summary-table tr:last-child td { border-bottom: none; }
.nwtq-summary-table .s-name  { color: #334155; }
.nwtq-summary-table .s-price { text-align: right; font-weight: 700; white-space: nowrap; width: 100px; }

/* ── Totals box ─────────────────────────────────────────── */
.nwtq-totals-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
}
.nwtq-totals-box .t-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: #475569;
}
.nwtq-totals-box .t-row.bold  { color: #1e293b; font-weight: 700; }
.nwtq-totals-box .t-row.green { color: #15803d; font-weight: 600; }
.nwtq-total-final {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  border-top: 2px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 8px;
}
.nwtq-deposit-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
  text-align: right;
}
.nwtq-poa-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 12px;
}
.nwtq-delivery-note {
  color: #64748b;
  font-size: 12px;
  font-style: italic;
}

/* ── Buttons ────────────────────────────────────────────── */
.nwtq-btn-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 24px;
  flex-wrap: wrap;
}
#nwtq-app .nwtq-btn {
  padding: 11px 22px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  border: 2px solid transparent !important;
  transition: background .2s, border-color .2s, opacity .2s !important;
  font-family: inherit !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  display: inline-block !important;
}
#nwtq-app .nwtq-btn-primary {
  background: #0f172a !important;
  color: #fff !important;
  border-color: #0f172a !important;
}
#nwtq-app .nwtq-btn-primary:hover:not(:disabled) {
  background: #1e293b !important;
  border-color: #1e293b !important;
}
#nwtq-app .nwtq-btn-primary:disabled { opacity: .55 !important; cursor: not-allowed !important; }
#nwtq-app .nwtq-btn-secondary {
  background: transparent !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}
#nwtq-app .nwtq-btn-secondary:hover {
  border-color: #94a3b8 !important;
  color: #334155 !important;
}

/* ── Success screen ─────────────────────────────────────── */
.nwtq-success {
  text-align: center;
  padding: 48px 20px;
}
.nwtq-success .s-tick  { font-size: 60px; margin-bottom: 16px; }
.nwtq-success h2       { color: #0f172a; margin: 0 0 10px; font-size: 24px; }
.nwtq-success p        { color: #64748b; max-width: 420px; margin: 0 auto 10px; font-size: 15px; line-height: 1.6; }
.nwtq-success .s-phone { margin-top: 20px; font-size: 14px; color: #94a3b8; }
.nwtq-success .s-phone strong { color: #0f172a; }

/* ── Mobile: ≤ 479px ─────────────────────────────────────── */
@media (max-width: 479px) {
  #nwtq-app { padding: 0 8px 24px; }

  .nwtq-progress { margin: 14px 0 20px; }
  .nwtq-progress::before { left: 8%; right: 8%; top: 13px; }
  .nwtq-step-dot .dot { width: 26px; height: 26px; font-size: 11px; }
  .nwtq-step-dot .dot-label { display: none; }
  .nwtq-step-dot.active .dot-label {
    display: block;
    font-size: 11px;
    color: #0f172a;
    font-weight: 600;
    white-space: nowrap;
    position: absolute;
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
  }
  .nwtq-step-dot { position: relative; }
  .nwtq-progress { margin-bottom: 38px; }

  .nwtq-card { padding: 16px 12px 14px; border-radius: 10px; }
  .nwtq-card h2 { font-size: 17px; line-height: 1.3; }
  .nwtq-subtitle { font-size: 13px; margin-bottom: 16px; }

  .nwtq-cat-hdr { padding: 12px 14px; min-height: 44px; }
  .nwtq-cat-body { padding: 4px 10px 12px; }

  .nwtq-item {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px 8px;
    padding: 10px 0;
  }
  .nwtq-item input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
  .nwtq-item label { font-size: 13px; min-width: 0; }
  .nwtq-item select {
    flex-shrink: 1;
    flex-basis: calc(100% - 26px);
    width: calc(100% - 26px);
    margin-left: 26px;
    order: 10;
    font-size: 14px;
    padding: 7px 10px;
  }
  .nwtq-item .i-price { margin-left: auto; }

  #nwtq-app .nwtq-qty-btn { width: 34px !important; height: 34px !important; font-size: 17px !important; }
  .nwtq-qty-val { font-size: 14px; }

  .nwtq-total-bar { padding: 10px 14px; border-radius: 8px; margin-top: 12px; }
  .nwtq-total-bar .tb-amount { font-size: 16px; }
  .nwtq-total-bar .tb-label  { font-size: 10px; }

  .nwtq-form-group input,
  .nwtq-form-group textarea { font-size: 16px; padding: 10px 11px; }

  .nwtq-btn-row { flex-direction: column-reverse; gap: 8px; margin-top: 18px; }
  #nwtq-app .nwtq-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 13px 16px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    display: block !important;
  }

  .nwtq-total-final { font-size: 17px; }
  .nwtq-summary-table { font-size: 13px; }
  .nwtq-summary-table .s-price { width: 80px; font-size: 13px; }
  .nwtq-totals-box { padding: 12px 14px; }
  .nwtq-contact-chip { font-size: 12px; padding: 11px 12px; }
}

/* ── Tablet: 480px – 639px ──────────────────────────────── */
@media (min-width: 480px) and (max-width: 639px) {
  .nwtq-form-group input,
  .nwtq-form-group textarea { font-size: 16px; }
  .nwtq-btn-row { flex-wrap: wrap; }
}
