/* ==========================================================================
   Goodwill Store Locator

   Every selector is scoped under .gwl and carries at least two classes. That is
   deliberate: Elementor and the theme style bare `button`, `h4` and `p`
   elements, and single-class rules lose to them. The reset block below
   neutralises inherited styling before the component rules re-apply it.

   Design tokens are the custom properties in the .gwl block. Change them here
   and the whole locator follows.
   ========================================================================== */

.gwl {
  /* Brand */
  --gwl-blue:         #0d5da9;
  --gwl-blue-dark:    #09477f;
  --gwl-blue-pale:    #eaf2fa;
  --gwl-blue-pale-bd: #cfe0f1;
  --gwl-yellow:       #f7b500;
  --gwl-yellow-dark:  #e5a800;
  --gwl-btn-hover:    #042f61;  /* solid fill behind white text on button hover */

  /* Surfaces */
  --gwl-card-bg:   #f0f1f3;
  --gwl-border:    #dfe2e6;
  --gwl-ink:       #2c3033;
  --gwl-muted:     #5d656d;
  --gwl-alert-bg:  #fff8e1;
  --gwl-alert-bd:  #e8c65a;
  --gwl-alert-ink: #6b5518;
  --gwl-pin:        #0d5da9;  /* store markers, brand blue */
  --gwl-pin-on:     #062f56;  /* the selected store */
  --gwl-pin-origin: #b13c00;  /* the visitor's search location */

  /* Type */
  --gwl-font:      inherit;
  --gwl-size:      14px;
  --gwl-leading:   1.5;

  /* Layout */
  --gwl-rail-width: 394px;
  --gwl-map-height: 660px;
  --gwl-gap:        20px;
  --gwl-radius:     2px;

  font-family: var(--gwl-font);
  font-size: var(--gwl-size);
  line-height: var(--gwl-leading);
  color: var(--gwl-ink);
}

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

/* ---------------------------------------------------------------- reset ---
   Undo theme and Elementor styling on the bare elements this component uses.

   Note on !important: it appears only on button `background`. Elementor and many
   themes set `button { background-color: ... !important }` globally, and no
   amount of specificity beats that. Every other property here wins on
   specificity alone.
   ------------------------------------------------------------------------- */

.gwl button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-align: left;
  min-width: 0;
  min-height: 0;
  width: auto;
  cursor: pointer;
}

.gwl button:hover,
.gwl button:focus,
.gwl button:active {
  box-shadow: none;
  text-decoration: none;
}

/* Themes and Elementor animate a ::before or ::after overlay on button hover.
   None of our buttons use pseudo-elements, so removing them is safe and stops
   the overlay flickering across our own hover colour. */
.gwl button::before,
.gwl button::after {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
  transition: none !important;
}

.gwl h2,
.gwl h3,
.gwl h4,
.gwl h5 {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.gwl p { margin: 0; padding: 0; }

.gwl a { box-shadow: none; }

.gwl input[type="text"],
.gwl input[type="search"],
.gwl select {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  box-shadow: none;
  max-width: 100%;
}

.gwl select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235d656d' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
  padding-right: 30px;
}

/* ----------------------------------------------------------- search form -- */

.gwl .gwl-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--gwl-blue-pale);
  border: 1px solid var(--gwl-blue-pale-bd);
  padding: 15px;
  margin: 0;
}

.gwl .gwl-form__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}

.gwl .gwl-form__field--query  { flex: 1 1 280px; }
.gwl .gwl-form__field--radius { flex: 0 0 170px; }

.gwl .gwl-form label {
  display: block;
  margin: 0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--gwl-muted);
}

.gwl .gwl-form input[type="text"],
.gwl .gwl-form select {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
  padding: 10px 11px;
  border: 1px solid #b6c2cd;
  border-radius: var(--gwl-radius);
  background-color: #fff;
  color: var(--gwl-ink);
  height: auto;
}

.gwl .gwl-form select { padding-right: 30px; }

.gwl .gwl-form input[type="text"]:focus-visible,
.gwl .gwl-form select:focus-visible {
  outline: 2px solid var(--gwl-blue);
  outline-offset: 1px;
}

