/* Machineria — personalizzazioni pannello Filament */

/* sidebar distinta dal contenuto: grigio neutro freddo */
.fi-sidebar {
    background-color: #e4e6eb;
}
.dark .fi-sidebar {
    background-color: #131720;
}

/* Upload (FilePond): il grigio medio solo DIETRO l'anteprima dell'immagine,
   così un logo nero o bianco resta visibile; la zona di drop vuota mantiene
   lo sfondo di default e la label resta leggibile. */
.filepond--image-preview {
    background-color: #888888 !important;
}
.filepond--image-preview-overlay {
    display: none;   /* niente gradiente scuro sopra l'anteprima */
}

/* filtri: lo stato lo comunica l'icona (imbuto vuoto/pieno), niente badge */
.fi-ta-filters-trigger-action-ctn .fi-badge,
.fi-icon-btn .fi-badge {
    display: none;
}

/* Repeater dei contenuti per lingua: blocchi ben separati e titolo lingua
   più grande, così le lingue non sembrano "attaccate" tra loro. */
.fi-fo-repeater-item {
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: .6rem;
    overflow: hidden;
}
.dark .fi-fo-repeater-item {
    border-color: rgba(255, 255, 255, .14);
}
.fi-fo-repeater-items {
    gap: 1.1rem;   /* spazio marcato tra una lingua e l'altra */
}
.fi-fo-repeater-item-header {
    background-color: rgba(0, 0, 0, .04);
    padding-top: .7rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid rgba(0, 0, 0, .10);
}
.dark .fi-fo-repeater-item-header {
    background-color: rgba(255, 255, 255, .05);
    border-bottom-color: rgba(255, 255, 255, .10);
}
.fi-fo-repeater-item-header-label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .01em;
}

/* sfondo alternato (zebra) dei blocchi lingua: differenza marcata da espansi */
.fi-fo-repeater-item:nth-of-type(even) .fi-fo-repeater-item-content {
    background-color: rgba(0, 0, 0, .035);
}
.dark .fi-fo-repeater-item:nth-of-type(even) .fi-fo-repeater-item-content {
    background-color: rgba(255, 255, 255, .04);
}


/* anteprima video nell'upload: altezza contenuta come le immagini */
.filepond--image-preview video,
.filepond--media-preview video,
.filepond--file-poster video {
    max-height: 220px !important;
    object-fit: contain;
}


/* Filament centra i tab segmentati (non-contained) con margin-inline:auto —
   es. i tab Location/Tour/POI/Extra della scheda. Li allineo a sinistra. */
.fi-tabs:not(.fi-contained) {
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
}


