/* File Tree Dropdown Styles */

/* Main dropdown container */
#yourFilesItem .file-structure-dropdown {
    position: absolute;
    left: calc(100% + 5px);
    top: 0;
    background: #131313;
    border-radius: 12px;
    padding: 12px;
    min-width: 320px;
    max-width: 450px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1002;
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Show dropdown on hover */
#yourFilesItem:hover .file-structure-dropdown {
    opacity: 1;
    visibility: visible;
}

/* File tree container */
.file-tree {
    color: #ddd;
}

.file-tree ul {
    padding-left: 20px;
    list-style: none;
    margin: 0;
}

/* Root level no padding */
.file-tree > ul {
    padding-left: 0;
}

.file-tree li {
    position: relative;
    margin: 2px 0;
}

/* Remove tree lines - cleaner look */
.file-tree li:before,
.file-tree li:after {
    display: none;
}

/* Details/Summary styling */
.file-tree details {
    margin: 2px 0;
}

.file-tree details summary {
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    margin: 0;
}

.file-tree details summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Remove default marker */
.file-tree details summary::-webkit-details-marker {
    display: none;
}

.file-tree summary::before {
    content: '▶';
    font-size: 10px;
    color: #666;
    transition: transform 0.2s;
    display: inline-block;
    width: 12px;
    flex-shrink: 0;
}

.file-tree details[open] > summary::before {
    transform: rotate(90deg);
}

/* Icons */
.folder-icon, .file-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.folder-icon {
    stroke: #fbbf24;
}

.file-icon {
    stroke: #60a5fa;
}

/* Category and file names */
.category-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Item count */
.item-count {
    font-size: 11px;
    color: #666;
    margin-left: auto;
    padding: 0 4px;
    flex-shrink: 0;
}

/* Category link */
.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

/* File items */
.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.file-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.file-item:hover .file-icon {
    stroke: #60a5fa;
    opacity: 1;
}

.file-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Current board highlight */
.current-board {
    color: #60a5fa;
}

/* Empty state */
.file-tree-empty {
    padding: 20px;
    color: #666;
    font-size: 12px;
    font-style: italic;
    text-align: center;
}

/* Scrollbar styling */
.file-structure-dropdown::-webkit-scrollbar {
    width: 6px;
}

.file-structure-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.file-structure-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.file-structure-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Light mode support */
.light-mode .file-structure-dropdown {
    background: #FFFFFF;
    border: 2px solid #ffffff;
    box-shadow: none;
}

.light-mode .file-tree {
    color: #333;
}

.light-mode .file-tree li:before,
.light-mode .file-tree li:after {
    background-color: #ddd;
}

.light-mode .file-tree details summary:hover {
    background: #E8EBF0;
}

.light-mode .file-tree summary::before {
    color: #9ca3af;
}


.light-mode .file-icon {
    stroke: #6b7280;
    fill: none;
}

.light-mode .item-count {
    color: #9ca3af;
}

.light-mode .file-item:hover {
    background: #E8EBF0;
    color: #5c5c5c;
}

.light-mode .file-tree-empty {
    color: #9ca3af;
}

/* Light mode find button */
.light-mode .find-btn {
    background: #3b82f6;
    color: white;
}

.light-mode .find-btn:hover {
    background: #2563eb;
}
