/*
   KAIROS MAP / MATTEO CIAMPICA
   Updated version: stable Leaflet fallback, compact offset markers, list/image toggle,
   selection limit message, fixed work grid, popup wrapping fix, close X fully outside popup.
*/

/* --- Leaflet critical fallback START --- */
.leaflet-container {
    overflow: hidden;
    position: relative;
    outline-style: none;
    background: #ddd;
}

.leaflet-container * {
    box-sizing: content-box;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
    position: absolute;
    left: 0;
    top: 0;
}

.leaflet-container img.leaflet-tile,
.leaflet-container img.leaflet-marker-icon,
.leaflet-container img.leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
}

.leaflet-tile {
    width: 256px;
    height: 256px;
    user-select: none;
    -webkit-user-select: none;
}

.leaflet-tile-container {
    pointer-events: none;
}

.leaflet-control {
    position: relative;
    z-index: 800;
    pointer-events: auto;
    float: left;
    clear: both;
}

.leaflet-top,
.leaflet-bottom {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }

.leaflet-control-zoom a {
    display: block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    text-decoration: none;
    color: #000;
    background: #fff;
    border-bottom: 1px solid #ccc;
}

.leaflet-control-zoom a:last-child { border-bottom: 0; }

.leaflet-control-zoom {
    border: 2px solid rgba(0,0,0,0.2);
    background: #fff;
}

.leaflet-popup {
    position: absolute;
    text-align: center;
    margin-bottom: 20px;
}

.leaflet-popup-content-wrapper {
    padding: 1px;
    text-align: left;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.leaflet-popup-content {
    margin: 12px;
    line-height: 1.4;
}

.leaflet-popup-tip-container {
    width: 40px;
    height: 20px;
    position: absolute;
    left: 50%;
    margin-left: -20px;
    overflow: hidden;
    pointer-events: none;
}

.leaflet-popup-tip {
    width: 17px;
    height: 17px;
    padding: 1px;
    margin: -10px auto 0;
    transform: rotate(45deg);
    background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.leaflet-popup-close-button {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    text-align: center;
    width: 24px;
    height: 24px;
    font: 16px/24px Tahoma, Verdana, sans-serif;
    color: #757575;
    text-decoration: none;
    background: transparent;
}

.leaflet-interactive { cursor: pointer; }
.leaflet-marker-icon,
.leaflet-marker-shadow { display: block; }
/* --- Leaflet critical fallback END --- */

.ciampica-map-section {
    width: 100%;
}

.ciampica-map-intro {
    margin-top: 8px;
}

.ciampica-map-shell,
.ciampica-map-works-shell {
    margin-top: 10px;
}

.ciampica-travel-map {
    width: 100%;
    height: 640px;
    min-height: 420px;
    border: 1px solid rgba(233, 133, 13, 0.55);
    background: #111;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ciampica-travel-map .leaflet-container,
#ciampicaTravelMap {
    font-family: inherit;
}

.ciampica-map-limit-info {
    font-size: 12px;
    line-height: 1.4;
    color: rgb(175, 175, 175);
    margin-bottom: 4px;
    text-align: left;
}

.ciampica-map-warning {
    font-size: 12px;
    line-height: 1.4;
    color: rgb(233, 133, 13);
    margin-bottom: 4px;
    text-align: left;
}

.ciampica-map-status {
    font-size: 14px;
    line-height: 1.5;
    color: rgb(175, 175, 175);
    text-align: left;
}

.ciampica-map-control-btn {
    border: 1px solid rgba(233, 133, 13, 0.85);
    background: transparent;
    color: rgb(233, 133, 13);
    font-size: 13px;
    line-height: 1.2;
    padding: 8px 12px;
    margin-left: 6px;
    border-radius: 0;
    cursor: pointer;
    display: inline-block;
}

.ciampica-map-control-btn:hover,
.ciampica-map-control-btn:focus {
    background: rgba(233, 133, 13, 0.12);
    outline: none;
}

.ciampica-map-list-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 20px;
    font-weight: 500;
    color: rgb(233, 133, 13);
    text-align: left;
}

.ciampica-map-title-separator {
    color: rgb(165, 165, 165);
    font-weight: 300;
}

.ciampica-map-view-toggle {
    border: 0;
    background: transparent;
    color: rgb(233, 133, 13);
    font-size: 14px;
    line-height: 1.2;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
}

.ciampica-map-view-toggle:hover,
.ciampica-map-view-toggle:focus {
    color: #fff;
    outline: none;
    text-decoration: none;
}

.ciampica-map-search {
    width: min(100%, 260px);
    border: 1px solid rgba(120, 120, 120, 0.75);
    background: rgb(20, 20, 20);
    color: rgb(220, 220, 220);
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 0;
    display: inline-block;
}

.ciampica-map-search:focus {
    border-color: rgb(233, 133, 13);
    outline: none;
}

/* Wandering Works: righe reali da 7 elementi.
   La stessa griglia viene usata sia in Show list sia in Show images,
   così colonne, larghezze e numero di elementi per riga non cambiano. */
.ciampica-map-works-list {
    display: block;
    width: 972px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    overflow: visible;
    overflow-anchor: none;
}

.ciampica-map-works-list::before,
.ciampica-map-works-list::after,
.ciampica-map-work-row::before,
.ciampica-map-work-row::after {
    content: none !important;
    display: none !important;
}

.ciampica-map-work-row {
    display: grid;
    grid-template-columns: repeat(7, 132px);
    column-gap: 8px;
    row-gap: 0;
    width: 972px;
    max-width: 100%;
    margin: 0 0 8px 0;
    padding: 0;
    justify-content: start;
    align-items: start;
    overflow-anchor: none;
}

.ciampica-map-work-row:last-child {
    margin-bottom: 0;
}

.ciampica-map-work-btn {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    height: 32px;
    margin: 0 !important;
    border: 1px solid rgba(120, 120, 120, 0.7);
    background: transparent;
    color: rgb(205, 205, 205);
    font-size: 12px;
    padding: 0 6px;
    box-sizing: border-box;
    line-height: 30px;
    cursor: pointer;
    border-radius: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-anchor: none;
}

.ciampica-map-work-btn:hover,
.ciampica-map-work-btn:focus {
    color: rgb(233, 133, 13);
    border-color: rgb(233, 133, 13);
    outline: none;
}

.ciampica-map-work-btn.is-active {
    color: #fff;
    border-color: var(--work-color, rgb(233, 133, 13));
    box-shadow: inset 0 0 0 1px var(--work-color, rgb(233, 133, 13));
}

.ciampica-map-work-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
}

