.ptz-map-intro {
  max-width: 1068px;
  margin: 32px auto;
  text-align: center;
}

.ptz-map-intro h3 {
  margin: 0 0 12px;
  font-family: Oswald, sans-serif;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
}

.ptz-map-intro p {
  margin: 0;
  color: #222;
  font-size: 15px;
  line-height: 1.6;
}

.ptz-map-intro a {
  color: #008cba;
}

.ptz-map-shell {
  position: relative;
  width: 100%;
  min-height: 640px;
}

.ptz-map {
  width: 100%;
  min-height: 640px;
  background: #f2f2f2;
}

.ptz-map-status {
  position: absolute;
  inset: 16px auto auto 16px;
  z-index: 2;
  max-width: min(320px, calc(100% - 32px));
  padding: 10px 12px;
  border: 1px solid #d8d8d8;
  background: #fff;
  color: #222;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ptz-map-status:empty,
.ptz-map-status[hidden] {
  display: none;
}

.ptz-map-status.is-error {
  border-color: #b3261e;
  color: #b3261e;
}

.ptz-map-legend {
  min-width: 230px;
  max-width: 300px;
  margin: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  background: #fff;
  color: #222;
  font-size: 14px;
  line-height: 1.35;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.ptz-map-legend__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.ptz-map-legend__header h3 {
  margin: 0;
  font-family: Oswald, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.ptz-map-legend__toggle {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: #efefef;
  color: #444;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ptz-map-legend__toggle:hover,
.ptz-map-legend__toggle:focus {
  color: #006fb8;
}

.ptz-map-legend__content {
  display: grid;
  gap: 7px;
}

.ptz-map-legend__row {
  display: grid;
  grid-template-columns: 18px 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #008cba;
  cursor: pointer;
}

.ptz-map-legend__row--all {
  grid-template-columns: 18px minmax(0, 1fr);
  margin-top: 4px;
  color: #222;
}

.ptz-map-legend__row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ptz-map-legend__row span {
  overflow-wrap: anywhere;
}

.ptz-map-legend__row strong {
  color: #f28c00;
  font-weight: 700;
}

.ptz-map-legend__row strong.is-muted {
  color: #999;
  text-decoration: line-through;
}

.ptz-map-popup {
  max-width: min(640px, 78vw);
  color: #222;
}

.ptz-map-popup h3 {
  margin: 0 0 16px;
  font-family: Oswald, sans-serif;
  font-size: 24px;
  line-height: 1.15;
}

.ptz-map-popup__main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ptz-map-popup__image {
  flex: 0 0 50%;
  max-width: 50%;
  height: auto;
  display: block;
}

.ptz-map-popup__details {
  flex: 1;
  min-width: 0;
}

.ptz-map-popup__details p {
  margin: 10px 0;
  white-space: pre-line;
}

.ptz-map-popup__address {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #111;
  text-decoration: none;
}

.ptz-map-popup__address img {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.ptz-map-popup__address span span,
.ptz-map-popup__address strong {
  display: block;
}

.ptz-map-popup__more {
  color: #008cba;
  font-weight: 700;
  text-decoration: none;
}

.ptz-map-popup__more:hover,
.ptz-map-popup__more:focus {
  text-decoration: underline;
}

.ptz-map-popup__gallery {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ptz-map-popup__gallery img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .ptz-map-shell,
  .ptz-map {
    min-height: 560px;
  }

  .ptz-map-intro {
    margin: 24px auto;
  }

  .ptz-map-intro h3 {
    font-size: 24px;
  }

  .ptz-map-legend {
    max-width: calc(100vw - 20px);
    font-size: 13px;
  }

  .ptz-map-popup {
    max-width: 82vw;
  }

  .ptz-map-popup__main {
    display: block;
  }

  .ptz-map-popup__image {
    max-width: 100%;
    margin-bottom: 10px;
  }
}
