html,
body,
#map {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  position: fixed;
}

#map {
  background: rgb(211 211 211 / 100%);
}

table,
th,
td {
  border: 1px solid #ddd;
  border-collapse: collapse;
}

th,
td {
  padding: 5px;
}

.swal2-container {
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}

.swal2-title {
  font-size: 1.25em !important;
}

.swal2-html-container {
  font-size: 1em !important;
}

.info-icon {
  padding: 9px;
}

.info-title {
  padding: 0;
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  color: black;
}

.leaflet-popup-close-button {
  /* display: none; */

  /*
  width: 10px;
  height: 10px;
  top: -5px !important;
  left: -5px !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65) !important;
  background: white !important;
  color: gray !important;
  */
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 4px 0 0;
  border: none;
  text-align: center;
  width: 18px;
  height: 14px;
  font: 16px/14px Tahoma, Verdana, sans-serif;
  color: #c3c3c3;
  text-decoration: none;
  font-weight: bold;
  background: transparent;
}

.leaflet-popup-content-wrapper {
  width: 100%;
  padding: 1px;
  text-align: left;
  border-radius: 5px;
  overflow-x: scroll;
}

.leaflet-popup {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}

.leaflet-popup-pdf {
  min-width: 100lvw;
  max-width: 1024px;
}

.leaflet-popup-video {
  min-width: 100lvw;
  max-width: 1024px;
}

.leaflet-popup-images {
  min-width: 301px;
  max-width: 600px;
}

.leaflet-popup h3 {
  text-align: center;
}

div.leaflet-popup-content {
  min-height: 20lvh;
  max-height: 80lvh;
}

.leaflet-popup-content {
  min-width: 96%;
  max-width: 98vw;
  max-height: 100%;
  max-height: 70vh;
  overflow: auto;
  line-height: 1.4;
  margin: 5px;
}

.leaflet-popup-content-pdf {
  min-width: 100%;
}

.leaflet-popup-content-video {
  min-width: 100%;
}

.leaflet-popup-content-images {
  max-width: fit-content;
  display: flex;
  gap: 20px;
}

.leaflet-popup-scrolled {
  width: auto !important;
  height: auto !important;
  overflow: auto;
  max-height: 70vw;
  max-width: 70vw;
  border-bottom: unset !important;
  border-top: unset !important;
}

.leaflet-top {
  z-index: 9999;
}

.leaflet-right {
  max-width: 60vw;
}

.leaflet-control-layers-base label {
  cursor: pointer;
  user-select: none;
}

.leaflet-container a {
  -webkit-tap-highlight-color: unset;
}

.leaflet-control-layers {
  border-radius: 50%;
}

.leaflet-touch .leaflet-control-layers {
  border-radius: 50%;
}

.leaflet-control-layers-toggle {
  width: 56px;
  height: 56px;
  line-height: 56px;
}

.leaflet-touch .leaflet-control-layers-toggle {
  width: 56px;
  height: 56px;
}

.leaflet-control-layers-expanded {
  padding: 5px;
  border-radius: 5px;
}

.leaflet-touch .leaflet-control-layers-expanded {
  border-radius: 5px;
}

.leaflet-control-scale-line {
  background: rgb(211 211 211 / 100%);
  background-color: rgb(211 211 211 / 50%);
}

.leaflet-container .leaflet-control-attribution {
  background: rgb(211 211 211 / 100%);
}

.leaflet-bar {
  border-radius: 50%;
}

.leaflet-bar a {
  width: 56px;
  height: 56px;
  line-height: 56px;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  width: 56px;
  height: 56px;
  line-height: 56px;
}

.leaflet-touch .leaflet-bar a {
  width: 56px;
  height: 56px;
  line-height: 56px;
}

.leaflet-touch .leaflet-bar a,
.leaflet-bar a:hover {
  width: 56px;
  height: 56px;
  line-height: 56px;
}

