/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    min-height: 36px;
    background: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
 
/* Button Variants */
.btn-primary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-success {
    background-color: var(--accent-success);
    color: var(--text-inverse);
    border-color: var(--accent-success);
}

.btn-success:hover:not(:disabled) {
    background-color: var(--bg-success);
}

.btn-warning {
    background-color: var(--accent-warning);
    color: var(--text-inverse);
    border-color: var(--accent-warning);
}

.btn-warning:hover:not(:disabled) {
    background-color: var(--bg-warning);
}

.btn-danger {
    background-color: var(--accent-danger);
    color: var(--text-inverse);
    border-color: var(--accent-danger);
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--bg-danger);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-ghost:hover:not(:disabled) {
    background-color: var(--bg-hover);
}

.btn-link {
    background-color: transparent;
    color: var(--accent-primary);
    border-color: transparent;
    text-decoration: underline;
    padding: var(--spacing-xs) var(--spacing-sm);
}

.btn-link:hover:not(:disabled) {
    color: var(--accent-secondary);
    background-color: var(--bg-hover);
    text-decoration: none;
}

/* Button Sizes */
.btn-small {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    min-height: 28px;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-md);
    min-height: 44px;
}

.btn-icon {
    padding: var(--spacing-sm);
    min-width: 36px;
    min-height: 36px;
    border-radius: var(--border-radius-sm);
}

.btn-icon.small {
    padding: var(--spacing-xs);
    min-width: 28px;
    min-height: 28px;
}

.btn-icon .icon {
    font-size: var(--font-size-md);
}

.btn-block {
    width: 100%;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

input,
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: border-color var(--transition-fast);
    min-height: 36px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--bg-tertiary);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.form-actions.center {
    justify-content: center;
}

.form-actions.start {
    justify-content: flex-start;
}

.form-actions.between {
    justify-content: space-between;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    border-radius: 0;
    border-right: none;
}

.input-group input:first-child {
    border-top-left-radius: var(--border-radius-md);
    border-bottom-left-radius: var(--border-radius-md);
}

.input-group input:last-child {
    border-top-right-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);
    border-right: 1px solid var(--border-color);
}

.input-group .btn {
    border-radius: 0;
    border-left: none;
}

.input-group .btn:last-child {
    border-top-right-radius: var(--border-radius-md);
    border-bottom-right-radius: var(--border-radius-md);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content.large {
    max-width: 800px;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: var(--spacing-lg);
    overflow: auto;
    flex: 1;
}

/* Enable text selection in documentation modal */
#docs-modal .modal-body,
#docs-modal .docs-content {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Keep UI elements non-selectable in docs modal */
#docs-modal .modal-header,
#docs-modal .modal-footer,
#docs-modal .btn,
#docs-modal button,
#docs-modal .modal-close {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-close {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.notification-container.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.notification {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    position: relative;
    max-width: 100%;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--accent-success);
}

.notification.warning {
    border-left: 4px solid var(--accent-warning);
}

.notification.error {
    border-left: 4px solid var(--accent-danger);
}

.notification.info {
    border-left: 4px solid var(--accent-primary);
}

.notification-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.notification-message {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    flex-shrink: 0;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-base);
    font-weight: 500;
}
 
.notification-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width linear;
}

/* ===== CONTEXT MENU ===== */
.context-menu {
    position: fixed;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: all var(--transition-fast);
}

.context-menu.active {
    opacity: 1;
    transform: scale(1);
}

.context-menu-items {
    padding: var(--spacing-xs) 0;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    transition: background-color var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.context-menu-item:hover {
    background-color: var(--bg-hover);
}

.context-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.context-menu-item .icon {
    font-size: var(--font-size-md);
    opacity: 0.7;
}

.context-menu-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: var(--spacing-xs) 0;
}

.context-menu-danger {
    color: var(--accent-danger);
}

.context-menu-danger:hover {
    background-color: var(--accent-danger);
    color: var(--text-inverse);
}

.menu-icon {
    font-size: var(--font-size-md);
    opacity: 0.7;
    min-width: 16px;
    text-align: center;
}

.menu-text {
    flex: 1;
}

/* File Manager Styles */
.file-menu-btn {
    opacity: 0.6;
    color: var(--text-secondary);
    border: 1px solid transparent;
    background-color: var(--bg-tertiary);
    font-weight: bold;
    font-size: 14px;
    line-height: 1;
    padding: var(--spacing-xs);
    min-width: 28px;
    min-height: 28px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
    flex-shrink: 0;
}

