/* ================================================================
   Locations hub (page-locations.php) — /location/
   Heading + search, full-width map, location list (filtered by state), enquiry form.
   Brand: navy #132965, blue #0065E4, dark navy #0D2747. Headings:
   Oakes Grotesk, 400.
   ================================================================ */

.tc-lh,
.tc-lh *,
.tc-lh *::before,
.tc-lh *::after { box-sizing: border-box; }

.tc-lh :where(h1, h2, h3, p, ul, li) { margin: 0; padding: 0; }

.tc-lh {
  --navy:   #132965;
  --blue:   #0065E4;
  --ink:    #14223B;
  --muted:  #4A586E;
  --light:  #F3F7FD;
  --border: #E2E8F0;
  font-family: 'Oakes Grotesk', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
}

.tc-lh ul { list-style: none; }
.tc-lh h1, .tc-lh h2, .tc-lh h3 { font-family: 'Oakes Grotesk', system-ui, sans-serif; font-weight: 400; color: var(--navy); line-height: 1.2; }
.tc-lh [hidden] { display: none !important; }
.tc-lh .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.tc-lh-inner { max-width: 1100px; margin: 0 auto; }

/* ---- Heading + search ---- */
.tc-lh-hero { padding: 64px 5% 28px; }
.tc-lh-hero h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 24px; text-align: center; }

.tc-lh-combo { position: relative; }
.tc-lh-combo input {
  width: 100%; height: 64px; padding: 0 24px !important;
  border: 1px solid #C9D5EA !important; border-radius: 16px !important;
  font: inherit !important; font-size: 18px !important; color: var(--ink) !important; background: #fff !important;
  box-shadow: 0 8px 24px rgba(19, 41, 101, .06);
}
.tc-lh-combo input:focus { outline: 3px solid rgba(0, 101, 228, .25); border-color: var(--blue) !important; }

.tc-lh-suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden auto; max-height: 400px;
  box-shadow: 0 16px 40px rgba(19, 41, 101, .16);
}
.tc-lh-suggest [role="option"] {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: baseline;
  padding: 12px 18px; cursor: pointer;
}
.tc-lh-suggest [role="option"] + [role="option"] { border-top: 1px solid var(--border); }
.tc-lh-suggest [aria-selected="true"], .tc-lh-suggest [role="option"]:hover { background: var(--light); }
.tc-lh-suggest__tag {
  grid-row: span 2; align-self: center; font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--blue); background: #E8F0FD; border-radius: 99px; padding: 4px 10px;
}
.tc-lh-suggest__title { font-size: 16px; color: var(--navy); }
.tc-lh-suggest__sub { font-size: 13px; color: var(--muted); }

