/*
 * GI District Map - home section styles. Ported 2026-11-07 from modern_storefront CL-280
 * (static/www/css/gidistrict/gi-district-map.css) and re-tokenised to Jeevika's design system (css/jb-ds.css 2.2):
 * districts with GI products in haldi, hover saffron, the chosen district in sindoor (the action colour), focus in the
 * jb focus blue. Every rule is scoped under .gi-map-section; colour lives only in the token block below.
 * Ships IN the WAR (/static/www/css/gidistrict/, never on the static disk or the CDN), versioned by build + checksum.
 * Layout: the heading sits like its neighbours (Recently viewed, the sliders); chooser (only with 2+ states), map and
 * its legend beneath are centred, max 680px; the cards carousel runs full width beneath, its arrows the site's own.
 */
.gi-map-section {
  --gi-fill: #efe6d6;
  --gi-fill-has: #f2b33d;
  --gi-hover: #e37932;
  --gi-active: #c62828;
  --gi-stroke: #ffffff;
  --gi-off: #f7f2e8;
  --gi-ink: #1f2118;
  --gi-muted: #4a4a40;
  --gi-line: #8a8270;
  --gi-focus: #1d4e89;
  --gi-paper: #ffffff;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

.gi-map-section *,
.gi-map-section *::before,
.gi-map-section *::after {
  box-sizing: border-box;
}

.gi-map-section .gi-map-inner {
  padding: 24px 0 8px;
  color: var(--gi-ink);
}

.gi-map-section .gi-map-inner[hidden] {
  display: none;
}

.gi-map-section .gi-map-sub {
  margin: 4px 0 0;
  max-width: 680px;
  font-size: 15px;
  color: var(--gi-muted);
}

.gi-map-section .gi-map-chooser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  max-width: 680px;
}

/* One active state: the widget sets [hidden] - the display:flex above would otherwise keep it on screen. */
.gi-map-section .gi-map-chooser[hidden] {
  display: none;
}

.gi-map-section .gi-map-label {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--gi-ink);
}

/* display:block overrides materialize's select { display: none } (its JS swaps selects for a widget we do not use). */
.gi-map-section .gi-map-state {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 320px;
  min-height: 44px;
  height: auto;
  padding: 8px 12px;
  border: 1px solid var(--gi-line);
  border-radius: 6px;
  background: var(--gi-paper);
  color: var(--gi-ink);
  font-size: 16px;
}

.gi-map-section .gi-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 8px auto 0;
  font-size: 13px;
  color: var(--gi-muted);
}

.gi-map-section .gi-map-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gi-map-section .gi-map-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--gi-line);
  border-radius: 3px;
  background: var(--gi-fill);
}

.gi-map-section .gi-map-swatch-has {
  background: var(--gi-fill-has);
}

.gi-map-section .gi-map-container {
  width: 100%;
  max-width: 680px;
  margin: 12px auto 0;
}

.gi-map-section .gi-map-container svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.gi-map-section .gi-district,
.gi-map-section .gi-district-off {
  stroke: var(--gi-stroke);
  stroke-width: 0.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.gi-map-section .gi-district-off {
  fill: var(--gi-off);
}

.gi-map-section .gi-district {
  fill: var(--gi-fill);
  cursor: pointer;
  transition: fill 0.15s ease-in-out;
  outline: none;
}

.gi-map-section .gi-district.has-products {
  fill: var(--gi-fill-has);
}

.gi-map-section .gi-district:hover {
  fill: var(--gi-hover);
}

.gi-map-section .gi-district.active {
  fill: var(--gi-active);
}

/* An SVG path takes no outline in every browser; the ring is a stroke (and, drawn over the neighbours, the
   overlay's .gi-district-focus copy). */
.gi-map-section .gi-district:focus-visible {
  stroke: var(--gi-focus);
  stroke-width: 3;
}

/* Drawn last, over every neighbour, so the chosen district's border is never covered. Not interactive. */
.gi-map-section .gi-district-outline {
  fill: none;
  stroke: var(--gi-ink);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.gi-map-section .gi-district-focus {
  fill: none;
  stroke: var(--gi-focus);
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.gi-map-section .gi-map-status {
  margin: 8px auto 0;
  min-height: 1.4em;
  text-align: center;
  font-size: 14px;
  color: var(--gi-muted);
}

.gi-map-section .gi-map-panel {
  width: 100%;
  margin: 8px 0 0;
}

.gi-map-section .gi-map-district-heading {
  display: table;
  margin: 8px auto 0;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--gi-active);
  font-size: 20px;
  font-weight: 700;
  color: var(--gi-active);
  text-align: center;
}

.gi-map-section .gi-map-district-heading[hidden] {
  display: none;
}

.gi-map-section .gi-map-panel-msg {
  margin: 12px auto;
  text-align: center;
  font-size: 15px;
  color: var(--gi-muted);
}

.gi-map-section .gi-map-panel-msg.is-error {
  color: var(--gi-ink);
  font-weight: 700;
}

.gi-map-section .gi-map-cards {
  width: 100%;
  margin-top: 12px;
}

.gi-map-section .gi-map-cards .owl-carousel {
  width: 100%;
}

/* A short row (fewer cards than fit) sits centred; a long one starts at the left as Owl lays it out. */
.gi-map-section .gi-map-cards .owl-stage {
  margin: 0 auto;
}

/* The arrows are the site's own (slider-icon-left / -right): the theme places them left and right of the cards,
   vertically centred, exactly as on every other home slider - no override here. (A custom row below the cards made the
   theme's ".owl-prev svg { position:absolute; width:60% }" size the icons against the whole carousel, and its
   "background: transparent !important" hid the buttons.) Only the keyboard focus ring is added. */
.gi-map-section .gi-map-cards .owl-carousel .owl-nav button:focus-visible {
  outline: 3px solid var(--gi-focus);
  outline-offset: 2px;
}

@media (max-width: 575.98px) {
  .gi-map-section .gi-map-inner {
    padding-top: 16px;
  }

  .gi-map-section .gi-map-district-heading {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gi-map-section .gi-district {
    transition: none;
  }
}
