.mypoi-map-shell {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 8px 30px rgb(15 23 42 / 12%);
}

.mypoi-map {
  width: 100%;
  min-height: 320px;
}

.mypoi-map.has-error {
  display: grid;
  place-items: center;
  background: #f8fafc;
}

.mypoi-map-status {
  position: absolute;
  left: 12px;
  bottom: 24px;
  z-index: 2;
  max-width: calc(100% - 140px);
  padding: 7px 10px;
  border-radius: 7px;
  color: #0f172a;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 1px 6px rgb(15 23 42 / 20%);
  font: 500 12px/1.3 system-ui, sans-serif;
}

.mypoi-map-status.is-ready {
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease 2s;
}

.mypoi-map-status.is-error {
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%);
  color: #991b1b;
  background: #fef2f2;
}

.mypoi-popup {
  width: min(400px, 72vw);
  color: #1e293b;
  font: 14px/1.5 system-ui, sans-serif;
}

.mypoi-popup h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.25;
}

.mypoi-popup-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mypoi-popup-gallery img {
  display: block;
  width: 100%;
  height: 128px;
  border-radius: 6px;
  object-fit: cover;
}

.mypoi-popup-gallery a {
  display: block;
  cursor: zoom-in;
}

body.mypoi-lightbox-open { overflow: hidden; }

.mypoi-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-columns: minmax(48px, 1fr) minmax(0, auto) minmax(48px, 1fr);
  place-items: center;
  padding: 28px 18px;
  background: rgb(2 6 23 / 92%);
}

.mypoi-lightbox[hidden] { display: none !important; }

.mypoi-lightbox-figure {
  grid-column: 2;
  max-width: min(1200px, 82vw);
  margin: 0;
  text-align: center;
}

.mypoi-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  margin: auto;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgb(0 0 0 / 50%);
  object-fit: contain;
}

.mypoi-lightbox-caption {
  margin-top: 10px;
  color: #fff;
  font: 500 14px/1.4 system-ui, sans-serif;
}

.mypoi-lightbox-close,
.mypoi-lightbox-nav {
  border: 0;
  color: #fff;
  background: rgb(255 255 255 / 12%);
  cursor: pointer;
  line-height: 1;
}

.mypoi-lightbox-close:hover,
.mypoi-lightbox-close:focus-visible,
.mypoi-lightbox-nav:hover,
.mypoi-lightbox-nav:focus-visible { background: rgb(255 255 255 / 25%); }

.mypoi-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 34px;
}

.mypoi-lightbox-nav {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  font-size: 42px;
}

.mypoi-lightbox-previous { justify-self: end; }
.mypoi-lightbox-next { justify-self: start; }

.mypoi-popup-description > :first-child { margin-top: 0; }
.mypoi-popup-description > :last-child { margin-bottom: 0; }

.mypoi-popup-address {
  margin: 12px 0;
  padding-left: 20px;
  background: linear-gradient(#2563eb, #2563eb) 4px 5px / 8px 8px no-repeat;
}

.mypoi-popup-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  margin: 12px 0;
  font-size: 12px;
}

.mypoi-popup-meta dt { font-weight: 700; }
.mypoi-popup-meta dd { margin: 0; }

.mypoi-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.mypoi-popup-button {
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff !important;
  background: #2563eb;
  text-decoration: none !important;
  font-weight: 650;
}

@media (max-width: 600px) {
  .mypoi-map-shell { border-radius: 0; }
  .mypoi-popup { width: 68vw; }
  .mypoi-popup-gallery { grid-template-columns: 1fr; }
  .mypoi-lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding-inline: 6px; }
  .mypoi-lightbox-figure { max-width: 100%; }
  .mypoi-lightbox-nav { width: 40px; height: 56px; }
}
