/*!
 * Golfi Popups: shell + shared controls (job golfi-popups-20261127).
 * Everything is scoped under #gp-root / #gp-peek and prefixed gp-, so the theme and Bootstrap cannot leak in
 * and nothing here leaks out. Colours, radii and soft shadows are the site's own (golfi-brand.css, golfi-soft.css).
 * Mobile first: bottom sheet up to 767px, two-column modal from 768px.
 */

html.gp-open { overflow: hidden !important; }

#gp-root, #gp-peek {
  --gp-navy: #0D1B3E;
  --gp-navy-hi: #1d3a7a;
  --gp-navy-lo: #081127;
  --gp-red: #E2001A;
  --gp-red-ink: #B80015;
  --gp-gold: #C8A25A;
  --gp-gold-hi: #F4C766;
  --gp-cream: #F1E9DE;
  --gp-well: #EAE0D2;
  --gp-muted: #4a5262;
  --gp-edge: rgba(13, 27, 62, .12);
  --gp-in: inset 3px 3px 7px rgba(170, 148, 112, .45), inset -3px -3px 7px rgba(255, 255, 255, .9);
  --gp-out: 4px 4px 10px rgba(170, 148, 112, .38), -4px -4px 10px rgba(255, 255, 255, .85);
  --gp-focus: 3px solid #003DA5;
  --gp-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gp-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --gp-ease: cubic-bezier(.2, .8, .2, 1);
  font-family: var(--gp-sans);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--gp-navy);
  text-align: left;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ── reset (ID specificity beats the theme, :where keeps our own classes on top) ── */
#gp-root, #gp-root *, #gp-root *::before, #gp-root *::after,
#gp-peek, #gp-peek *, #gp-peek *::before, #gp-peek *::after { box-sizing: border-box; }
#gp-root :where(h2, h3, p, ul, ol, li, dl, dt, dd, fieldset, legend, form, label, picture, span, b, strong, em, small),
#gp-peek :where(span, b) {
  margin: 0; padding: 0; border: 0; min-width: 0; float: none; background: none;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; text-shadow: none; list-style: none;
}
#gp-root :where(button, input), #gp-peek :where(button) {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: 0;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; line-height: inherit;
  width: auto; height: auto; min-height: 0; min-width: 0; max-width: none;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
#gp-root :where(button), #gp-peek :where(button) { cursor: pointer; touch-action: manipulation; }
#gp-root :where(a) { color: inherit; text-decoration: none; }
#gp-root :where(img), #gp-peek :where(img) { display: block; max-width: 100%; border: 0; }
#gp-root :where(svg), #gp-peek :where(svg) {
  display: block; flex: none; width: 1em; height: 1em;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
#gp-root [hidden] { display: none !important; }
#gp-root :where(a, button, input, [tabindex]):focus-visible { outline: var(--gp-focus); outline-offset: 2px; }
#gp-root .gp-sr {
  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;
}
#gp-root .gp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── shell ─────────────────────────────────────────────────────────────── */
#gp-root {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: flex-end; justify-content: center;
}
#gp-root .gp-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 17, 39, .64);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity .24s ease;
}
#gp-root .gp-dialog {
  position: relative; display: flex; flex-direction: column;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 20px);
  max-height: calc(var(--gp-vh, 100dvh) - 20px);
  margin-bottom: var(--gp-kb, 0px);
  background: var(--gp-cream);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 60px rgba(8, 17, 39, .45);
  overflow: hidden; outline: 0;
  transform: translateY(100%);
  transition: transform .28s var(--gp-ease);
  will-change: transform;
}
#gp-root[data-state="open"] .gp-backdrop { opacity: 1; }
#gp-root[data-state="open"] .gp-dialog { transform: none; }
#gp-root[data-state="closing"] .gp-dialog { transition-duration: .2s; transition-timing-function: ease-in; }

#gp-root .gp-grab {
  position: absolute; top: 8px; left: 50%; z-index: 3;
  width: 40px; height: 5px; margin-left: -20px; border-radius: 99px;
  background: rgba(255, 255, 255, .38);
}
#gp-root .gp-close {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; color: #fff;
  background: rgba(255, 255, 255, .14);
  transition: background .15s ease, transform .15s ease;
}
#gp-root .gp-close:hover { background: rgba(255, 255, 255, .24); }
#gp-root .gp-close:active { transform: scale(.94); }
#gp-root .gp-close:focus-visible { outline-color: #fff; }

