/* Footer postcode finder + onsite-quote modal */
.ft-postcode {
  margin: 28px 0 8px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.ft-postcode__title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}

.ft-postcode__lead {
  margin: 0 auto 14px;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

.ft-postcode__form {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  width: fit-content;
  max-width: min(100%, 420px);
  margin-inline: auto;
}

.ft-postcode__form label {
  flex: 0 0 200px;
  width: 200px;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.ft-postcode__form input[type="text"] {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #1a1a1c;
  color: #fff;
  padding: 0 12px;
  font-size: 16px;
}

.ft-postcode__form button {
  height: 44px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #c8db4f;
  color: #121213;
  font-weight: 700;
  cursor: pointer;
}

.ft-postcode__status {
  margin: 12px auto 0;
  max-width: 40rem;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.ft-postcode__status[data-tone="empty"] { color: #f0c36a; }
.ft-postcode__status[data-tone="ok"] { color: #c8db4f; }

.ft-postcode__results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  justify-content: center;
  gap: 12px;
  width: min(100%, 720px);
  max-width: 720px;
  margin: 16px auto 0;
  text-align: left;
}

.ft-postcode__card {
  padding: 14px 14px 12px;
  border-radius: 10px;
  background: #0d0d0e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: ft-postcode-in .28s ease;
  min-width: 0;
  overflow-wrap: anywhere;
}

@keyframes ft-postcode-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.ft-postcode__name {
  margin: 0 0 2px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.ft-postcode__code {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
}

.ft-postcode__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ft-postcode__links a {
  color: #c8db4f !important;
  min-height: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
}

.ft-postcode__quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #8a5aa5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.ft-postcode__banner {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(200, 219, 79, 0.12);
  color: #eef6b8;
  font-size: 14px;
  line-height: 1.5;
}

.ft-postcode__banner a { color: #c8db4f; font-weight: 700; }

.ft-quote {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(88px, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.ft-quote[hidden] { display: none; }

.ft-quote__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 14, 0.72);
}

.ft-quote__panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(92dvh, calc(100dvh - 96px));
  overflow: auto;
  background: #fff;
  color: #121213;
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.ft-quote__panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.ft-quote__panel p {
  margin: 0 0 14px;
  color: #58505d;
  font-size: 14px;
  line-height: 1.5;
}

.ft-quote__panel label {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-brand-charcoal, #121213);
}

.ft-quote__panel input,
.ft-quote__panel textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid #d8d4dc;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  color: var(--c-brand-charcoal, #121213);
  background: #fff;
}

.ft-quote__panel input {
  height: 44px;
}

.ft-quote__panel textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.ft-quote__panel input[aria-invalid="true"],
.ft-quote__panel textarea[aria-invalid="true"] {
  border-color: #9a3d3d;
}

.ft-quote__mark,
.ft-quote__opt {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ft-quote__mark { color: #8a5aa5; }
.ft-quote__opt { color: #58505d; font-weight: 600; }

/* Honeypot stays in the form for bots, clipped off the visible panel. */
.ft-quote__honey {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ft-quote__panel .ft-quote__honey label,
.ft-quote__panel .ft-quote__honey input {
  position: static !important;
  display: block !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

.ft-quote__trade {
  border: 0;
  margin: 0 0 10px;
  padding: 0;
  min-width: 0;
}

.ft-quote__trade legend {
  margin: 0 0 4px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-brand-charcoal, #121213);
}

.ft-quote__segments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ft-quote__panel .ft-quote__segment {
  display: flex;
  flex: 1 1 0;
  min-width: 72px;
  margin: 0;
  font-weight: 700;
  cursor: pointer;
}

.ft-quote__panel .ft-quote__segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ft-quote__segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 4px;
  border: 1px solid #d8d4dc;
  border-radius: 8px;
  background: #fff;
  color: var(--c-brand-charcoal, #121213);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.ft-quote__segment:hover span {
  border-color: #8a5aa5;
}

.ft-quote__segment input:checked + span {
  background: #8a5aa5;
  border-color: #8a5aa5;
  color: #fff;
}

.ft-quote__segment input:focus-visible + span {
  outline: 2px solid #8a5aa5;
  outline-offset: 2px;
}

.ft-quote__trade.is-invalid .ft-quote__segment span {
  border-color: #9a3d3d;
}

.ft-quote__trade.is-invalid .ft-quote__segment input:checked + span {
  border-color: #8a5aa5;
}

.ft-quote__error {
  margin: 0 0 10px;
  color: #9a3d3d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.ft-quote__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ft-quote__actions button[type="submit"] {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #8a5aa5;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ft-quote__close {
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #58505d;
  cursor: pointer;
}

.ft-quote__emergency {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: #121213;
}

@media (min-width: 768px) {
  .ft-postcode {
    padding: 24px 24px 22px;
  }

  .ft-postcode__form {
    max-width: min(100%, 420px);
    margin-inline: auto;
  }

  .ft-postcode__results {
    grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ft-postcode {
    padding: 18px 14px 16px;
    margin-top: 22px;
  }

  .ft-postcode__form {
    flex-direction: column;
    align-items: stretch;
    width: min(100%, 420px);
    max-width: 420px;
    margin-inline: auto;
  }

  .ft-postcode__form label,
  .ft-postcode__form button {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
  }

  .ft-quote__panel {
    padding: 18px 16px 16px;
  }

  .ft-quote__actions {
    flex-direction: column;
  }

  .ft-quote__actions button[type="submit"],
  .ft-quote__close {
    width: 100%;
  }
}