@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   TheTransporter quote tool (index.php, quote.php, book.php)
   Matches the users/support/admin portal's 8-color brand theme -
   see portal-assets/css/portal.css for the canonical token values.
   The old kraft-paper "shipping manifest" theme (perforated edges,
   tape stripes, rubber-stamp badges) has been retired in favor of
   full visual consistency across the whole site.
   ============================================================ */
:root {
  --tt-blue: #1b75bc;
  --tt-blue-deep: #125a94;
  --tt-sky: #6fb3e4;
  --tt-green: #39b54a;
  --tt-green-deep: #27913a;
  --tt-orange: #f7941e;
  --tt-orange-deep: #d9780a;
  --tt-slate: #414750;

  --tt-blue-soft: #e7f1fa;
  --tt-green-soft: #e8f7eb;
  --tt-orange-soft: #fef2e2;
  --tt-red: #d64545;
  --tt-red-soft: #fdecec;

  --p-ink: #232a33;
  --p-muted: #64707e;
  --p-bg: #f2f5f9;
  --p-card: #ffffff;
  --p-border: #dfe6ee;
  --p-radius: 14px;
  --p-radius-sm: 9px;
  --p-shadow: 0 1px 2px rgba(35,42,51,0.05), 0 6px 20px rgba(35,42,51,0.06);
  --p-shadow-lift: 0 2px 4px rgba(35,42,51,0.06), 0 14px 34px rgba(27,117,188,0.13);
  --p-display: 'Oswald', sans-serif;
  --p-body: 'Inter', sans-serif;
  --tt-tricolor: linear-gradient(90deg, var(--tt-blue) 0 34%, var(--tt-green) 34% 67%, var(--tt-orange) 67% 100%);
  /* The main site header is position:fixed and overlays the page. */
  --site-header-h: 100px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.quote-page {
  padding: calc(var(--site-header-h) + 30px) 16px 90px;
  background:
    radial-gradient(1000px 380px at 15% -80px, rgba(27,117,188,0.10), transparent 60%),
    radial-gradient(900px 340px at 90% -60px, rgba(247,148,30,0.08), transparent 55%),
    var(--p-bg);
  font-family: var(--p-body);
  color: var(--p-ink);
}

.quote-container {
  max-width: 700px;
  margin: 0 auto;
}

/* Eyebrow / header strip */
.manifest-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-blue-deep));
  color: #fff;
  font-family: var(--p-display);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 20px;
}

.manifest-date {
  font-family: var(--p-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--p-muted);
  letter-spacing: 0.02em;
}

.quote-intro, .quote-result-header {
  text-align: center;
  margin-bottom: 28px;
}

.quote-intro h1, .quote-result-header h1 {
  font-family: var(--p-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--tt-slate);
  margin: 0 0 12px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.quote-intro p, .quote-result-header p {
  color: var(--p-muted);
  font-size: 16px;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Stamp badge -> clean gradient pill (used on quote.php) */
.stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--tt-green), var(--tt-green-deep));
  color: #fff;
  font-family: var(--p-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 20px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(57,181,74,0.3);
  animation: badgeIn 0.4s ease-out;
}

@keyframes badgeIn {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Step stubs */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--p-muted);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--p-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--p-body);
  font-size: 13px;
  font-weight: 700;
  background: var(--p-card);
  transition: all 0.25s ease;
}

.step-label {
  font-family: var(--p-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: none;
}

@media (min-width: 480px) { .step-label { display: inline; } }

.step.active .step-num {
  border-color: var(--tt-blue);
  background: linear-gradient(135deg, var(--tt-blue), var(--tt-blue-deep));
  color: #fff;
}
.step.active .step-label { color: var(--tt-slate); }

.step.done .step-num {
  border-color: var(--tt-green);
  background: linear-gradient(135deg, var(--tt-green), var(--tt-green-deep));
  color: #fff;
}

.step-line {
  width: 26px;
  height: 2px;
  background: var(--p-border);
}

/* Card */
.manifest-card {
  position: relative;
  background: var(--p-card);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  padding: 30px 26px;
  margin-bottom: 22px;
}

.perf { display: none; }

.tape-divider {
  height: 1.5px;
  margin: 24px 0;
  background: var(--p-border);
  border-radius: 0;
  opacity: 1;
}

.form-section { margin-bottom: 4px; }

.field-label {
  display: block;
  font-family: var(--p-body);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--tt-slate);
  margin-bottom: 18px;
}

/* Route inputs */
.route-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.field {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--p-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field label {
  display: block;
  font-family: var(--p-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--p-muted);
  margin-bottom: 6px;
}

.input-icon-wrap { position: relative; }

.input-icon-wrap i {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tt-blue);
  font-size: 13px;
}