.file-item:hover .file-menu-btn {
    opacity: 1;
}

.file-menu-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

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

.btn-tiny {
    padding: var(--spacing-xs);
    font-size: var(--font-size-xs);
    min-height: 24px;
    border-radius: var(--border-radius-sm);
}

/* File Preview Modal */
#file-preview-modal .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#file-preview-modal .modal-body {
    padding: 0;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

#file-preview-modal pre {
    background-color: var(--bg-tertiary);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 70vh;
}

#file-preview-modal .file-info {
    padding: var(--spacing-md);
}

#file-preview-modal img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--border-radius-md);
}

/* Loading state for preview */
.preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.preview-loading .loading-spinner {
    margin-right: var(--spacing-sm);
}

#file-preview-modal .file-info p {
    margin: var(--spacing-sm) 0;
    color: var(--text-secondary);
}

#file-preview-modal .file-info strong {
    color: var(--text-primary);
}

#file-preview-modal img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin: var(--spacing-md);
    box-shadow: var(--shadow-md);
}


/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    z-index: var(--z-tooltip);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--border-color);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    padding: var(--spacing-lg);
}

/* ===== SETTINGS COMPONENTS ===== */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.settings-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-group {
    margin-bottom: var(--spacing-xl);
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group h4 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-info {
    flex: 1;
}

.settings-item-title {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.settings-item-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.settings-item-control {
    flex: 0 0 auto;
    margin-left: var(--spacing-md);
}

/* ===== THEME SELECTOR COMPONENT ===== */
.theme-selector {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    min-width: 120px;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
}

.theme-selector:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-hover);
}

.theme-selector:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.theme-selector option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

/* Light theme adjustments for theme selector */
.theme-light .theme-selector {
    background-color: var(--bg-primary);
    border-color: var(--border-color);
}

.theme-light .theme-selector:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.theme-light .theme-selector option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ===== TOGGLE SWITCH COMPONENT ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    vertical-align: middle;
}

.toggle-switch:hover {
    background-color: var(--bg-secondary);
}

.toggle-switch.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.toggle-switch .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(26px);
}

.toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Override mobile input styling for toggle switches */
.toggle-switch input {
    min-height: auto !important;
    font-size: inherit !important;
}

/* ===== KEYBOARD SHORTCUTS ===== */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm);
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

kbd {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-family: var(--font-mono);
    color: var(--text-primary);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* ===== LOADING STATES ===== */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--spacing-xs);
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.long {
    width: 100%;
}

