
/* Brand variables for quick theming */
:root {
  --brand-primary: #ffd200;           /* CTA giallo */
  --brand-primary-text: #004f5b;      /* Testo su giallo */
  --brand-primary-hover: #e6be00;     /* Giallo hover */

  --brand-secondary: #004f5b;         /* Verdone */
  --brand-secondary-text: #ffffff;    /* Testo su verdone */
  --brand-secondary-hover: #003b43;   /* Verdone hover */

  --brand-link: #004f5b;              /* Link */
  --brand-link-hover: #003b43;        /* Link hover */

  --focus-ring: rgba(255, 210, 0, .4);/* Focus ring coerente con primary */

  --marker-normal:#274289; 
  --marker-guided:#44A6E6;
  --marker-trash:#ED9806; 
  --marker-kit:#A6148C; 
}

/* Buttons - primary CTA in giallo */
.btn-primary,
.btn-dark {
  color: var(--brand-primary-text) !important;
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-dark:hover,
.btn-dark:active,
.btn-dark:focus {
  color: var(--brand-primary-text) !important;
  background-color: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
}
.btn-primary:focus-visible,
.btn-dark:focus-visible {
  box-shadow: 0 0 0 .25rem var(--focus-ring) !important;
}

/* Buttons - secondary in verdone */
.btn-secondary {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary-hover) !important;
  border-color: var(--brand-secondary-hover) !important;
}
.btn-secondary:focus-visible {
  box-shadow: 0 0 0 .25rem var(--focus-ring) !important;
}

/* Outline variants aligned with brand */
.btn-outline-primary,
.btn-outline-dark {
  color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary:focus,
.btn-outline-dark:hover,
.btn-outline-dark:active,
.btn-outline-dark:focus {
  color: var(--brand-primary-text) !important;
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}
.btn-outline-secondary {
  color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:active,
.btn-outline-secondary:focus {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}

/* Links */
a { color: var(--brand-link); }
a:hover,
a:focus { color: var(--brand-link-hover); }

/* Keep icons legible inside buttons */
.btn i { color: currentColor; }
#map .marker-normal { background: var(--marker-normal); }
#map .marker-guided { background: var(--marker-guided); }
#map .marker-trash  { background: var(--marker-trash); }
#map .marker-kit    { background: var(--marker-kit); }
.leaflet-marker-icon.marker-normal,
.leaflet-marker-icon.marker-guided,
.leaflet-marker-icon.marker-trash,
.leaflet-marker-icon.marker-kit {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  font-size: 14px; line-height: 1;
  padding: 0 !important; /* keep icon centered within fixed size */
}

.marker-highlight {
}

/* Keep highlighted scale priority even on hover NON va */
.marker-highlight:hover { 
}
.leaflet-marker-icon .badge {
  position:absolute; top:-6px; right:-6px; background:#dc3545; color:#fff;
  font-size:10px; padding:2px 6px; border-radius:999px;
}
.map-shell {
  position: relative;
}

.map-made-by {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  min-height: 18px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--brand-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.map-made-by:hover,
.map-made-by:focus {
  color: #333;
  text-decoration: none;
}

.offcanvas-body .meta { color:#2bb673; }
#type-filters .btn[data-type=''] i { color:#555; }
#type-filters .btn[data-type='normal'] i { color:var(--marker-normal); }
#type-filters .btn[data-type='guided'] i { color:var(--marker-guided); }
#type-filters .btn[data-type='trash'] i { color:var(--marker-trash); }
#type-filters .btn[data-type='kit'] i { color:var(--marker-kit); }

#type-filters .btn.active[data-type=''] i { color:#fff; }

/* Ensure 'Tutti' icon turns white on hover/focus/active for contrast */
#type-filters .btn:hover i,
#type-filters .btn:focus i,
#type-filters .btn:active i {
  color: #fff !important;
}

/* Horizontal scroll for filters on mobile without visible scrollbars */
#type-filters {
  -ms-overflow-style: none;       /* IE/Edge */
  scrollbar-width: none;          /* Firefox */
}
#type-filters::-webkit-scrollbar { display: none; } /* WebKit */
#type-filters .btn { flex: 0 0 auto; margin-right: .5rem; }

/* Filters bar: use brand secondary (verdone) locally */
#type-filters .btn-dark {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
#type-filters .btn-dark:hover,
#type-filters .btn-dark:active,
#type-filters .btn-dark:focus {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary-hover) !important;
  border-color: var(--brand-secondary-hover) !important;
}

#type-filters .btn-outline-dark {
  color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}
#type-filters .btn-outline-dark:hover,
#type-filters .btn-outline-dark:active,
#type-filters .btn-outline-dark:focus {
  color: var(--brand-secondary-text) !important;
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}

.form-check {
    padding-left: 1.9em;
}

/*
 * CSS per centrare un offcanvas-bottom con larghezza massima
 */
.offcanvas-centered.offcanvas-bottom {
  max-width: 640px; /* La tua larghezza massima desiderata */
  width: 100%;      /* Mantiene la responsività su schermi piccoli */
  
  /* Questo è il trucco! */
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
}


/* Cursor + floating tooltip while moving on map */
.leaflet-container,
#map,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-pane img {
  cursor: default !important;
}
.cud-mouse-tooltip {
  position: absolute;
  z-index: 5000;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
  color: #212529;
  background: rgba(255,255,255,0.95);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  pointer-events: none;
  user-select: none;
  transform: translate(12px, 12px);
}


.bold{
  font-weight: bold !important;
}

.guide-modal-dialog {
  max-width: 420px;
  margin: 1rem auto;
}

.guide-modal-content {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
}

.guide-step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c757d;
}

.guide-slide {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 0 0.5rem;
}

.guide-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--brand-secondary);
}

.guide-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #495057;
}

p {
  margin: 0;
}
/*
.guide-text p + p {
  margin-top: 0.75rem;
}
*/

.guide-indicators {
  gap: 0.4rem;
}

.guide-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background-color: #ced4da;
  opacity: 1;
}

.guide-indicators .active {
  background-color: var(--brand-primary);
}

.guide-controls .btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guide-controls .btn:disabled {
  opacity: 0.35;
}

@media (max-width: 575.98px) {
  .guide-modal-dialog {
    margin: 0.75rem;
  }

  .guide-slide {
    min-height: 250px;
  }

  .guide-title {
    font-size: 1.3rem;
  }

  .guide-text {
    font-size: 0.95rem;
  }
}