.input-icon-wrap input {
  width: 100%;
  padding: 4px 4px 4px 20px;
  border: none;
  font-family: var(--p-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--p-ink);
  background: transparent;
  box-sizing: border-box;
}

.input-icon-wrap input:focus {
  outline: none;
}
.field:focus-within {
  border-color: var(--tt-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(27,117,188,0.14);
}

.route-icon {
  display: flex;
  align-items: center;
  color: var(--tt-blue);
  font-size: 16px;
  flex-shrink: 0;
}

.route-hint {
  font-size: 12.5px;
  color: var(--p-muted);
  margin: 12px 2px 0;
  line-height: 1.5;
}

/* Upload zone */
.upload-zone {
  border: 1.5px solid var(--p-border);
  border-radius: 10px;
  background: #fafcfe;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 34px 20px;
  text-align: center;
}

.upload-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--tt-blue-soft);
  color: var(--tt-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
}

.upload-title {
  font-family: var(--p-display);
  font-weight: 600;
  color: var(--tt-slate);
  font-size: 15px;
  letter-spacing: 0.01em;
}

.upload-sub { color: var(--p-muted); font-size: 13px; }

/* Preview grid */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding: 0 6px;
}

.preview-thumb {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--p-border);
  box-shadow: var(--p-shadow);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remove-thumb {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--tt-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
}

/* Submit button - primary conversion CTA, orange like the portal's
   hero/promo buttons */
.submit-btn {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tt-orange), var(--tt-orange-deep));
  color: #fff;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(247,148,30,0.30);
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.submit-btn:not(:disabled):hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(247,148,30,0.38); }
.submit-btn:not(:disabled):active { transform: scale(0.98); }
.submit-btn:disabled { background: #d5dbe3; color: #97a1ad; cursor: not-allowed; box-shadow: none; }
.submit-btn:focus-visible, .cta-btn:focus-visible, input:focus-visible {
  outline: 2.5px solid var(--tt-blue);
  outline-offset: 2px;
}

.btn-loader {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qtSpin 0.7s linear infinite;
}
@keyframes qtSpin { to { transform: rotate(360deg); } }

.scan-status {
  text-align: center;
  margin-top: 12px;
  font-family: var(--p-body);
  font-weight: 600;
  font-size: 13px;
  color: var(--p-muted);
  min-height: 18px;
}

/* Trust row as mini badges */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--p-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--tt-slate);
  border: 1.5px solid var(--tt-blue-soft);
  background: var(--tt-blue-soft);
  border-radius: 20px;
  padding: 7px 13px;
}
.trust-item i { color: var(--tt-blue); }

/* Route summary (quote.php) */
.route-summary-card {
  padding: 26px;
}

.route-summary-line-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-summary-city { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.route-summary-city-end { text-align: right; align-items: flex-end; }

.route-summary-label {
  font-family: var(--p-body);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--p-muted);
}

.route-summary-name {
  font-family: var(--p-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--tt-slate);
}

.route-summary-mid {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  min-width: 40px;
}

.route-summary-track {
  flex: 1;
  height: 0;
  border-top: 2px dashed var(--p-border);
  position: relative;
}

.route-summary-truck {
  color: var(--tt-orange);
  font-size: 18px;
  flex-shrink: 0;
  animation: truckDrift 2.2s ease-in-out infinite;
}
@keyframes truckDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.route-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

.route-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--p-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-blue-deep);
  background: var(--tt-blue-soft);
  border-radius: 20px;
  padding: 6px 13px;
}
.route-meta-item i { color: var(--tt-blue); }

.quote-section { margin-bottom: 26px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--p-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tt-slate);
  margin: 0 0 16px;
}
.section-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--tt-blue-soft);
  color: var(--tt-blue);
  font-size: 13px;
}

/* Photo gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 16px;
  padding: 4px;
}

.gallery-thumb {
  aspect-ratio: 1;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--p-border);
  box-shadow: var(--p-shadow);
}

.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Quote table */
.quote-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--p-body); }

.quote-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tt-blue-deep);
  background: var(--tt-blue-soft);
  padding: 10px 12px;
  font-weight: 800;
}
.quote-table th:first-child { border-radius: 8px 0 0 8px; padding-left: 12px; }
.quote-table th:last-child { border-radius: 0 8px 8px 0; }
.quote-table td:first-child { padding-left: 12px; }
.quote-table td:last-child { padding-right: 12px; }

.quote-table td {
  padding: 12px;
  border-bottom: 1px solid var(--p-border);
  font-size: 14px;
  color: var(--p-ink);
  font-family: var(--p-body);
  font-weight: 500;
}
.quote-table td:last-child, .quote-table th:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.quote-table tr:last-child td { border-bottom: none; }
.quote-table tbody tr:hover { background: #f7fafd; }

/* Breakdown */
.breakdown-card { padding: 24px 26px; }

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--p-border);
  font-size: 13.5px;
  color: var(--p-muted);
}