/* ===== ERROR STATES ===== */
.error-message {
    color: var(--accent-danger);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.error-message .icon {
    font-size: var(--font-size-md);
}

.success-message {
    color: var(--accent-success);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.warning-message {
    color: var(--accent-warning);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        margin: 0;
        max-height: 90vh;
        width: 100%;
        max-width: 100%;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        transform: translateY(100%);
    }
    
    .modal.active .modal-content {
        transform: translateY(0);
    }
    
    .notification-container {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        left: auto;
        bottom: auto;
        max-width: 280px; /* Smaller max-width for mobile */
        width: calc(100vw - 2 * var(--spacing-sm)); /* Responsive width with margins */
        max-width: min(280px, calc(100vw - 2 * var(--spacing-sm))); /* Ensure it fits on screen */
    }
    
    .notification {
        transform: translateX(100%); /* Slide in from right instead of bottom */
        font-size: var(--font-size-xs); /* Smaller font for mobile */
        padding: var(--spacing-sm); /* Smaller padding */
    }
    
    .notification.show {
        transform: translateX(0);
    }
    
    .notification-title {
        font-size: var(--font-size-xs);
        margin-bottom: var(--spacing-xs);
    }
    
    .notification-message {
        font-size: var(--font-size-xs);
        line-height: 1.3;
    }
    
    .notification-icon {
        font-size: var(--font-size-sm);
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column-reverse;
        gap: var(--spacing-sm);
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .settings-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .settings-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .settings-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .settings-item-control {
        margin-left: 0;
        align-self: stretch;
    }
    
    /* Touch-friendly form inputs */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Larger buttons on mobile */
    .btn {
        min-height: 44px;
        font-size: var(--font-size-md);
    }
    
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Context menu mobile adjustments */
    .context-menu {
        min-width: 200px;
        max-width: calc(100vw - var(--spacing-lg));
        z-index: calc(var(--z-modal) + 10);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .context-menu-item {
        padding: 12px;
        min-height: 44px;
    }
    
    /* Ensure menu is always visible and clickable on mobile */
    .context-menu.active {
        transform: scale(1) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* ===== FILE BROWSER PANEL ===== */
.file-browser {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.file-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.file-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: var(--spacing-xs);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.breadcrumb-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 1px 2px;
    border-radius: var(--border-radius-xs);
    transition: all var(--transition-fast);
}

.breadcrumb-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.breadcrumb-separator img {
    filter: brightness(0.7);
    transition: filter 0.2s ease;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

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

.file-item.selected {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.file-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
}

.file-info.hidden-file {
    opacity: 0.6;
    font-style: italic;
}

/* Parent directory special styling */
.file-info.parent-directory {
    background: linear-gradient(135deg, rgba(64, 153, 255, 0.1) 0%, rgba(100, 181, 246, 0.05) 100%);
    border: 1px solid rgba(64, 153, 255, 0.2);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-xs);
    margin: -2px 0;
}

.file-info.parent-directory .file-name {
    color: #64b5f6;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
}

.file-info.parent-directory:hover {
    background: linear-gradient(135deg, rgba(64, 153, 255, 0.15) 0%, rgba(100, 181, 246, 0.08) 100%);
    border-color: rgba(64, 153, 255, 0.3);
}

.file-item:has(.parent-directory):hover {
    background-color: transparent;
    border-color: transparent;
}


.file-name {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.file-size {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

.file-date {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    min-width: 70px;
    text-align: right;
    margin-right: var(--spacing-md);
}

.file-actions {
    display: flex;
    gap: var(--spacing-xs);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

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

.no-files {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-style: italic;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--bg-secondary);
}

.no-files-text {
    text-align: center;
}

/* Note: Modal styles are defined earlier in this file to avoid conflicts */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
}

.form-group input[readonly] {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.image-item .image-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs);
    text-align: center;
    word-break: break-all;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-item:hover .image-name {
    opacity: 1;
}

.image-item .delete-btn {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-item:hover .delete-btn {
    opacity: 1;
}

.image-item .delete-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Image upload button */
#upload-image-btn {
    min-width: auto;
    padding: var(--spacing-xs) var(--spacing-sm);
}

/* Hidden file input */
#image-file-input {
    display: none;
}

/* Loading state for images */
.images-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.images-loading .loading-spinner {
    margin-right: var(--spacing-sm);
}

/* Tmux Sessions Dialog */
.sessions-list {
    padding: 1rem;
}

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

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.session-item:hover {
    background: var(--bg-hover);
}

.session-info {
    flex: 1;
}

.session-info strong {
    color: var(--text-primary);
}

.session-info small {
    color: var(--text-secondary);
}

.session-actions {
    display: flex;
    gap: 0.5rem;
}

.dialog-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* ===== SHORTCUTS PANEL ===== */
.shortcuts-panel {
    position: fixed;
    top: 80px;
    right: 0;
    width: 320px;
    max-height: calc(100vh - 100px);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.shortcuts-panel.collapsed {
    transform: translateX(calc(100% - 40px));
}

.shortcuts-panel.expanded {
    transform: translateX(0);
}

.shortcuts-panel.pinned {
    transform: translateX(0);
}

.shortcuts-toggle {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.shortcuts-toggle:hover {
    background-color: var(--bg-hover);
}

.shortcuts-toggle-icon {
    font-size: var(--font-size-md);
    color: var(--text-primary);
    transition: transform var(--transition-fast);
}

.shortcuts-panel.expanded .shortcuts-toggle-icon {
    transform: rotate(180deg);
}

.shortcuts-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    cursor: grab;
    user-select: none;
}

.shortcuts-header.dragging {
    cursor: grabbing;
}

.shortcuts-header:hover {
    background-color: var(--bg-hover);
}

.shortcuts-header h3 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
}

.shortcuts-header-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.shortcuts-pin-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
}

.shortcuts-pin-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

.shortcuts-pin-btn.pinned {
    color: var(--text-inverse);
    background-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.shortcuts-pin-btn.pinned:hover {
    background-color: var(--accent-secondary);
    box-shadow: 0 0 0 2px var(--accent-secondary);
}


.shortcuts-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.shortcuts-content::-webkit-scrollbar {
    width: 6px;
}

.shortcuts-content::-webkit-scrollbar-track {
    background: transparent;
}

.shortcuts-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.shortcuts-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-hover);
}

.shortcuts-section {
    margin-bottom: var(--spacing-lg);
}

.shortcuts-section:last-child {
    margin-bottom: 0;
}

.shortcuts-section-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--border-color);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

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

.shortcut-command {
    font-family: var(--terminal-font-family);
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    min-width: 0;
    flex-shrink: 0;
}

.shortcut-description {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-left: var(--spacing-sm);
    flex: 1;
    min-width: 0;
    text-align: right;
}

/* Mouse hover area for triggering panel */
.shortcuts-trigger-area {
    position: fixed;
    top: 80px;
    right: 0;
    width: 20px;
    height: calc(100vh - 100px);
    z-index: var(--z-base);
    pointer-events: none;
}

.shortcuts-trigger-area.active {
    pointer-events: all;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .shortcuts-panel {
        width: 280px;
        max-height: calc(100vh - 80px);
        top: 60px;
    }
    
    .shortcuts-panel.collapsed {
        width: 35px;
        transform: translateX(245px);
    }
    
    .shortcuts-toggle {
        left: -35px;
        width: 35px;
        height: 50px;
    }
    
    .shortcuts-content {
        padding: var(--spacing-sm);
    }
    
    .shortcuts-header {
        padding: var(--spacing-sm);
    }
    
    .shortcuts-header h3 {
        font-size: var(--font-size-sm);
    }
    
    .shortcut-command {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .shortcut-description {
        font-size: 10px;
    }
}

/* Dark/Light theme adjustments */
.theme-light .shortcuts-panel {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

.theme-light .shortcuts-toggle {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.theme-light .shortcuts-command {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* ===== ENHANCED MARKDOWN CONTENT STYLES ===== */
.markdown-content {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--text-primary);
    max-width: none;
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* Enable text selection for documentation content */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* Headers with enhanced spacing and typography */
.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4, 
.markdown-content h5, 
.markdown-content h6 {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    line-height: 1.25;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child {
    margin-top: 0;
}

.markdown-content h1 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.markdown-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.markdown-content h3 {
    font-size: 1.25rem;
}

.markdown-content h4 {
    font-size: 1.1rem;
}

.markdown-content h5 {
    font-size: 1rem;
}

.markdown-content h6 {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.markdown-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

.markdown-content strong {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.markdown-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-content code {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.125rem 0.375rem;
    font-family: var(--font-family-mono);
    font-size: 0.85em;
    color: var(--text-primary);
    white-space: nowrap;
    /* Ensure inline code is selectable for copying */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.markdown-content pre {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    box-shadow: var(--shadow-sm);
    /* Ensure code blocks are selectable for copying */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.markdown-content pre code {
    background: none !important;
    border: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre;
    display: block;
    overflow-x: auto;
    line-height: inherit;
}

/* Ensure highlight.js themes work properly */
.markdown-content pre.hljs {
    padding: 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.markdown-content ul, 
.markdown-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.markdown-content li {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.markdown-content li > p {
    margin: 0.5rem 0;
}

.markdown-content li:first-child > p:first-child {
    margin-top: 0;
}

.markdown-content li:last-child > p:last-child {
    margin-bottom: 0;
}

/* Nested lists */
.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin: 0.5rem 0;
}

.markdown-content a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-fast);
}

.markdown-content a:hover {
    color: var(--accent-primary-light);
    border-bottom-color: var(--accent-primary-light);
}

.markdown-content a:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.markdown-content blockquote {
    border-left: 4px solid var(--accent-primary);
    background-color: var(--bg-tertiary);
    margin: 1rem 0;
    padding: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.markdown-content th {
    background-color: var(--bg-tertiary);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.markdown-content td {
    color: var(--text-secondary);
}

.markdown-content tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.markdown-content tbody tr:hover {
    background-color: var(--bg-hover);
}

.markdown-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
    opacity: 0.5;
}

.markdown-content .markdown-image,
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    margin: 1rem 0;
    display: block;
    box-shadow: var(--shadow-sm);
}

/* Task lists (GitHub style) */
.markdown-content .task-list-item {
    list-style-type: none;
    position: relative;
    margin-left: -1.5rem;
}

.markdown-content .task-list-item input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Enhanced error message styling */
.error-message {
    background-color: var(--bg-secondary);
    border: 1px solid var(--accent-danger);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-secondary);
}

.error-message h3 {
    color: var(--accent-danger);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.error-message p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.error-message details {
    margin-top: 1rem;
    text-align: left;
}

.error-message summary {
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-message pre {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    overflow-x: auto;
    text-align: left;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .markdown-content {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .markdown-content h1 {
        font-size: 1.75rem;
    }
    
    .markdown-content h2 {
        font-size: 1.375rem;
    }
    
    .markdown-content h3 {
        font-size: 1.125rem;
    }
    
    .markdown-content pre {
        font-size: 0.8rem;
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .markdown-content table {
        font-size: 0.8rem;
    }
    
    .markdown-content th,
    .markdown-content td {
        padding: 0.5rem;
    }
}

/* ===== FILE TREE ===== */
.file-tree-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    max-height: calc(100vh - 200px);
}

.file-tree-root {
    padding: var(--spacing-xs);
}

.file-tree-node {
    margin: 0;
    user-select: none;
}

.tree-node-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.tree-node-header:hover {
    background-color: var(--bg-hover);
}

.tree-node-header.file-node:hover {
    background-color: var(--bg-tertiary);
}

.tree-node-icon {
    font-size: 14px;
    width: 16px;
    height: 16px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.tree-node-icon svg {
    width: 16px;
    height: 16px;
    color: inherit;
}

.tree-node-label {
    flex: 1;
    color: var(--text-primary);
    font-weight: var(--font-weight-normal);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-tree-node.file .tree-node-label {
    color: var(--text-secondary);
}

.tree-node-children {
    padding-left: var(--spacing-md);
    border-left: 1px solid var(--border-color);
    margin-left: 8px;
    display: none;
}

.file-tree-node.expanded > .tree-node-children {
    display: block;
}

/* Selected project highlighting */
.file-tree-node.selected-project > .tree-node-header {
    background-color: var(--accent-primary);
    color: var(--text-primary-inverted);
    border: 1px solid var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
}

.file-tree-node.selected-project > .tree-node-header .tree-node-label {
    color: var(--text-primary-inverted);
    font-weight: var(--font-weight-medium);
}

.file-tree-node.selected-project > .tree-node-header:hover {
    background-color: var(--accent-secondary);
}

.file-tree-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.file-tree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.empty-icon {
    font-size: 2rem;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.empty-icon svg {
    width: 2rem;
    height: 2rem;
    color: inherit;
}

.empty-message {
    font-weight: var(--font-weight-medium);
}

/* File tree specific button styles */
#refresh-tree-btn {
    min-width: 32px;
    padding: var(--spacing-xs);
}

/* Monaco Editor and Git Diff styles have been moved to main.css to avoid conflicts */

/* ===== UPLOAD MANAGER ===== */

/* Upload button in file tree headers */
.tree-node-header .upload-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    margin-left: auto;
    min-width: auto;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-node-header:hover .upload-btn {
    opacity: 1;
}

.tree-node-header .upload-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* Delete button in file tree headers */
.tree-node-header .delete-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    margin-left: 4px;
    min-width: auto;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-node-header:hover .delete-btn {
    opacity: 1;
}

.tree-node-header .delete-btn:hover {
    background: var(--accent-danger);
    color: var(--text-inverse);
    border-color: var(--accent-danger);
}

/* Drag and drop visual feedback */
.file-tree-node.drag-over > .tree-node-header {
    background-color: rgba(var(--accent-primary-rgb), 0.2);
    border: 2px dashed var(--accent-primary);
    border-radius: var(--border-radius-sm);
}

/* Dragging state for file tree nodes */
.file-tree-node.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.file-tree-node.dragging > .tree-node-header {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius-sm);
}

/* Terminal drop zone visual feedback - handled by overlay */

/* Enhanced cursor feedback for draggable items */
.file-tree-node[draggable="true"]:hover {
    cursor: grab;
}

.file-tree-node[draggable="true"]:active {
    cursor: grabbing;
}

.drop-indicator {
    position: absolute;
    right: 8px;
    background: var(--accent-primary);
    color: var(--text-primary-inverted);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 10px;
    font-weight: var(--font-weight-medium);
    z-index: 10;
    pointer-events: none;
}

/* ===== BREADCRUMB NAVIGATION ===== */
.breadcrumb-navigation {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: var(--spacing-sm);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    gap: 2px;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: none;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    line-height: 1.4;
    white-space: nowrap;
}

.breadcrumb-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.breadcrumb-item.current {
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    cursor: default;
    background-color: var(--bg-tertiary);
}

.breadcrumb-item.current:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    font-size: 12px;
    margin: 0 1px;
    user-select: none;
}

/* Removed breadcrumb-icon styles as icons are no longer used */

.breadcrumb-label {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== FILE LIST ===== */
.file-list {
    padding: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-item {
    margin: 0;
    user-select: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: stretch;
    position: relative;
    min-height: 28px;
}

.file-item-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px var(--spacing-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    line-height: 1.2;
    border-radius: var(--border-radius-sm);
    min-height: 28px;
    flex: 1;
}

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

.file-item.directory:hover .file-item-content {
    background-color: var(--bg-tertiary);
}

.file-icon {
    font-size: 14px;
    width: 16px;
    height: 16px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.file-icon svg {
    width: 14px;
    height: 14px;
    color: inherit;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-weight: var(--font-weight-normal);
}

.file-item.file .file-name {
    color: var(--text-secondary);
}

/* File item layout - left side with icon/name, right side with buttons */
.file-item-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    padding: 4px var(--spacing-sm);
    margin-left: 0;
    min-height: 28px;
}

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

/* Action buttons */
.file-action-btn {
    background: none;
    border: none;
    padding: 2px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.file-action-btn svg {
    width: 12px;
    height: 12px;
    color: inherit;
}

.file-action-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.file-action-btn.upload-btn:hover {
    background-color: var(--accent-primary);
    color: var(--text-primary-inverted);
}

.file-action-btn.download-btn:hover {
    background-color: var(--accent-primary);
    color: var(--text-primary-inverted);
}

.file-action-btn.delete-btn:hover {
    background-color: var(--accent-danger);
    color: var(--text-primary-inverted);
}

/* Selected project highlighting for breadcrumb navigation */
.file-item.selected-project .file-item-content {
    background-color: var(--accent-primary);
    color: var(--text-primary-inverted);
    border: 1px solid var(--accent-secondary);
    box-shadow: 0 0 0 2px rgba(var(--accent-primary-rgb), 0.2);
}

.file-item.selected-project .file-name {
    color: var(--text-primary-inverted);
    font-weight: var(--font-weight-medium);
}

.file-item.selected-project .file-icon {
    color: var(--text-primary-inverted);
}

.file-item.selected-project .file-action-btn {
    color: var(--text-primary-inverted);
}

.file-item.selected-project .file-item-actions {
    opacity: 1;
}

.file-item.selected-project:hover .file-item-content {
    background-color: var(--accent-secondary);
}

/* Empty states */
.file-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.breadcrumb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.breadcrumb-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    text-align: center;
}

.access-denied-icon {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.access-denied-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.access-denied-message {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.access-denied-path {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    font-family: var(--font-family-mono);
    background-color: var(--bg-tertiary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    word-break: break-all;
    max-width: 100%;
}

.empty-icon {
    font-size: 24px;
    opacity: 0.6;
}

.empty-message {
    text-align: center;
}

/* Drag and drop visual feedback for breadcrumb navigation */
.file-item.drag-over .file-item-content {
    background-color: rgba(var(--accent-primary-rgb), 0.2);
    border: 2px dashed var(--accent-primary);
    border-radius: var(--border-radius-sm);
}

.file-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.file-item.dragging .file-item-content {
    background-color: rgba(var(--accent-primary-rgb), 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius-sm);
}

/* Enhanced cursor feedback for draggable items */
.file-item[draggable="true"]:hover {
    cursor: grab;
}

.file-item[draggable="true"]:active {
    cursor: grabbing;
}

/* Upload Modal */
.upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.upload-modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.upload-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.upload-modal-header .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.upload-modal-header .close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.upload-modal-body {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
}

.upload-target-info {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
}

.upload-target-info strong {
    color: var(--text-primary);
    margin-right: var(--spacing-sm);
}

#upload-target-path {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.upload-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-fast);
    margin-bottom: var(--spacing-md);
    background: var(--bg-secondary);
}

.upload-drop-zone.drag-active {
    border-color: var(--accent-primary);
    background-color: rgba(var(--accent-primary-rgb), 0.1);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.drop-zone-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.drop-zone-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.select-files-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}

.select-files-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.file-size-limit {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-top: var(--spacing-sm);
}

.selected-files h4 {
    color: var(--text-primary);
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    font-size: var(--font-size-md);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.file-name {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.file-size {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.remove-file-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-danger);
}

.errors-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.error-item {
    padding: var(--spacing-sm);
    background: rgba(var(--accent-danger-rgb), 0.1);
    border: 1px solid var(--accent-danger);
    border-radius: var(--border-radius-sm);
    color: var(--accent-danger);
    font-size: var(--font-size-sm);
}

.upload-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

/* Upload Progress Indicator */
.upload-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-primary);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-text {
    color: var(--text-primary);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.notification {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--accent-success);
}

.notification.error {
    border-left: 4px solid var(--accent-danger);
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-md);
    gap: var(--spacing-sm);
}

.notification-message {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    transition: color var(--transition-fast);
}

.notification-close:hover {
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsiveness for upload components */
@media (max-width: 768px) {
    .upload-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .notifications-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .upload-modal-footer {
        flex-direction: column-reverse;
    }
    
    .upload-modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== GIT STATUS PANELS ===== */

/* Desktop only visibility */
.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

/* Git Status Sidebar */
.git-status-sidebar {
    width: 350px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width var(--transition-normal);
    overflow: hidden;
}

.git-status-sidebar.collapsed {
    width: 0 !important;
}

/* Git Sidebar Header */
.git-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    padding-left: 16px; /* Align with git-panel-header text */
    height: 40px; /* Match terminal-header height */
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 10; /* Ensure header is above content */
    flex-shrink: 0;
}

.git-sidebar-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.git-project-status {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.git-refresh-btn {
    padding: 6px;
    min-width: auto;
}

/* Git Sidebar Collapse Button */
.git-sidebar-collapse-btn {
    --git-sidebar-width: 350px;
    position: fixed;
    right: calc(var(--git-sidebar-width) - 4px); /* Position 4px inside git-sidebar-header */
    top: 65px; /* app-header height (60px) + 5px margin to position in git-sidebar-header */
    width: 24px;
    height: 24px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.git-sidebar-collapse-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-primary);
}

.git-sidebar-collapse-btn:active {
    transform: scale(0.95);
}

.git-sidebar-collapse-btn .collapse-icon {
    transition: transform var(--transition-normal);
    color: var(--text-secondary);
    width: 12px;
    height: 12px;
    transform: scaleX(-1);
}

/* When git sidebar is collapsed, position button at terminal-header right side */
.git-status-sidebar.collapsed ~ .git-sidebar-collapse-btn {
    position: fixed;
    top: 68px; /* app-header height (60px) + 8px to center in terminal-header */
    right: 5px; /* Position at the very right edge of screen */
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    opacity: 1;
    z-index: 101;
}

.git-status-sidebar.collapsed ~ .git-sidebar-collapse-btn .collapse-icon {
    transform: scaleX(1);
}

/* Git Status Divider */
.git-status-divider {
    width: 6px;
    background-color: var(--bg-secondary);
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color var(--transition-normal);
}

.git-status-divider:hover {
    background-color: var(--bg-hover);
}

.git-status-divider-handle {
    width: 3px;
    height: 40px;
    background-color: var(--border-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
    transition: background-color var(--transition-normal);
}

.git-status-divider:hover .git-status-divider-handle,
.git-status-divider.dragging .git-status-divider-handle {
    background-color: var(--accent-primary);
}

/* Git Panels */
.git-panel {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    min-height: 100px;
}

.git-panel:first-child {
    flex: 0 0 30%;
}

.git-panel:nth-child(3) {
    flex: 0 0 40%;
}

.git-panel:last-of-type {
    flex: 1;
    border-bottom: none;
}

/* Git Panel Header */
.git-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 16px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.git-panel-title {
    display: flex;
    align-items: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    margin-left: 2ch; /* Indent by 2 characters */
}

.git-panel-icon {
    margin-right: 8px;
    font-size: 16px;
}

.git-panel-count {
    margin-left: 8px;
    font-size: 12px;
    font-weight: normal;
    color: var(--text-secondary);
}

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

.git-panel-collapse {
    padding: 4px 8px;
}

.git-panel-collapse .collapse-icon {
    display: inline-block;
    transition: transform var(--transition-normal);
    font-size: 12px;
}

/* Git Panel Content */
.git-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Git Panel Content Scrollbar Styling - Dark Theme */
.git-panel-content::-webkit-scrollbar {
    width: 8px;
}

.git-panel-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.git-panel-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

.git-panel-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-hover);
}

/* Light Theme Scrollbar Override for Git Panel Content */
.theme-light .git-panel-content {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.theme-light .git-panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.theme-light .git-panel-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Git Panel Divider */
.git-panel-divider {
    height: 6px;
    background-color: var(--bg-secondary);
    cursor: row-resize;
    position: relative;
    flex-shrink: 0;
    transition: background-color var(--transition-normal);
}

.git-panel-divider:hover {
    background-color: var(--bg-hover);
}

.git-panel-divider-handle {
    width: 40px;
    height: 3px;
    background-color: var(--border-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
    transition: background-color var(--transition-normal);
}

.git-panel-divider:hover .git-panel-divider-handle,
.git-panel-divider.dragging .git-panel-divider-handle {
    background-color: var(--accent-primary);
}

/* Git Status States */
.git-empty-state,
.git-error-state {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.git-error-state {
    color: var(--color-error);
}

/* Current Changes Panel Styles */
.git-changes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.git-changes-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.git-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.git-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background-color var(--transition-normal);
    cursor: pointer;
    font-size: 13px;
}

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

.git-file-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.git-file-path {
    flex: 1;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease;
}

.git-file-path:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.git-file-item.deleted .git-file-path {
    cursor: default;
}

.git-file-item.deleted .git-file-path:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.git-file-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.git-file-item.modified .git-file-status {
    background-color: rgba(91, 160, 242, 0.2);
    color: var(--accent-primary);
}

.git-file-item.added .git-file-status {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.git-file-item.deleted .git-file-status {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.git-file-item.untracked .git-file-status {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Commit History Panel Styles */
.git-commit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.git-commit-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.git-commit-item:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
}

.git-commit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.git-commit-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.git-commit-hash {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 2px 6px;
    background-color: var(--bg-tertiary);
    border-radius: 3px;
    color: var(--text-secondary);
}

.git-commit-message {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.git-commit-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.git-commit-author {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.git-commit-changes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.git-commit-changes .additions {
    color: #4caf50;
}

.git-commit-changes .deletions {
    color: #f44336;
}

.git-commit-files {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.git-commit-file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.git-commit-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 4px 8px;
    background-color: var(--bg-tertiary);
    border-radius: 3px;
}

.git-commit-file .git-file-path {
    color: var(--text-secondary);
}

.git-commit-file .git-file-changes {
    display: flex;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

/* ===== GIT TEXT SELECTION ===== */
/* Enable text selection in git components (override global user-select: none) */
.git-status-sidebar,
.git-panel-content,
.git-commit-item,
.git-commit-message,
.git-commit-hash,
.git-commit-author,
.git-commit-time,
.git-file-path,
.git-commit-stats,
.git-commit-changes,
.git-commit-files,
.git-commit-file-list,
.git-commit-file {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* ===== TERMINAL SCROLLBAR OVERLAY ===== */
.terminal-scrollbar-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    background-color: rgb(43, 43, 43); /* Dark theme */
    z-index: 10;
    pointer-events: none;
    display: none;
    transition: opacity var(--transition-fast);
}

.terminal-scrollbar-overlay.active {
    display: block;
}

/* Light theme color override */
.theme-light .terminal-scrollbar-overlay {
    background-color: rgb(248, 249, 250); /* Light theme */
}

/* Responsive overlay width for different browsers */
@supports (scrollbar-width: thin) {
    /* Firefox */
    .terminal-scrollbar-overlay {
        width: 8px;
    }
}

@media (max-width: 768px) {
    .terminal-scrollbar-overlay {
        width: 0;
        display: none !important;
    }
}

/* E-ink Designer styles moved to separate module: /assets/css/eink-designer.css */

