/* Shipping quote on the product page.
   Design carried from the Shopify store's widget, retuned for these themes:
   units are px, not rem, because Dawn sets html{font-size:62.5%} and these
   WooCommerce themes do not — 1.4rem would render at 22px here. */

.shipq {
  --shipq-line: rgba(0, 0, 0, 0.16);
  --shipq-line-soft: rgba(0, 0, 0, 0.10);
  --shipq-soft: rgba(0, 0, 0, 0.03);
  --shipq-truck: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M1 3h15v13H1z'/><path d='M16 8h4l3 3v5h-7z'/><circle cx='5.5' cy='18.5' r='2.5'/><circle cx='18.5' cy='18.5' r='2.5'/></svg>");
  --shipq-chevron: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  margin: 16px 0 20px;
  max-width: 460px;
}

/* ---------- the header row, which is also the trigger ---------- */
.shipq__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 13px 15px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  color: inherit;
  background: transparent;
  border: 1px solid var(--shipq-line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.shipq__toggle:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background: var(--shipq-soft);
}
.shipq__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.shipq__toggle::before {
  content: "";
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: var(--shipq-truck) center / contain no-repeat;
  mask: var(--shipq-truck) center / contain no-repeat;
}
.shipq__toggle::after {
  content: "";
  flex: 0 0 auto;
  margin-left: auto;
  width: 13px;
  height: 13px;
  background: currentColor;
  opacity: 0.5;
  -webkit-mask: var(--shipq-chevron) center / contain no-repeat;
  mask: var(--shipq-chevron) center / contain no-repeat;
  transition: transform 0.2s ease;
}

/* open: the panel shares the header's border, so it reads as one control */
.shipq.is-open .shipq__toggle {
  background: var(--shipq-soft);
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.shipq.is-open .shipq__toggle::after { transform: rotate(180deg); }

.shipq__panel {
  margin: 0;
  padding: 14px;
  background: var(--shipq-soft);
  border: 1px solid var(--shipq-line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

/* ---------- inputs ---------- */
.shipq__row { display: flex; gap: 7px; align-items: stretch; }

.shipq__zip,
.shipq__prov {
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  margin: 0;
  padding: 10px 11px;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  box-shadow: none;
}
.shipq__zip {
  flex: 1 1 auto;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shipq__zip::placeholder { text-transform: none; letter-spacing: 0; opacity: 0.5; }
.shipq__prov { flex: 0 0 auto; padding-right: 8px; }

.shipq__go {
  flex: 0 0 auto;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  padding: 10px 16px;
  color: #fff;
  background: #15172a;
  border: 1px solid #15172a;
  border-radius: 6px;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.shipq__go:hover { filter: brightness(1.4); }
.shipq__go[disabled] { opacity: 0.45; cursor: default; filter: none; }

/* ---------- results ---------- */
.shipq__out:empty { display: none; }
.shipq__out {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--shipq-line-soft);
}

.shipq__list { list-style: none; margin: 0; padding: 0; }
.shipq__opt {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid var(--shipq-line-soft);
}
.shipq__opt:last-child { border-bottom: 0; padding-bottom: 0; }
.shipq__opt span { opacity: 0.75; }
.shipq__opt b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shipq__opt.is-best span { opacity: 1; font-weight: 500; }
.shipq__opt.is-best b { font-size: 17px; }

.shipq__note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; opacity: 0.6; }
.shipq__msg  { margin: 0; font-size: 15px; line-height: 1.4; }
.shipq__msg + .shipq__note { opacity: 0.75; }

@media (max-width: 560px) {
  .shipq__row { flex-wrap: wrap; }
  .shipq__zip { flex: 1 1 130px; }
  .shipq__go  { flex: 1 1 100%; }
}
