


.modal-trigger {
  width: 200px;
  margin: 10px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}
.modal-trigger:hover { transform: scale(1.1); }


.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 24px;              
}


.modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}


.modal, .modal * { box-sizing: border-box; }


.modal .modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 80vw;
  height: 45vw;               
  max-width: 980px;
  max-height: 552px;
  min-width: 300px;
  min-height: 169px;
  overflow: visible;
  padding: 20px;
  text-align: center;

  transform: scale(0.5);
  opacity: 0;
}
.modal.active .modal-content {
  animation: scaleUp 0.4s ease forwards;  
}


.modal .modal-body {
  max-height: 100%;
  overflow-y: auto;
  width: 100%;
}


.modal .close-btn {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  user-select: none;
  z-index: 1001;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.modal .close-btn:hover {
  background-color: #fff;
  transform: scale(1.2);
}


@keyframes scaleUp {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes fadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.5); }
}


@media (prefers-reduced-motion: reduce) {
  .modal.active { animation: none; }
  .modal .modal-content,
  .modal.active .modal-content {
    transform: none;
    opacity: 1;
    animation: none;
  }
}


.toggle-wrapper {
  margin: 20px 10px;
  font-size: 16px;
}
.toggle-wrapper label { cursor: pointer; }
.toggle-wrapper input[type="checkbox"] { margin-right: 8px; vertical-align: middle; }


.fade-map { transition: opacity 0.4s ease; }
