/* Robot Control Tabs - Files, Apps, Shell */

/* ==================== FILE BROWSER ==================== */

.file-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    overflow: hidden;
}

/* Storage Info Bar */
.storage-info-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.storage-icon {
    font-size: 20px;
}

.storage-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.storage-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.storage-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 70%, #dc3545 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.storage-text {
    font-size: 12px;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb-buttons {
    display: flex;
    gap: 4px;
}

.nav-btn {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #ced4da;
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.breadcrumb-path {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.breadcrumb-path::-webkit-scrollbar {
    height: 4px;
}

.breadcrumb-path::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 2px;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 13px;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.breadcrumb-item:hover:not(.active) {
    background: #e7f3ff;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
    cursor: default;
}

.breadcrumb-item::after {
    content: '›';
    margin-left: 8px;
    color: #6c757d;
}

.breadcrumb-item:last-child::after {
    content: '';
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
    scrollbar-width: thin;
}

.filter-chips::-webkit-scrollbar {
    height: 4px;
}

.filter-chip {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover {
    background: #f8f9fa;
    border-color: #ced4da;
}

.filter-chip.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Toolbar */
.file-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sort-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: '▼';
    margin-left: 6px;
    font-size: 10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 150px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: #495057;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item.active {
    background: #e7f3ff;
    color: #007bff;
    font-weight: 600;
}

.dropdown-item.active::before {
    content: '✓ ';
    margin-right: 4px;
}

/* File List */
.file-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for toolbars */
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item.selected {
    background: #e7f3ff;
    border-left: 3px solid #007bff;
}

.file-item .file-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.file-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
}

.file-icon {
    font-size: 24px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-action-btn {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-action-btn:hover {
    background: #e9ecef;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.empty-text {
    font-size: 14px;
    color: #6c757d;
}

/* Selection Toolbar */
.selection-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0d6efd;
    color: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.selection-info {
    display: flex;
    align-items: center;
}

.btn-text {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-text:hover {
    opacity: 0.8;
}

.selection-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.2);
}

/* Clipboard Indicator */
.clipboard-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff3cd;
    border-top: 2px solid #ffc107;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    z-index: 999;
}

.clipboard-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clipboard-icon {
    font-size: 18px;
}

.clipboard-text {
    font-size: 14px;
    font-weight: 500;
    color: #856404;
}

.clipboard-actions {
    display: flex;
    gap: 8px;
}

/* Apps Manager */
.apps-manager {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.app-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.app-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
    cursor: pointer;
}

.app-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.app-card.selected {
    border-color: #007bff;
    background: #e7f3ff;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.app-icon {
    font-size: 32px;
}

.app-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.app-package {
    font-size: 11px;
    color: #666;
    word-break: break-all;
}

.app-info {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.app-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.app-action-btn {
    flex: 1;
    padding: 5px 10px;
    font-size: 11px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.app-action-btn.launch {
    background: #28a745;
    color: white;
}

.app-action-btn.stop {
    background: #dc3545;
    color: white;
}

.app-action-btn.uninstall {
    background: #6c757d;
    color: white;
}

.app-action-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Shell Terminal */
.shell-terminal {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.shell-controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #2d2d2d;
    border-bottom: 1px solid #404040;
}

.shell-status {
    margin-left: auto;
    color: #4ec9b0;
    font-size: 12px;
    align-self: center;
}

.shell-output {
    flex: 1;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #d4d4d4;
    overflow-y: auto;
    max-height: 400px;
    background: #1e1e1e;
}

.shell-line {
    margin-bottom: 5px;
    white-space: pre-wrap;
    word-break: break-all;
}

.shell-line.shell-command {
    color: #4ec9b0;
}

.shell-line.shell-output-text {
    color: #d4d4d4;
}

.shell-line.shell-error {
    color: #f48771;
}

.shell-line.shell-success {
    color: #4ec9b0;
}

.shell-line.shell-info {
    color: #569cd6;
}

.shell-input-container {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #2d2d2d;
    border-top: 1px solid #404040;
    align-items: center;
}

.shell-prompt {
    color: #4ec9b0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: bold;
}

.shell-input {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #404040;
    border-radius: 4px;
    padding: 8px 12px;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.shell-input:focus {
    outline: none;
    border-color: #007acc;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    /* File Browser Mobile */
    .storage-info-bar {
        padding: 10px 12px;
    }
    
    .storage-text {
        font-size: 11px;
    }
    
    .breadcrumb-nav {
        padding: 6px 8px;
        flex-wrap: wrap;
    }
    
    .breadcrumb-buttons {
        order: 1;
    }
    
    .breadcrumb-path {
        order: 3;
        width: 100%;
        margin-top: 6px;
    }
    
    .nav-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .filter-chips {
        padding: 8px 12px;
        gap: 6px;
    }
    
    .filter-chip {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .file-toolbar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .toolbar-left,
    .toolbar-right {
        flex: 1 1 100%;
    }
    
    .file-item {
        padding: 10px 12px;
    }
    
    .file-icon-wrapper {
        width: 36px;
        height: 36px;
    }
    
    .file-icon {
        font-size: 20px;
    }
    
    .file-name {
        font-size: 13px;
    }
    
    .file-meta {
        font-size: 11px;
    }
    
    .selection-toolbar {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .clipboard-indicator {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .clipboard-actions {
        justify-content: space-between;
    }
    
    /* Apps Manager Mobile */
    .app-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .app-controls {
        flex-direction: column;
    }
    
    .app-card {
        padding: 12px;
    }
    
    /* Shell Terminal Mobile */
    .shell-output {
        font-size: 12px;
        max-height: 300px;
        padding: 12px;
    }
    
    .shell-input {
        font-size: 12px;
    }
}

