/* finder.css - macOS Finder Styling */
.finder-window {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.finder-container {
    display: flex;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* Sidebar */
.finder-sidebar {
    width: 240px;
    background: rgba(248, 248, 248, 0.95);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    overflow-y: auto;
    user-select: none;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 20px 8px;
    user-select: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #424242;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 0;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    position: relative;
}

.sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-item.active {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.sidebar-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-item .badge {
    margin-left: auto;
    background: #e0e0e0;
    color: #666;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.sidebar-item.favorites .badge {
    background: #FFD60A;
    color: #000;
}

.sidebar-item.icloud .badge {
    background: #30B0C7;
    color: white;
}

/* Tags Section */
.sidebar-tags {
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.tag-item {
    display: flex;
    align-items: center;
    padding: 6px 20px;
    cursor: pointer;
}

.tag-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tag-name {
    font-size: 13px;
    color: #424242;
    flex: 1;
}

.tag-count {
    font-size: 11px;
    color: #999;
}

/* Toolbar */
.finder-toolbar {
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    height: 24px;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #424242;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}

.toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.toolbar-btn.active {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.toolbar-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.toolbar-btn.dropdown::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #007AFF;
    border-radius: 50%;
}

/* Path Bar */
.path-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.path-bar::-webkit-scrollbar {
    display: none;
}

.path-segment {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #424242;
    white-space: nowrap;
}

.path-segment:hover {
    background: rgba(0, 0, 0, 0.05);
}

.path-separator {
    color: #999;
    font-size: 12px;
    user-select: none;
}

.path-segment.current {
    color: #000;
    font-weight: 500;
}

.search-container {
    min-width: 200px;
    max-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 6px 12px 6px 32px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.03);
    font-size: 13px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 13px;
}

/* View Controls */
.view-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    padding: 3px;
}

.view-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #424242;
    font-size: 14px;
    transition: all 0.2s;
}

.view-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.view-btn.active {
    background: white;
    color: #007AFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.finder-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.finder-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(248, 248, 248, 0.5);
}

/* Column View */
.column-view {
    display: none;
    height: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.column-view.active {
    display: flex;
}

.column {
    width: 240px;
    height: 100%;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    background: white;
    flex-shrink: 0;
}

.column-header {
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(248, 248, 248, 0.5);
    position: sticky;
    top: 0;
    z-index: 5;
}

.column-items {
    padding: 8px 0;
}

.column-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.column-item:hover {
    background: rgba(0, 122, 255, 0.05);
}

.column-item.selected {
    background: rgba(0, 122, 255, 0.1);
}

.column-item .icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.column-item .name {
    font-size: 13px;
    color: #000;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-item .date {
    font-size: 11px;
    color: #999;
    margin-left: 10px;
}

/* Icon View */
.icon-view {
    display: none;
}

.icon-view.active {
    display: block;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 25px 20px;
    padding: 10px;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    user-select: none;
}

.icon-item:hover {
    background: rgba(0, 122, 255, 0.05);
}

.icon-item.selected {
    background: rgba(0, 122, 255, 0.1);
}

.icon-item .icon-container {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.icon-item .icon-emoji {
    font-size: 40px;
    line-height: 1;
}

.icon-item .name {
    font-size: 12px;
    color: #000;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    word-break: break-word;
    white-space: normal;
}

.icon-item.selected .name {
    color: #007AFF;
}

/* List View */
.list-view {
    display: none;
    overflow: auto;
}

.list-view.active {
    display: block;
}

.list-header {
    display: grid;
    grid-template-columns: 40px 3fr 1fr 1fr 120px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(248, 248, 248, 0.5);
    position: sticky;
    top: 0;
    z-index: 5;
}

.list-column {
    font-size: 12px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.list-column:hover {
    color: #000;
}

.list-column i {
    font-size: 10px;
    opacity: 0.5;
}

.list-items {
    padding: 5px 0;
}

.list-item {
    display: grid;
    grid-template-columns: 40px 3fr 1fr 1fr 120px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.list-item:hover {
    background: rgba(0, 122, 255, 0.05);
}

.list-item.selected {
    background: rgba(0, 122, 255, 0.1);
}

.list-item .list-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.list-item .list-name {
    font-size: 13px;
    color: #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-item.selected .list-name {
    color: #007AFF;
}

.list-item .list-date,
.list-item .list-size,
.list-item .list-kind {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
}

/* Preview Panel */
.preview-panel {
    width: 300px;
    background: rgba(248, 248, 248, 0.95);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.preview-panel.active {
    display: flex;
}

.preview-header {
    margin-bottom: 20px;
}

.preview-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 5px;
}

.preview-subtitle {
    font-size: 13px;
    color: #666;
}

.preview-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    background: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-image i {
    font-size: 48px;
    color: #ccc;
}

.preview-info {
    flex: 1;
}

.info-section {
    margin-bottom: 20px;
}

.info-title {
    font-size: 12px;
    font-weight: 600;
    color: #6d6d6d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-label {
    font-size: 13px;
    color: #666;
}

.info-value {
    font-size: 13px;
    color: #000;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 122, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #007AFF;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(0, 122, 255, 0.15);
}

.action-btn i {
    font-size: 14px;
}

/* Status Bar */
.finder-statusbar {
    height: 24px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 12px;
    color: #666;
    justify-content: space-between;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 6px 0;
    min-width: 180px;
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 6px 15px;
    font-size: 13px;
    color: #000;
    cursor: pointer;
    transition: all 0.1s;
    user-select: none;
}

.menu-item:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.menu-item i {
    margin-right: 10px;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 4px 0;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
    padding: 40px;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #666;
}

.empty-state p {
    font-size: 13px;
    max-width: 300px;
    line-height: 1.5;
}

/* Drag and Drop */
.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 122, 255, 0.1);
    border: 2px dashed #007AFF;
    border-radius: 8px;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #007AFF;
    pointer-events: none;
}

.drag-overlay.active {
    display: flex;
}

/* Quick Look */
.quick-look {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 30px;
    z-index: 10001;
    display: none;
    flex-direction: column;
    max-width: 800px;
    max-height: 80vh;
}

.quick-look.active {
    display: flex;
}

.quick-look-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quick-look-title {
    font-size: 20px;
    font-weight: 600;
    color: #000;
}

.quick-look-content {
    flex: 1;
    overflow: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.context-menu {
    animation: fadeIn 0.15s ease-out;
}

.icon-item, .list-item, .column-item {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 1200px) {
    .preview-panel {
        display: none !important;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 768px) {
    .finder-sidebar {
        display: none;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .toolbar-btn span {
        display: none;
    }
}

/* Icons Colors */
.icon-folder { color: #FFD60A; }
.icon-document { color: #007AFF; }
.icon-image { color: #34C759; }
.icon-video { color: #FF3B30; }
.icon-music { color: #AF52DE; }
.icon-archive { color: #FF9500; }
.icon-application { color: #5856D6; }
.icon-disk { color: #8E8E93; }
.icon-trash { color: #FF3B30; }
.icon-home { color: #FF9F0A; }
.icon-desktop { color: #30D158; }
.icon-downloads { color: #5AC8FA; }
.icon-cloud { color: #64D2FF; }
.icon-users { color: #FF2D55; } 

/* Window Titlebar */
.window-titlebar {
    height: 40px;
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 15px;
    justify-content: space-between;
    cursor: move;
    user-select: none;
}

.window-controls {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1000;
}

.window-close, .window-minimize, .window-zoom {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.window-close {
    background: #FF5F57;
}
.window-minimize {
    background: #FFBD2E;
}
.window-zoom {
    background: #28CA42;
}

.window-close:hover { background: #FF3B30; }
.window-minimize:hover { background: #FF9500; }
.window-zoom:hover { background: #34C759; }

.window-title {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
} 


/* Add this to the end of finder.css */
@keyframes windowAppear {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}