#gp-root .gp-aside {
  position: relative; flex: none;
  padding: 26px 66px 18px 20px;
  color: #fff;
  background: radial-gradient(120% 90% at 0% 0%, var(--gp-navy-hi) 0%, var(--gp-navy) 55%, var(--gp-navy-lo) 100%);
}
#gp-root .gp-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; background: var(--gp-cream); }
#gp-root .gp-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
#gp-root .gp-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 18px 20px 14px;
}
#gp-root .gp-foot {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--gp-cream);
  border-top: 1px solid var(--gp-edge);
}

/* ── type ──────────────────────────────────────────────────────────────── */
#gp-root .gp-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gp-gold-hi);
}
#gp-root .gp-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
#gp-root .gp-title {
  margin-top: 6px;
  font-size: 21px; line-height: 1.18; font-weight: 800; letter-spacing: -.01em; color: #fff;
  text-wrap: balance;
}
#gp-root .gp-title em { font-style: normal; color: var(--gp-gold-hi); }
#gp-root .gp-q {
  font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--gp-navy);
  outline: 0; text-wrap: balance;
}
#gp-root .gp-help { margin-top: 6px; font-size: 14.5px; color: var(--gp-muted); }
#gp-root .gp-fine { margin-top: 16px; font-size: 12px; line-height: 1.5; color: var(--gp-muted); }
#gp-root .gp-fine a, #gp-root .gp-help a, #gp-root .gp-alert a { color: var(--gp-navy); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
#gp-root .gp-opt { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--gp-muted); }

/* ── fields: the site's pressed-in soft wells ──────────────────────────── */
#gp-root .gp-field, #gp-root .gp-set { display: block; margin-top: 16px; }
#gp-root .gp-label { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 700; color: var(--gp-navy); }
#gp-root .gp-input {
  display: block; width: 100%; height: 56px; padding: 0 18px;
  border-radius: 20px; border: 1px solid transparent;
  background: var(--gp-well); box-shadow: var(--gp-in);
  font-size: 16px; font-weight: 500; color: var(--gp-navy);
  transition: box-shadow .15s ease, border-color .15s ease;
}
#gp-root .gp-input::placeholder { color: #5a6473; opacity: 1; font-weight: 400; }
#gp-root .gp-input:focus { border-color: rgba(13, 27, 62, .55); box-shadow: var(--gp-in), 0 0 0 3px rgba(226, 0, 26, .22); }
#gp-root .gp-input[aria-invalid="true"] { border-color: var(--gp-red-ink); }
#gp-root .gp-err { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--gp-red-ink); }
#gp-root .gp-alert {
  margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--gp-red-ink);
  font-size: 14px; font-weight: 600; color: var(--gp-red-ink);
}

/* ── chips (radio / checkbox) ──────────────────────────────────────────── */
#gp-root .gp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#gp-root .gp-chip { position: relative; display: inline-flex; cursor: pointer; }
#gp-root .gp-chip input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#gp-root .gp-chip span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--gp-edge);
  box-shadow: 0 2px 5px rgba(170, 148, 112, .28);
  font-size: 14.5px; font-weight: 600; color: var(--gp-navy); white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
#gp-root .gp-chip small { font-size: 12px; font-weight: 600; opacity: .7; }
#gp-root .gp-chip input:checked + span {
  background: var(--gp-navy); border-color: var(--gp-navy); color: #fff;
  box-shadow: 0 8px 16px -8px rgba(13, 27, 62, .7);
}
#gp-root .gp-chip input:active + span { transform: scale(.96); }
#gp-root .gp-chip input:focus-visible + span { outline: var(--gp-focus); outline-offset: 2px; }

/* ── segmented switch ──────────────────────────────────────────────────── */
#gp-root .gp-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--gp-well); box-shadow: var(--gp-in); }
#gp-root .gp-seg label { position: relative; display: inline-flex; cursor: pointer; }
#gp-root .gp-seg input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#gp-root .gp-seg span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--gp-muted);
  transition: background .15s ease, color .15s ease;
}
#gp-root .gp-seg input:checked + span { background: var(--gp-navy); color: #fff; box-shadow: 0 6px 12px -6px rgba(13, 27, 62, .7); }
#gp-root .gp-seg input:focus-visible + span { outline: var(--gp-focus); outline-offset: 2px; }

