/* Satyam — Google Maps wrapper styles (map.js).
   The page sets the container's size (height / aspect-ratio); this file gives it the
   rounded, bordered, beige look, the loading + fallback states, pins and info window. */

.satyam-map {
  --map-bg: #F3ECE1;
  --map-pin: #E03A3E;
  --map-pin-active: var(--accent, #B5121B);
  --map-border: var(--border, #E9E1D6);
  --map-radius: 12px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 200px;
  border: 1px solid var(--map-border);
  border-radius: var(--map-radius);
  background: var(--map-bg);
  color: var(--text-primary, #1C1613);
  font-family: var(--font-body, "Inter", system-ui, sans-serif);
}

.satyam-map__canvas {
  position: absolute;
  inset: 0;
  background: var(--map-bg) !important;
}

/* calm loading state: beige with a faint shimmer, no grey flash */
.satyam-map.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) var(--map-bg);
  background-size: 250% 100%;
  animation: satyam-map-shimmer 1.6s ease-in-out infinite;
  transition: opacity .3s;
}
@keyframes satyam-map-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) {
  .satyam-map.is-loading::after { animation: none; }
}

/* Google's own error overlay ("This page can't load Google Maps correctly") */
.satyam-map .gm-err-container,
.satyam-map .dismissButton { display: none !important; }
.satyam-map .gm-style { font-family: inherit; }

/* zoom control: flat, brand-tinted */
.satyam-map .gmnoprint > div[draggable] > div,
.satyam-map .gm-bundled-control .gmnoprint > div {
  border-radius: 8px !important;
  box-shadow: 0 1px 4px rgba(28, 22, 19, .12) !important;
}

/* ---------- pins (HTML overlay: .satyam-map-marker > button.satyam-map-pin + label) ---------- */
.satyam-map-marker {
  position: absolute;
  width: 0;
  height: 0;
}
.satyam-map-marker:hover,
.satyam-map-marker:focus-within,
.satyam-map-marker.is-open { z-index: 200000 !important; }
.satyam-map-pin {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  transition: transform .15s ease;
  filter: drop-shadow(0 2px 2px rgba(28, 22, 19, .22));
  -webkit-tap-highlight-color: transparent;
}
.satyam-map-pin svg { display: block; width: 100%; height: 100%; overflow: visible; }
.satyam-map-pin__body { fill: var(--map-pin); stroke: #fff; stroke-width: 1.25; transition: fill .15s; }
.satyam-map-pin:hover,
.satyam-map-pin.is-open { transform: translateX(-50%) scale(1.12); }
.satyam-map-pin:hover .satyam-map-pin__body,
.satyam-map-pin.is-open .satyam-map-pin__body { fill: var(--map-pin-active); }
.satyam-map-pin:focus { outline: none; }
.satyam-map-pin:focus-visible { outline: 2px solid var(--map-pin-active); outline-offset: 2px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; }
.satyam-map-pin.is-active { width: 40px; height: 52px; }
.satyam-map-pin.is-active .satyam-map-pin__body { fill: var(--map-pin-active); stroke-width: 1; }

/* group pin: same teardrop, count instead of the white dot */
.satyam-map-pin.is-group { width: 30px; height: 39px; }
.satyam-map-pin__count {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  font: 700 10px/12px var(--font-body, "Inter", system-ui, sans-serif);
  color: var(--map-pin-active);
  text-align: center;
  pointer-events: none;
}

/* city label under the pin (country zoom only) */
.satyam-map-marker__label {
  position: absolute;
  left: 0;
  top: 3px;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 500 13px/1.2 var(--font-body, "Inter", system-ui, sans-serif);
  color: #3E3630;
  text-shadow: 0 0 2px var(--map-bg), 0 0 3px var(--map-bg), 0 0 4px var(--map-bg);
  pointer-events: none;
}
@media (max-width: 599px) {
  .satyam-map-marker__label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .satyam-map-pin, .satyam-map-pin__body { transition: none; }
}

/* ---------- info window (overrides Google's bubble chrome) ---------- */
.satyam-map .gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px;
  border: 1px solid var(--map-border);
  box-shadow: 0 8px 24px rgba(28, 22, 19, .14);
}
.satyam-map .gm-style .gm-style-iw-d { overflow: auto !important; padding: 0 16px 16px; }
.satyam-map .gm-style .gm-style-iw-ch { padding-top: 14px; padding-left: 16px; }
.satyam-map .gm-style .gm-style-iw-chr { align-items: flex-start; }
.satyam-map .gm-style .gm-style-iw-chr button { width: 36px !important; height: 36px !important; }
.satyam-map .gm-style .gm-style-iw-chr button span { margin: 8px !important; width: 18px !important; height: 18px !important; background-color: var(--text-muted, #6E6459) !important; }
.satyam-map .gm-style .gm-style-iw-tc::after { box-shadow: none; }

.satyam-map-iw__name {
  margin: 0;
  font-family: var(--font-heading, "Anton", Impact, sans-serif);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--text-primary, #1C1613);
}
.satyam-map-iw { font-family: var(--font-body, "Inter", system-ui, sans-serif); font-size: 13px; line-height: 1.45; color: var(--text-muted, #6E6459); min-width: 200px; }
.satyam-map-iw p { margin: 0; }
.satyam-map-iw__head p { margin: 0 0 2px; }
.satyam-map-iw__city {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent, #B5121B);
}
.satyam-map-iw__address { color: var(--text-primary, #1C1613); }
.satyam-map-iw__status { display: flex; align-items: center; gap: 6px; margin-top: 6px !important; font-size: 12px; }
.satyam-map-iw__dot { width: 7px; height: 7px; border-radius: 50%; background: #A69C90; flex: none; }
.satyam-map-iw__status.is-open { color: #2E7D46; }
.satyam-map-iw__status.is-open .satyam-map-iw__dot { background: #2EA155; }
.satyam-map-iw__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 12px !important;
  padding-top: 10px;
  border-top: 1px solid var(--map-border);
}
.satyam-map-iw__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1C1613);
  text-decoration: none;
}
.satyam-map-iw__link--primary { color: var(--accent, #B5121B); }
.satyam-map-iw__link:hover { text-decoration: underline; text-underline-offset: 2px; }
.satyam-map-iw__link:focus-visible { outline: 2px solid var(--accent, #B5121B); outline-offset: 2px; border-radius: 2px; }

/* ---------- fallback (API failed / key rejected) ---------- */
.satyam-map.is-failed {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .55), transparent 55%),
    var(--surface, #F8F4EE);
}
.satyam-map-fallback {
  max-width: 340px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted, #6E6459);
  font-size: 14px;
  line-height: 1.5;
}
.satyam-map-fallback p { margin: 0; }
.satyam-map-fallback__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--bg, #FFFFFF);
  border: 1px solid var(--map-border);
  color: var(--accent, #B5121B);
}
.satyam-map-fallback__title {
  margin-bottom: 4px !important;
  font-family: var(--font-heading, "Anton", Impact, sans-serif);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--text-primary, #1C1613);
}
.satyam-map-fallback__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 14px !important; }
.satyam-map-fallback__link { font-weight: 600; color: var(--accent, #B5121B); text-decoration: none; }
.satyam-map-fallback__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.satyam-map-fallback__link:focus-visible { outline: 2px solid var(--accent, #B5121B); outline-offset: 2px; border-radius: 2px; }
