:root {
  --blue: #007bff;
  --gold: #ffc107;
  --red: #dc3545;
  --green: #28a745;
  --orange: #fd7e14;
  --violet: #6f42c1;
  --grey: #6c757d;
  --black: #343a40;
}

html, body, #map {
  height: 100%;
  width: 100vw;
  margin: 0;
  padding: 0;
}
body {
  overflow: hidden;
}
#map { height: 100vh; width: 100vw; }

.pin.blue {
  fill: var(--blue);
}
.pin.gold {
  fill: var(--gold);
}
.pin.red {
  fill: var(--red);
}
.pin.green {
  fill: var(--green);
}
.pin.orange {
  fill: var(--orange);
}
.pin.violet {
  fill: var(--violet);
}
.pin.grey {
  fill: var(--grey);
}
.pin.black {
  fill: var(--black);
}

/* General styles for both bars */
#search-bar, #filter-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  border-radius: 15px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  white-space: nowrap;
}

/* Positioning for the bars */
#search-bar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  top: 10px; /* First row */
  min-width: 38vw;
  max-width: 90vw;
}

@media (max-width: 600px) {
  #search-bar {
    min-width: 90vw;
  }
}

#filter-bar {
  overflow-x: auto;
  top: 60px; /* Second row, adjust based on the height of #search-bar */
}

#search-bar input[type="date"] {
  font-size: 15px;
  padding: 5px;
  border-radius: 4px;
  border: 0px solid #6c757d;
}

/* Botones de tag desactivados (solo borde visible) */
.filter-btn {
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

/* Colores de los bordes para tags */
.filter-btn[data-color="blue"] { border-color: var(--blue); }
.filter-btn[data-color="gold"] { border-color: var(--gold); }
.filter-btn[data-color="red"] { border-color: var(--red); }
.filter-btn[data-color="green"] { border-color: var(--green); }
.filter-btn[data-color="orange"] { border-color: var(--orange); }
.filter-btn[data-color="violet"] { border-color: var(--violet); }
.filter-btn[data-color="grey"] { border-color: var(--grey); }
.filter-btn[data-color="black"] { border-color: var(--black); }

/* Botones activos (relleno de fondo con el color del borde) */
.filter-btn.active[data-color="blue"] {
  background: var(--blue);
  color: white;
}
.filter-btn.active[data-color="gold"] {
  background: var(--gold);
  color: black;
}
.filter-btn.active[data-color="red"] {
  background: var(--red);
  color: white;
}
.filter-btn.active[data-color="green"] {
  background: var(--green);
  color: white;
}
.filter-btn.active[data-color="orange"] {
  background: var(--orange);
  color: white;
}
.filter-btn.active[data-color="violet"] {
  background: var(--violet);
  color: white;
}
.filter-btn.active[data-color="grey"] {
  background: var(--grey);
  color: white;
}
.filter-btn.active[data-color="black"] {
  background: var(--black);
  color: white;
}

/* Push only the leaflet top controls below the tag bar */
.leaflet-control-container > .leaflet-top {
  margin-top: 60px; /* Adjust this value to match the height of #filter-bar */
  position: relative; /* Ensure it respects the margin */
}

/* Estilo del botón Reset */
.reset-btn {
  border: 2px solid #343a40;
  background: #fff;
  color: #343a40;
  font-size: 16px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.reset-btn:hover {
  background: #f5f5f5;
  border-color: #343a40;
}

.reset-btn:active {
  background: #e6e6e6;
}

/* Hide zoom controls on touch displays. */
@media (pointer: coarse) {
  .leaflet-control-zoom {
    display: none;
  }
}

.leaflet-control-search{
  width: 100%
}

/* Hide the search-tooltip dropdown */
.leaflet-control-search .search-tooltip {
  display: none !important;
}

.search-button {
  display: none !important;
}

.search-alert {
  display: none !important;
}

.leaflet-popup-close-button {
  display: none !important;
}

.leaflet-control-search.search-exp {
  border: none;
  box-shadow: none;
}

.leaflet-control-search .search-cancel {
  position: absolute;
  right: 1%;
  top: 38%;
  transform: translateY(-50%);
}

.leaflet-control-search .search-input {
  font-size: 15px;
  padding: 5px;
  border-radius: 4px;
  border: 0px solid #6c757d;
  margin: 0;
  height: 95%;
  width: 97%;
}

.spinworld-info-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.spinworld-info-flex-left {
  display: flex;
  align-items: flex-start;
}

/* Popup title styling */
.popup-title {
    margin-bottom: 8px;
}

.popup-title span {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.soft-span,
.leaflet-popup-content {
  color:#555;
  font-size:14px;
}

/* Share button styling */
.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
  vertical-align: top;
}


.share-btn svg {
    height: 1.2em;
    width: auto;
    vertical-align: top;
    stroke: black;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

/* FAB Styles */
.fab-container {
  position: fixed;
  bottom: 28px;
  right: 12px;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  row-gap: 12px;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: #818181;
  font-size: 1.3rem;
  border: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: background 0.2s;
}
.fab:hover {
  background: #f5f5f5;
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: absolute;
  bottom: 70px;
  right: 0;
  background: rgba(255,255,255,0.95);
  border-radius: 12px 12px 0 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.1s, transform 0.1s;
  min-width: 130px;
}

.fab-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fab-menu-item {
  font: 14px Arial;
  background: none;
  border: none;
  color: #818181;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-align: right;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.fab-menu-item:hover {
  background: #f0f4fa;
  /* color:#007bff; */
}

.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
  pointer-events: all; /* Ensure it captures all pointer events */
}

.modal-content {
  margin: 13px 24px 13px 20px;
  position: fixed;
  top: 50%;
  left: 2vw;
  right: 2vw;
  background: rgba(255, 255, 255, 1.0);
  z-index: 9999;
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
  transform: translateY(-50%);
  max-height: 77vh;
  overflow-y: auto;
}

.close-modal {
  position:absolute;
  top: 5px;
  right:5px;
  width: 19px;
  height: 24px;
  border: none;
  color:#6c757d;
  /* background-color: #ececec; */
  box-shadow: none;
}

.close-modal:hover {
  color:#007bff;
  cursor: pointer;
}

.modal-content h2 {
  margin-bottom: 8px;
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.modal-content p {
  font-size: 0.9em;
  color: #555;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.modal-content a {
  color: #0078A8;
}

#add-event-modal {
  top: 25%;
}

@media (min-width: 600px) {
  .modal-content {
    max-width: 22%;
    min-width: 525px;
    /* top: 15%; */
    margin-left: auto;
    margin-right: auto;
  }

  #add-event-modal {
    top: 15%;
  }
}

#map.new-event-cursor {
  cursor: crosshair !important;
}

.our-logo {
  position: fixed;
  bottom: 22px;
  right: 70px;
  z-index: 1000;
}

/* Ko-fi */
.floatingchat-container-wrap-mobi {
  bottom: 25px !important;
}