/* shipestimate app layer — sits on top of existing bootstrap/theme */

.se-app {
  background: linear-gradient(165deg, #f7f8fa 0%, #eef2f7 45%, #f8f5f0 100%);
  min-height: 100vh;
  padding: 1.25rem 0 2.5rem;
  color: #333;
}

.se-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.se-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.se-hero-text {
  flex: 1 1 320px;
}

.se-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c45c12;
  margin: 0 0 0.35rem;
}

.se-hero h1 {
  font-size: 1.85rem;
  color: #1f2933;
  margin: 0 0 0.5rem;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.se-lead {
  font-size: 1.05rem;
  color: #4b5563;
  max-width: 38rem;
  margin: 0;
  line-height: 1.5;
}

.se-poster-card {
  flex: 0 0 180px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(31, 41, 51, 0.08);
  text-decoration: none;
  color: #374151;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.se-poster-card:hover,
.se-poster-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.14);
  color: #111;
}

.se-poster-card img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  object-position: top center;
  background: #eee;
}

.se-poster-card span {
  display: block;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.se-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1rem;
}

.se-presets-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-right: 0.25rem;
}

.se-chip {
  border: 1px solid #cfd6e0;
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.se-chip:hover,
.se-chip:focus {
  background: #fff7ed;
  border-color: #f0a35e;
  color: #9a3412;
  outline: none;
}

.se-chip.is-active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}

.se-main-row {
  display: flex;
  flex-wrap: wrap;
}

.se-panel {
  background: #fff;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  padding: 1.1rem 1.15rem 1.25rem;
  box-shadow: 0 8px 22px rgba(31, 41, 51, 0.06);
  margin-bottom: 1rem;
  float: none !important;
}

.se-form-panel {
  width: 100%;
}

@media (min-width: 992px) {
  .se-form-panel {
    width: 41.666%;
  }
  .se-results-panel {
    width: 56%;
    margin-left: 2.333%;
  }
}

.se-panel-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin: 0 0 0.9rem;
  font-family: 'Raleway', sans-serif;
}

.se-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.se-field-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  margin: 0;
}

.se-field-grid .form-control {
  font-weight: 500;
  color: #111;
  height: 38px;
  border-radius: 8px;
}

.se-dest-type {
  display: flex;
  gap: 1rem;
  margin: 0.9rem 0 0.85rem;
}

.se-radio {
  font-weight: 600;
  color: #374151;
  margin: 0;
  cursor: pointer;
}

.se-submit {
  border-radius: 8px !important;
  padding: 0.7rem 1rem !important;
  font-size: 1rem !important;
  background: #ea580c !important;
  border-color: #c2410c !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.se-submit:hover,
.se-submit:focus {
  background: #c2410c !important;
  border-color: #9a3412 !important;
}

.se-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.se-map-btn {
  margin-top: 0.5rem !important;
  border-radius: 8px !important;
  padding: 0.55rem 1rem !important;
  font-weight: 600 !important;
  border: 1px solid #cfd6e0 !important;
  background: #fff !important;
  color: #374151 !important;
}

.se-map-btn:hover,
.se-map-btn:focus {
  background: #fff7ed !important;
  border-color: #f0a35e !important;
  color: #9a3412 !important;
}

.se-map-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.se-map-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.35;
}

.se-dim-panel {
  margin-top: 1.1rem;
  padding: 0.9rem 0.95rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  border: 1px solid #fcd34d;
}

.se-dim-panel h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: #92400e;
  text-transform: none;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
}

.se-live-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f59e0b;
  color: #fff;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.se-dim-math {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: #78350f;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.7rem;
  word-break: break-word;
}

