.ha-postcode-finder {
  display: flex;
  justify-content: center;
}

.ha-postcode-finder__inner {
  width: min(520px, 100%);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
}

.ha-postcode-finder__heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  font-weight: 600;
  color: var(--wp--preset--color--base, #fff);
  margin-bottom: .75rem;
}

.ha-postcode-finder__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
}

.ha-postcode-finder__input {
  border: 0;
  padding: .85rem 1rem;
  border-radius: 12px 0 0 12px;
  width: 100%;
}

.ha-postcode-finder__submit {
  border: 0;
  padding: .85rem 1rem;
  border-radius: 0 12px 12px 0;
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

.ha-postcode-finder__results {
  margin-top: .75rem;
}

.ha-pc-cta{
  margin-top: .75rem; /* space between text and button */
}

.ha-pc-result {
  padding: .75rem 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,.12);
  color: var(--wp--preset--color--base, #fff);
}

.ha-pc-result p { margin: 0; }
.ha-pc-result p + p { margin-top: .5rem; }

/* Container centred like the screenshot */
.ha-postcode-finder{
  display:flex;
  justify-content:center;
}

/* The rounded “card” */
.ha-postcode-finder__inner{
  width:min(520px, 100%);
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--wp--preset--color--primary-accent);
}

/* Title row */
.ha-postcode-finder__heading{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:.6rem;
  margin-bottom:.8rem;
  color: var(--wp--preset--color--base);
  font-weight: 700;
}

/* If you replace emoji later with an SVG, this still works */
.ha-postcode-finder__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 28px;
  height: 28px;
}

.ha-postcode-finder__icon-svg{
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Input + button as a single pill */
.ha-postcode-finder__form{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 0;
  border-radius: 14px;
  overflow: hidden; /* joins input + button */
  background: color-mix(in srgb, var(--wp--preset--color--base) 14%, transparent);
}

/* Input styling */
.ha-postcode-finder__input{
  border: 0;
  outline: none;
  background: transparent;
  color: var(--wp--preset--color--base);
  padding: .9rem 1rem;
  font: inherit;
}

.ha-postcode-finder__input::placeholder{
  color: color-mix(in srgb, var(--wp--preset--color--base) 70%, transparent);
}

/* Remove default input glow in some themes */
.ha-postcode-finder__input:focus{
  outline: none;
}

/* Brand button wrapper: remove margins so grid behaves */
.ha-postcode-finder__btn{
  margin: 0;
}

/* Brand button itself: ensure it fills the grid cell and joins the pill */
.ha-postcode-finder__submit.wp-block-button__link{
  height: 100%;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 0; /* container handles rounding */
  padding: .9rem 1.1rem;
  white-space: nowrap;
}

/* Results area */
.ha-postcode-finder__results{
  margin-top: .85rem;
}

/* Result panels */
.ha-pc-result{
  border-radius: 14px;
  padding: .9rem 1rem;
  background: color-mix(in srgb, var(--wp--preset--color--base) 10%, transparent);
  color: var(--wp--preset--color--base);
}

.ha-pc-result p{ margin:0; }
.ha-pc-result p + p{ margin-top:.5rem; }

/* Optional: quick visual cues */
.ha-pc-result--yes{
  background: color-mix(in srgb, var(--wp--preset--color--primary-alt, #ffc821) 20%, transparent);
}

.ha-pc-result--no{
  background: color-mix(in srgb, var(--wp--preset--color--contrast, #111) 15%, transparent);
}

.ha-pc-result--error,
.ha-pc-result--invalid{
  background: color-mix(in srgb, var(--wp--preset--color--contrast, #111) 18%, transparent);
}

/* Mobile */
@media (max-width: 480px){
  .ha-postcode-finder__inner{
    padding: 1rem;
  }
  .ha-postcode-finder__heading{
    justify-content:flex-start;
  }
}

.ha-postcode-finder .wp-block-button.is-style-button-brand--2 .wp-block-button__link{
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}