/* ── consent checkbox ──────────────────────────────────────────────────── */
#gp-root .gp-check { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin-top: 18px; cursor: pointer; }
#gp-root .gp-check input { position: absolute; top: -8px; left: -8px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
#gp-root .gp-check .gp-box {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--gp-well); box-shadow: var(--gp-in); border: 1.5px solid rgba(13, 27, 62, .55);
  font-size: 18px; color: transparent;
  transition: background .15s ease, color .15s ease;
}
#gp-root .gp-check input:checked + .gp-box { background: var(--gp-navy); border-color: var(--gp-navy); box-shadow: none; color: #fff; }
#gp-root .gp-check input:focus-visible + .gp-box { outline: var(--gp-focus); outline-offset: 2px; }
#gp-root .gp-check.has-err .gp-box { border-color: var(--gp-red-ink); }
#gp-root .gp-check .gp-check-text { font-size: 13.5px; line-height: 1.45; color: var(--gp-navy); }
#gp-root .gp-check .gp-err { grid-column: 2; margin-top: 0; }

/* ── buttons ───────────────────────────────────────────────────────────── */
#gp-root .gp-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 22px; border-radius: 999px;
  font-size: 16px; font-weight: 800; line-height: 1.1; text-align: center; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
#gp-root .gp-btn svg { font-size: 18px; }
#gp-root .gp-btn--primary {
  flex: 1 1 auto; color: #fff;
  background: linear-gradient(180deg, #EC1730 0%, #E2001A 50%, #C40016 100%);
  box-shadow: 0 12px 22px -8px rgba(226, 0, 26, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
}
#gp-root .gp-btn--primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
#gp-root .gp-btn--primary:active { transform: scale(.98); }
#gp-root .gp-btn--ghost { flex: none; padding: 0 14px; font-size: 15px; font-weight: 700; color: var(--gp-navy); }
#gp-root .gp-btn--ghost:hover { text-decoration: underline; text-underline-offset: 3px; }
#gp-root .gp-btn.is-busy { color: transparent; pointer-events: none; }
#gp-root .gp-btn.is-busy svg { visibility: hidden; }
#gp-root .gp-btn.is-busy::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px;
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: gp-spin .7s linear infinite;
}
@keyframes gp-spin { to { transform: rotate(360deg); } }

/* ── the "slip": a navy card that fills in as the visitor answers ──────── */
#gp-root .gp-slip {
  display: none;
  border-radius: 18px; padding: 14px 16px 6px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(200, 162, 90, .45);
}
#gp-root .gp-slip-cap { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gp-gold-hi); }
#gp-root .gp-slip dl { margin-top: 6px; }
#gp-root .gp-slip dl > div { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
#gp-root .gp-slip dl > div:first-child { border-top: 0; }
#gp-root .gp-slip dt { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .72); }
#gp-root .gp-slip dd { font-size: 13.5px; font-weight: 600; color: #fff; overflow-wrap: anywhere; }
#gp-root .gp-slip dd.is-empty { font-weight: 400; color: rgba(255, 255, 255, .6); }

/* ── who is behind the form ────────────────────────────────────────────── */
#gp-root .gp-who { display: flex; align-items: center; gap: 12px; }
#gp-root .gp-who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gp-gold); }
#gp-root .gp-who strong { display: block; font-family: var(--gp-serif); font-size: 17px; font-weight: 700; line-height: 1.2; }
#gp-root .gp-who span { display: block; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .78); }

/* ── thank-you state ───────────────────────────────────────────────────── */
#gp-root .gp-done { padding-top: 26px; padding-bottom: 22px; }
#gp-root .gp-done-mark {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 50%;
  font-size: 26px; color: var(--gp-gold-hi); background: var(--gp-navy);
  box-shadow: 0 12px 22px -10px rgba(13, 27, 62, .7);
}
#gp-root .gp-done p { margin-top: 10px; font-size: 15px; color: var(--gp-navy); }
#gp-root .gp-done .gp-next { margin-top: 16px; counter-reset: gp-n; }
#gp-root .gp-done .gp-next li {
  counter-increment: gp-n; position: relative; padding: 10px 0 10px 40px;
  border-top: 1px solid var(--gp-edge); font-size: 14.5px; color: var(--gp-navy);
}
#gp-root .gp-done .gp-next li::before {
  content: counter(gp-n); position: absolute; left: 0; top: 8px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--gp-serif); font-size: 14px; font-weight: 700; color: var(--gp-navy);
  background: var(--gp-well); box-shadow: var(--gp-in);
}
#gp-root .gp-dialog.is-done .gp-slip { border-color: var(--gp-gold-hi); }