.ciampica-map-works-list.is-grid {
    display: block;
    width: 972px;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.ciampica-map-works-list.is-grid .ciampica-map-work-row {
    grid-template-columns: repeat(7, 132px);
    column-gap: 8px;
    margin-bottom: 8px;
}

.ciampica-map-work-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    height: 224px;
    margin: 0 !important;
    padding: 0;
    border: 1px solid rgba(120, 120, 120, 0.65);
    background: transparent;
    cursor: pointer;
    text-align: center;
    vertical-align: top;
    overflow: hidden;
    box-sizing: border-box;
    overflow-anchor: none;
}

.ciampica-map-work-card img {
    display: block;
    width: 120px;
    height: 180px;
    object-fit: contain;
    object-position: center center;
    background: #111;
    margin: 5px auto 0;
    flex: 0 0 auto;
}

.ciampica-map-work-card span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 28px;
    padding: 0;
    color: rgb(205, 205, 205);
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
}

.ciampica-map-work-card:hover,
.ciampica-map-work-card:focus {
    border-color: rgb(233, 133, 13);
    outline: none;
}

.ciampica-map-work-card.is-active {
    border-color: var(--work-color, rgb(233, 133, 13));
    box-shadow: inset 0 0 0 1px var(--work-color, rgb(233, 133, 13));
}

.ciampica-map-work-card.is-disabled {
    opacity: 0.35;
    cursor: default;
}

.ciampica-map-marker-icon {
    width: 96px !important;
    height: 96px !important;
    border: 0 !important;
    background: transparent !important;
    pointer-events: none !important;
}

.ciampica-map-marker-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 7px rgba(0, 0, 0, 0.85);
    left: 50%;
    top: 50%;
    transform: translate(calc(-50% + var(--marker-x, 0px)), calc(-50% + var(--marker-y, 0px)));
    pointer-events: auto !important;
}

.ciampica-map-marker-icon:hover .ciampica-map-marker-dot,
.ciampica-map-marker-icon:focus .ciampica-map-marker-dot {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 0 9px rgba(0, 0, 0, 0.9);
}

.ciampica-travel-map .leaflet-popup-content-wrapper {
    width: 132px;
    padding: 0;
    text-align: center;
    border-radius: 2px;
    overflow: visible;
}

.ciampica-travel-map .leaflet-popup-content {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
    margin: 0 !important;
    text-align: center;
    overflow: visible;
}

