.folder-structure {
    margin-top: 20px;
}

.navigation-path {
    display: none;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.navigation-path.visible {
    display: flex;
}

.back-button {
    background: #f5f5f5;
    padding: 8px;
    border: none;
    cursor: pointer;
    margin-right: 8px;
    border-radius: 4px;
    display: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.back-button.visible {
    display: block;
}

.back-button img {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

.current-path {
    flex: 1;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-item,
.folder-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f4fafb;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap:8px;
}

.folder-item:hover {
    background: #e9f5f7;
}

.folder-info,
.folder-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.folder-icon {
    width: 28px;
    height: 28px;
}

.folder-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.folder-arrow {
    width:24px;
    height:24px;    
}

.folder-name {
    font-size: 14px;
}

.folder-counts {
    display: flex;
    gap: 8px;
}

.count-cartelle,
.count-documenti {
    background: #e1f0ff;
    font-weight: bold;
    padding: 4px 4px;
    width: 32px;
    border-radius: 3px;
    font-size: 13px;
    color: #50575e;
    min-width: 24px;
    text-align: center;
    position: relative;
    cursor: help;
    transition: background 0.2s ease, color 0.2s ease;
}

.count-cartelle:hover,
.count-documenti:hover {
    background: var(--colorPrimary, #28A7DB);
    color: white;
}

/* Custom Tooltip Styles */
.count-cartelle[title],
.count-documenti[title] {
    position: relative;
}

.count-cartelle[title]:hover::after,
.count-documenti[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #333;
    color: white;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 5px;
    z-index: 10;
    font-weight: normal;
}

.count-cartelle[title]:hover::before,
.count-documenti[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    margin-bottom: -5px;
    z-index: 10;
}

.folder-file-item {
    cursor: pointer;
    position: relative;
}

.folder-file-item:hover {
    background: #e9f5f7;
}

.folder-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.folder-file-icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-file-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.folder-file-name {
    font-size: 16px;
}

.download-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: none;
    font-weight: bold;
    color: var(--colorPrimary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.download-button:hover {
    color: #005177;
}

.download-arrow {
    width: 20px;
    height: 20px;
}

.folder-file-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
    background: #f4fafb;
    border-radius: 4px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .folder-structure {
        padding: 10px;
    }

    .folder-item,
    .folder-file-item {
        padding: 10px;
    }

    .folder-counts {
        gap: 8px;
    }

    .count-cartelle,
    .count-documenti {
        padding: 3px 6px;
        font-size: 12px;
    }
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    margin:0!important;
	max-width:none;
}

.search-input:focus {
    outline: none;
    border-color: var(--colorPrimary, #28A7DB);
    box-shadow: 0 0 0 2px rgba(40, 167, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon img {
    width: 32px;
    height: 32px;
}

.sort-button {
    background:transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #111;
    font-size: 14px;
    transition: color 0.2s ease;
}

.sort-button:hover {
    color: var(--colorPrimary, #28A7DB);
}

.sort-button img {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
}

.sort-button.desc img {
    transform: rotate(90deg);
}