/* --- 100: THIN --- */
/* Corrisponde a class="font-thin" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Thin.otf") format("opentype");
    font-weight: 100;
    font-style: normal;
}

/* --- 300: LIGHT --- */
/* Corrisponde a class="font-light" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Light.otf") format("opentype");
    font-weight: 300;
    font-style: normal;
}

/* --- 400: NORMAL / BOOK --- */
/* Corrisponde a class="font-normal" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Book.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

/* --- 500: MEDIUM --- */
/* Corrisponde a class="font-medium" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
}

/* --- 600: SEMIBOLD (DemiBold) --- */
/* Corrisponde a class="font-semibold" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_DemiBold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
}

/* --- 700: BOLD (Mapping su DemiBold) --- */
/* Corrisponde a class="font-bold" 
       Nota: Uso DemiBold anche qui perché non hai un file "Bold" puro */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_DemiBold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
}

/* --- 800 & 900: EXTRABOLD / BLACK (Heavy) --- */
/* Corrisponde a class="font-extrabold" e "font-black" */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Heavy.otf") format("opentype");
    font-weight: 800; /* Copre anche 900 */
    font-style: normal;
}
/* Regola extra per il 900 per sicurezza */
@font-face {
    font-family: "LondonUnderground";
    src: url("assets/fonts/P22_Underground_Heavy.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
}

/* Applicazione Globale */
body {
    font-family: "LondonUnderground", sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
}

canvas {
    display: block;
}

.mapbox-improve-map {
    display: none;
}

/* Stile custom per i popup di Mapbox */

/* Reset del padding nativo per gestire tutto via HTML/Tailwind */
.mapboxgl-popup-content {
    font-family: "LondonUnderground", sans-serif;
    border-radius: 0.75rem;
    padding: 0 !important; /* IMPORTANTE: Rimuove il padding bianco di default */
    border: none !important; /* Rimuoviamo il bordo nativo, lo gestiamo noi */
    overflow: hidden; /* Assicura che il background colorato non esca dai bordi arrotondati */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* La punta del popup (triangolino) */
.mapboxgl-popup-tip {
    border-top-color: #171717 !important;
    border-bottom-color: transparent !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
}

.mapboxgl-popup-close-button {
    display: none;
}

/* Nasconde il testo di caricamento di default di p5.js */
#p5_loading {
    display: none !important;
}

/* Timeline custom style */
.metro-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 8px;
    background: #D4D4D4;
    outline: none;
    transition: background 0.3s ease-in-out;
}
.metro-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #171717;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, border-color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}
.metro-slider:disabled::-webkit-slider-thumb {
    border-color: #A3A3A3;
    background-color: #F8F8F8;
    cursor: not-allowed;
    box-shadow: none;
}
.metro-slider:not(:disabled)::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    border-color: #171717;
    cursor: grab;
}

.metro-slider::-moz-range-progress {
    background-color: #171717;
    height: 8px;
    border-radius: 8px;
}
.metro-slider::-moz-range-track {
    background-color: #D4D4D4;
    height: 8px;
    border-radius: 8px;
}

@keyframes horizontal-shaking {
            0% { transform: translateX(0) }
            25% { transform: translateX(4px) }
            50% { transform: translateX(-4px) }
            75% { transform: translateX(4px) }
            100% { transform: translateX(0) }
        }
        
.animate-shake {
    animation: horizontal-shaking 0.3s ease-in-out;
}

/* Nasconde la scrollbar nella sezione linee*/
.custom-scrollbar {
  scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* old Edge/IE */
}

.custom-scrollbar::-webkit-scrollbar {
  display: none;             /* Chrome/Safari */
}

/* Nasconde elementi solo su mobile */
.md\:hidden {
    display: none;
}

@media (max-width: 767px) {
    .md\:hidden {
        display: block;
    }
}

/* --- MOBILE HORIZONTAL SLIDER --- */

/* Lo slider è 200% largo su mobile: tiene [Map | List] affiancati */
.mobile-slider {
    width: 200%;
}

/* Ogni panel occupa il 50% dello slider = 100% del viewport */
.mobile-panel-map,
.mobile-panel-sidebar {
    width: 50%;
}

/* Su desktop: slider torna a larghezza normale, layout flex-row affiancato */
@media (min-width: 768px) {
    .mobile-slider {
        width: 100% !important;
        transform: translateX(0) !important;
        gap: 1rem;
    }

    .mobile-panel-map {
        flex: 1;
        min-width: 0;
        width: auto !important;
    }

    .mobile-panel-sidebar {
        width: 333px !important;
        flex-shrink: 0;
    }
}
/* --- ACCORDION TRANSITIONS --- */
.accordion-item {
    display: flex;
    flex-direction: column;
}

.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-in-out;
    overflow: hidden;
}

.accordion-item.is-open > .accordion-content {
    grid-template-rows: 1fr;
}

.accordion-inner {
    min-height: 0;
    overflow: hidden;
}

/* Chevron: controllato da is-open invece di group-open: (open non viene rimosso) */
.accordion-chevron {
    transition: transform 0.28s ease-out !important;
    transform: rotate(-90deg) !important;
}
.accordion-item.is-open > summary .accordion-chevron {
    transform: rotate(0deg) !important;
}