.ciampica-travel-map .leaflet-popup {
    overflow: visible !important;
}

.ciampica-travel-map .leaflet-popup-close-button {
    position: absolute !important;
    top: -26px !important;
    right: -26px !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    font: 17px/18px Tahoma, Verdana, sans-serif !important;
    color: #555 !important;
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.20) !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45) !important;
    z-index: 10000 !important;
    text-align: center !important;
    text-decoration: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.ciampica-travel-map .leaflet-popup-close-button:hover,
.ciampica-travel-map .leaflet-popup-close-button:focus {
    color: #000;
    background: #fff;
    outline: none;
}

.ciampica-map-popup {
    display: block;
    width: 132px;
    height: auto;
    padding: 6px 5px 5px;
    color: #111;
    text-align: center;
    white-space: normal;
    overflow: visible;
    box-sizing: border-box !important;
}

.ciampica-map-popup-place {
    display: block;
    width: 122px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    color: #111;
    margin: 0 0 2px;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: normal;
    box-sizing: border-box !important;
}

.ciampica-map-popup-title {
    display: block;
    width: 122px;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.15;
    margin: 0 0 5px;
    color: #555;
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: normal;
    box-sizing: border-box !important;
}

.ciampica-map-popup-thumb {
    display: block;
    width: 120px;
    height: 180px;
    border: 0;
    text-decoration: none;
    vertical-align: top;
    margin: 0 auto;
    overflow: hidden;
}

.ciampica-map-popup-thumb img {
    display: block;
    width: 120px;
    height: 180px;
    max-width: none;
    object-fit: contain;
    object-position: center center;
    background: #111;
    margin: 0 auto;
}

.ciampica-map-popup-note {
    margin-top: 5px;
    font-size: 10px;
    color: #777;
    white-space: normal;
}

/* V27.6 — quando il popup è già pubblicato ma il post Social MAP non esiste ancora,
   desktop mostra l'avviso al passaggio del mouse/focus; mobile lo mantiene sempre visibile. */
.ciampica-map-popup-link-pending {
    display: block;
    width: 122px;
    margin: 5px auto 0;
    font-size: 10px;
    line-height: 1.2;
    color: #666;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    transition: opacity .15s ease;
}

.ciampica-map-popup:hover .ciampica-map-popup-link-pending,
.ciampica-map-popup:focus-within .ciampica-map-popup-link-pending {
    opacity: 1;
    visibility: visible;
    max-height: 80px;
}

@media (hover: none), (max-width: 767.98px) {
    .ciampica-map-popup-link-pending {
        opacity: 1;
        visibility: visible;
        max-height: 80px;
    }
}

@media (max-width: 1399.98px) {
    .ciampica-travel-map {
        height: 560px;
    }

}

@media (max-width: 767.98px) {
    .ciampica-travel-map {
        height: 460px;
        min-height: 360px;
    }

    .ciampica-map-control-btn {
        margin-left: 0;
        margin-top: 8px;
    }

    .ciampica-map-search {
        width: 100%;
        margin-bottom: 2px;
    }

    .ciampica-map-work-btn {
        width: 100%;
        text-align: center;
    }

}


/* KAIROS MAP additions */
.ciampica-map-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.ciampica-map-controls .ciampica-map-control-btn {
    margin-left: 0;
}

.ciampica-map-work-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.ciampica-map-work-btn span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ciampica-map-work-btn small {
    flex: 0 0 auto;
    color: rgb(120, 120, 120);
    font-size: 9px;
    line-height: 1;
}

.ciampica-map-work-card {
    height: 224px;
}

.ciampica-map-work-card img,
.ciampica-map-work-card .ciampica-map-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 180px;
    object-fit: contain;
    object-position: center center;
    background: #111;
    color: rgb(105, 105, 105);
    font-size: 11px;
    margin: 5px auto 0;
    flex: 0 0 auto;
}

.ciampica-map-work-card .ciampica-map-work-card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 24px;
    padding: 0;
    color: rgb(185, 185, 185);
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 auto;
}

.ciampica-map-work-card .ciampica-map-work-card-code {
    display: block;
    width: 120px;
    height: 12px;
    color: rgb(120, 120, 120);
    font-size: 9px;
    line-height: 11px;
    flex: 0 0 auto;
}

.ciampica-map-popup-thumb,
.ciampica-map-popup-thumb img,
.ciampica-map-popup-thumb-empty {
    width: 120px;
    height: 180px;
}

.ciampica-map-popup-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #777;
    font-size: 11px;
}

