/* wonderwater application form */
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f4f7fc;
  --ink: #101f3a;
  --primary: #175cd3;
  --primary-deep: #1247a8;
  --primary-soft: #eaf2ff;
  --accent-soft: #dbeafe;
  --on-primary: #ffffff;
  --muted: #61718a;
  --card: #ffffff;
  --line: #d8e1ee;
  --error: #b3261e;
  --error-bg: #fdeceb;
  --radius: 14px;
  --shadow: 0 10px 34px rgba(16, 46, 97, 0.10);
  --focus: 0 0 0 3px rgba(23, 92, 211, 0.28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  background: transparent; /* iframe canvas: the parent page shows through */
}
body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-weight: 450;
  color: var(--ink);
  background: transparent;
  line-height: 1.55;
}

.demo-banner {
  background: var(--primary-soft);
  color: var(--primary-deep);
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  letter-spacing: 0.02em;
}
.noscript-banner {
  background: var(--error-bg);
  color: var(--error);
  border-bottom: 1.5px solid var(--error);
  text-align: center;
  font-weight: 700;
  padding: 0.6rem 1rem;
}

.layout {
  max-width: 760px; /* includes the horizontal padding */
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: block;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.8rem 1.8rem;
  margin-bottom: 1.4rem;
}
.section-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.section-num {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 800;
  flex-shrink: 0;
}
.section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: var(--primary-deep); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.field { margin-bottom: 1.05rem; }
.grid-2 .field { margin-bottom: 0; }
label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; }
.req { color: var(--error); font-style: normal; }

input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%;
  font: inherit;
  font-weight: 550;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 0.62rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus-visible, select:focus-visible,
.terms-scroll:focus-visible, canvas:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
input.readonly { background: var(--primary-soft); border-style: dashed; color: var(--muted); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--error); }

.hint { font-size: 0.82rem; color: var(--muted); margin: 0.35rem 0 0; }
.hint.attribution { font-size: 0.75rem; }
.field-error { color: var(--error); font-size: 0.85rem; font-weight: 600; margin: 0.35rem 0 0; }

.error-summary {
  background: var(--error-bg);
  border: 1.5px solid var(--error);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  margin-bottom: 1.4rem;
}
.error-summary h2 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--error); font-weight: 600; }

/* address autocomplete */
.combo-wrap { position: relative; }
.suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0; right: 0;
  margin: 0; padding: 0.3rem;
  list-style: none;
  background: #fff;
  border: 1.5px solid var(--primary);
  border-radius: 9px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}
.suggestions li {
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
}
.suggestions li[aria-selected="true"], .suggestions li:hover {
  background: var(--primary-soft);
}
.suggestions .sug-main { font-weight: 700; display: block; }
.suggestions .sug-sec { font-size: 0.8rem; color: var(--muted); display: block; }

/* product cards */
.product-cards { border: 0; margin: 0 0 1.3rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.product-cards legend { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; padding: 0; }
.product-card { position: relative; cursor: pointer; margin: 0; }
.product-card input { position: absolute; opacity: 0; }
.product-card .card-body {
  display: flex; flex-direction: column; gap: 0.4rem;
  height: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.product-card .cooler-icon { width: 34px; height: 51px; color: var(--primary); }
.product-card .card-title { font-weight: 800; }
.product-card .card-desc { font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.product-card input:checked + .card-body {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--focus);
}
.product-card input:focus-visible + .card-body { box-shadow: var(--focus); }
.product-cards .field-error { grid-column: 1 / -1; }

/* terms */
.terms-scroll {
  max-height: 220px;
  overflow-y: auto;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 0.9rem 1.1rem;
  font-size: 0.86rem;
  margin-bottom: 0.7rem;
}
.terms-scroll p { margin: 0 0 0.55rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 550; }
.check input { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }

/* signature */
.signature-wrap {
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
#signature-pad { display: block; width: 100%; height: 200px; touch-action: none; }
.signature-actions {
  display: flex; gap: 0.5rem; justify-content: flex-end;
  padding: 0.45rem 0.6rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.btn-ghost {
  font: inherit; font-weight: 700; font-size: 0.85rem;
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px; padding: 0.3rem 0.9rem; cursor: pointer;
}
.btn-ghost:hover { background: var(--primary-soft); }

.btn-primary {
  font: inherit; font-weight: 800; font-size: 1.05rem;
  background: var(--primary); color: var(--on-primary);
  border: 0; border-radius: 10px;
  padding: 0.9rem 2.2rem; cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary[disabled] { opacity: 0.6; cursor: wait; }

/* Select2 tuning */
.select2-container .select2-selection--single {
  min-height: 0;
  height: auto;
  font: inherit;
  font-weight: 550;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  padding: 0.62rem 2rem 0.62rem 0.8rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0;
  margin: 0;
  line-height: 1.55;
  color: var(--ink);
}
.select2-container .select2-selection--single .select2-selection__placeholder {
  color: var(--muted);
  font-weight: 450;
}
.select2-container .select2-selection--single .select2-selection__arrow {
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
  height: auto;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.select2-selection.input-invalid { border-color: var(--error); }
.select2-container--default.select2-container--disabled .select2-selection--single {
  background: var(--bg);
  border-color: var(--line);
  color: var(--muted);
}
.select2-dropdown {
  border: 1.5px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--primary);
  color: var(--on-primary);
}
.select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--primary);
  color: var(--on-primary);
}

/* flatpickr brand */
.flatpickr-day.today { border-color: var(--primary); }
.flatpickr-day.selected, .flatpickr-day.selected:focus,
.flatpickr-day.selected:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* last card sits flush with the container's bottom padding */
#application-form > .card:last-child,
.success > .card:last-child { margin-bottom: 0; }

/* direct debit bank details */
.bank-details { border: 0; margin: 0 0 1.05rem; padding: 0; }
.bank-details legend {
  font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; padding: 0;
  color: var(--primary-deep);
}

/* success */
.success { max-width: 640px; margin: 0 auto; padding: 0.5rem 1.25rem; }
.success .card { text-align: center; padding: 2.6rem 2rem; }
.success-tick { width: 64px; height: 64px; margin-bottom: 1rem; }
.success-tick .tick-ring { color: var(--primary); }
.success-tick .tick-mark { color: var(--primary-deep); }
.success h2 { margin: 0 0 0.6rem; font-weight: 800; color: var(--primary-deep); }
.ref { color: var(--muted); }

@media (max-width: 560px) {
  .grid-2, .product-cards { grid-template-columns: 1fr; }
  .card { padding: 1.2rem 1.1rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
