/* checkstorage.css - Stili wizard checkstorage Fase 2-3 */

/* ---- Badge cartelle (Fase 2) ---- */
.cs-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
}
.cs-badge-standard    { background: #ccc;    color: #555; }
.cs-badge-livesignage { background: #e2007e; color: #fff; }
.cs-badge-unknown     { background: #f59e0b; color: #fff; }
.cs-badge-suspect     { background: #D0021B; color: #fff; }

/* ---- Tab interni del renderer (Fase 3) ---- */
.cs-tabs-wrapper { margin-top: 20px; }
.cs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
}
.cs-tab {
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    color: #999;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
    user-select: none;
}
.cs-tab:hover { color: #555; }
.cs-tab.active { color: #e2007e; border-bottom-color: #e2007e; }
.cs-tab .material-icons { font-size: 16px; }
.cs-tab-content { display: none; }
.cs-tab-content.active { display: block; }

/* ---- Stat box (tab Per categoria) ---- */
.cs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.cs-stat-item {
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    border: 1px solid transparent;
}
.cs-stat-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}
.cs-stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #999;
    margin-top: 3px;
}
.cs-stat-sublabel {
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}

/* ---- Barra spazio segmentata ---- */
.cs-space-bar {
    display: flex;
    height: 26px;
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0 8px;
}
.cs-space-segment {
    height: 100%;
    min-width: 2px;
    transition: width .4s;
}
.cs-space-segment:hover { opacity: .8; }
.cs-space-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 20px;
}
.cs-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cs-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ---- Riga selezionabile (pattern comune) ---- */
.cs-selectable-row { cursor: pointer; }
.cs-selectable-row.cs-row-selected {
    background: #fff3f9 !important;
    border-left: 4px solid #e2007e;
}

/* ---- Riga radice (Cancella tutta la cartella) ---- */
.cs-root-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #eee;
    margin-top: 16px;
    border-left: 4px solid transparent;
    transition: background .1s;
}
.cs-root-row:hover { background: #fdf2f8; }
.cs-root-row-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.cs-root-row-path {
    font-size: 11px;
    color: #888;
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-all;
    margin-top: 2px;
}

/* ---- Lista file grandi ---- */
.cs-file-list { list-style: none; padding: 0; margin: 0; }
.cs-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #f5f5f5;
    border-left: 4px solid transparent;
    transition: background .1s;
}
.cs-file-item:hover { background: #fdf2f8; }
.cs-file-icon { color: #ccc; flex-shrink: 0; font-size: 20px !important; }
.cs-file-info { flex: 1; min-width: 0; }
.cs-file-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cs-file-path {
    font-size: 10px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'SF Mono', 'Fira Code', monospace;
    margin-top: 1px;
}
.cs-file-size {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
    min-width: 64px;
}
.cs-file-bar-wrap {
    width: 80px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}
.cs-file-bar-fill {
    height: 100%;
    border-radius: 3px;
    min-width: 2px;
}
.cs-load-more {
    text-align: center;
    padding: 14px 0;
    border-top: 1px solid #f5f5f5;
}

/* ---- Albero filesystem ---- */
.cs-tree { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.cs-tree ul { list-style: none; padding-left: 20px; }
.cs-tree ul.cs-collapsed { display: none; }
.cs-tree-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 3px;
    border-left: 4px solid transparent;
    transition: background .1s;
}
.cs-tree-item:hover { background: #f5f5f5; }
.cs-tree-item.cs-row-selected { background: #fff3f9 !important; border-left-color: #e2007e; }
.cs-tree-item .material-icons { font-size: 16px !important; flex-shrink: 0; }
.cs-tree-icon-folder { color: #f5a623; }
.cs-tree-icon-file   { color: #ccc; }
.cs-tree-toggle {
    color: #bbb;
    cursor: pointer;
    transition: transform .15s;
    user-select: none;
}
.cs-tree-toggle.collapsed { transform: rotate(-90deg); }
.cs-tree-spacer { width: 16px; flex-shrink: 0; display: inline-block; }
.cs-tree-name {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cs-tree-size { margin-left: 8px; font-size: 10px; color: #aaa; white-space: nowrap; }
.cs-tree-item.cs-file-node   { cursor: pointer; }
.cs-tree-item.cs-folder-node { cursor: pointer; }

/* ---- Errori ---- */
.cs-error-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fde8e8;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #c0392b;
}
.cs-error-item .material-icons { font-size: 16px !important; flex-shrink: 0; }
.cs-empty-state {
    text-align: center;
    padding: 28px;
    color: #bbb;
}
.cs-empty-state .material-icons { font-size: 36px !important; display: block; margin-bottom: 6px; }

/* ---- Info selezionato sotto il bottone Cancella ---- */
.cs-delete-info {
    font-size: 11px;
    color: #888;
    max-width: 320px;
    text-align: right;
    word-break: break-all;
}

/* ---- Download file selezionato ---- */
.cs-download-progress {
    width: min(520px, 100%);
    margin-top: 8px;
    padding: 12px 14px;
    border: 1px solid #e6eef8;
    border-radius: 6px;
    background: #f7fbff;
}
.cs-download-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #345b85;
}
.cs-download-progress-head strong {
    color: #4a90e2;
    white-space: nowrap;
}
.cs-download-progress-bar {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #dfeaf6;
}
.cs-download-progress-fill {
    height: 100%;
    min-width: 0;
    border-radius: 4px;
    background: #4a90e2;
    transition: width .2s ease;
}
