/* Ideal Postcodes address finder integration for the paid order journey */
.address-entry { position: relative; }
.address-lookup-panel[hidden] { display: none !important; }
.address-lookup-panel {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(184,150,46,.34);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff 0%, #fbf7ed 100%);
  box-shadow: 0 8px 22px rgba(13,27,62,.055);
}
.address-lookup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.address-lookup-heading > div { min-width: 0; }
.address-lookup-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
}
.address-lookup-label {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}
.address-lookup-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gold-pale);
  color: #765f19;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .025em;
}
.address-lookup-heading p,
.address-lookup-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.address-search-shell { position: relative; }
.address-search-shell > svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}
.address-search-shell input[type="search"] {
  width: 100%;
  min-height: 54px;
  padding: 14px 44px 14px 45px;
  border: 1.5px solid #D9DDE5;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  box-shadow: 0 4px 14px rgba(13,27,62,.04);
  -webkit-appearance: none;
  appearance: none;
}
.address-search-shell input[type="search"]::-webkit-search-cancel-button { opacity: .55; }
.address-search-shell input[type="search"]:focus {
  border-color: var(--gold);
  box-shadow: var(--focus-ring);
}
.address-lookup-help { margin-top: 8px; }
.address-manual-toggle {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.address-manual-toggle:hover { color: var(--gold); }
.address-manual-toggle[hidden] { display: none !important; }
.address-lookup-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
}
.address-lookup-status.is-success {
  border: 1px solid rgba(26,107,74,.22);
  background: var(--green-bg);
  color: var(--green);
}
.address-lookup-status.is-error {
  border: 1px solid rgba(192,57,43,.2);
  background: #fff4f2;
  color: #9d2f24;
}
.address-entry.address-lookup-active .manual-address-fields { display: none; }
.address-entry.address-lookup-active .manual-address-fields.is-open {
  display: block;
  animation: address-fields-in .18s ease-out;
}
.address-check-label {
  display: none;
  margin: 2px 0 13px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.address-entry.address-lookup-active .manual-address-fields.is-open .address-check-label { display: block; }
.delivery-address-heading {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}
@keyframes address-fields-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ideal Postcodes suggestion list.
   Selectors are scoped to the search shell so they outrank the library's
   injected stylesheet without !important. The container is deliberately left
   without a z-index: giving it one hides the search icon behind the input. */
.address-search-shell div.idpc_af {
  z-index: 1400;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(13,27,62,.16);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}
.address-search-shell div.idpc_af > ul {
  max-height: var(--address-list-max, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.address-search-shell div.idpc_af > ul > li {
  padding: 13px 16px;
  border-top: 1px solid #F0EBE1;
  color: var(--navy);
  font-size: 14.5px;
  line-height: 1.4;
  text-decoration: none;
}
.address-search-shell div.idpc_af > ul > li:first-child { border-top: 0; }
.address-search-shell div.idpc_af > ul > li:hover,
.address-search-shell div.idpc_af > ul > li[aria-selected="true"] {
  background: var(--gold-pale);
}
.address-search-shell div.idpc_af > ul > li.idpc_error,
.address-search-shell div.idpc_af > ul > li.idpc_error:hover {
  padding: 14px 16px;
  background: #fff;
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
}
.address-search-shell div.idpc_af > ul > li.idpc_action {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .address-lookup-panel { padding: 16px; }
  .address-search-shell input[type="search"] { min-height: 56px; font-size: 16px; }
}
