/* Folder Tree Styles */

.fg-folder-item {
    margin-bottom: 0;
}

.fg-folder-header {
    display: flex;
    align-items: center;
    padding: 2px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    gap: 6px;
}

.fg-folder-header:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fg-folder-header.active {
    background: #D4A017; /* Tmavě žlutá barva pro aktivní složku */
    color: white;
}

.fg-folder-toggle {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fg-folder-toggle i {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

.fg-folder-toggle .fa-chevron-down {
    transform: rotate(90deg);
}

.fg-folder-children {
    margin-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animace pro řazení */
.fg-folder-children.transitioning {
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.fg-spacer {
    width: 10px;
}

.fg-folder-icon {
    font-size: 12px;
    color: #D4A017; /* Tmavě žlutá barva složky */
    min-width: 12px;
}

.fg-folder-header.active .fg-folder-icon {
    color: white;
}

.fg-folder-name {
    flex: 1;
    font-size: 12px;
    font-weight: 100;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.fg-folder-header.active .fg-folder-name {
    color: white;
}

.fg-folder-stats {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fg-file-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 100;
    line-height: 1.2;
}

/* Tlačítko pro rozbalení/sbalení podsložek - SVG styl */
.fg-expand-toggle {
    background: rgba(255, 255, 255, 0.1); /* Stejné pozadí jako file-item:hover */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    width: 22px;
    height: 22px;
    margin-left: 4px;
    backdrop-filter: blur(4px);
    flex-shrink: 0; /* Zabrání deformaci */
    aspect-ratio: 1; /* Zajistí perfektní čtverec/kruh */
}

.fg-expand-toggle:hover {
    background: rgba(255, 255, 255, 0.2); /* Světlejší při hoveru */
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* SVG ikona styling - stejná barva jako folder ikona */
.fg-expand-toggle .svg-icon {
    width: 20px;
    height: 20px;
    fill: white; /* Bílá barva ikon */
    transition: all 0.3s ease;
}

/* SVG path styling */
.fg-expand-toggle .svg-path-plus,
.fg-expand-toggle .svg-path-minus {
    transition: all 0.3s ease;
}

/* Animace při změně ikony */
.fg-expand-toggle.rotating .svg-icon {
    transform: rotate(180deg);
}

.fg-folder-header.active .fg-expand-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.fg-folder-header.active .fg-expand-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.fg-folder-header.active .fg-expand-toggle .svg-icon {
    fill: white;
}

/* FontAwesome fallback - zachovat pro zpětnou kompatibilitu */
.fg-expand-toggle i {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
    transition: all 0.5s ease;
    transform-origin: center;
}

.fg-expand-toggle i.fa-minus {
    transform: rotate(0deg);
}

.fg-expand-toggle i.fa-plus {
    transform: rotate(0deg);
}

/* Animace při změně ikony - FontAwesome */
.fg-expand-toggle i.fa-plus.rotating {
    transform: rotate(90deg);
}

.fg-expand-toggle i.fa-minus.rotating {
    transform: rotate(90deg);
}

.fg-folder-header.active .fg-expand-toggle i {
    color: rgba(255, 255, 255, 0.9);
}

.fg-folder-header.active .fg-file-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}


.fg-empty-tree {
    padding: 20px 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Breadcrumb Navigation */
.fg-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.fg-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.fg-breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.fg-breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.fg-breadcrumb-nav i.fa-chevron-right {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .fg-folder-header {
        padding: 10px;
    }
    
    .fg-folder-name {
        font-size: 12px;
    }
    
    .fg-breadcrumb-item {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .fg-breadcrumb-item span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Upravy pro mobilní zařízení - tlačítko rozbalit/sbalit */
    .fg-expand-toggle {
        min-width: 32px;
        min-height: 32px;
        width: 32px;
        height: 32px;
    }
    
    .fg-expand-toggle .svg-icon {
        width: 24px;
        height: 24px;
    }
}