/* ── Postcode autocomplete layout ───────────────────────────── */
.postcode-combo {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.postcode-combo input {
  width: 100%;
  box-sizing: border-box;
}

/* ── Dropdown panel — portalled to <body> to escape overflow clipping ── */
.postcode-dropdown {
  display: none;
  position: fixed;
  background: #fff;
  border: 1px solid #e0d9cf;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(20, 30, 50, 0.14);
  z-index: 9999;
  max-height: 340px;
  overflow-y: auto;
}

.postcode-dropdown.open {
  display: block;
}

/* ── Result rows ────────────────────────────────────────────── */
.pc-drop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0ede8;
  transition: background 0.1s ease;
  user-select: none;
}

.pc-drop-item:last-child {
  border-bottom: none;
}

.pc-drop-item:hover {
  background: #faf7f3;
}

.pc-drop-item.pc-active {
  background: #1a2e4a;
  color: #fff;
}

/* ── Left column: code + area ───────────────────────────────── */
.pc-drop-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pc-drop-code {
  font-weight: 700;
  font-size: 0.93rem;
  color: #1a2e4a;
  letter-spacing: 0.05em;
}

.pc-drop-item.pc-active .pc-drop-code {
  color: #fff;
}

.pc-drop-area {
  font-size: 0.8rem;
  color: #938d83;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.pc-drop-item.pc-active .pc-drop-area {
  color: rgba(255, 255, 255, 0.72);
}

/* ── Pricing badge ──────────────────────────────────────────── */
.pc-price-label {
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.pc-price-label.pc-base {
  color: #938d83;
  background: #f0ede8;
}

.pc-price-label.pc-uplift {
  color: #7a5f18;
  background: #f5e9cc;
}

.pc-drop-item.pc-active .pc-price-label.pc-base {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
}

.pc-drop-item.pc-active .pc-price-label.pc-uplift {
  background: rgba(255, 255, 255, 0.18);
  color: #f0c96a;
}

/* ── Empty / error state ────────────────────────────────────── */
.pc-drop-empty {
  padding: 14px 16px;
  font-size: 0.86rem;
  color: #938d83;
  font-style: italic;
  line-height: 1.5;
}

.pc-drop-empty a {
  color: #1a2e4a;
  text-decoration: underline;
}

/* ── Promo code row ─────────────────────────────────────────── */
.promo-row {
  display: flex;
  gap: 10px;
  margin: 1.25rem 0 0.5rem;
}

.promo-row input {
  flex: 1 1 0;
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.promo-status {
  min-height: 1.4rem;
  font-size: 0.84rem;
  padding: 0 2px;
  margin-bottom: 0.5rem;
}

.promo-status.promo-ok {
  color: #2a7a4e;
}

.promo-status.promo-err {
  color: #c0392b;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 899px) {
  .postcode-dropdown {
    left: 0;
    right: 0;
  }

  .pc-drop-item {
    min-height: 48px;
    padding: 10px 14px;
  }

  .pc-drop-area {
    max-width: 180px;
  }
}