.leaflet-bar a:first-child {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.leaflet-bar a:last-child {
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}

.leaflet-control-locate.active a {
  color: #2074b6;
}

.leaflet-touch .leaflet-bar a:first-child {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.leaflet-touch .leaflet-bar a:last-child {
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
  border: unset;
  box-shadow: 0 1px 5px rgb(0 0 0 / 65%);
}

.file-control-btn,
.fit-bounds-btn {
  font-size: 1.4em;
  color: #444;
  cursor: pointer;
}

.leaflet-control-locate.active.following a {
  color: #fc8428;
}

.icon-add,
.icon-info_outline,
.icon-gps_fixed,
.icon-gps_not_fixed,
.icon-gps_off,
.icon-coord_switch {
  font-size: 24px;
}

[class^="icon-"],
[class*=" icon-"] {
  line-height: unset;
  color: gray;
}

@media (width <=768px) {
  .leaflet-control-layers-list {
    font-size: medium;
  }
}

.spinner {
  display: inline-block;
  animation: anim-rotate 2s infinite linear;
}

@keyframes anim-rotate {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Progress Bar https://codepen.io/holdencreative/pen/vEVbwv */
.progress {
  position: relative;
  height: 4px;
  display: none;
  width: 100%;
  background-color: darkgray;
  background-clip: padding-box;
  overflow: hidden;
  z-index: 999;
}

.progress .indeterminate {
  background-color: white;
}

.progress .indeterminate::before {
  content: "";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.progress .indeterminate::after {
  content: "";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation-delay: 1.15s;
}

@keyframes indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
}

@keyframes indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
}

@keyframes indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
}

@keyframes indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
}

.hiden-images {
  width: 1px;
  height: 1px;
}

img.images-photo {
  object-fit: cover;
}

/* layer control */

.ac-container {
  width: auto;
  text-align: left;
  overflow: hidden auto;
  height: auto;
}

.ac-container article label {
  display: inline;
  cursor: pointer;
}