@media (max-width: 767.98px) {
    .ciampica-map-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .ciampica-map-controls .ciampica-map-search {
        flex: 1 1 220px;
        margin-bottom: 0;
    }

    .ciampica-map-controls .ciampica-map-control-btn {
        margin-top: 0;
    }
}

/* Search e Clear restano sempre sulla stessa riga. */
.ciampica-map-controls {
    width: min(100%, 380px);
    flex-wrap: nowrap !important;
}

.ciampica-map-controls .ciampica-map-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
}

.ciampica-map-controls .ciampica-map-control-btn {
    flex: 0 0 auto;
    margin: 0;
}

@media (max-width: 767.98px) {
    .ciampica-map-controls {
        width: 100%;
        flex-wrap: nowrap !important;
    }
}


/* Responsive: sotto la larghezza necessaria alle 7 colonne si riduce solo il numero di colonne,
   mantenendo identiche larghezze e allineamento tra list e images. */
@media (max-width: 991.98px) {
    .ciampica-map-works-list,
    .ciampica-map-works-list.is-grid,
    .ciampica-map-work-row,
    .ciampica-map-works-list.is-grid .ciampica-map-work-row {
        width: 100%;
        max-width: 100%;
    }

    .ciampica-map-work-row,
    .ciampica-map-works-list.is-grid .ciampica-map-work-row {
        grid-template-columns: repeat(auto-fit, 132px);
        column-gap: 8px;
        justify-content: start;
    }
}

/* KAIROS MAP V33 — layout editoriale desktop.
   - Mappa centrale: 1176px (circa 70px meno della precedente configurazione ampia).
   - Altezza desktop laterale: 640px.
   - Una colonna da 16 Aphonia per lato; eccedenza sotto la mappa.
   - Tutto ciò che sta sotto la mappa usa esattamente la stessa larghezza della mappa.
   - Le colonne laterali diventano sticky e si arrestano sotto la testata KAIROS sticky. */
.ciampica-map-desktop-stage {
    --kairos-map-center-width: 1176px;
    --kairos-map-desktop-height: 640px;
    --kairos-map-side-sticky-top: 150px;
    display: block;
    width: 100%;
    margin: 10px 0 0;
}

.ciampica-map-center {
    width: min(var(--kairos-map-center-width), 100%);
    min-width: 0;
    margin: 0 auto;
}

.ciampica-map-side-list {
    display: none;
}

/* Fascia immediatamente sotto la mappa: tre aree ordinate e simmetriche. */
.ciampica-map-works-shell {
    width: 100%;
    max-width: 100%;
    margin: 3px 0 0;
    padding: 0;
}

.ciampica-map-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    align-items: center;
    width: 100%;
    min-height: 42px;
    margin: 0 0 10px;
    padding: 5px 0;
    box-sizing: border-box;
    background: rgb(55, 55, 55);
}

.ciampica-map-toolbar-title,
.ciampica-map-toolbar-info,
.ciampica-map-toolbar .ciampica-map-controls {
    min-width: 0;
}

.ciampica-map-toolbar-title {
    justify-self: start;
}

.ciampica-map-list-title {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    margin: 0;
    color: rgb(233, 133, 13);
    font-size: 16px;
    font-weight: 500;
    line-height: 32px;
    white-space: nowrap;
}

.ciampica-map-title-separator {
    color: rgb(165, 165, 165);
    font-weight: 300;
}

