/* Weebi Tourism Map styles */
.weetm-wrapper{
  position: relative;
  width: 100%;
  min-height: 520px;
}
.weetm-map{
  width: 100%;
  height: 100vh;
  min-height: 480px;
}
.weetm-hamburger{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1002;                 /* üle paneeli */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
}

//* Filtripaneel – vaikimisi peidus */
/* Base state: visible (no transform!) */


/* Hidden state: only when .closed is present */
/* paneel peidus ja mitte-klikitav */
/* Filtripaneel peidus: ära püüa klikke */
#weetm-filters.closed {
  transform: translateX(100%);
  pointer-events: none;                  /* <-- oluline mobiilis */
}


#weetm-filters {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -4px 0 18px rgba(0,0,0,.08);
  z-index: 1000;
  transition: transform .25s ease;
  transform: translateX(100%) !important;   /* ⬅️ peidus by default */
}
#weetm-filters:not(.closed) {
  transform: translateX(0) !important;      /* ⬅️ kui .closed puudub → nähtav */
}

/* Hamburger peab olema paneelist väljaspool ja nähtav */
.weetm-hamburger{
  position: absolute; /* või fixed */
  top: 12px;
  right: 12px;
  z-index: 1002;      /* üle paneeli */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
}



.weetm-filters-header{ padding:14px 16px; border-bottom:1px solid #f0f0f0}
.weetm-filters-search{ padding:10px 16px; border-bottom:1px solid #f0f0f0}
.weetm-filters-search input{ width:100%; padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px}
.weetm-filters-body{ padding:12px 16px }
.weetm-filter-list{ list-style:none; margin:0; padding:0 }
.weetm-filter-list li{ margin:8px 0 }


/* Popup */
/* Popup kaardi stiil */
.weetm-popup-card {
  max-width: 480px;       /* rohkem laiust */
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.18);
  font-family: 'Segoe UI', Roboto, sans-serif;
}

/* Pildi osa */
.weetm-popup-image img {
  width: 100%;
  height: 200px;          /* suurem pilt */
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

/* Sisu */
.weetm-popup-content {
  padding: 5px 10px;     /* rohkem ruumi tekstile */
}
.weetm-popup-title {
  margin: 0 0 5px;
  font-size: 20px;        /* suurem pealkiri */
  font-weight: 700;
  color: #111;
}
.weetm-popup-desc {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 5px;
  color: #444;
}

/* Kontaktinfo */
.weetm-popup-meta {
  list-style: none;
  margin: 0 0 5px;
  padding: 0;
  font-size: 14px;
}
.weetm-popup-meta li {
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.weetm-popup-meta a {
  color: #2563eb;
  text-decoration: none;
}
.weetm-popup-meta a:hover {
  text-decoration: underline;
}
.weetm-popup-meta .icon {
  width: 18px;
  min-width: 18px;
  text-align: center;
  font-size: 15px;
}

/* Nupud */
.weetm-popup-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.weetm-popup-buttons .btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}
.weetm-popup-buttons .btn.nav {
  background: #10b981;
  color: #fff;
}
.weetm-popup-buttons .btn.nav:hover {
  background: #059669;
}
.weetm-popup-buttons .btn.more {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #333;
}
.weetm-popup-buttons .btn.more:hover {
  background: #e5e7eb;
}

/* Accordion */
.weetm-accordion-content {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #444;
}
.weetm-accordion-content.open {
  display: block;
}

/* Tee Leafleti popup ise laiemaks */
.leaflet-popup-content {
 /* width: auto !important; */
  margin: 0;
}

.weetm-leaflet-popup .leaflet-popup-content {
  max-width: 420px !important;  /* vastab sellele, mis bindPopup-is */
}

.weetm-popup-card {
  max-width: 420px; /* nüüd töötab */
}

/*
.leaflet-popup-content .weetm-popup-buttons,
.leaflet-popup-content .weetm-popup-buttons .btn {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
*/

/* Teine nupp "Navigeerimine" – halli raamiga */
.weetm-popup-buttons .btn.outline{
  background:#fff; border:1px solid #e5e7eb; color:#333;
}
.weetm-popup-buttons .btn.outline:hover{
  background:#f3f4f6;
}



@media (max-width: 900px){
  .weetm-filters{
    width: 85%;
    max-width: 360px;
  }
}

#weetm-map { z-index: 100; }
.leaflet-control-container { z-index: 1000; }


/* === Filters as a modal (top-right) === */
#weetm-filters {
  position: fixed !important;
  top: 12px;
  right: 12px;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  z-index: 10020;                 /* jääb alla sündmuste overlayle (10060) */
  display: none;                  /* peidus vaikimisi */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  /* neutraliseeri varasem slide-in transform */
  pointer-events: auto;
}
#weetm-filters.open {
  display: block;
  opacity: 1;
  transform: none;
}