.gwl .gwl-form__submit {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  background: var(--gwl-yellow) !important;
  background-image: none !important;
  color: #1c1c1c !important;
  border: 0 !important;
  border-radius: var(--gwl-radius);
  padding: 12px 26px;
  box-shadow: none !important;
  transition: background-color .15s ease, color .15s ease;
}

/* Explicit non-visible focus state, otherwise the theme's own focus styling
   flashes between the rest and hover colours. */
.gwl .gwl-form__submit:focus {
  background: var(--gwl-yellow) !important;
  color: #1c1c1c !important;
  outline: none;
  box-shadow: none !important;
}

.gwl .gwl-form__submit:hover,
.gwl .gwl-form__submit:active,
.gwl .gwl-form__submit:focus-visible {
  background: var(--gwl-btn-hover) !important;
  background-image: none !important;
  color: #fff !important;
}

/* border, outline and box-shadow all paint the same rectangle, so all three are
   cleared in every state. Only keyboard focus re-adds a ring, further down. */
.gwl .gwl-form__submit,
.gwl .gwl-form__submit:hover,
.gwl .gwl-form__submit:active,
.gwl .gwl-form__submit:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  text-shadow: none;
}

.gwl .gwl-form__submit:focus-visible {
  outline: 2px solid var(--gwl-btn-hover) !important;
  outline-offset: 2px;
}

.gwl .gwl-form__hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--gwl-muted);
}

/* --------------------------------------------------------------- results -- */

.gwl .gwl-results__count {
  margin: 18px 0 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gwl-muted);
}

.gwl .gwl-results__count strong { color: var(--gwl-ink); font-weight: 700; }

.gwl .gwl-panes {
  display: grid;
  grid-template-columns: var(--gwl-rail-width) 1fr;
  gap: var(--gwl-gap);
  align-items: start;
}

.gwl .gwl-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: var(--gwl-map-height);
  overflow-y: auto;
  padding-right: 5px;
  margin: 0;
}

/* ------------------------------------------------------------------ card -- */

.gwl .gwl-card {
  border: 1px solid var(--gwl-border);
  background: var(--gwl-card-bg);
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;

  /* No overflow clipping here. Themes style bare `article` and `p` with fixed
     heights for post listings; combined with overflow:hidden that silently
     truncates a card. Force intrinsic sizing instead.

     min-height stays `auto`, never 0. The rail is a flex column with a
     max-height, and flex items rely on min-height:auto to refuse to shrink
     below their content. Setting 0 lets cards compress and overlap once the
     list is taller than the rail. flex-shrink:0 belts it. */
  display: block;
  height: auto;
  min-height: auto;
  max-height: none;
  overflow: visible;
  flex-shrink: 0;
  flex-grow: 0;
}

/* Same defence for the pieces inside. min-height:auto for the same reason. */
.gwl .gwl-card__body,
.gwl .gwl-card__row,
.gwl .gwl-card__contact,
.gwl .gwl-card__actions,
.gwl .gwl-card__hours,
.gwl .gwl-hours-group {
  height: auto;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.gwl .gwl-card p,
.gwl .gwl-card h4 {
  height: auto;
  min-height: auto;
  max-height: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  position: static;
  visibility: visible;
  opacity: 1;
  display: block;
}

.gwl .gwl-card.is-active {
  border-color: var(--gwl-blue);
  box-shadow: 0 0 0 2px rgba(13, 93, 169, .16);
}

.gwl .gwl-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--gwl-blue) !important;
  color: #fff;
  border: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: var(--gwl-size);
  font-weight: 400;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}

.gwl .gwl-card__head--static { cursor: default; }

.gwl .gwl-card__head:hover,
.gwl .gwl-card__head:focus {
  background: var(--gwl-blue-dark) !important;
  color: #fff;
}

.gwl .gwl-card__head--static:hover { background: var(--gwl-blue) !important; }

.gwl .gwl-card__head,
.gwl .gwl-card__head:hover,
.gwl .gwl-card__head:active,
.gwl .gwl-card__head:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.gwl .gwl-card__head:focus-visible {
  outline: 2px solid var(--gwl-yellow) !important;
  outline-offset: -2px;
}