/* ---- Map (full width of the wrapper) ---- */
.tc-lh-mapsec { padding: 0 5% 64px; }
.tc-lh-map { position: relative; background: var(--light); border-radius: 24px; padding: 16px; }
.tc-lh-maptools {
  position: absolute; z-index: 5; top: 28px; left: 28px; right: 28px;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
}
.tc-lh-maptools > * { pointer-events: auto; }
.tc-lh-back {
  appearance: none; border: 1px solid var(--blue) !important; background: #fff !important; color: var(--blue) !important;
  border-radius: 99px !important; padding: 8px 16px !important; font: inherit !important; font-size: 14px !important; cursor: pointer;
}
.tc-lh-trail { font-size: 14px; color: var(--muted); background: rgba(255, 255, 255, .85); border-radius: 99px; padding: 6px 12px; }
.tc-lh-canvas { border-radius: 16px; overflow: hidden; background: #EEF3FB; }
.tc-lh-canvas svg { display: block; width: 100%; height: auto; aspect-ratio: 731 / 655; max-height: 78vh; }

.tc-lh-state-shape { fill: #DCE6F6; stroke: #fff; stroke-width: var(--tc-lh-stroke, .6); transition: fill .2s, opacity .3s; }
.tc-lh-state-shape:focus { outline: none; }
.tc-lh-state-shape.has-locations { fill: #C6D7F3; cursor: pointer; }
svg:not([data-level="au"]) .tc-lh-state-shape { cursor: default; }
svg[data-level="au"] .tc-lh-state-shape.has-locations:hover { fill: #9EBDEC; }
svg[data-level="au"] .tc-lh-state-shape.has-locations:focus-visible { fill: #9EBDEC; stroke: var(--blue); }
.tc-lh-state-shape.is-dim { opacity: .45; }
.tc-lh-state-shape.is-active { fill: #C6D7F3; }

.tc-lh-pin a { cursor: pointer; outline: none; }
.tc-lh-pin__dot { fill: var(--navy); stroke: #fff; stroke-width: 1.4; }
.tc-lh-pin.is-priority .tc-lh-pin__dot { fill: var(--blue); }
.tc-lh-pin.is-area .tc-lh-pin__dot { fill: #7FB0FF; }
.tc-lh-pin.is-section .tc-lh-pin__dot { fill: var(--blue); stroke-width: 1.6; }
.tc-lh-pin__count { font-size: 8.5px; font-weight: 500; fill: #fff; pointer-events: none; font-family: 'Oakes Grotesk', system-ui, sans-serif; }
.tc-lh-pin a:hover .tc-lh-pin__dot, .tc-lh-pin a:focus .tc-lh-pin__dot { fill: #F28C28; }
.tc-lh-pin__label {
  font-size: 9px; fill: var(--navy);
  font-family: 'Oakes Grotesk', system-ui, sans-serif; /* clickable: part of the pin's link */
}
.tc-lh-pin.is-area .tc-lh-pin__label { fill: var(--muted); }
svg[data-level="au"] .tc-lh-pin__label { display: none; }
.tc-lh-pin.is-section .tc-lh-pin__label { font-size: 10.5px; }

.tc-lh-tip {
  position: absolute; z-index: 10; width: 260px; padding: 14px 16px; background: #fff; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(19, 41, 101, .2); font-size: 14px; line-height: 1.45;
}
.tc-lh-tip strong { display: block; font-size: 17px; font-weight: 400; color: var(--navy); }
.tc-lh-tip p { margin: 6px 0 8px; color: var(--muted); }
.tc-lh-tip a { color: var(--blue) !important; }
.tc-lh-tip__state { font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); }

/* ---- All locations (grouped by state, then section; filtered by the chips and the map) ---- */
.tc-lh-all { padding: 0 5% 88px; }
.tc-lh-all__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding-bottom: 24px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.tc-lh-all__head h2 { font-size: clamp(26px, 3vw, 36px); }

.tc-lh-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-lh-filter button {
  appearance: none; cursor: pointer; font: inherit !important; font-size: 14px !important; line-height: 1 !important;
  padding: 10px 14px !important; border-radius: 99px !important; letter-spacing: .3px;
  border: 1px solid var(--border) !important; background: #fff !important; color: var(--navy) !important;
  transition: background .15s, color .15s, border-color .15s;
}
.tc-lh-filter button:hover { border-color: var(--blue) !important; color: var(--blue) !important; }
.tc-lh-filter button[aria-pressed="true"] { background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }

.tc-lh-state { padding: 40px 0 8px; }
.tc-lh-state + .tc-lh-state { border-top: 1px solid var(--border); }
.tc-lh-state__name { font-size: 22px; margin-bottom: 24px !important; }

.tc-lh-sections { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 48px; }
.tc-lh-section__name {
  font-size: 15px; font-weight: 500; color: var(--muted); font-family: 'Oakes Grotesk', system-ui, sans-serif;
  padding-bottom: 10px; margin-bottom: 4px !important; border-bottom: 1px solid var(--border);
}

.tc-lh-loc { padding: 14px 0; }
.tc-lh-loc + .tc-lh-loc { border-top: 1px solid var(--border); }
.tc-lh-loc__link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 18px; line-height: 1.3; color: var(--navy) !important; text-decoration: none !important;
}
.tc-lh-loc__link { transition: color .25s ease; }
.tc-lh-loc__link .tc-icon { color: var(--blue); transition: transform .25s ease; }
.tc-lh-loc__link:hover, .tc-lh-loc__link:focus-visible { color: var(--blue) !important; }
.tc-lh-loc__link:hover .tc-icon, .tc-lh-loc__link:focus-visible .tc-icon { transform: translate(3px, -3px); }
.tc-lh-loc__areas { margin-top: 8px !important; display: grid; gap: 6px; }
.tc-lh-loc__areas li { font-size: 15px; line-height: 1.4; }
.tc-lh-loc__areas a {
  color: var(--muted) !important; text-decoration: underline !important; text-decoration-color: transparent !important;
  text-underline-offset: 3px; transition: color .25s ease, text-decoration-color .25s ease;
}
.tc-lh-loc__areas a:hover, .tc-lh-loc__areas a:focus-visible { color: var(--blue) !important; text-decoration-color: currentColor !important; }

/* A state with no sections: spread its locations across the columns.
   Rules sit between rows only; the state divider closes the last row. */
.tc-lh-section:only-child { grid-column: 1 / -1; }
.tc-lh-section:only-child > ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; }
.tc-lh-section:only-child .tc-lh-loc { border-top: 1px solid var(--border); }
.tc-lh-section:only-child .tc-lh-loc:nth-child(-n+3) { border-top: 0; }

@media (max-width: 960px) {
  .tc-lh-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-lh-section:only-child > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-lh-section:only-child .tc-lh-loc:nth-child(3) { border-top: 1px solid var(--border); }
}

/* ---- Small screens ---- */
@media (max-width: 600px) {
  .tc-lh-hero { padding: 36px 5% 20px; }
  .tc-lh-combo input { height: 56px; font-size: 16px !important; }
  .tc-lh-map { padding: 8px; border-radius: 16px; }
  .tc-lh-maptools { top: 16px; left: 16px; right: 16px; }
  .tc-lh-tip { width: 220px; }
  .tc-lh-filter { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .tc-lh-filter button { flex-shrink: 0; }
  .tc-lh-sections { grid-template-columns: 1fr; gap: 28px; }
  .tc-lh-section:only-child > ul { grid-template-columns: 1fr; }
  .tc-lh-section:only-child .tc-lh-loc:nth-child(2) { border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-lh-loc__link, .tc-lh-loc__link .tc-icon, .tc-lh-loc__areas a { transition: none; }
}

/* Phosphor icons (inc/phosphor-icons.php) */
.tc-lh .tc-icon { flex-shrink: 0; display: inline-block; vertical-align: -2px; }
.tc-lh-back { display: inline-flex; align-items: center; gap: 6px; }
