/* ============== GENERAL =============== */
body { margin: 0; padding: 0; }
html, body, #map { height: 100%; z-index: 1;}


/* ============== HEADER ======================== */
.condove-header {
    z-index: 4;
    background-color: #000000aa;
    position: absolute;
    top: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 25px;
}

.logo_overlay {
    border-radius: 100%;
    background-color: rgb(247, 247, 247);
    padding: 5px;
    flex-shrink: 0;
}
.logo_overlay img {
    width: 50px;
    height: 50px;
    display: block;
}
.header-title {
    color: white;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(243, 243, 243, 0.63)
}
.my-menu-button {
  color: white !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px !important;
  border-radius: 4px;
}
.my-menu-button:hover {
    color: white !important;
    background: rgba(255,255,255,0.1) !important;
}
.my-menu-button.show {
    color: white !important;
    background: rgba(255, 255, 255, 0.27) !important;
}
.dropdown-menu {
    position: absolute !important;
    width: 1000px !important;
    z-index: 4 !important;
    right: 5px !important;
    margin-top: 20px !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 2px 8px rgba(255, 109, 11, 0.328) !important;
    background: rgba(0, 0, 0, 0.862) !important;
    /* backdrop-filter: blur(12px); */
    /* -webkit-backdrop-filter: blur(12px); */
    animation: dropdownFadeIn 0.18s ease;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bottom-popover-header {
  background-color: #ff67108c !important;
  border-radius: 15px !important;
}
.x-button {
  color: rgb(0, 0, 0) !important;
  border: none;
}
.dropdown-menu .small {
    color: rgb(255, 255, 255) !important;
    font-size: 0.82rem !important;
    line-height: 1.7;
    padding: 16px 20px !important;
    margin: 0;
}

/* ============= BOTTONI LATERALI ================ */
.map-overlay_1 {
  font: 12px/20px 'Raleway';
  position: absolute;
  top: 90px;
  left: 25px;
  z-index: 3;
}
.map-overlay_2 {
  font: 12px/20px 'Raleway';
  position: absolute;
  top: 170px;
  left: 25px;
  z-index: 3;
}
.map-overlay_3 {
  font: 12px/20px 'Raleway';
  position: absolute;
  top: 245px;
  left: 25px;
  z-index: 3;
}

.map-btn {
  all: unset;
  width: 50px;
  height: 50px;
  background-color: #D65F1A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.map-btn:hover {
  background-color: #ffffff;
  transform: scale(1.05);
}
.map-btn.active {
  background-color: #ffffff;
}
.map-btn.active .icon-expand {
  color: #D65F1A;
}
.map-btn:focus-visible {
  outline: 2px solid #D65F1A;
  outline-offset: 3px;
}
.icon-expand {
    font-size: 2em; /* oppure usa % se vuoi in base al contenitore padre */
    color: black;
}
.map-btn:hover .icon-expand {
  color: #D65F1A;
}


/* ============= TAB LATERALI ============== */
.tab {
  position: absolute;
  left: 70px;
  top: 0;
  background-color: #fff;
  border-radius: 15px;
  width: 250px;
  outline: solid 3px #AB420F;
  z-index: 4;

  /* stato chiuso */
  opacity: 0;
  transform: translateX(-30px) scale(0.95); /* leggero slide + scala */
  transition: 
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
}
.tab.open {
  opacity: 1;
  transform: translateX(0) scale(1); /* slide + scala a posto */
  display: inline-block;
}


/* ======== TOC ======================== */
.accordion-item {
    border: none;
    background-color: transparent;
}

.accordion-button {
    background-color: transparent !important;
    padding: 2px 8px;              
    font-size: 0.9rem;             
    box-shadow: none !important;   
}

.accordion-button:not(.collapsed) {
    background-color: transparent !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
}

.accordion-body {
    padding: 6px 8px;             
    border: none;
}

.form-check-input {
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: #D65F1A;
    border-color: #D65F1A;
}

.scroll-wrapper {
    width: 0;
    min-width: 100%;
    overflow-x: auto;
}
.legend-container {
    border: none;
    white-space: nowrap;
    width: max-content;
}
.layer-legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
}
.layer-legend-color {
  width:12px;
  height:12px;
  border:1px solid #0003;
  margin-left:10px;
  display:inline-block;
}
.checkScript {
  display: none !important;
}
.checkScript.arrivato{
  display: block !important;
}
.check_fake.invisibile {
  display:none !important;
}

/* ============ OFFCANVAS ================= */
.offcanvas.custom-width {
  width: 550px !important;
  top: 70px !important;
}

/* ======= TABELLA ATTRIBUTI ========= */
.bootstrap-table .table {
    border-radius: 12px;
    overflow: hidden;
    font-family: "Calibri";
}
.bootstrap-table .table thead th:first-child {
    border-top-left-radius: 12px;
}
.bootstrap-table .table thead th:last-child {
    border-top-right-radius: 12px;
}