div[id^="leaflet-control-accordion-layers"]>label {
  font-family: BebasNeueRegular, "Arial Narrow", Arial, sans-serif;
  padding: 5px 20px;
  position: relative;
  z-index: 20;
  display: block;
  height: 30px;
  color: #777;
  text-shadow: 1px 1px 1px rgb(255 255 255 / 80%);
  line-height: 33px;
  font-size: 19px;
  background: #fff;
  background: linear-gradient(to top, #fff 1%, #eaeaea 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #fff), color-stop(100%, #eaeaea));
  background: linear-gradient(to top, #fff 1%, #eaeaea 100%);
  background: linear-gradient(to top, #fff 1%, #eaeaea 100%);
  background: linear-gradient(to top, #fff 1%, #eaeaea 100%);
  background: linear-gradient(to top, #fff 1%, #eaeaea 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea', GradientType=0);
  box-shadow: 0 0 0 1px rgb(155 155 155 / 30%), 1px 0 0 0 rgb(255 255 255 / 90%) inset, 0 2px 2px rgb(0 0 0 / 10%);
  box-sizing: content-box;
  cursor: pointer;
  width: auto;
  margin: 0;
}

div[id^="leaflet-control-accordion-layers"]>label:hover {
  background: #fff;
}

.ac-container input.menu:checked+label,
.ac-container input.menu:checked+label:hover {
  background: #c6e1ec;
  color: #737373;
  text-shadow: 0 1px 1px rgb(255 255 255 / 60%);
  box-shadow: 0 0 0 1px rgb(155 155 155 / 30%), 0 2px 2px rgb(0 0 0 / 10%);
}

.ac-container div[id^="leaflet-control-accordion-layers"]>label:hover::after,
.ac-container input.menu:checked+div[id^="leaflet-control-accordion-layers"]>label:hover::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  right: 13px;
  top: 7px;
  background: transparent url("images/arrow_down.png") no-repeat center center;
}

.ac-container input.menu:checked+div[id^="leaflet-control-accordion-layers"]>label:hover::after {
  background-image: url("images/arrow_up.png");
}

.ac-container input.menu {
  display: none;
}

.ac-container article {
  background: rgb(255 255 255 / 50%);
  margin-top: -1px;
  overflow: hidden;
  height: 0;
  padding: 0;
  line-height: 0px;
  position: relative;
  z-index: 10;
  transition: height 0.3s ease-in-out, box-shadow 0.6s linear;
}

.ac-container input.menu:checked~article {
  transition: height 0.5s ease-in-out, box-shadow 0.1s linear;
}

.ac-container input.menu:checked~article.ac-large {
  height: auto;
  max-height: 100px;
  padding: 8px 0;
  overflow-y: auto;
  line-height: 18px;
}

.ac-container .group-toggle-container {
  text-align: right;
  margin-right: 3px;
  line-height: 0px;
  display: none;
  height: 20px;
}

.ac-container input.menu:checked~.group-toggle-container {
  display: block;
  line-height: 1em;
}

.menu-item-radio {
  font-family: Ubuntu-Regular, Arial, sans-serif;
  font-size: 13px;
}

.menu-item-checkbox {
  font-family: Ubuntu-Regular, Arial, sans-serif;
  font-size: 13px;
}

.bt_delete {
  position: relative;
  float: right;
  background-image: url("images/delete.png");
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: 0 0;
  border: none;
  cursor: pointer;
  height: 16px;
  width: 16px;
  vertical-align: middle;
}

.leaflet-control-layers:hover {
  box-shadow: 0 1px 5px rgb(0 0 0 / 40%);
  border-radius: 5px;
}

.leaflet-container .leaflet-control-mapcentercoord {
  background-color: rgb(211 211 211 / 50%);
  box-shadow: 0 0 5px #bbb;
  padding: 5px;
  margin: 5px;
  color: #333;
  font-family: sans-serif;

  /* font-weight: bold; */
  font-size: 12px;
}

.leaflet-control-mapcentercoord-icon {
  background: url("../img/map-center-icon1.svg") 50% 50% no-repeat;
  margin: -18px 0 0 -18px;
  width: 36px;
  height: 36px;
  left: 50%;
  top: 50%;
  content: "";
  display: block;
  position: absolute;
  z-index: -1;
}

/*******************************************************************************
 * load bar
 ******************************************************************************/

.load {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  border: 3px solid green;
}

.ldBar {
  position: relative;
}

.ldBar path.mainline {
  stroke-width: 10;
  stroke: #09f;
  stroke-linecap: round;
}

.ldBar path.baseline {
  stroke-width: 14;
  stroke: #f1f2f3;
  stroke-linecap: round;
  filter: url("#custom-shadow");
}

.ldBar-label {
  color: #09f;
  font-family: "varela round", sans-serif;
  font-size: 2.5em;
  font-weight: 900;
}

.ldBar.label-center>.ldBar-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 3px #fff;
}

.ldBar-label::after {
  content: "%";
  display: inline;
}

/*******************************************************************************
 * install button
 ******************************************************************************/

.leaflet-button {
  margin-left: 10px;
  margin-top: 10px;
  transform: translateX(0%);
  padding: 2px 5px;
  color: gray;
  font-size: 1.25em;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 5px 5px 7px gray;
}


/* New Button */
.install-btn {
  font: 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  cursor: pointer;
}

#map {
  background: #f0efe9;
  /* або #fff */
}




/* --- Intro Overlay --- */

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* щоб у hidden стані не ловити кліки */
}

#intro-overlay.intro-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease-out, visibility 150ms ease-out;
}

#intro-overlay.intro-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#intro-overlay .intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

/* Власне вікно */

