/* Přenesená verze z projektu */

.avatar-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  background-size: cover;
  background-position: center;
  background-color: #e9e9e9;
  display: block;
}

.pin-marker {
  width: 48px;
  height: 56px;
  display: inline-block;
  line-height: 0;
  box-sizing: border-box;
}
.pin-marker svg { width: 48px; height: 56px; display: block; }

.hollow-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #2563eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  box-sizing: border-box;
}

.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.marker-cluster-small {
  background-color: rgba(37,99,235,0.85) !important;
  color: #fff !important;
}

/* Modal / Gallery */

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.60);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
}
.modal-content {
  width: 95%;
  max-width: 1100px;
  max-height: 95vh;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  color: #fff;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg,#0f1724,#07101a);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.modal-left, .modal-right {
  width: 48px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.modal-center { flex: 1; display:flex; align-items:center; justify-content:center; }
.modal-nav { display:flex; align-items:center; gap:10px; }

.icon-btn {
  background: #2563eb;
  border: none;
  padding: 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  cursor: pointer;
  min-width:38px;
  min-height:38px;
  transition: transform .06s ease, opacity .12s ease;
}
.icon-btn svg { display:block; width:18px; height:18px; }
.icon-btn:disabled { opacity: 0.45; cursor: default; filter: grayscale(0.6); }

.gallery-progress {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  min-width: 64px;
  text-align: center;
}

/* Body */
#gallery-body {
  background: #fff;
  color: #111;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  box-sizing: border-box;
  position: relative;
}

/* Main image area */
.main-image-wrap {
  width: 100%;
  max-width: 920px;
  display:flex;
  align-items:center;
  justify-content:center;
  position: relative;
  background: transparent;
  box-sizing: border-box;
}
#main-image {
  max-width: 100%;
  max-height: 60vh;
  height: auto;
  display:block;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  background: #f6f6f6;
  object-fit: contain;
}

.image-progress {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(255,255,255,0.92);
  color: #111;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
  pointer-events: none;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 1200;
}

/* Credit */
.gallery-credit, #image-credit {
  font-size: 0.92rem;
  text-align: center;
  color: #333;
  margin-top: 6px;
  width: 100%;
  max-width: 920px;
  box-sizing: border-box;
}

/* Thumbnails */
.thumbs {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  width:100%;
  max-width:920px;
  box-sizing: border-box;
}
.thumb-item {
  width: 96px;
  height: 64px;
  overflow:hidden;
  border-radius:6px;
  border: 2px solid transparent;
  box-sizing: border-box;
  cursor: pointer;
  background: #f2f2f2;
  display:flex;
  align-items:center;
  justify-content:center;
}
.thumb-item img { width:100%; height:100%; object-fit:cover; display:block; }
.thumb-item.active { border-color: #2563eb; box-shadow: 0 6px 18px rgba(37,99,235,0.12); }

/* Description */
.gallery-description {
  padding: 0 18px 18px 18px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.description-text {
  color: #111;
  line-height: 1.45;
  font-size: 0.98rem;
  overflow: hidden;
  transition: max-height .18s ease;
  position: relative;
  box-sizing: border-box;
  padding: 6px 4px;
  background: transparent;
  border-radius: 6px;
  text-align: justify;
  text-justify: inter-word;
}
.description-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  pointer-events: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}
.description-expanded { overflow: auto; -webkit-overflow-scrolling: touch; }
.description-toggle-wrap { display:flex; justify-content:center; padding-top:6px; }
.desc-toggle { background: transparent; border: none; color: #2563eb; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 6px; }
.desc-toggle:focus { outline: 3px solid rgba(37,99,235,0.18); outline-offset: 2px; }

/* Side arrows */
.side-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  width: 48px;
  height: 64px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  z-index: 1100;
  cursor: pointer;
  color: #fff;
}
.side-nav-left { left: 8px; }
.side-nav-right { right: 8px; }
.side-nav[aria-hidden="true"], .side-nav.hidden { display: none !important; }
.side-nav[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }

.thumbs.hidden { display: none !important; }
.image-progress.hidden { display: none !important; }

@media (max-width: 900px) {
  #main-image { max-height: 52vh; }
  .thumb-item { width: 84px; height: 56px; }
}
@media (max-width: 600px) {
  .modal-left, .modal-right { display: none; }
  .modal-content { width: 98%; }
  .side-nav { display: none; }
  #main-image { max-height: 48vh; }
  .thumb-item { width: 72px; height: 52px; }
}
@media (max-width: 420px) {
  .thumb-item { width: 64px; height: 44px; }
  .gallery-progress { min-width: 54px; padding: 4px 8px; font-size: 0.88rem; }
  .image-progress { font-size: 0.85rem; padding: 5px 6px; }
}

.thumb-item:focus, .thumb-item img:focus, .icon-btn:focus, .side-nav:focus {
  outline: 3px solid rgba(37,99,235,0.18);
  outline-offset: 2px;
  border-radius: 6px;
}

.modal-content, .main-image-wrap, #main-image {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-content > #gallery-body, .modal-content > .gallery-description {
  background: #fff;
}

/* Tooltip seznam bodů ve shluku */
.cluster-tooltip-list {
  margin: 4px 0 0 0;
  padding-left: 18px;
  font-size: 0.9rem;
}
.cluster-tooltip-list li {
  margin: 2px 0;
}