.breakdown-row span:last-child {
  font-weight: 700;
  color: var(--tt-slate);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.breakdown-total { border-bottom: none; padding-top: 18px; align-items: baseline; }
.breakdown-total span:first-child {
  font-family: var(--p-display);
  font-size: 15px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tt-slate) !important;
}
.breakdown-total span:last-child {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--tt-orange-deep) !important;
}

.disclaimer {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 24px;
  color: var(--p-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
  padding: 17px;
  background: linear-gradient(135deg, var(--tt-orange), var(--tt-orange-deep));
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(247,148,30,0.30);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.cta-btn:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(247,148,30,0.38); }

@media (max-width: 520px) {
  .quote-intro h1, .quote-result-header h1 { font-size: 28px; }
  .manifest-card { padding: 24px 18px; }
  .route-row { flex-direction: column; }
  .route-icon { display: none; }
  .route-summary-name { font-size: 16px; }
  .route-summary-mid { padding: 0 8px; }
  .breakdown-total span:last-child { font-size: 22px !important; }
}

/* Account / portal cross-link strip */
.account-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin: 22px auto 0;
  padding: 13px 18px;
  border: 1.5px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  background: var(--p-card);
  box-shadow: var(--p-shadow);
  font-family: var(--p-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--p-muted);
  line-height: 1.5;
  text-align: center;
}
.account-strip i { color: var(--tt-blue); font-size: 16px; flex-shrink: 0; }
.account-strip a { color: var(--tt-blue); font-weight: 700; }
.account-strip strong { color: var(--tt-slate); }

/* SEO content section */
.seo-content {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1.5px solid var(--p-border);
}

.seo-content h2 {
  font-family: var(--p-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--tt-slate);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.seo-content p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 0 0 14px;
}

.seo-content p:last-child {
  margin-bottom: 0;
}

/* Booking form */
.booking-form .field {
  margin-bottom: 16px;
}
.booking-form .field:last-of-type {
  margin-bottom: 24px;
}

.booking-form input[type="date"] {
  font-family: var(--p-body);
}

.error-list {
  background: var(--tt-red-soft);
  border: 1.5px solid #f2c4c4;
  border-left: 5px solid var(--tt-red);
  color: #a33333;
  padding: 14px 18px;
  border-radius: var(--p-radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
}
.error-list ul {
  margin: 0;
  padding-left: 18px;
}
.error-list li {
  margin-bottom: 4px;
}
.error-list li:last-child {
  margin-bottom: 0;
}

/* Success state */
.success-card {
  text-align: center;
  padding: 44px 26px;
}
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tt-green), var(--tt-green-deep));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 18px;
  box-shadow: 0 10px 24px rgba(57,181,74,0.32);
  animation: badgeIn 0.4s ease-out;
}
.success-card h1 {
  font-family: var(--p-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--tt-slate);
  margin: 0 0 10px;
}
.success-card p {
  color: var(--p-muted);
  font-size: 15px;
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Rate limit UI */
.limit-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--tt-orange-soft);
  border: 1.5px solid #f5dcb0;
  border-left: 5px solid var(--tt-orange);
  color: var(--tt-slate);
  font-size: 13.5px;
  line-height: 1.4;
  padding: 12px 16px;
  border-radius: var(--p-radius-sm);
  margin-bottom: 22px;
}
.limit-warning i {
  color: var(--tt-orange-deep);
  font-size: 15px;
  flex-shrink: 0;
}

.limit-note {
  text-align: center;
  font-family: var(--p-body);
  font-size: 12.5px;
  color: var(--p-muted);
  margin: 4px 0 20px;
}
.limit-note strong {
  color: var(--tt-slate);
}

/* Blocked / contact card */
.contact-card {
  text-align: center;
  padding: 38px 26px;
}
.contact-card h2 {
  font-family: var(--p-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--tt-slate);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.contact-card p {
  color: var(--p-muted);
  font-size: 14.5px;
  max-width: 420px;
  margin: 0 auto 26px;
  line-height: 1.55;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 340px;
  margin: 0 auto;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--p-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: filter 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.contact-link i { font-size: 16px; }

.contact-link span {
  text-align: left;
  line-height: 1.35;
}

.contact-link small {
  display: block;
  font-family: var(--p-body);
  font-weight: 500;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.9;
  margin-top: 2px;
}

.contact-link.primary {
  background: linear-gradient(135deg, var(--tt-orange), var(--tt-orange-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(247,148,30,0.30);
}
.contact-link.primary:hover { filter: brightness(1.07); }

.contact-link.secondary {
  background: #fff;
  border: 1.5px solid var(--p-border);
  color: var(--tt-slate);
}
.contact-link.secondary:hover {
  border-color: var(--tt-blue);
  color: var(--tt-blue);
  background: var(--tt-blue-soft);
}
