/*!
 * Mapa SKC/PZC - arkusz stylów mapy dekanatów.
 * Wykonanie: Matenet dla Caritas Archidiecezji Poznańskiej.
 * Wszelkie prawa zastrzeżone. Kopiowanie, przerabianie i wdrażanie
 * na innych witrynach wymaga pisemnej zgody autora.
 */
.mapa-dekanatow-showcase,
.mapa-dekanatow-admin,
.mapa-dekanatow-tooltip,
.mapa-dekanatow-region-tip {
  --caritas-red: var(--color-red, #b00009);
  --caritas-red-dark: var(--color-red-dark, #8b0000);
  --caritas-red-light: var(--color-red-light, #cd665c);
  --ink: var(--text, #222222);
  --muted: var(--text-muted, #666666);
  --md-surface: var(--surface, #ffffff);
  --md-surface-2: var(--surface-2, #f5f5f5);
  --md-border: var(--border, #e3e3e3);
  --md-hairline: rgba(17, 17, 17, .07);
  --md-stage-tint: rgba(176, 0, 9, .035);
  --md-font: var(--font-main, inherit);
  --md-tooltip-bg: var(--tooltip-bg, #222222);
  --md-tooltip-fg: var(--tooltip-fg, #ffffff);
  --md-accent: var(--caritas-red);
  --md-accent-dark: var(--caritas-red-dark);

  --md-region: #edc3c0;
  --md-region-line: var(--surface, #ffffff);
  --md-region-1: #ecc6cb;
  --md-region-2: #eed4d3;
  --md-region-3: #e9ced6;
  --md-region-4: #ebb7b9;
  --md-region-5: #ecdae2;
  --md-city-1: #e298a1;
  --md-city-2: #e2a9a7;
  --md-city-3: #dba3b4;
  --md-city-4: #e1898c;
  --md-city-5: #dcb2c4;
  --md-neighbor-line: #d3a19d;
  --md-sign: var(--text-muted, #666666);

  --pzc-color: var(--color-red, #b00009);
  --skc-color: var(--color-red-light, #cd665c);
  --md-pin-line: #ffffff;

  --md-flag-bg: #fdf1f0;
  --md-flag-line: #e7bcb8;
}

:root[data-theme="dark"] .mapa-dekanatow-showcase,
:root[data-theme="dark"] .mapa-dekanatow-admin,
:root[data-theme="dark"] .mapa-dekanatow-tooltip,
:root[data-theme="dark"] .mapa-dekanatow-region-tip {
  --md-hairline: rgba(255, 255, 255, .12);
  --md-accent: var(--accent-text, #ff9a90);
  --md-accent-dark: var(--accent-text-hover, #ffc2bb);
  --md-stage-tint: rgba(255, 154, 144, .05);
  --md-region: #6b2b28;
  --md-region-line: #2b0a0a;
  --md-region-1: #683138;
  --md-region-2: #6c3937;
  --md-region-3: #653946;
  --md-region-4: #642b2d;
  --md-region-5: #684051;
  --md-city-1: #8b3c46;
  --md-city-2: #8e4543;
  --md-city-3: #874559;
  --md-city-4: #883538;
  --md-city-5: #894d67;
  --md-neighbor-line: #a05f59;
  --md-sign: #b9a5a3;
  --pzc-color: #ff9a90;
  --skc-color: #d9695f;
  --md-pin-line: #2b0a0a;
  --md-flag-bg: #4a1a18;
  --md-flag-line: #7b3330;
}

:root[data-contrast="high"] .mapa-dekanatow-showcase,
:root[data-contrast="high"] .mapa-dekanatow-admin,
:root[data-contrast="high"] .mapa-dekanatow-tooltip,
:root[data-contrast="high"] .mapa-dekanatow-region-tip {
  --md-hairline: #ffff00;
  --md-accent: #ffff00;
  --md-accent-dark: #ffff00;
  --md-stage-tint: transparent;
  --md-region: #000000;
  --md-region-line: #ffff00;
  --md-neighbor-line: #ffff00;
  --md-sign: #ffff00;
  --pzc-color: #ffff00;
  --skc-color: #ffffff;
  --md-pin-line: #000000;
  --md-flag-bg: #000000;
  --md-flag-line: #ffff00;
}

.mapa-dekanatow-showcase.mapa-dekanatow-showcase :is(h1, h2, h3, h4, p, ul, ol, li, figure) {
  margin: 0;
}

.mapa-dekanatow-showcase.mapa-dekanatow-showcase .mapa-dekanatow-showcase__kicker {
  margin: 0 0 6px;
}

.mapa-dekanatow-showcase.mapa-dekanatow-showcase .mapa-dekanatow-showcase__subtitle {
  margin: 6px 0 0;
}

.mapa-dekanatow-showcase.mapa-dekanatow-showcase .mapa-dekanatow-search__results {
  margin: 8px 0 0;
}

.mapa-dekanatow-showcase {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  font-family: var(--md-font);
  color: var(--ink);
  background: var(--md-surface);
  border-radius: 14px;
  padding: 8px 0 0;
}

.mapa-dekanatow-showcase__header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--md-border);
  margin-bottom: 18px;
}

.mapa-dekanatow-showcase__header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--caritas-red);
}

.mapa-dekanatow-showcase__heading {
  min-width: 0;
}

.mapa-dekanatow-showcase__kicker {
  margin: 0 0 6px;
  font-family: var(--md-font);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--accent-text, var(--caritas-red));
  opacity: 0;
  animation: mdFadeIn .6s ease forwards;
}

.mapa-dekanatow-showcase__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--md-font);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  opacity: 0;
  animation: mdFadeIn .6s ease forwards;
}

.mapa-dekanatow-showcase__subtitle {
  margin: 6px 0 0;
  max-width: 56ch;
  font-family: var(--md-font);
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  opacity: 0;
  animation: mdFadeIn .6s ease .1s forwards;
}

.mapa-dekanatow-showcase__toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-self: flex-end;
  margin-bottom: 2px;
  border: 1px solid var(--md-border);
  border-radius: 24px;
  padding: 3px;
  background: var(--md-surface-2);
  opacity: 0;
  animation: mdFadeIn .6s ease .15s forwards;
}

.mapa-dekanatow-showcase__toggle-btn {
  border: 0;
  background: transparent;
  border-radius: 24px;
  padding: 9px 22px;
  font-family: var(--md-font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.mapa-dekanatow-showcase__toggle-btn:hover {
  color: var(--md-accent);
}

.mapa-dekanatow-showcase__toggle-btn.is-active {
  background: var(--caritas-red);
  color: var(--color-white, #ffffff);
}

.mapa-dekanatow-showcase__toggle-btn.is-active:hover {
  background: var(--caritas-red-dark);
  color: var(--color-white, #ffffff);
}

:root[data-contrast="high"] .mapa-dekanatow-showcase__toggle-btn.is-active {
  background: #ffff00;
  color: #000000;
}

.mapa-dekanatow-showcase__map-head {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  opacity: .26;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.mapa-dekanatow-showcase__map-logo {
  display: block;
  width: auto;
  height: 96px;
  max-width: 100%;
}

@media (max-width: 768px) {
  .mapa-dekanatow-showcase__map-logo {
    height: 64px;
  }
}

:root[data-contrast="high"] .mapa-dekanatow-showcase__map-head {
  display: none;
}

.mapa-dekanatow-showcase__map-sign {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .5em;
  margin: 0;
  font-family: var(--md-font);
  font-size: 12px;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
  color: var(--md-sign);
  opacity: .75;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.mapa-dekanatow-showcase__map-sign-logo {
  display: block;
  flex: 0 0 auto;
  width: 37px;
  height: 12px;
  color: currentColor;
}

.mapa-dekanatow-showcase__map-sign-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.mapa-dekanatow-showcase__map-sign-link::after {
  content: "";
  position: absolute;
  inset: -8px -6px;
}

.mapa-dekanatow-showcase__map-sign-copy {
  margin-left: -.15em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .mapa-dekanatow-showcase__map-sign {
    gap: .45em;
    font-size: 9px;
  }
  .mapa-dekanatow-showcase__map-sign-logo {
    width: 28px;
    height: 9px;
  }
}

:root[data-contrast="high"] .mapa-dekanatow-showcase__map-sign {
  font-size: 13px;
  opacity: 1;
}

:root[data-contrast="high"] .mapa-dekanatow-showcase__map-sign-logo {
  width: 40px;
  height: 13px;
}

.mapa-dekanatow-showcase__map {
  position: relative;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-18px);
  animation: mdFadeInDown .7s ease-out .1s forwards;
}

.mapa-dekanatow-showcase__tools {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  opacity: 0;
  animation: mdFadeIn .6s ease .12s forwards;
}

.mapa-dekanatow-showcase__tools [hidden] {
  display: none;
}

.mapa-dekanatow-search {
  position: relative;
}

.mapa-dekanatow-search__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--md-border);
  border-radius: 24px;
  padding: 8px 16px 8px 12px;
  background: var(--md-surface-2);
  font-family: var(--md-font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.mapa-dekanatow-search__btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mapa-dekanatow-search__btn:hover,
.mapa-dekanatow-search__btn.is-active {
  color: var(--md-accent);
  border-color: var(--md-accent);
}

.mapa-dekanatow-search__panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--md-border);
  border-radius: 12px;
  padding: 8px;
  background: var(--md-surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
}

.mapa-dekanatow-search__input {
  width: 100%;
  border: 1px solid var(--md-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--md-font);
  font-size: .875rem;
  color: var(--ink);
  background: var(--md-surface);
}

.mapa-dekanatow-search__results {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 300px;
  overflow: auto;
}

.mapa-dekanatow-search__results li.is-empty {
  padding: 8px 6px;
  font-size: .8125rem;
  color: var(--muted);
}

.mapa-dekanatow-search__results button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: transparent;
  font-family: var(--md-font);
  text-align: left;
  cursor: pointer;
}

.mapa-dekanatow-search__results button:hover,
.mapa-dekanatow-search__results button:focus-visible {
  background: var(--md-flag-bg);
}

.mapa-dekanatow-search__label {
  display: grid;
  min-width: 0;
}

.mapa-dekanatow-search__label strong {
  font-size: .875rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-dekanatow-search__label small {
  font-size: .75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-dekanatow-showcase__region select {
  border: 1px solid var(--md-border);
  border-radius: 24px;
  padding: 8px 14px;
  background: var(--md-surface-2);
  font-family: var(--md-font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  max-width: min(300px, calc(100vw - 40px));
  cursor: pointer;
}

.mapa-dekanatow-showcase__region select:hover {
  color: var(--md-accent);
  border-color: var(--md-accent);
}

@supports (appearance: base-select) {
  .mapa-dekanatow-showcase__region select,
  .mapa-dekanatow-showcase__region select::picker(select) {
    appearance: base-select;
  }

  .mapa-dekanatow-showcase__region select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color .2s ease, border-color .2s ease;
  }

  .mapa-dekanatow-showcase__region select::picker-icon {
    color: currentColor;
    transition: transform .2s ease;
  }

  .mapa-dekanatow-showcase__region select:open::picker-icon {
    transform: rotate(180deg);
  }

  .mapa-dekanatow-showcase__region select::picker(select) {
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--md-border);
    border-radius: 16px;
    background: var(--md-surface);
    box-shadow: 0 18px 40px rgba(17, 17, 17, .16);
    max-height: min(60vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mapa-dekanatow-showcase__region option {
    padding: 7px 12px;
    border-radius: 12px;
    font-family: var(--md-font);
    font-size: .875rem;
    color: var(--ink);
    cursor: pointer;
  }

  .mapa-dekanatow-showcase__region option::checkmark {
    display: none;
  }

  .mapa-dekanatow-showcase__region option:hover,
  .mapa-dekanatow-showcase__region option:focus {
    background: var(--md-surface-2);
    color: var(--md-accent);
    outline: none;
  }

  .mapa-dekanatow-showcase__region option:checked {
    background: var(--caritas-red);
    color: #fff;
  }

  .mapa-dekanatow-showcase__region optgroup::legend {
    padding: 10px 12px 4px;
    font-family: var(--md-font);
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
  }
}

.mapa-dekanatow-showcase__city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--md-border);
  border-radius: 24px;
  padding: 8px 16px;
  background: var(--md-surface-2);
  font-family: var(--md-font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.mapa-dekanatow-showcase__city:hover {
  color: var(--md-accent);
  border-color: var(--md-accent);
}

.mapa-dekanatow-showcase__reset {
  border: 1px solid var(--caritas-red);
  border-radius: 24px;
  padding: 8px 16px;
  background: var(--caritas-red);
  font-family: var(--md-font);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-white, #ffffff);
  cursor: pointer;
}

.mapa-dekanatow-showcase__reset:hover {
  background: var(--caritas-red-dark);
}

:root[data-contrast="high"] .mapa-dekanatow-showcase__reset {
  background: #ffff00;
  border-color: #ffff00;
  color: #000000;
}

.mapa-dekanatow-showcase .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.mapa-dekanatow-showcase__map > svg {
  --md-map-cap: min(68vh, 775px);
  width: min(100%, calc(var(--md-map-cap) * var(--md-map-ratio, .707)));
  height: auto;
  background: none;
  margin: 0 auto;
  display: block;
}

.mapa-dekanatow-coin {
  position: relative;
  z-index: 6;
  perspective: 1400px;
  margin: 0 0 6px;
  transition: height .7s cubic-bezier(.6, .02, .28, 1);
  opacity: 0;
  animation: mdCoinIn .7s cubic-bezier(.22, .61, .36, 1) .05s forwards;
}

@keyframes mdCoinIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.mapa-dekanatow-coin__inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.6, .02, .28, 1);
}

.mapa-dekanatow-coin.is-flipped .mapa-dekanatow-coin__inner {
  transform: rotateX(-180deg);
}

.mapa-dekanatow-coin__face {
  grid-area: 1 / 1;
  min-width: 0;
  align-self: start;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  visibility: hidden;
  transition: visibility 0s linear .35s;
}

.mapa-dekanatow-coin__face--cover {
  visibility: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 14px;
}

.mapa-dekanatow-coin__face--tools {
  transform: rotateX(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mapa-dekanatow-coin.is-flipped .mapa-dekanatow-coin__face--cover {
  visibility: hidden;
}

.mapa-dekanatow-coin.is-flipped .mapa-dekanatow-coin__face--tools {
  visibility: visible;
}

.mapa-dekanatow-coin__face--tools .mapa-dekanatow-showcase__tools {
  margin-bottom: 0;
}

.mapa-dekanatow-coin__hero {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--md-font);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}

.mapa-dekanatow-coin__hero-text {
  text-decoration: none;
}

.mapa-dekanatow-coin__hero:focus-visible {
  outline: 3px solid var(--md-accent);
  outline-offset: 6px;
  border-radius: 4px;
}

.mapa-dekanatow-coin__count {
  font-size: 1.25em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--md-accent);
}

@media (prefers-reduced-motion: reduce) {
  .mapa-dekanatow-coin,
  .mapa-dekanatow-coin__inner {
    animation: none;
    transition: none;
    opacity: 1;
  }
}

.mapa-dekanatow-showcase__stage {
  --md-stage-h: min(56vh, 625px);
  box-sizing: border-box;
  background: var(--md-stage-tint);
  border-radius: 16px;
  padding: 14px 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (min-width: 760px) {
  .mapa-dekanatow-showcase__stage.is-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (min-width: 900px) {
  .mapa-dekanatow-showcase__stage.is-split {
    width: min(1475px, calc(100vw - 24px));
    max-width: min(1475px, calc(100vw - 24px));
    margin-left: calc(50% - min(737px, 50vw - 12px));
  }
}

.mapa-dekanatow-showcase__stage.is-split.is-wide {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, .78fr);
}

.mapa-dekanatow-showcase__stage.is-split .mapa-dekanatow-showcase__list {
  grid-column: 1 / -1;
}

.mapa-dekanatow-showcase__stage.is-split.is-wide .mapa-dekanatow-showcase__list {
  grid-column: auto;
}

@media (min-width: 760px) {
  .mapa-dekanatow-showcase__stage.is-split > .mapa-dekanatow-showcase__detail,
  .mapa-dekanatow-showcase__stage.is-split.is-wide > .mapa-dekanatow-showcase__list {
    border-left: 1px solid var(--md-hairline);
    padding-left: 16px;
    align-self: stretch;
  }
}

.mapa-dekanatow-showcase__stage.is-split .mapa-dekanatow-showcase__map > svg {
  --md-map-cap: var(--md-stage-h);
  animation: mdMapAside .5s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes mdMapAside {
  from { transform: translateX(6%) scale(1.03); }
  to { transform: none; }
}

.mapa-dekanatow-showcase__detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}

.mapa-dekanatow-showcase__detail[hidden] {
  display: none;
}

.mapa-dekanatow-showcase__detail.is-in {
  animation: mdDetailIn .5s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes mdDetailIn {
  from { opacity: 0; transform: translateX(40px) scale(.95); }
  to { opacity: 1; transform: none; }
}

.mapa-dekanatow-showcase__detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mapa-dekanatow-showcase__detail-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mapa-dekanatow-showcase__detail-kicker {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--md-accent);
}

.mapa-dekanatow-showcase__detail-titles strong {
  font-family: var(--md-font);
  font-size: 1.125rem;
  line-height: 1.25;
  color: var(--md-text);
}

.mapa-dekanatow-showcase__detail-titles small {
  font-size: .8125rem;
  color: var(--muted);
}

.mapa-dekanatow-showcase__detail-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--md-border);
  border-radius: 50%;
  background: var(--md-surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.mapa-dekanatow-showcase__detail-close:hover {
  color: var(--md-accent);
  border-color: var(--md-accent);
}

.mapa-dekanatow-showcase__detail-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mapa-dekanatow-showcase__detail-map {
  height: calc(var(--md-stage-h) - 54px);
  width: min(100%, calc((var(--md-stage-h) - 54px) * var(--md-map-ratio, .707)));
  margin: 0 auto;
}

.mapa-dekanatow-showcase__detail-map svg {
  display: block;
  width: 100%;
  height: 100%;
  background: none;
}

.mapa-dekanatow-showcase__detail-map path[data-md-id] {
  display: block !important;
  fill: none !important;
  stroke: var(--md-neighbor-line) !important;
  stroke-width: 1.1 !important;
  vector-effect: non-scaling-stroke;
  opacity: .55;
  pointer-events: none;
}

.mapa-dekanatow-showcase__detail-map path[data-md-id].is-focused {
  display: block !important;
  pointer-events: auto;
  vector-effect: non-scaling-stroke;
  transition: fill .2s ease;
  fill: var(--caritas-red-light) !important;
  stroke: var(--caritas-red-dark) !important;
  stroke-width: 2 !important;
  opacity: 1;
}

.mapa-dekanatow-showcase__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mapa-dekanatow-showcase__list[hidden] {
  display: none;
}

.mapa-dekanatow-showcase__list-kicker {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--md-accent);
}

.mapa-dekanatow-showcase__list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: var(--md-stage-h, min(62vh, 700px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mapa-dekanatow-showcase__list-items li + li {
  border-top: 1px solid var(--md-hairline);
}

.mapa-dekanatow-showcase__list-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 7px 4px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  border-radius: 6px;
  transition: background-color .15s ease;
}

.mapa-dekanatow-showcase__list-item:hover,
.mapa-dekanatow-showcase__list-item:focus-visible {
  background: var(--md-surface-2);
}

.mapa-dekanatow-showcase__list-item:focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: -2px;
}

.mapa-dekanatow-showcase__list-item strong {
  font-size: .875rem;
  line-height: 1.25;
  color: var(--md-text);
}

.mapa-dekanatow-showcase__list-item small {
  font-size: .75rem;
  line-height: 1.3;
  color: var(--muted);
}

.mapa-dekanatow-showcase__list-empty {
  margin: 0;
  font-size: .8125rem;
  color: var(--muted);
}

.mapa-dekanatow-showcase__detail-map.is-drillable path[data-md-id].is-focused {
  cursor: pointer;
}

.mapa-dekanatow-showcase__detail-map.is-drillable path[data-md-id].is-focused:hover {
  fill: var(--caritas-red) !important;
}

.mapa-dekanatow-showcase__map path[id] {
  fill: var(--md-region);
  stroke: var(--md-region-line);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  transition: fill .2s ease, opacity .3s ease;
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone="1"] {
  fill: var(--md-region-1);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone="2"] {
  fill: var(--md-region-2);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone="3"] {
  fill: var(--md-region-3);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone="4"] {
  fill: var(--md-region-4);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone="5"] {
  fill: var(--md-region-5);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-city][data-md-tone="1"] {
  fill: var(--md-city-1);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-city][data-md-tone="2"] {
  fill: var(--md-city-2);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-city][data-md-tone="3"] {
  fill: var(--md-city-3);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-city][data-md-tone="4"] {
  fill: var(--md-city-4);
}

:is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-city][data-md-tone="5"] {
  fill: var(--md-city-5);
}

:root[data-contrast="high"] :is(.mapa-dekanatow-showcase__map, .mapa-dekanatow-admin__map) path[data-md-tone] {
  fill: var(--md-region);
}

.mapa-dekanatow-showcase__map path[id^="dekanat-"],
.mapa-dekanatow-showcase__map path[id^="poznan-"] {
  cursor: pointer;
}

.mapa-dekanatow-showcase[data-tools="0"] .mapa-dekanatow-showcase__map path[id] {
  cursor: default;
}

.mapa-dekanatow-showcase[data-tools="0"] .mapa-dekanatow-showcase__map path[id^="dekanat-"]:hover,
.mapa-dekanatow-showcase[data-tools="0"] .mapa-dekanatow-showcase__map path[id^="poznan-"]:hover {
  fill: var(--md-region) !important;
}

.mapa-dekanatow-showcase__map path[id^="dekanat-"]:hover,
.mapa-dekanatow-showcase__map path[id^="poznan-"]:hover {
  fill: var(--caritas-red-light) !important;
}

.mapa-dekanatow-showcase__map.is-region-focused path[id]:not(.is-focused) {
  opacity: .35;
}

.mapa-dekanatow-showcase__map path[id].is-focused {
  fill: var(--caritas-red-light) !important;
  stroke: var(--caritas-red-dark) !important;
  stroke-width: 2 !important;
}

.mapa-dekanatow-markers .marker-pin {
  stroke: var(--md-pin-line);
  stroke-width: 1;
}

.mapa-dekanatow-markers .marker-type-skc .marker-pin {
  fill: var(--skc-color);
}

.mapa-dekanatow-markers .marker-type-pzc .marker-pin {
  fill: var(--pzc-color);
}

.mapa-dekanatow-markers .marker-hole {
  fill: var(--md-pin-line);
  pointer-events: none;
}

.mapa-dekanatow-markers .marker-hit {
  fill: transparent;
  stroke: none;
  pointer-events: none;
}

@media (pointer: coarse) {
  .mapa-dekanatow-markers .marker-hit {
    pointer-events: all;
  }
}

.mapa-dekanatow-showcase__map > svg.is-zoomed {
  touch-action: none;
}

.mapa-dekanatow-markers .marker-wrap {
  cursor: pointer;
}

.mapa-dekanatow-markers .marker-inner {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform .18s ease;
}

.mapa-dekanatow-markers .marker-wrap:hover .marker-inner {
  transform: scale(1.28);
}

.mapa-dekanatow-markers .marker-wrap:hover .marker-pin {
  stroke-width: 1.6;
}

.mapa-dekanatow-markers .marker-wrap.is-muted {
  opacity: .22;
  pointer-events: none;
}

.mapa-dekanatow-markers .marker-wrap.is-hot .marker-inner {
  transform: scale(1.35);
}

.mapa-dekanatow-markers .marker-wrap.is-hot .marker-pin {
  stroke-width: 1.6;
}

.mapa-dekanatow-markers .marker-wrap.is-found .marker-inner {
  animation: mdFoundPulse 1s ease-in-out 3;
}

@keyframes mdFoundPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.45); }
}

.mapa-dekanatow-markers .marker-inner.is-intro {
  opacity: 0;
  transform: scale(0);
  animation: mdMarkerPop .42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes mdMarkerPop {
  from {
    opacity: 0;
    transform: scale(0);
  }
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mdFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mdFadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

.mapa-dekanatow-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  will-change: transform;
  z-index: 9999;
  pointer-events: none;
  background: var(--md-tooltip-bg);
  color: var(--md-tooltip-fg);
  font-family: var(--md-font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  border: 1px solid var(--md-tooltip-bg);
  border-radius: 8px;
  padding: 9px 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  max-width: min(340px, calc(100vw - 12px));
  box-sizing: border-box;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 1;
}

.mapa-dekanatow-tooltip__head {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.mapa-dekanatow-tooltip__dekanat {
  color: var(--md-tooltip-fg);
  font-size: 13px;
  font-weight: 400;
}

.mapa-dekanatow-tooltip__badge {
  flex: none;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 5px;
  padding: 0 6px;
  color: #ffffff;
}

.mapa-dekanatow-tooltip__badge.is-pzc {
  background: var(--pzc-color);
}

.mapa-dekanatow-tooltip__badge.is-skc {
  background: var(--skc-color);
}

:root[data-theme="dark"] .mapa-dekanatow-tooltip__badge {
  color: #2b0a0a;
}

:root[data-contrast="high"] .mapa-dekanatow-tooltip__badge {
  color: #000000;
}

.mapa-dekanatow-tooltip__parish {
  color: var(--md-tooltip-fg);
  font-size: 13px;
  font-weight: 400;
}


.mapa-dekanatow-region-tip {
  position: fixed;
  left: 0;
  top: 0;
  will-change: transform, opacity;
  z-index: 9998;
  pointer-events: none;
  background: var(--md-tooltip-bg);
  color: var(--md-tooltip-fg);
  font-family: var(--md-font);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
  border-radius: 7px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  max-width: min(340px, calc(100vw - 12px));
  box-sizing: border-box;
  overflow-wrap: anywhere;
  opacity: 0;
  transition: opacity .22s ease;
}

.mapa-dekanatow-region-tip.is-visible {
  opacity: 1;
}

:root[data-contrast="high"] .mapa-dekanatow-region-tip {
  border: 1px solid var(--md-tooltip-fg);
}

@media (prefers-reduced-motion: reduce) {
  .mapa-dekanatow-region-tip {
    transition: none;
  }
}

.mapa-dekanatow-lead {
  max-width: 70ch;
  color: var(--muted);
}

.mapa-dekanatow-admin {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.mapa-dekanatow-admin__map {
  position: relative;
}

.mapa-dekanatow-admin__map svg {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
  background: var(--md-surface);
  border: 1px solid var(--md-border);
  border-radius: 14px;
  margin: 0 auto;
  touch-action: none;
}

.mapa-dekanatow-admin__map path[id] {
  stroke: var(--md-region-line);
  stroke-width: .8;
}

/* Dekanaty z tonem malują reguły wyżej - tu zostaje tylko awaryjne
   wypełnienie dla kształtu, który tonu nie dostał. */
.mapa-dekanatow-admin__map path[id]:not([data-md-tone]) {
  fill: var(--md-region);
}

/* Przełącznik nad mapą w panelu: decyduje tylko o tym, które pinezki są
   narysowane. Lista obok ma własny filtr, bo służy do czego innego -
   do szukania punktu, także tego jeszcze nieustawionego. */
.mapa-dekanatow-admin__filter {
  display: flex;
  justify-content: center;
  gap: 4px;
  max-width: 760px;
  margin: 0 auto 10px;
  padding: 4px;
  border: 1px solid var(--md-border);
  border-radius: 24px;
  background: var(--md-surface-2);
}

.mapa-dekanatow-admin__filter-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 0;
  background: transparent;
  border-radius: 24px;
  padding: 7px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.mapa-dekanatow-admin__filter-btn:hover {
  color: var(--md-accent);
}

.mapa-dekanatow-admin__filter-btn.is-active {
  background: var(--caritas-red);
  color: #ffffff;
}

.mapa-dekanatow-admin__filter-btn.is-active:hover {
  background: var(--caritas-red-dark);
  color: #ffffff;
}

.mapa-dekanatow-admin__filter-count {
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  opacity: .7;
}

:root[data-contrast="high"] .mapa-dekanatow-admin__filter-btn.is-active {
  background: #ffff00;
  color: #000000;
}

.mapa-dekanatow-admin__maphint {
  display: none;
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--md-flag-bg);
  border: 1px solid var(--md-flag-line);
  color: var(--md-accent-dark);
  font-weight: 600;
  font-size: 13px;
}

.mapa-dekanatow-admin__maphint.is-visible {
  display: block;
}

.mapa-dekanatow-admin__map .marker-wrap {
  cursor: grab;
}

.mapa-dekanatow-admin__map .marker-wrap.is-dragging {
  cursor: grabbing;
}

.mapa-dekanatow-admin__map .marker-wrap.is-dragging .marker-inner {
  transform: scale(1.2);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.mapa-dekanatow-admin__map .marker-wrap.is-selected .marker-inner {
  animation: mdSelectedPulse 1.2s ease-in-out infinite;
}

@keyframes mdSelectedPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(176, 0, 9, 0)); }
  50% { filter: drop-shadow(0 0 7px rgba(176, 0, 9, 0.75)); }
}

.mapa-dekanatow-admin__side {
  display: grid;
  gap: 14px;
}

.mapa-dekanatow-card {
  border: 1px solid var(--md-border);
  border-radius: 14px;
  padding: 14px;
  background: var(--md-surface);
}

.mapa-dekanatow-card h2,
.mapa-dekanatow-card summary {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--md-accent-dark);
}

.mapa-dekanatow-card summary {
  cursor: pointer;
  margin: 0;
}

.mapa-dekanatow-import[open] summary {
  margin-bottom: 10px;
}

.mapa-dekanatow-hero label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.mapa-dekanatow-hero input[type="text"] {
  width: 100%;
  border: 1px solid var(--md-border);
  border-radius: 8px;
  padding: 7px 8px;
  font-weight: 400;
}

.mapa-dekanatow-hero__preview {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--md-surface-2);
  line-height: 1.35;
}

.mapa-dekanatow-hero__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.mapa-dekanatow-hero__preview strong {
  color: var(--md-text);
}

.mapa-dekanatow-form {
  display: grid;
  gap: 9px;
}

.mapa-dekanatow-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  display: grid;
  gap: 4px;
}

.mapa-dekanatow-form input[type="text"],
.mapa-dekanatow-form select,
.mapa-dekanatow-import textarea,
.mapa-dekanatow-import select,
.mapa-dekanatow-list__tools input,
.mapa-dekanatow-list__tools select {
  width: 100%;
  border: 1px solid var(--md-border);
  border-radius: 8px;
  padding: 7px 8px;
  font-weight: 400;
}

.mapa-dekanatow-form__types {
  display: flex;
  gap: 8px;
}

.mapa-dekanatow-chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--md-border);
  border-radius: 24px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  background: var(--md-surface-2);
}

.mapa-dekanatow-chip input {
  margin: 0;
}

.mapa-dekanatow-chip.is-active {
  border-color: var(--md-accent);
  color: var(--md-accent-dark);
  background: var(--md-flag-bg);
}

.mapa-dekanatow-form__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mapa-dekanatow-form__actions [data-delete-point] {
  margin-left: auto;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}

.mapa-dekanatow-form__actions [data-delete-point][hidden] {
  display: none;
}

.mapa-dekanatow-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.mapa-dekanatow-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--md-accent-dark);
  min-height: 16px;
}

.mapa-dekanatow-import__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.mapa-dekanatow-import textarea {
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
}

.mapa-dekanatow-count {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.mapa-dekanatow-list__tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.mapa-dekanatow-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 520px;
  overflow: auto;
}

.mapa-dekanatow-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--md-border);
  font-size: 13px;
}