#parcelle_tab thead th {
  background-color: #8c8c8c;
  color: #000000;
  border-bottom: 2px solid black;
}

/* ======================= MAPBOX -GL DRAW ===================================== */

.maplibregl-map.mouse-pointer .maplibregl-canvas-container.maplibregl-interactive {
    cursor: pointer;
}
.maplibregl-map.mouse-move .maplibregl-canvas-container.maplibregl-interactive {
    cursor: move;
}
.maplibregl-map.mouse-add .maplibregl-canvas-container.maplibregl-interactive {
    cursor: crosshair;
}
.maplibregl-map.mouse-move.mode-direct_select .maplibregl-canvas-container.maplibregl-interactive {
    cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
}
.maplibregl-map.mode-direct_select.feature-vertex.mouse-move .maplibregl-canvas-container.maplibregl-interactive {
    cursor: move;
}
.maplibregl-map.mode-direct_select.feature-midpoint.mouse-pointer .maplibregl-canvas-container.maplibregl-interactive {
    cursor: cell;
}
.maplibregl-map.mode-direct_select.feature-feature.mouse-move .maplibregl-canvas-container.maplibregl-interactive {
    cursor: move;
}
.maplibregl-map.mode-static.mouse-pointer  .maplibregl-canvas-container.maplibregl-interactive {
    cursor: grab;
    cursor: -moz-grab;
    cursor: -webkit-grab;
}


/* =========== ALTRO ============ */
.arrow_overlay {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 3;
  border-radius: 15px;
}

.my_bg {
  background: linear-gradient(to right, #AB420F , #D65F1A);
  color: white;
}

.btn-calcolo {
  background-color: #ff0000;
  color: #ffffff;
}
.btn-calcolo:hover {
  background-color: #da0101;
  color: #ffffff;
}

.esito_calcolo {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.esito_calcolo.visible {
    display: block;
    opacity: 1;
}

::-webkit-scrollbar {
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.07);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ========================= SCANNER RADAR ================================ */

.Scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  mix-blend-mode: screen;
  opacity: 0;
  visibility: hidden; /* di default invisibile */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.Scan.active {
  opacity: 1;
  visibility: visible;
}
.Scan::before,
.Scan::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -10%;
}
/* Linea rossa principale */
.Scan::before {
  width: 300%;
  height: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 0, 0, 0) 0%,
    rgba(255, 0, 0, 1) 45%,
    rgba(255, 100, 100, 1) 50%,
    rgba(255, 0, 0, 1) 55%,
    rgba(255, 0, 0, 0) 100%
  );
  box-shadow:
    0 0 12px rgba(255, 0, 0, 1),
    0 0 30px rgba(255, 0, 0, 0.8),
    0 0 60px rgba(255, 0, 0, 0.6),
    0 0 120px rgba(255, 0, 0, 0.4);

  animation: scanVertical 4s linear infinite;
}
/* Alone/Glow della linea */
.Scan::after {
  width: 350%;
  height: 180px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 0, 0, 0.733) 0%,
    rgba(255, 0, 0, 0.459) 40%,
    rgba(0, 0, 0, 0.24) 80%
  );
  filter: blur(18px);
  animation: scanVertical 4s linear infinite;
}
/* Movimento verticale dal top al bottom e ritorno immediato */
@keyframes scanVertical {
  0%   { top: -10%; } 
  100% { top: 100%; }
}

/* Effetto leggero di flicker */
@keyframes flicker {
  0% { opacity: 1; }
  100% { opacity: 0.86; }
}


/* ================== MENU ================================== */

.bottom-banner{
  position: absolute;
  left: 50%;
  bottom: 1%;
  transform: translateX(-50%);
  z-index: 3;
  background-color: #ffffffc9;
  border-radius: 15px;
}
.bottom-footer-dropdown .bottom-popover-menu {
  border: 0;
  padding: 0;
  background: transparent;
  position: fixed; 
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--footer-h) + 2% + 70px);
  z-index: 3;
}
.bottom-footer-dropdown .dropdown-toggle::after {
  display: none !important;
}
.bottom-footer-group {
  display: flex;
  gap: 10px;
}
.bottom-popover-card {
  position: relative;
  width: clamp(320px, 85vw, 80vw);
  height: auto;
  background: #f1efeeed;
  border-radius: 15px;
  overflow-y: auto;
  z-index: 3;
}
.bottom-popover-header {
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background-color: #f4f1f0ea;
  color: rgb(0, 0, 0);
  z-index: 3;
}
.bottom-popover-body {
  padding: 0.9rem;
}
.bottom-popover-header .btn {
  /* outline: solid 1px #AB420F; */
  color: #AB420F;
  border-color: #AB420F;
}
.bottom-popover-header .btn:hover {
  background-color: #AB420F;
  border-color: #AB420F;
  color: #f4f1f0ea;
}