/* ===== Mappa contenuti (pagina + widget) ===== */
.cmap-toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.cmap-toolbar-l { font-size: .8rem; color: #6b7280; }
.cmap-select-w { max-width: 22rem; }

.cmap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.cmap-title { font-size: 1.2rem; font-weight: 600; }
.cmap-sub { font-size: .82rem; color: #6b7280; margin-top: .15rem; }
.cmap-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; }
.cmap-pills { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.cmap-pill { font-size: .72rem; border: 1px solid rgba(0, 0, 0, .15); border-radius: 999px; padding: .1rem .5rem; color: #374151; }
.dark .cmap-pill { border-color: rgba(255, 255, 255, .2); color: #d1d5db; }
.cmap-pill-orphan { border-color: #f59e0b; color: #b45309; }
.dark .cmap-pill-orphan { border-color: #f59e0b; color: #fbbf24; }
.cmap-pill-opt { border-style: dashed; color: #9ca3af; }
.dark .cmap-pill-opt { color: #9ca3af; }

.cmap-coverage { min-width: 12rem; }
.cmap-coverage-top { display: flex; align-items: baseline; gap: .4rem; justify-content: flex-end; }
.cmap-coverage-pct { font-size: 1.2rem; font-weight: 600; }
.cmap-coverage-l { font-size: .72rem; color: #6b7280; }
.cmap-coverage-hint { font-size: .68rem; color: #9ca3af; text-align: right; margin-top: .2rem; }
.cmap-bar { height: 6px; background: rgba(0, 0, 0, .1); border-radius: 999px; overflow: hidden; margin-top: .3rem; }
.dark .cmap-bar { background: rgba(255, 255, 255, .14); }
.cmap-bar > span { display: block; height: 100%; background: #d97706; border-radius: 999px; }

.cmap-legend { font-size: .75rem; color: #9ca3af; margin: .2rem 0 .5rem; }

.cmap-sec { margin-top: 2rem; }
.cmap-sec-location { --cmap-accent: #2a78d6; }
.cmap-sec-tour { --cmap-accent: #1baf7a; }
.cmap-sec-poi { --cmap-accent: #d97706; }
.cmap-sec-extra { --cmap-accent: #7c6bd6; }
.cmap-sec-h { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .8rem; padding-bottom: .35rem; border-bottom: 2px solid var(--cmap-accent); }
.cmap-sec-title { font-size: 1.05rem; font-weight: 600; }
.cmap-sec-count { font-size: .76rem; color: var(--cmap-accent); border: 1px solid var(--cmap-accent); border-radius: 999px; padding: .02rem .5rem; font-variant-numeric: tabular-nums; }

.cmap-card { border: 1px solid rgba(0, 0, 0, .08); border-radius: .7rem; padding: .5rem .9rem; background: #fff; }
.dark .cmap-card { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .02); }
.cmap-loc-counts { font-size: .8rem; color: #6b7280; padding: .35rem .1rem .15rem; }

.cmap-t { width: 100%; border-collapse: collapse; font-size: .82rem; }
.cmap-t th { font-weight: 400; color: #9ca3af; text-align: center; padding: .4rem .3rem; border-bottom: 1px solid rgba(0, 0, 0, .08); white-space: nowrap; }
.dark .cmap-t th { border-color: rgba(255, 255, 255, .1); }
.cmap-t th:first-child { text-align: left; width: 3.4rem; }
.cmap-t td { text-align: center; padding: .45rem .3rem; border-bottom: 1px solid rgba(0, 0, 0, .05); }
.dark .cmap-t td { border-color: rgba(255, 255, 255, .06); }
.cmap-t tr:last-child td { border-bottom: none; }
.cmap-lang { text-align: left; color: #6b7280; font-variant-numeric: tabular-nums; }
.cmap-mark { font-size: .92em; line-height: 1; }
.cmap-ok { color: #059669; font-weight: 600; }
.dark .cmap-ok { color: #34d399; }
.cmap-no { color: #cbd5e1; }
.dark .cmap-no { color: #4b5563; }
.cmap-gap { color: #d97706; font-weight: 600; }
.dark .cmap-gap { color: #fbbf24; }
.cmap-lang-opt { color: #9ca3af; }
.cmap-th-media { color: #b8bcc4; font-style: italic; }
.dark .cmap-th-media { color: #6b7280; }

.cmap-assets { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; font-size: .8rem; color: #6b7280; padding: .55rem .1rem .3rem; border-top: 1px solid rgba(0, 0, 0, .05); margin-top: .2rem; }
.dark .cmap-assets { border-color: rgba(255, 255, 255, .06); color: #9ca3af; }
.cmap-assets span { display: inline-flex; align-items: center; gap: .3rem; }

.cmap-ent { border: 1px solid rgba(0, 0, 0, .08); border-radius: .7rem; margin-top: .55rem; background: #fff; overflow: hidden; }
.dark .cmap-ent { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .02); }
.cmap-ent-h { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .55rem .9rem; background: rgba(0, 0, 0, .02); border-bottom: 1px solid rgba(0, 0, 0, .05); }
.dark .cmap-ent-h { background: rgba(255, 255, 255, .025); border-color: rgba(255, 255, 255, .06); }
.cmap-ent-name { font-weight: 600; font-size: .92rem; }
.cmap-ent-meta { font-size: .74rem; color: #6b7280; margin-top: .15rem; display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.cmap-ent-children { color: #374151; font-weight: 500; }
.dark .cmap-ent-children { color: #d1d5db; }
.cmap-sep { color: #cbd5e1; }
.dark .cmap-sep { color: #4b5563; }
.cmap-meta-off { color: #b45309; }
.dark .cmap-meta-off { color: #fbbf24; }
.cmap-meta-mut { color: #9ca3af; }
.cmap-ent-langs { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.cmap-lchip { font-size: .7rem; font-weight: 500; border-radius: 4px; padding: .08rem .4rem; font-variant-numeric: tabular-nums; }
.cmap-lchip-ok { background: rgba(5, 150, 105, .12); color: #047857; }
.dark .cmap-lchip-ok { background: rgba(52, 211, 153, .16); color: #34d399; }
.cmap-lchip-miss { background: rgba(217, 119, 6, .14); color: #b45309; }
.dark .cmap-lchip-miss { background: rgba(251, 191, 36, .16); color: #fbbf24; }
.cmap-lchip-opt { background: rgba(0, 0, 0, .04); color: #9ca3af; border: 1px dashed rgba(0, 0, 0, .15); }
.dark .cmap-lchip-opt { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .15); }
.cmap-ent-body { padding: .3rem .9rem .55rem; }

.cmap-empty { font-size: .85rem; color: #9ca3af; padding: .6rem 0; }

.cmap-w { display: flex; flex-direction: column; }
.cmap-w-row { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; align-items: center; padding: .65rem .2rem; border-bottom: 1px solid rgba(0, 0, 0, .06); text-decoration: none; color: inherit; }
.dark .cmap-w-row { border-color: rgba(255, 255, 255, .07); }
.cmap-w-row:last-child { border-bottom: none; }
.cmap-w-row:hover { background: rgba(0, 0, 0, .02); }
.dark .cmap-w-row:hover { background: rgba(255, 255, 255, .03); }
.cmap-w-main { display: flex; align-items: center; gap: .5rem; }
.cmap-w-name { font-weight: 600; }
.cmap-w-counts { grid-column: 1; font-size: .78rem; color: #6b7280; }
.cmap-w-prog { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: .5rem; min-width: 9rem; }
.cmap-w-prog .cmap-bar { flex: 1; margin-top: 0; }
.cmap-w-pct { font-size: .8rem; color: #6b7280; font-variant-numeric: tabular-nums; min-width: 2.4rem; text-align: right; }
.cmap-w-tag { font-size: .68rem; border: 1px solid rgba(0, 0, 0, .15); border-radius: 999px; padding: .02rem .4rem; color: #6b7280; }
.dark .cmap-w-tag { border-color: rgba(255, 255, 255, .18); color: #9ca3af; }
.cmap-w-tag-warn { border-color: #f59e0b; color: #b45309; }
.dark .cmap-w-tag-warn { color: #fbbf24; }