/* ── phone teaser (never a sheet nobody asked for) ─────────────────────── */
#gp-peek {
  position: fixed; z-index: 990;
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 8px 10px; border-radius: 22px;
  color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, var(--gp-navy-hi) 0%, var(--gp-navy) 55%, var(--gp-navy-lo) 100%);
  border: 1px solid rgba(200, 162, 90, .55);
  box-shadow: 0 16px 34px -10px rgba(8, 17, 39, .6);
  opacity: 0; transform: translateY(14px);
  transition: opacity .24s ease, transform .24s var(--gp-ease);
}
#gp-peek.is-in { opacity: 1; transform: none; }
#gp-peek .gp-peek-face { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gp-gold); }
#gp-peek .gp-peek-open { flex: 1 1 auto; min-height: 48px; text-align: left; }
#gp-peek .gp-peek-open span { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #fff; }
#gp-peek .gp-peek-open b { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13.5px; font-weight: 800; color: var(--gp-gold-hi); }
#gp-peek .gp-peek-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; color: rgba(255, 255, 255, .85); }
#gp-peek :where(button):focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ── desktop: centred two-column modal ─────────────────────────────────── */
@media (min-width: 768px) {
  #gp-root { align-items: center; padding: 24px; }
  #gp-root .gp-dialog {
    display: grid; grid-template-columns: minmax(300px, 39%) minmax(0, 1fr);
    width: 100%; max-width: 920px;
    max-height: min(700px, calc(100vh - 48px));
    margin-bottom: 0;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(8, 17, 39, .5);
    opacity: 0; transform: translateY(14px) scale(.98);
    transition: transform .26s var(--gp-ease), opacity .2s ease;
  }
  #gp-root[data-state="open"] .gp-dialog { opacity: 1; }
  #gp-root .gp-grab { display: none; }
  #gp-root .gp-close { top: 14px; right: 14px; color: var(--gp-navy); background: var(--gp-cream); box-shadow: var(--gp-out); }
  #gp-root .gp-close:hover { background: #fff; }
  #gp-root .gp-close:focus-visible { outline-color: #003DA5; }
  #gp-root .gp-aside { padding: 30px 28px 26px; min-height: 0; overflow: hidden; }
  #gp-root .gp-main { min-height: 0; }
  #gp-root .gp-scroll { padding: 30px 34px 16px; }
  #gp-root .gp-scroll > :first-child { padding-right: 44px; }
  #gp-root .gp-foot { padding: 14px 34px 20px; border-top: 0; justify-content: space-between; }
  #gp-root .gp-btn--primary { flex: 0 1 auto; min-width: 230px; }
  #gp-root .gp-title { font-size: 27px; margin-top: 8px; }
  #gp-root .gp-q { font-size: 24px; }
  #gp-root .gp-slip { display: block; }
  #gp-peek { left: 20px; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  #gp-root .gp-backdrop, #gp-root .gp-dialog, #gp-root .gp-btn, #gp-root .gp-chip span, #gp-root .gp-close,
  #gp-root .gp-step, #gp-peek { transition: none !important; animation: none !important; }
  #gp-root .gp-btn.is-busy::after { animation-duration: 1.6s; }
}

/* ── short viewport (on-screen keyboard open): shrink the navy header so the form keeps the room ── */
@media (max-width: 767px) {
  #gp-root.gp-short .gp-aside { padding: 14px 56px 8px 16px; }
  #gp-root.gp-short .gp-title { margin-top: 2px; font-size: 16px; }
  #gp-root.gp-short .gp-title em, #gp-root.gp-short .gp-slip, #gp-root.gp-short .gp-up-points,
  #gp-root.gp-short .gp-mo-cap, #gp-root.gp-short .gp-mo-sub, #gp-root.gp-short .gp-hw-photo { display: none; }
  #gp-root.gp-short .gp-mo-out { margin-top: 6px; padding: 6px 12px; }
  #gp-root.gp-short .gp-mo-pay { font-size: 24px; }
  #gp-root.gp-short .gp-scroll { padding-top: 10px; }
}

/* the site's mobile rule `section { padding: 52px 0 !important }` would pad the dialog (a <section>) */
#gp-root .gp-dialog { padding-top: 0 !important; padding-bottom: 0 !important; }