.ciampica-map-view-toggle {
    border: 0;
    background: transparent;
    color: #00b4e2;
    font-size: 16px;
    font-weight: 400;
    line-height: 32px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.ciampica-map-view-toggle:hover,
.ciampica-map-view-toggle:focus {
    color: #fff;
    outline: none;
    text-decoration: none;
}

.ciampica-map-toolbar-info {
    justify-self: center;
    width: 100%;
    color: rgb(175, 175, 175);
    font-size: 10px;
    font-weight: 300;
    line-height: 16px;
    text-align: left;
}

.ciampica-map-toolbar-info > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ciampica-map-toolbar .ciampica-map-controls {
    display: flex;
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: none;
    justify-self: end;
}

.ciampica-map-toolbar .ciampica-map-search,
.ciampica-map-toolbar .ciampica-map-control-btn {
    height: 32px;
    box-sizing: border-box;
    margin: 0;
}

.ciampica-map-toolbar .ciampica-map-search {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0 10px;
}

.ciampica-map-toolbar .ciampica-map-control-btn {
    flex: 0 0 auto;
    padding: 0 14px;
}

/* Lista sotto la mappa: 8 Aphonia per riga con primo e ultimo elemento
   perfettamente a filo dei due bordi della mappa. */
.ciampica-map-works-list,
.ciampica-map-works-list.is-grid {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    text-align: left;
    overflow: visible;
    overflow-anchor: none;
}

.ciampica-map-work-row,
.ciampica-map-works-list.is-grid .ciampica-map-work-row {
    display: grid;
    grid-template-columns: repeat(8, 132px);
    justify-content: space-between;
    column-gap: 0;
    row-gap: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 0 8px;
    padding: 0;
    align-items: start;
    overflow-anchor: none;
}

.ciampica-map-work-row:last-child {
    margin-bottom: 0;
}

@media (min-width: 1500px) {
    #ciampicaMapDesktopStage {
        display: grid !important;
        grid-template-columns: 132px var(--kairos-map-center-width) 132px !important;
        column-gap: 16px !important;
        align-items: start !important;
        width: 1472px !important;
        max-width: none !important;
        margin: 10px 0 0 50% !important;
        transform: translateX(-50%) !important;
        position: relative !important;
    }

    #ciampicaMapDesktopStage::before,
    #ciampicaMapDesktopStage::after {
        content: none !important;
        display: none !important;
    }

    #ciampicaMapDesktopStage > .ciampica-map-center {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: var(--kairos-map-center-width) !important;
        min-width: var(--kairos-map-center-width) !important;
        max-width: var(--kairos-map-center-width) !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-self: center !important;
        align-self: start !important;
    }

    #ciampicaMapDesktopStage > .ciampica-map-center > .ciampica-travel-map,
    #ciampicaTravelMap {
        display: block !important;
        width: var(--kairos-map-center-width) !important;
        min-width: var(--kairos-map-center-width) !important;
        max-width: var(--kairos-map-center-width) !important;
        height: var(--kairos-map-desktop-height) !important;
        min-height: var(--kairos-map-desktop-height) !important;
        max-height: var(--kairos-map-desktop-height) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #viainsMapWorksLeft,
    #viainsMapWorksRight {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        gap: 8px;
        width: 132px !important;
        height: var(--kairos-map-desktop-height) !important;
        min-height: var(--kairos-map-desktop-height) !important;
        max-height: var(--kairos-map-desktop-height) !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: start !important;
        position: sticky !important;
        top: var(--kairos-map-side-sticky-top) !important;
        z-index: 25 !important;
    }

    #viainsMapWorksLeft {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: end !important;
    }

    #viainsMapWorksRight {
        grid-column: 3 !important;
        grid-row: 1 !important;
        justify-self: start !important;
    }

    #viainsMapWorksLeft.is-full-column,
    #viainsMapWorksRight.is-full-column {
        justify-content: space-between !important;
        gap: 0 !important;
    }

    #viainsMapWorksLeft .ciampica-map-work-btn,
    #viainsMapWorksRight .ciampica-map-work-btn {
        flex: 0 0 32px !important;
        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;
        height: 32px !important;
        margin: 0 !important;
    }
}

@media (max-width: 1499.98px) {
    #ciampicaMapDesktopStage {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
    }

    #viainsMapWorksLeft,
    #viainsMapWorksRight {
        display: none !important;
    }

    #ciampicaMapDesktopStage > .ciampica-map-center {
        display: block !important;
        width: min(var(--kairos-map-center-width), 100%) !important;
        min-width: 0 !important;
        max-width: var(--kairos-map-center-width) !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    #ciampicaTravelMap {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 1199.98px) {
    .ciampica-map-work-row,
    .ciampica-map-works-list.is-grid .ciampica-map-work-row {
        grid-template-columns: repeat(auto-fit, 132px);
        justify-content: center;
        column-gap: 8px;
    }
}

@media (max-width: 767.98px) {
    .ciampica-map-toolbar {
        grid-template-columns: 1fr;
        row-gap: 6px;
        min-height: 0;
        padding: 8px;
    }

    .ciampica-map-toolbar-title,
    .ciampica-map-toolbar-info,
    .ciampica-map-toolbar .ciampica-map-controls {
        width: 100%;
        justify-self: stretch;
    }

    .ciampica-map-list-title,
    .ciampica-map-view-toggle {
        font-size: 16px;
        line-height: 30px;
    }

    .ciampica-map-toolbar-info > div {
        white-space: normal;
    }

    .ciampica-map-toolbar .ciampica-map-controls {
        justify-content: flex-start;
    }
}
