/* ===========================================
   FONT DEFINITIONS
   =========================================== */

/* Default font for the entire application */
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: 'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback';
    font-size: 11pt;
}

/* Console/CLI specific monospace font */
.cli-container,
.command-promt,
.command-input,
.command-text {
    font-family: monospace;
    font-size: 11pt;
}

/* ===========================================
   CLI/CONSOLE STYLES
   =========================================== */

.cli-container {
    background-color: #ffffff;
    color: #000000;
    padding: 20px;
    height: calc(100vh - 100px); /* Subtract toolbar height */
    overflow-y: auto;
    box-sizing: border-box;
}

.command-output {
    margin: 20px 0;
}

/***
Table command output
***/

.command-output table {
    border-collapse: collapse;
    margin: 20px 0;
}

th + th,
td + td {
    border-left: 1px solid rgb(190, 190, 190);
}

.command-output table th {
    text-align: left;
    padding: 4px 12px;
    text-align: right;

}

.command-output table td {
    padding: 2px 12px;
    text-align: right;
}

.command-output table thead tr {
    border-bottom: 1px solid #000;
}

.command-prompt {
    font-weight: bold;
    white-space: pre;
}

.command-history {
    margin: 0;
    padding: 0;
}

.command-entry {
    margin: 8px 0;
    padding: 12px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background-color: #fcfcfc;
    transition: box-shadow 0.2s ease;
}

.command-entry:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #e8e8e8;
}

.command-entry.command-prompt-active {
    border-color: #007acc;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.1);
}

.command-entry.command-prompt-active:hover {
    border-color: #005a9e;
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.command-form {
    margin: 0 0 10px 0;
    padding: 0;
}

.command-input, .command-text {
    background-color: transparent;
    border: none;
    color: blue;
    outline: none;
    margin: 0;
    padding: 0;
}

.command-input {
    flex: 1;
}

.command-form {
    display: flex;
    align-items: center;
}

/* ===========================================
   SIDEBAR STYLES
   =========================================== */

.sidebar {
    background-color: #f3f3f3;
    padding: 20px 0;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    /*border-right: 1px solid #e0e0e0;*/
}

.sidebar-split {
    height: 100%;
    width: 100%;
}

/*
.split-view-handle {
    background-color: #d0d0d0;
    transition: background-color 0.2s ease;
}

.split-view-handle:hover {
    background-color: #b0b0b0;
}
*/

/* ===========================================
   FILE UPLOAD STYLES
   =========================================== */

.file-upload-section {
    padding: 15px 20px;
}

.file-upload-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-upload-button:hover {
    background-color: #0056b3;
}

/***
These are status messages
***/

.selected-file {
    margin-top: 10px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
}

.selected-file p {
    margin: 0;
    word-break: break-all;
}

.upload-status {
    margin-top: 10px;
    padding: 10px;
    background-color: #d4edda;
    border-radius: 5px;
    color: #155724;
}

.upload-status p {
    margin: 0;
    word-break: break-all;
}

/* ===========================================
   BUTTON STYLES
   =========================================== */

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.1s;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: rgba(0, 0, 0, 0.08);
    opacity: 1;
}

.icon-button svg {
    width: 16px;
    height: 16px;
}

/* Toolbar button styles */
.toolbar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(75, 85, 99);
}

.toolbar-button:hover {
    background-color: #e5e7eb;
}

.toolbar-button svg {
    width: 20px;
    height: 20px;
}

/* ===========================================
   FILE TREE STYLES
   =========================================== */

.file-tree {
    margin: 0;
    padding-top: 0;
}

.tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 20px;
}

.tree-header h3 {
    margin: 0;
    padding 0;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6e6e6e;
}

/* Legacy refresh-button class for compatibility */
.refresh-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.1s;
    opacity: 0.7;
}

.refresh-button:hover {
    background-color: rgba(0, 0, 0, 0.08);
    opacity: 1;
}
.refresh-button svg {
    width: 16px;
    height: 16px;
}

.tree-loading {
    color: #6e6e6e;
    font-style: italic;
    padding: 10px 20px;
}

.tree-content {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

.tree-content::-webkit-scrollbar {
    width: 10px;
}

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

.tree-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

.tree-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.tree-node {
    display: flex;
    align-items: center;
    padding: 5px 28px 5px 28px;
    height: 22px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s;
    color: #333;
}

.tree-node:hover {
    background-color: #e8e8e8;
}

.tree-icon {
    margin-right: 6px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.tree-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 22px;
}

.tree-children {
    margin-left: 0;
}

/***
Plot command output
***/

.plot-output-container {
    margin: 0;
    padding: 0;
    width: 500px;
    height: 500px;
}


/**

Split view

**/

/* ===========================================
   EDITOR VIEW STYLES
   =========================================== */

.editor-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
}

/***
TABS STYLES
***/

.tabs-bar {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
    align-items: stretch;
    overflow-x: auto;
}

.tab {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    background: #ffffff;
    min-width: 100px;
    max-width: 200px;
    position: relative;
}

.tab:hover {
    background: #ebebeb;
}

.tab.active {
    background: #ffffff;
    border-bottom: 2px solid #007bff;
}

.tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11pt;
}

.tab-close {
    margin-left: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: #6e6e6e;
}

.tab-close:hover {
    background: #d0d0d0;
    color: #000000;
}

.tab-add {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e6e6e;
}

.tab-add:hover {
    background: #ebebeb;
    color: #000000;
}

.tab-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-placeholder,
.plot-placeholder,
.no-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e6e6e;
    font-size: 11pt;
}

/* Editor content styling */
.editor-content {
    background: #ffffff;
    color: #000000;
    font-family: 'Droid Sans Mono', 'Courier New', monospace;
    font-size: 11pt;
    line-height: 1.5;
}

.editor-content pre {
    margin: 0;
    padding: 10px;
}

.editor-content .loading {
    color: #6e6e6e;
    font-style: italic;
}

/* ===========================================
   DIALOG/POPUP STYLES
   =========================================== */

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-box {
    background-color: white;
    border-radius: 8px;
    padding: 24px;
    min-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dialog-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.dialog-content {
    margin-bottom: 20px;
}

.dialog-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 8px;
    box-sizing: border-box;
}

.dialog-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
}

.dialog-button-primary {
    background-color: #3b82f6;
    color: white;
}

.dialog-button-primary:hover {
    background-color: #2563eb;
}

.dialog-button-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.dialog-button-secondary:hover {
    background-color: #d1d5db;
}

/* Notebook Styles 
.notebook-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.notebook-toolbar {
    display: flex;
    gap: 8px;
    padding: 12px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.toolbar-btn {
    padding: 6px 12px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

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

.notebook-cells {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.notebook-cell {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.cell-number {
    font-family: monospace;
    font-size: 12px;
    color: #6b7280;
}

.cell-actions {
    display: flex;
    gap: 6px;
}

.cell-action-btn {
    padding: 4px 8px;
    font-size: 12px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.cell-action-btn:hover:not(:disabled) {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.cell-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cell-action-btn.danger:hover {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

.cell-input {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    border: none;
    font-family: monospace;
    font-size: 13px;
    resize: vertical;
    background-color: #f9fafb;
}

.cell-input:focus {
    outline: none;
    background-color: #ffffff;
}

.cell-output {
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    min-height: 20px;
}

.cell-output.empty {
    display: none;
}

.cell-output .error {
    color: #dc2626;
}

.script-indicator {
    color: #6b7280;
    font-style: italic;
    font-size: 12px;
}
    */