/* taust (klikk väljapoole sulgeb) */
/*#weetm-filters-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.15);
  backdrop-filter: blur(1px);
  z-index: 10010;
  display: none;
}
#weetm-filters-backdrop.active { display: block; }
*/

/* pealkiri + otsing sama kujuga jäävad */
.weetm-filters-header{ padding: 14px 16px; border-bottom:1px solid #f0f0f0 }
.weetm-filters-search{ padding: 10px 16px; border-bottom:1px solid #f0f0f0 }
.weetm-filters-search input{ width:100%; padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px }
.weetm-filters-body{ padding: 12px 16px; }
.weetm-filter-list{ list-style:none; margin:0; padding:0 }
.weetm-filter-list li{ margin: 8px 0; }

/* hamburger ise jääb samasse kohta paremale ülanurka */
.weetm-hamburger{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10030; /* üle backdrop'i */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
}

/* --- Popup mobiilis väiksemaks --- */
@media (max-width: 768px) {
  .weetm-leaflet-popup .leaflet-popup-content {
    max-width: calc(100vw - 60px) !important; /* hoia 20px marginit mõlemal pool */
    margin: 0 auto;
  }
  .weetm-popup-card {
    max-width: calc(100vw - 60px);
    margin: 0 auto;
  }
}

/* luba SVG-l joonistada väljapoole oma viewBox’i (mobiili fix) */
#weebi-mask svg {
  overflow: visible !important;
}

/* soovi korral lisa ka paint-promotion, kui mõni mobiil veel klipib */
#weebi-mask {
  will-change: transform;
  transform: translateZ(0);
}

/* Ker­ge "bounce" animatsioon markeritele */
@keyframes weebi-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.leaflet-marker-icon.weebi-bounce {
  animation: weebi-bounce 1.2s ease-in-out infinite;
  transform-origin: bottom center;       /* hüppab alt keskelt */
  will-change: transform;                /* sujuvam */
}

/* Peata animatsioon, kui kaart animiseerib (vältimaks “jitterit”) */
.leaflet-zoom-anim .leaflet-marker-icon.weebi-bounce,
.leaflet-dragging .leaflet-marker-icon.weebi-bounce {
  animation: none !important;
}

/* Ligipääsetavus – kui kasutaja eelistab vähendatud animatsioone */
@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon.weebi-bounce { animation: none !important; }
}


/* === Popup slider (manuaalne) === */
.weetm-slider{
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 5px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.weetm-slides{
  position: relative;
  width: 100%;
  height: 210px;
}
.weetm-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s ease;
}
.weetm-slide.active{ opacity: 1; }
.weetm-slide img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
}
.weetm-nav,
.weetm-dots .dot { cursor: pointer; }
.weetm-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-size: 18px; line-height: 36px; text-align: center;
  user-select: none;
}
.weetm-nav.prev{ left: 10px; }
.weetm-nav.next{ right: 10px; }
.weetm-dots{
  position: absolute; left:0; right:0; bottom:10px;
  display:flex; gap:6px; justify-content:center;
}
.weetm-dots .dot{
  width: 8px; height: 8px; border-radius:999px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.08);
}
.weetm-dots .dot.active{ background:#fff; }
@media (max-width: 480px){
  .weetm-slides{ height: 180px; }
}


/* --- GALERII: mobiilis peab olla KINDLA kõrgusega --- */
.weetm-gallery {
  position: relative;
  width: 100%;
  height: 220px;            /* <- fikseeri kõrgus, muidu mobiilis kukub kokku */
  overflow: hidden;
  border-radius: 12px;
  background: #f3f4f6;      /* kerge taust, kuniks pilt laeb */
}

@media (max-width: 480px) {
  .weetm-gallery { height: 180px; }  /* väiksematel ekraanidel natuke madalam */
}

/* slaidid */
.weetm-gallery .slide {
  position: absolute;
  inset: 0;                 /* top/right/bottom/left: 0 */
  opacity: 0;
  transition: opacity .25s ease;
}
.weetm-gallery .slide.active { opacity: 1; }

/* pildid */
.weetm-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* nooled */
.weetm-gallery .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.9);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.weetm-gallery .prev { left: 10px; }
.weetm-gallery .next { right: 10px; }