.se-dim-bars {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.se-bar-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr 3.2rem;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.se-bar-track {
  height: 10px;
  background: #f3f4f6;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.se-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.se-bar-actual { background: #3b82f6; }
.se-bar-dim { background: #ea580c; }
.se-bar-usps { background: #8b5cf6; }

.se-bar-row strong {
  text-align: right;
  color: #111;
  font-size: 0.78rem;
}

.se-dim-verdict {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
}

.se-dim-verdict.is-dim {
  color: #c2410c;
}

.se-dim-verdict.is-actual {
  color: #1d4ed8;
}

.se-dim-note {
  margin: 0;
  font-size: 0.78rem;
  color: #78716c;
  line-height: 1.4;
}

.se-results-panel {
  min-height: 420px;
}

.se-results-empty,
#shippingResult {
  min-height: 280px;
}

.se-empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: #6b7280;
}

.se-empty-state i {
  font-size: 2.2rem;
  color: #fdba74;
  margin-bottom: 0.75rem;
}

.se-muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

.se-summary-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.se-card {
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.se-card.cheapest {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.se-card.fastest {
  background: #eff6ff;
  border-color: #93c5fd;
}

.se-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.se-card .price {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.se-card .detail {
  font-size: 0.82rem;
  color: #4b5563;
  margin-top: 0.15rem;
}

.se-pkg-chip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.se-pkg-chip span {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.se-pkg-chip span.warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.se-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-weight: 600;
}

#shipResults {
  margin-bottom: 0;
  font-size: 0.92rem;
}

#shipResults thead th {
  background: #1f2937 !important;
  color: #fff !important;
  border: none !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

#shipResults tbody tr td:nth-child(1) {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#shipResults td img {
  height: 22px;
  width: auto;
  vertical-align: middle;
}

.se-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

.se-badge.cheap {
  background: #d1fae5;
  color: #065f46;
}

.se-badge.fast {
  background: #dbeafe;
  color: #1e40af;
}

.se-footer {
  margin-top: 0.25rem;
  color: #9ca3af;
  max-width: 52rem;
}

.se-footer small {
  font-size: 0.75rem;
  line-height: 1.45;
}

@media (max-width: 600px) {
  .se-field-grid {
    grid-template-columns: 1fr 1fr;
  }
  .se-bar-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .se-bar-row strong {
    text-align: left;
  }
  .se-summary-cards {
    grid-template-columns: 1fr;
  }
  .se-poster-card {
    flex-basis: 100%;
    max-width: 220px;
  }
}

/* ---- Rate-band map ---- */
.se-map-panel {
  clear: both;
}

.se-map-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.65rem;
}

.se-map-sub {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
  max-width: 46rem;
}

.se-map-legend {
  margin-bottom: 0.75rem;
}

.se-legend-range {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.se-legend-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.se-swatch {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1f2937;
  border: 1px solid rgba(0,0,0,0.08);
}

.se-map-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .se-map-stage {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: start;
  }
}

.se-map-host {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.5rem;
  min-height: 280px;
  overflow: hidden;
}

.se-map-host svg.se-us-map,
.se-map-host svg#se-us-map {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
}

.se-map-host .state {
  cursor: pointer;
}

.se-map-host .state.is-origin {
  stroke: #111 !important;
  stroke-width: 2.5 !important;
}

.se-map-host .state.is-focus {
  stroke: #ea580c !important;
  stroke-width: 2.5 !important;
  filter: brightness(0.97);
}

.se-map-detail {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  min-height: 200px;
}

.se-map-detail h3 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
}

.se-map-detail h4 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.se-detail-state {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}

.se-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ea580c;
  margin: 0.15rem 0 0.35rem;
}

.se-hub-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}

.se-hub-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.82rem;
  color: #374151;
}

.se-hub-list li strong {
  font-variant-numeric: tabular-nums;
  color: #111;
  margin-right: 0.25rem;
}

.se-hub-svc {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 0.1rem;
}

.se-error-inline {
  color: #b91c1c;
}

.se-map-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.4;
}

.se-map-placeholder {
  padding: 2rem 1rem;
}

.se-tiny {
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.se-hub-list li {
  cursor: pointer;
}

.se-hub-list li:hover {
  background: #fff7ed;
}

/* Stronger origin outline on dark band colors */
.se-map-host .state.is-origin {
  stroke: #f8fafc !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 1px #111);
}