.mapa-dekanatow-list li.is-empty {
  display: block;
  color: var(--muted);
  padding: 10px 4px;
}

.mapa-dekanatow-list li.is-unplaced {
  background: var(--md-flag-bg);
}

.mapa-dekanatow-list li.is-placing {
  background: var(--md-flag-bg);
  outline: 2px solid var(--md-accent);
}

.mapa-dekanatow-list__label {
  display: grid;
  min-width: 0;
}

.mapa-dekanatow-list__label strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-dekanatow-list__label small {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapa-dekanatow-list__actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.mapa-dekanatow-list__actions button {
  font-size: 11px;
}

.mapa-dekanatow-badge {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 6px;
  color: #ffffff;
}

.mapa-dekanatow-badge.is-pzc {
  background: var(--pzc-color);
}

.mapa-dekanatow-badge.is-skc {
  background: var(--skc-color);
}

:root[data-theme="dark"] .mapa-dekanatow-badge {
  color: #2b0a0a;
}

:root[data-contrast="high"] .mapa-dekanatow-badge {
  color: #000000;
}

@media (max-width: 1100px) {
  .mapa-dekanatow-admin {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mapa-dekanatow-showcase__header {
    align-items: flex-start;
  }
  .mapa-dekanatow-showcase__heading {
    flex: 1 1 100%;
  }
  .mapa-dekanatow-showcase__toggle {
    align-self: flex-start;
    margin-bottom: 0;
  }
  .mapa-dekanatow-showcase__title {
    font-size: 1.35rem;
  }
  .mapa-dekanatow-showcase__subtitle {
    font-size: .875rem;
  }
  .mapa-dekanatow-showcase__map > svg {
    --md-map-cap: max(320px, calc(100vh - 180px));
  }
  .mapa-dekanatow-showcase__stage {
    --md-stage-h: max(300px, calc(100vh - 260px));
  }
  @supports (height: 100svh) {
    .mapa-dekanatow-showcase__map > svg {
      --md-map-cap: max(320px, calc(100svh - 180px));
    }
    .mapa-dekanatow-showcase__stage {
      --md-stage-h: max(300px, calc(100svh - 260px));
    }
  }
  .mapa-dekanatow-showcase__tools {
    gap: 6px;
  }
  .mapa-dekanatow-search,
  .mapa-dekanatow-showcase__region {
    flex: 1 1 100%;
  }
  .mapa-dekanatow-search__btn,
  .mapa-dekanatow-showcase__region select {
    width: 100%;
    max-width: none;
    justify-content: center;
  }
  .mapa-dekanatow-search__panel {
    width: 100%;
  }
  .mapa-dekanatow-showcase__reset {
    flex: 1 1 100%;
  }
}

@media (max-width: 1024px) {
  .mapa-dekanatow-search__input,
  .mapa-dekanatow-showcase__region select {
    font-size: 1rem;
  }
}
