/* Base styles */
html, body { 
    margin: 0; 
    padding: 0; 
    overflow: hidden; 
    width: 100%;
    height: 100%;
}

.nicegui-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.q-page-container {
    padding: 0 !important;
    margin: 0 !important;
}

.q-page {
    padding: 0 !important;
    margin: 0 !important;
}

/* Terminal container */
#terminal-container { 
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: 0;
    background: #1e1e1e;
    padding: 8px 8px 16px 8px;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#terminal { 
    width: 100%; 
    height: 100%;
    box-sizing: border-box;
}

/* Scrollbar styling */
.xterm-viewport {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #555 #1e1e1e;
}

.xterm-viewport::-webkit-scrollbar {
    width: 12px;
}

.xterm-viewport::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.xterm-viewport::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
}

.xterm-viewport::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.xterm-screen {
    pointer-events: none;
}

.xterm-rows {
    pointer-events: auto;
}

/* Context menu */
.context-menu {
    position: absolute;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    z-index: 10000;
    min-width: 120px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 13px;
}

.context-menu-item {
    padding: 6px 16px;
    cursor: pointer;
    color: #cccccc;
    user-select: none;
}

.context-menu-item:hover {
    background: #404040;
}

.context-menu-item.disabled {
    color: #666;
    cursor: default;
}

.context-menu-item.disabled:hover {
    background: transparent;
}

.context-menu-separator {
    height: 1px;
    background: #555;
    margin: 4px 0;
}

/* ========== SFTP TRANSFER PROGRESS PANEL ========== */

#transfer-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-height: 500px;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 13px;
    color: #cccccc;
    display: none;  /* Hidden by default */
}

#transfer-panel.visible {
    display: block;
}

#transfer-header {
    padding: 12px 16px;
    background: #3a3a3a;
    border-bottom: 1px solid #555;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#transfer-header:hover {
    background: #424242;
}

#transfer-title {
    font-weight: 600;
    font-size: 14px;
}

#transfer-collapse-icon {
    font-size: 18px;
    transition: transform 0.2s;
}

#transfer-collapse-icon.collapsed {
    transform: rotate(-90deg);
}

#transfer-list {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #555 #2d2d2d;
}

#transfer-list::-webkit-scrollbar {
    width: 8px;
}

#transfer-list::-webkit-scrollbar-track {
    background: #2d2d2d;
}

#transfer-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.transfer-item {
    background: #3a3a3a;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.transfer-item:last-child {
    margin-bottom: 0;
}

.transfer-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.transfer-label {
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transfer-value {
    font-weight: 500;
}

.transfer-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.transfer-status.starting {
    background: #4a5568;
    color: #cbd5e0;
}

.transfer-status.compressing {
    background: #4299e1;
    color: white;
}

.transfer-status.transferring {
    background: #48bb78;
    color: white;
}

.transfer-status.extracting {
    background: #ed8936;
    color: white;
}

.transfer-status.completed {
    background: #38a169;
    color: white;
}

.transfer-status.error {
    background: #f56565;
    color: white;
}

.transfer-progress-bar {
    width: 100%;
    height: 8px;
    background: #4a4a4a;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.transfer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.3s ease;
}

.transfer-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.transfer-detail-item {
    display: flex;
    justify-content: space-between;
}