.intro-modal {
  position: relative;
  z-index: 1;
  max-width: min(900px, 90vw);
  max-height: min(600px, 80vh);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Хрестик */

.intro-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* Контент + слайди */

.intro-inner {
  position: relative;
  flex: 1;
  display: flex;
  overflow: hidden;
  justify-content: center;
}

.intro-slide {
  min-width: 100%;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(10%);
  transition: opacity 200ms ease, transform 200ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.intro-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.intro-slide img {
  max-height: 280px;
  width: auto;
  object-fit: contain;
  align-self: center;
  border-radius: 8px;
}

.intro-slide h2 {
  margin: 8px 0 4px;
  font-size: 1.25rem;
  text-align: center;
  max-width: 640px;
}

.intro-slide p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  max-width: 640px;
}

/* Стрілки */

.intro-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.9);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-prev {
  left: 8px;
}

.intro-next {
  right: 8px;
}

/* Невелика адаптація під мобайли */

@media (max-width: 600px) {
  .intro-modal {
    width: 94vw;
    max-height: 80vh;
    padding: 12px 14px 16px;
  }

  .intro-slide img {
    max-height: 200px;
  }
}

/* Кнопка "?" внизу зліва */
.leaflet-bottom.leaflet-left .intro-help-btn {
  width: 54px;
  height: 54px;
  display: none;
  /* центруємо іконку через flex */
  align-items: center;
  justify-content: center;
  padding: 0;
  /* прибираємо зайвий відступ */
}

/* Власне іконка всередині */
.intro-help-btn img {
  width: 28px;
  height: 28px;
  display: block;
}

/* Контейнер для слайдів */
.intro-inner {
  position: relative;
  overflow: hidden;
}

/* Базовий стан: усі слайди поверх один одного, але невидимі */
.intro-slide {
  position: absolute;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0; */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

/* Активний слайд – видимий */
.intro-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Картинка */
.intro-slide img {
  max-height: 280px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Текст під картинкою по центру */
.intro-slide h2,
.intro-slide p {
  text-align: center;
  max-width: 640px;
}


/* ===== Intro Overlay ===== */

#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

/* Початково сховано */
#intro-overlay.intro-hidden {
  display: none;
}

/* Коли показуємо через JS */
#intro-overlay.intro-visible {
  display: block;
}

/* Розмитий фон */
.intro-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.25);
}

/* Біла картка по центру */
.intro-modal {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 640px;
  max-height: 40vh;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Внутрішній контейнер для слайдів */
.intro-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кожен слайд: по замовчуванню схований */
.intro-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Активний слайд – видимий */
.intro-slide.active {
  display: flex;
}

/* Картинка */
.intro-slide img {
  max-height: 280px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Текст під картинкою, по центру */
.intro-slide h2,
.intro-slide p {
  text-align: center;
  max-width: 640px;
  margin: 0;
}

/* Кнопка закриття */
.intro-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

/* Стрілки-навігатори */
.intro-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-prev {
  left: 16px;
}

.intro-next {
  right: 16px;
}

/* Прибираємо білу стрілку внизу попапа */
.leaflet-popup-tip-container,
.leaflet-popup-tip {
  display: none !important;
}

/* ===== Mobile layout для інтро ===== */
@media (max-width: 768px) {
  .intro-modal {
    /* НЕ на весь екран, а акуратна картка посередині */
    width: auto;
    max-width: calc(100% - 32px);
    /* трохи відступів до краю екрана */
    max-height: calc(60vh - 32px);
    /* щоб були поля зверху/знизу */
    margin: 16px auto;
    border-radius: 16px;
    padding: 12px;
    /* біле поле навколо контенту */
    box-sizing: border-box;
  }

  .intro-inner {
    align-items: center;
    justify-content: center;
  }

  .intro-slide img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 45vh;
    /* щоб ще лишилось місце під текст */
  }

  .intro-slide h2,
  .intro-slide p {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .intro-nav {
    top: 50%;
    transform: translateY(-50%);
  }
}

.intro-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

/* Базово ховаємо всі стрілки інтро */
.intro-nav {
  display: none !important;
}

/* Показуємо їх тільки коли інтро реально відкрите */
#intro-overlay.intro-visible .intro-nav {
  display: flex !important;
  /* або inline-flex, як тобі більше подобається */
}