.gwl .gwl-card__pin {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  color: var(--gwl-blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.gwl .gwl-card__name {
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: inherit;
}

.gwl .gwl-card__services {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.gwl .gwl-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
  flex: 0 0 auto;
}

/* Announcement sits outside the reveal on purpose. A closure notice must not
   be hidden behind a click. */
.gwl .gwl-card__announcement {
  margin: 0;
  padding: 9px 12px;
  background: var(--gwl-alert-bg);
  border-bottom: 1px solid var(--gwl-alert-bd);
  color: var(--gwl-alert-ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}

.gwl .gwl-card__body { padding: 12px; }

.gwl .gwl-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.gwl .gwl-card__contact { min-width: 0; }

.gwl .gwl-card__address {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--gwl-ink);
}

.gwl .gwl-card__address br { line-height: inherit; }

.gwl .gwl-card__phone {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
}

.gwl .gwl-card__phone a {
  color: var(--gwl-blue);
  text-decoration: none;
  font-weight: 400;
}

.gwl .gwl-card__phone a:hover { text-decoration: underline; }

.gwl .gwl-card__distance {
  flex: 0 0 auto;
  margin: 0;
  text-align: right;
  line-height: 1.05;
}

.gwl .gwl-card__distance strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gwl-blue);
}

.gwl .gwl-card__distance span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gwl-muted);
}

.gwl .gwl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gwl-border);
}

.gwl .gwl-card__toggle,
.gwl .gwl-card__directions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: none !important;
  box-shadow: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  color: var(--gwl-blue);
  min-height: 0;
  width: auto;
}

/* Underline the label span rather than the control, so the caret and arrow
   icons are never decorated. text-decoration on a parent cannot be removed by a
   child, so it must not be set on the parent in the first place. */
.gwl .gwl-card__toggle,
.gwl .gwl-card__directions,
.gwl .gwl-card__toggle:hover,
.gwl .gwl-card__directions:hover,
.gwl .gwl-card__toggle:focus,
.gwl .gwl-card__directions:focus,
.gwl .gwl-card__toggle:active,
.gwl .gwl-card__directions:active {
  text-decoration: none;
}

.gwl .gwl-card__toggle:hover .gwl-card__toggle-label,
.gwl .gwl-card__directions:hover .gwl-card__directions-label {
  text-decoration: underline;
}

.gwl .gwl-card__arrow { text-decoration: none; }

/* Stay blue in every state. Themes commonly flip button colour to white on
   focus and active, which made the label and caret vanish. */
.gwl .gwl-card__toggle,
.gwl .gwl-card__directions,
.gwl .gwl-card__toggle:hover,
.gwl .gwl-card__directions:hover,
.gwl .gwl-card__toggle:focus,
.gwl .gwl-card__directions:focus,
.gwl .gwl-card__toggle:active,
.gwl .gwl-card__directions:active,
.gwl .gwl-card__toggle:focus-within,
.gwl .gwl-card__directions:focus-within {
  color: var(--gwl-blue) !important;
  background: none !important;
}

.gwl .gwl-card__toggle .gwl-caret { stroke: currentColor; color: inherit; }

/* No focus ring for pointer users, keep one for keyboard users. */
.gwl .gwl-card__toggle,
.gwl .gwl-card__directions,
.gwl .gwl-card__toggle:hover,
.gwl .gwl-card__directions:hover,
.gwl .gwl-card__toggle:active,
.gwl .gwl-card__directions:active,
.gwl .gwl-card__toggle:focus,
.gwl .gwl-card__directions:focus {
  outline: 0 !important;
  box-shadow: none !important;
}

.gwl .gwl-card__toggle:focus-visible,
.gwl .gwl-card__directions:focus-visible {
  outline: 2px solid var(--gwl-blue) !important;
  outline-offset: 2px;
}

.gwl .gwl-caret {
  flex: 0 0 auto;
  transition: transform .16s ease;
}

.gwl .gwl-card.is-open .gwl-caret { transform: rotate(180deg); }

.gwl .gwl-card__hours {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--gwl-border);
}

.gwl .gwl-hours-group + .gwl-hours-group { margin-top: 11px; }

.gwl .gwl-hours-group__label {
  display: block;
  margin: 0 0 3px;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gwl-ink);
}

.gwl .gwl-hours-group__rows {
  margin: 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gwl-muted);
}

