/* Shipping rates page (/shipping). Same look as the FAQ page (faq.css). */

.shipPage {
  display: block;
  background: #f0f2f5;
  padding: 32px 16px 40px;
  font-family: var(--font-base);
  color: #1a1d2e;
}

.shipPage__container {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Header ---- */
.shipPage__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.shipPage__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.shipPage__header h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px;
}

.shipPage__header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

/* ---- Form ---- */
.shipForm {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e5ee;
  border-radius: 16px;
}

.shipForm__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.shipForm__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.shipForm__select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #c9ced9;
  border-radius: 8px;
  background: #fff;
  color: #1a1d2e;
  font-size: 16px; /* 16px stops iOS from zooming the page on focus */
  font-family: inherit;
}

.shipForm__field--action {
  justify-content: flex-end;
}

/* .btnPrimar is width:100% / 44px in style.css; keep it full width inside its grid cell */
.shipForm__button {
  height: 44px;
}

@media (min-width: 640px) {
  .shipForm {
    grid-template-columns: 1.4fr 1fr auto;
    align-items: end;
  }

  .shipForm__button {
    width: 140px;
  }
}

/* ---- Results (space reserved to avoid layout shift while loading) ---- */
.shipResults {
  min-height: 300px;
  background: #fff;
  border: 1px solid #e2e5ee;
  border-radius: 16px;
  padding: 16px;
  transition: opacity 0.15s;
}

.shipResults.is-loading {
  opacity: 0.55;
}

.shipResult__empty,
.shipResult__summary,
.shipResult__dispatch,
.shipResult__warn,
.shipResult__duties,
.shipResult__error {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.shipResult__empty {
  color: #6b7280;
}

.shipResult__summary {
  font-size: 16px;
  margin-bottom: 2px;
}

.shipResult__pay {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 4px;
}

.shipResult__price {
  color: #2563eb;
}

.shipResult__dispatch {
  color: #4b5563;
  margin-bottom: 12px;
}

.shipResult__warn {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
}

.shipResult__error {
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
}

.shipResult__duties {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8f9fc;
  border: 1px solid #e2e5ee;
  border-radius: 8px;
  color: #374151;
}

.shipResult__duties--ddp {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* ---- Table ---- */
.shipTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.shipTable__caption {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #4b5563;
}

.shipTable th,
.shipTable td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #eef0f5;
  vertical-align: top;
}

.shipTable th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.shipTable__carrierName {
  display: block;
  font-weight: 600;
}

.shipTable__note {
  display: block;
  font-size: 12px;
  color: #6b7280;
}

.shipTable__price {
  font-weight: 600;
  white-space: nowrap;
}

/* Phone: each carrier becomes a card with label/value pairs */
@media (max-width: 639px) {
  .shipTable thead {
    display: none;
  }

  .shipTable,
  .shipTable tbody,
  .shipTable tr,
  .shipTable td {
    display: block;
  }

  .shipTable__row {
    padding: 10px 0;
    border-bottom: 1px solid #eef0f5;
  }

  .shipTable td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    border: none;
  }

  .shipTable td::before {
    content: attr(data-label);
    flex: 0 0 46%;
    font-size: 12px;
    color: #6b7280;
  }

  /* Same specificity as the generic td rules above, so the carrier cell wins */
  .shipTable td.shipTable__carrier::before {
    content: none;
  }

  .shipTable td.shipTable__carrier {
    display: block;
    padding-bottom: 6px;
  }
}

/* ---- Reference rates (collapsed; not a choice) ---- */
.shipRef {
  margin-top: 12px;
  font-size: 13px;
  color: #4b5563;
}

.shipRef__summary {
  cursor: pointer;
  color: #2563eb;
}

.shipRef__text {
  margin: 8px 0 6px;
  line-height: 1.6;
}

.shipRef__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shipRef__item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #eef0f5;
}

/* ---- Notes & CTA ---- */
.shipNotes {
  padding: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
}

.shipNotes__list {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: #1e3a8a;
}

/* The layout's link colour would otherwise paint the button text dark */
.shipNotes .shipNotes__cta,
.shipNotes .shipNotes__cta:hover,
.shipNotes .shipNotes__cta:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

.shipNotes__links {
  margin: 12px 0 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.shipNotes__links a {
  color: #2563eb;
  text-decoration: none;
}

.shipNotes__links a:hover {
  text-decoration: underline;
}
