/* PodoClick public clinic map — Yandex Maps JS API v3. */
.pc-clinic-explorer {
  --pc-map-accent: #0f8f9b;
  --pc-map-ink: #102437;
  --pc-map-muted: #66788a;
  --pc-map-border: #dce8ed;
}

.pc-clinic-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.pc-clinic-viewbar[hidden] { display: none; }

.pc-clinic-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--pc-map-border);
  border-radius: 14px;
  background: #f4f8fa;
}

.pc-clinic-view-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  color: #526779;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  font-weight: 650;
  cursor: pointer;
}

.pc-clinic-view-switch button.is-active {
  color: var(--pc-map-ink);
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 36, 55, .09);
}

.pc-clinic-view-switch button:disabled { opacity: .46; cursor: not-allowed; }
.pc-clinic-view-switch svg,
.pc-clinic-map-locate svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pc-clinic-map-coverage { color: var(--pc-map-muted); font-size: .86rem; }
.pc-clinic-explorer__body { min-width: 0; }

.pc-clinic-map-panel {
  position: relative;
  min-width: 0;
  height: 690px;
  overflow: hidden;
  border: 1px solid var(--pc-map-border);
  border-radius: 24px;
  background: #eaf3f5;
  box-shadow: 0 16px 40px rgba(16, 36, 55, .08);
}

.pc-clinic-map-panel[hidden] { display: none; }
.pc-clinic-map { width: 100%; height: 100%; }

.pc-clinic-map-status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  color: #526779;
  background: rgba(240, 247, 248, .94);
}

.pc-clinic-map-status[hidden] { display: none; }

.pc-clinic-map-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(15, 143, 155, .2);
  border-top-color: var(--pc-map-accent);
  border-radius: 50%;
  animation: pcMapSpin .8s linear infinite;
}

@keyframes pcMapSpin { to { transform: rotate(360deg); } }

.pc-clinic-map-locate {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(16, 36, 55, .12);
  border-radius: 13px;
  color: var(--pc-map-ink);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(16, 36, 55, .12);
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  cursor: pointer;
}

.pc-clinic-map-locate:disabled { opacity: .65; cursor: wait; }

.pc-map-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 16px 16px 16px 5px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(16, 36, 55, .28);
  cursor: pointer;
  transform: rotate(-45deg);
  transform-origin: 8px 38px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pc-map-marker img {
  width: 33px;
  height: 33px;
  object-fit: contain;
  transform: rotate(45deg);
}

.pc-map-marker:hover,
.pc-map-marker:focus-visible,
.pc-map-marker.is-selected {
  z-index: 2;
  box-shadow: 0 9px 28px rgba(15, 143, 155, .42);
  transform: rotate(-45deg) scale(1.12);
}

.pc-map-cluster {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  color: #fff;
  background: var(--pc-map-accent);
  box-shadow: 0 8px 24px rgba(15, 143, 155, .32);
  font: 750 14px/1 system-ui, sans-serif;
  cursor: pointer;
}

.pc-clinic-map-sheet {
  position: absolute;
  right: 16px;
  bottom: 42px;
  z-index: 4;
  width: min(390px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid rgba(16, 36, 55, .1);
  border-radius: 20px;
  color: var(--pc-map-ink);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 42px rgba(16, 36, 55, .2);
  backdrop-filter: blur(12px);
}

.pc-clinic-map-sheet[hidden] { display: none; }
.pc-clinic-map-sheet h3 { margin: 0 34px 6px 0; font-size: 1.03rem; line-height: 1.32; }
.pc-clinic-map-sheet p { margin: 0 0 9px; color: var(--pc-map-muted); font-size: .88rem; line-height: 1.45; }
.pc-clinic-map-sheet__meta { display: flex; gap: 8px; margin-bottom: 13px; color: #526779; font-size: .8rem; }
.pc-clinic-map-sheet__meta span { padding: 5px 8px; border-radius: 9px; background: #f2f7f8; }
.pc-clinic-map-sheet__close { position: absolute; top: 11px; right: 11px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #526779; background: #f2f7f8; font-size: 20px; cursor: pointer; }
.pc-clinic-map-sheet__action { width: 100%; min-height: 43px; border: 0; border-radius: 13px; color: #fff; background: var(--pc-map-accent); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; }
.pc-clinic-map-sheet__action:disabled { color: #7b8995; background: #edf2f4; cursor: default; }

.pc-show-on-map { border: 0; padding: 0; background: transparent; cursor: pointer; font: inherit; }
.pc-public-clinic-card.is-map-selected { border-color: #76cbd1 !important; box-shadow: 0 12px 30px rgba(15, 143, 155, .12) !important; }

@media (min-width: 961px) {
  .pc-clinic-explorer.is-map-view .pc-clinic-explorer__body {
    display: grid;
    grid-template-columns: minmax(340px, .72fr) minmax(520px, 1.28fr);
    gap: 22px;
    align-items: start;
  }

  .pc-clinic-explorer.is-map-view .clinics-list {
    max-height: 690px;
    overflow: auto;
    padding: 0 7px 12px 0;
    scrollbar-width: thin;
  }

  .pc-clinic-explorer.is-map-view .pc-clinics-head { display: block; }
  .pc-clinic-explorer.is-map-view .pc-clinic-sort { margin-top: 12px; }
  .pc-clinic-explorer.is-map-view .clinic-card.pc-public-clinic-card.pc-accordion-card { grid-template-columns: minmax(0, 1fr); }
  .pc-clinic-explorer.is-map-view .pc-accordion-toggle,
  .pc-clinic-explorer.is-map-view .btn-appointment--unavailable { width: 100%; }
  .pc-clinic-explorer.is-map-view .pc-accordion-booking { display: none !important; }
}

@media (max-width: 960px) {
  .pc-clinic-map-panel { height: min(690px, 72vh); min-height: 540px; border-radius: 20px; }
  .pc-clinic-explorer.is-map-view .clinics-list { display: none; }
  .pc-clinic-map-sheet { left: 12px; right: 12px; bottom: 38px; width: auto; padding: 16px; border-radius: 18px; }
}

@media (max-width: 600px) {
  .pc-clinic-viewbar { align-items: stretch; flex-direction: column; gap: 9px; margin-bottom: 13px; }
  .pc-clinic-view-switch { width: 100%; }
  .pc-clinic-view-switch button { min-height: 44px; }
  .pc-clinic-map-coverage { padding-left: 3px; font-size: .8rem; }
  .pc-clinic-map-panel { width: 100%; height: 68vh; min-height: 500px; border-radius: 18px; }
  .pc-clinic-map-locate { top: 10px; right: 10px; width: 43px; padding: 0; justify-content: center; }
  .pc-clinic-map-locate span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-clinic-map-spinner { animation-duration: 1.8s; }
  .pc-map-marker { transition: none; }
}