/* täpid */
.weetm-gallery .dots {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  display: flex;
  gap: 6px;
  justify-content: center;
  z-index: 2;
}
.weetm-gallery .dots button {
  width: 6px; height: 6px; border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.55);
}
.weetm-gallery .dots button.active { background: #fff; }

/* ära peida galeriid mobiilis – veendu, et kuskil ei ole display:none */


/* Üldine stiil */
#weetm-filters {
  border-radius: 18px;
}

/* Ainult desktop */
@media (pointer: fine) {
  #weetm-filters {
    position: absolute;
    top: 80px;          /* kaugus ülemisest servast */
    right: 20px;        /* kaugus paremast servast */
    left: auto;         /* igaks juhuks */
    
    width: 280px;       /* vaikimisi kitsam paneel */
    height: auto;       /* pole fikseeritud kõrgust */
    max-height: 70vh;   /* et ei läheks liiga pikaks */

    resize: both;       /* saab nurgast venitada */
    overflow: auto;     /* vajadusel kerimine */
    z-index: 9999;
  }
}

/* Header reas korralik joondus */
#weetm-filters .weetm-filters-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Lohistamise nupp ⠿ */
#weetm-filters .filters-drag-handle {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  cursor: move;
}

/* Alumise valge tühja ruumi vähendamine */
#weetm-filters .weetm-filters-body {
  padding-bottom: 12px; /* kui sul on suurem padding, võid siia väikse panna */
}

/* Dragimise ajal ei saa teksti valida */
.tm-dragging {
  user-select: none;
}

/* Visuaalne "nurgakäepide", et inimene näeks, et saab suurust muuta */
@media (pointer: fine) {
  #weetm-filters::after {
    content: "";
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    border-right: 2px solid rgba(0,0,0,0.2);
    border-bottom: 2px solid rgba(0,0,0,0.2);
    pointer-events: none;   /* ei sega resize’i */
  }
}






#weetm-map{ position: relative; }

#weetm-map .weetm-map-logo{
  position: absolute;
  top: 10px;
  left: 52px;        /* et zoom +/- ei kataks */
  z-index: 2000;
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#weetm-map .weetm-map-logo img{
  display:block;
  width:200px;
  height:200px;
  object-fit:contain;
}

/* ✅ Mobiil: tee logo väiksemaks */
@media (max-width: 768px){
  #weetm-map .weetm-map-logo{
    top: 8px;
    left: 52px;
    padding: 4px 6px;
    border-radius: 8px;
  }

  #weetm-map .weetm-map-logo img{
    width: 110px;
    height: 110px;
  }
}

/* ✅ Väga väike ekraan */
@media (max-width: 420px){
  #weetm-map .weetm-map-logo{
    left: 52px;
  }

  #weetm-map .weetm-map-logo img{
    width: 90px;
    height: 90px;
  }
}








/* Kui popup on avatud → peida kogu kaardi UI */
html.wee-popup-open .weetm-map-logo,
html.wee-popup-open .weetm-hamburger,
html.wee-popup-open .leaflet-control.vvv-info-control ,
html.wee-popup-open #wte-events-toggle,
html.wee-popup-open #wte-events-toggle1,
html.wee-popup-open .leaflet-control-zoom {
  display: none !important;
}


