/* ---------------------------------------------------------------- states -- */

.gwl .gwl-state {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--gwl-blue-pale);
  border-left: 3px solid var(--gwl-blue);
}

.gwl .gwl-state__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--gwl-ink);
}

.gwl .gwl-state__hint {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--gwl-muted);
}

/* ------------------------------------------------------------------- map -- */

.gwl .gwl-map {
  height: var(--gwl-map-height);
  border: 1px solid var(--gwl-border);
  background: #e7edf1;
}

.gwl .gwl-map__noscript {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--gwl-muted);
}

/* ---------------------------------------------------------------- markers ---
   Leaflet injects these into its own pane. The selectors below are written
   without a .gwl ancestor so they hold wherever the pane ends up, and Leaflet's
   own .leaflet-div-icon default (white box, grey border) is cleared.

   The pin number is SVG <text>, not an overlaid span, so no theme rule for
   `span`, `color` or `line-height` can suppress it.
   ------------------------------------------------------------------------- */

.leaflet-marker-icon.gwl-marker-wrap,
.leaflet-div-icon.gwl-marker-wrap {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}

.gwl-marker {
  display: block;
  position: relative;
  width: 27px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  line-height: 1;
}

.gwl-marker .gwl-marker__shape {
  display: block;
  width: 27px;
  height: 34px;
  overflow: visible;
  fill: #0d5da9;
}

/* Search origin is the odd one out, so it gets the contrasting colour. */
.gwl-marker--origin .gwl-marker__shape { fill: #b13c00; }

/* Selected store: darker blue plus a halo so it reads against its neighbours. */
.gwl-marker--active .gwl-marker__shape {
  fill: #062f56;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .95));
}

/* The number must never inherit the pin fill. */
.gwl-marker .gwl-marker__num {
  fill: #fff;
  stroke: none;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.leaflet-marker-icon .gwl-marker__label {
  position: absolute;
  top: 3px;
  left: 0;
  width: 27px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* ------------------------------------------------------------ zip prompt -- */

.gwl-prompt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.gwl-prompt .gwl-prompt__label {
  display: block;
  margin: 0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #5d656d;
}

.gwl-prompt .gwl-prompt__controls {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.gwl-prompt input[type="text"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px 11px;
  border: 1px solid #b6c2cd;
  border-radius: 2px;
  background-color: #fff;
  color: #2c3033;
  box-shadow: none;
  height: auto;
}

.gwl-prompt .gwl-prompt__submit {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  background: #f7b500 !important;
  background-image: none !important;
  color: #1c1c1c !important;
  border: 0 !important;
  border-radius: 2px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: none !important;
  min-height: 0;
  width: auto;
  transition: background-color .15s ease, color .15s ease;
}

.gwl-prompt .gwl-prompt__submit::before,
.gwl-prompt .gwl-prompt__submit::after {
  content: none !important;
  display: none !important;
}

.gwl-prompt .gwl-prompt__submit:focus {
  background: #f7b500 !important;
  color: #1c1c1c !important;
  outline: none;
  box-shadow: none !important;
}

.gwl-prompt .gwl-prompt__submit:hover,
.gwl-prompt .gwl-prompt__submit:active,
.gwl-prompt .gwl-prompt__submit:focus-visible {
  background: #042f61 !important;
  background-image: none !important;
  color: #fff !important;
}

.gwl-prompt .gwl-prompt__submit,
.gwl-prompt .gwl-prompt__submit:hover,
.gwl-prompt .gwl-prompt__submit:active,
.gwl-prompt .gwl-prompt__submit:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  text-shadow: none;
}

.gwl-prompt .gwl-prompt__submit:focus-visible {
  outline: 2px solid #042f61 !important;
  outline-offset: 2px;
}

/* ------------------------------------------------------------ responsive -- */

@media (max-width: 860px) {
  .gwl .gwl-panes { grid-template-columns: 1fr; }

  /* Map above the list on small screens. */
  .gwl .gwl-map-wrap { order: -1; }

  .gwl { --gwl-map-height: 300px; }

  .gwl .gwl-rail {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gwl .gwl-caret,
  .gwl .gwl-form__submit,
  .gwl-prompt .gwl-prompt__submit { transition: none; }
}
