/* File System Dialog Styles */
.file-system-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.file-system-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-light);
}

.file-system-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--header-color);
}

.header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cloud-sync-buttons {
    display: flex;
    margin-right: 5px;
    border-right: 1px solid var(--border-light);
    padding-right: 5px;
}

.cloud-upload-button,
.cloud-download-button,
.cloud-sync-button,
.upload-button,
.refresh-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    transition: all 0.2s;
    padding: 6px;
}

.cloud-upload-button {
    color: white; /* Green for upload */
}

.cloud-download-button {
    color: white; /* Blue for download */
}

.cloud-sync-button {
    color: white; /* Purple for sync */
}

.upload-button {
    color: #ff9800; /* Orange for file upload */
}

.refresh-button {
    color: #03a9f4; /* Light blue for refresh */
}

.cloud-upload-button:hover,
.cloud-download-button:hover,
.cloud-sync-button:hover,
.upload-button:hover,
.refresh-button:hover {
    background-color: var(--bg-secondary);
    filter: brightness(1.2);
    transform: scale(1.1);
}

.cloud-upload-button:disabled,
.cloud-download-button:disabled,
.cloud-sync-button:disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.close-button {
    background-color: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-button:hover {
    color: var(--accent-primary);
}

.current-path {
    padding: 8px 15px;
    background-color: var(--bg-primary-alt);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 1px solid var(--border-light);
}

.path-segment {
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.path-segment:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.path-separator {
    color: var(--text-muted);
}

/* Sync status container */
.sync-status-container {
    padding: 8px 15px;
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
}

.sync-status-container.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.sync-status-container.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.sync-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.dismiss-button {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* Two-column layout */
.file-system-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.file-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.cloud-column {
    flex: 1;
    margin-left: 1em;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.column-header {
    height: 45px;
    padding: 5px 10px;
    background-color: var(--bg-primary-alt);
    font-weight: bold;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    color: var(--text-secondary);
    gap: 10px;
}

.no-files-message,
.empty-folder-message {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-style: italic;
}

.file-tree {
    padding: 5px 0;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light-alt);
    transition: background-color 0.2s;
    position: relative;
}

.file-item:hover {
    background-color: var(--bg-primary-alt);
}

.file-item.folder {
    color: var(--accent-secondary);
}

.file-item.cartridge {
    color: #28a745;
}

.file-item.code {
    color: #17a2b8;
}

.file-item.image {
    color: #fd7e14;
}

.file-item.cloud-only {
    opacity: 0.7;
    border-left: 3px solid #2196f3;
}

.cloud-icon {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #2196f3;
}

.cloud-broken-icon {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #2196f3;
    opacity: 0.7;
}

.file-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
    padding-left: 15px;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.file-sync-button {
    background: none;
    border: none;
    color: white;
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    transition: all 0.2s;
}

.sync-download {
    background-color: #2196f3;
}

.sync-upload {
    background-color: #4caf50;
}

.file-sync-button:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.file-dropdown {
    position: absolute;
    top: 100%;
    right: 10px;
    z-index: 10;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-width: 150px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    color: var(--text-light);
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
}

/* Make sure dialog is properly sized */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-primary);
    width: 90%;
    max-width: 1100px;
    max-height: 700px;
    border-radius: 4px;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
} 