/* Delivery-with-carry-in row + panel — matches the falcon theme and the pixel_fabricpicker / pixel_tablequote
   cards (gold #bc8246, Mulish). The row lives in the theme's facts list under the cart button. */

.pd {
  --pd-gold: #bc8246;
  --pd-gold-dark: #9c6a36;
  --pd-gold-soft: #f6ede3;
  --pd-ink: #232323;
  --pd-muted: #6f6f78;
  --pd-line: #e6e1da;
  --pd-panel: #faf8f4;
  --pd-white: #fff;
  --pd-danger: #c0392b;
  --pd-danger-soft: #fbeceb;
  --pd-success: #3c8d4f;
  --pd-success-soft: #eaf5ec;
  --pd-ease: cubic-bezier(.22, .8, .24, 1);
  margin: 0;
  font-family: "Mulish", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--pd-ink);
}

.pd svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Row (button) ---------- */

.pd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 9px 0;
  font: inherit;
  text-align: left;
  color: var(--pd-ink);
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pd-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(188, 130, 70, .22);
  border-radius: 6px;
}

.pd-row__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--pd-gold);
}

.pd-row__text {
  flex: 1 1 auto;
  min-width: 0;
}

.pd-row__title {
  font-weight: 700;
}

.pd-row__hint {
  color: var(--pd-muted);
}

.pd-row__result {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--pd-success);
}

.pd-row__result[hidden] {
  display: none;
}

.pd-row__result.is-none {
  color: var(--pd-muted);
}

.pd-row__action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pd-gold);
  white-space: nowrap;
}

.pd-row:hover .pd-row__action {
  color: var(--pd-gold-dark);
}

.pd-row__caret {
  width: 16px;
  height: 16px;
  transition: transform .2s var(--pd-ease);
}

.pd.is-open .pd-row__caret {
  transform: rotate(180deg);
}

/* ---------- Panel ---------- */

.pd-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px 28px;
  padding: 14px;
  background: var(--pd-panel);
  border-radius: 10px;
}

.pd-panel[hidden] {
  display: none;
}

.pd-lead {
  margin: 0;
  font-size: 13px;
  color: var(--pd-muted);
}

.pd-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-city {
  margin: 0;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--pd-gold-dark);
  background: var(--pd-gold-soft);
  border-radius: 999px;
}

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  font-size: 13px;
  color: var(--pd-muted);
}

.pd-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-meta__item strong {
  color: var(--pd-ink);
  font-weight: 700;
}

.pd-meta__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--pd-gold);
}

/* ---------- Postcode check ---------- */

.pd-check {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.pd-check__label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--pd-ink);
}

.pd-check__row {
  display: flex;
  gap: 8px;
}

.pd-check__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--pd-ink);
  background: var(--pd-white);
  border: 1px solid var(--pd-line);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}

.pd-check__input::placeholder {
  color: #a9a9b2;
  letter-spacing: 0;
}

.pd-check__input:focus {
  outline: none;
  border-color: var(--pd-gold);
  box-shadow: 0 0 0 4px rgba(188, 130, 70, .14);
}

.pd.is-invalid .pd-check__input {
  border-color: var(--pd-danger);
}

.pd-check__btn {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 20px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pd-white);
  background: var(--pd-gold);
  border: 1px solid var(--pd-gold);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .2s var(--pd-ease), border-color .2s var(--pd-ease), opacity .2s;
}

.pd-check__btn:hover,
.pd-check__btn:focus-visible {
  background: var(--pd-gold-dark);
  border-color: var(--pd-gold-dark);
  color: var(--pd-white);
}

.pd-check__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(188, 130, 70, .22);
}

.pd.is-busy .pd-check__btn {
  opacity: .65;
  cursor: progress;
}

/* ---------- Result ---------- */

.pd-result {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 10px;
  background: var(--pd-gold-soft);
  color: var(--pd-ink);
}

.pd-result[hidden] {
  display: none;
}

.pd-result::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: var(--pd-gold);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E");
}

.pd-result.is-ok {
  background: var(--pd-success-soft);
}

.pd-result.is-ok::before {
  background-color: var(--pd-success);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.pd-result.is-error {
  background: var(--pd-danger-soft);
}

.pd-result.is-error::before {
  background-color: var(--pd-danger);
}

.pd-result.is-busy {
  color: var(--pd-muted);
}

.pd-result.is-busy::before {
  background-image: none;
  border: 2px solid rgba(255, 255, 255, .6);
  border-top-color: transparent;
  animation: pd-spin .8s linear infinite;
}

@keyframes pd-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Narrow screens ---------- */

@media (max-width: 575px) {
  /* Icon and text stay on one line; the action drops under the text, aligned with it */
  .pd-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
  }

  .pd-row__icon {
    margin-top: 2px;
  }

  .pd-row__action {
    grid-column: 2;
    margin-top: 4px;
  }

  .pd-panel {
    margin-left: 0;
    padding: 12px;
  }

  .pd-check__row {
    flex-direction: column;
  }

  .pd-check__btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-result.is-busy::before {
    animation: none;
  }

  .pd-row__caret {
    transition: none;
  }
}
