/* ===========================
   TIFANY UI; 3-Panel Layout
   =========================== */

/* CSS Custom Properties; Light (default) */
:root {
    --t-primary: #1a73e8;
    --t-primary-dark: #1557b0;
    --t-bg-surface: #ffffff;
    --t-bg-workspace: #f8f9fa;
    --t-bg-input: #ffffff;
    --t-border: #e5e7eb;
    --t-text: #111827;
    --t-text-muted: #6b7280;
    --t-text-light: #9ca3af;
    --t-section-header: #1a73e8;
    --t-hover-bg: rgba(26, 115, 232, 0.07);
    --t-active-bg: rgba(26, 115, 232, 0.12);
    --t-toolbar-bg: #f0f4ff;
    --t-toolbar-border: rgba(79, 172, 254, 0.4);
    --t-header-height: 52px;
}

/* Dark Theme */
[data-theme="dark"] {
    --t-bg-surface: #252526;
    --t-bg-workspace: #1e1e1e;
    --t-bg-input: #2d2d30;
    --t-border: #3e3e42;
    --t-text: #d4d4d4;
    --t-text-muted: #9d9d9d;
    --t-text-light: #6a6a6a;
    --t-hover-bg: rgba(255, 255, 255, 0.06);
    --t-active-bg: rgba(255, 255, 255, 0.1);
    --t-toolbar-bg: rgba(79, 172, 254, 0.15);
    --t-toolbar-border: rgba(79, 172, 254, 0.3);
}

/* ===========================
   RESET (scoped to TIFANY)
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--t-bg-workspace);
    color: var(--t-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

/* ===========================
   TIFANY HEADER
   =========================== */
.tifany-header {
    height: var(--t-header-height);
    background: var(--t-bg-surface);
    border-bottom: 1px solid var(--t-border);
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
}

.tifany-header .logo {
    flex-shrink: 0;
}

.tifany-header .logo h1 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.tifany-header .nav {
    flex: 1;
    display: flex;
    gap: 2px;
    align-items: center;
}

.tifany-header .nav-link {
    font-size: 13px;
    color: var(--t-text-muted);
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 150ms ease;
}

.tifany-header .nav-link:hover {
    color: var(--t-text);
    background: var(--t-hover-bg);
}

/* Theme toggle button */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--t-border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--t-text-muted);
    font-size: 14px;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--t-hover-bg);
    color: var(--t-text);
}

/* ===========================
   3-PANEL APP LAYOUT
   =========================== */
.tifany-app {
    display: flex;
    flex-direction: row;
    height: calc(100vh - var(--t-header-height));
    overflow: hidden;
}

/* --- Icon nav rail --- */
.sidebar-nav-rail {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid var(--t-border);
    background: var(--t-bg-surface);
    padding: 8px 0;
    gap: 4px;
}

.sidebar-nav-rail a,
.sidebar-nav-rail button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--t-text-muted);
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 150ms ease;
}

.sidebar-nav-rail a:hover,
.sidebar-nav-rail button:hover {
    background: var(--t-hover-bg);
    color: var(--t-primary);
}

.sidebar-nav-rail a.active {
    color: var(--t-primary);
    background: var(--t-active-bg);
}

/* --- Left panel --- */
.tifany-left-panel {
    width: 264px;
    min-width: 200px;
    overflow-y: auto;
    border-right: 1px solid var(--t-border);
    background: var(--t-bg-surface);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: calc(100vh - var(--t-header-height));
    align-self: flex-start;
}

.tifany-left-panel.panel-hidden {
    display: none;
}

/* --- Center panel --- */
.tifany-center-panel {
    flex: 1;
    min-width: 0;
    overflow: auto;
    background: var(--t-bg-workspace);
    display: flex;
    flex-direction: column;
}

/* --- Right panel --- */
.tifany-right-panel {
    width: 300px;
    min-width: 220px;
    max-width: 600px;
    overflow-y: auto;
    border-left: 1px solid var(--t-border);
    background: var(--t-bg-surface);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.right-panel-resize-handle {
    position: absolute;
    top: 0;
    left: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
}

.right-panel-resize-handle:hover,
.right-panel-resize-handle.dragging {
    background: var(--t-accent, #4a90d9);
    opacity: 0.5;
}

/* ===========================
   LEFT PANEL SECTIONS
   =========================== */
.left-section-header {
    color: var(--t-section-header);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--t-border);
    user-select: none;
}

.left-section-body {
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--t-border);
}

/* ===========================
   RIGHT PANEL SECTIONS (collapsible)
   =========================== */
.right-section {
    border-bottom: 1px solid var(--t-border);
}

.right-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    color: var(--t-section-header);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    background: var(--t-bg-surface);
    transition: background 150ms ease;
}

.right-section-header:hover {
    background: var(--t-hover-bg);
}

.right-section-chevron {
    font-size: 10px;
    color: var(--t-text-muted);
    transition: transform 150ms ease;
}

.right-section-body {
    padding: 10px 14px 12px;
    background: var(--t-bg-surface);
}

.right-section-body.collapsed {
    display: none;
}

/* Monaco editor container */
#monaco-editor-container {
    height: 480px;
    min-height: 180px;
    border: 1px solid var(--t-border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

/* Generate actions row */
.generate-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

/* ===========================
   CENTER; TABLE WRAPPER
   =========================== */
.center-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--t-text-muted);
    padding: 8px 14px;
    border-bottom: 1px solid var(--t-border);
    background: var(--t-bg-surface);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.center-pos {
    font-size: 11px;
    color: var(--t-text-light);
}

.table-wrapper {
    background-color: var(--t-bg-workspace);
    flex: 1;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: auto;
    padding: 16px;
    min-height: 200px;
}

/* ===========================
   MOBILE TOOLBAR (shown only on mobile)
   =========================== */
#tableViewer-mb {
    display: none;
}

.toolbar-container {
    display: flex;
    background-color: var(--t-bg-surface);
    border-bottom: 1px solid var(--t-border);
    padding: 6px 8px;
    overflow-x: auto;
    white-space: nowrap;
    gap: 4px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
    margin-right: 4px;
    border-right: 1px solid var(--t-border);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    background: var(--t-toolbar-bg);
    border: 1px solid var(--t-toolbar-border);
    color: var(--t-text);
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 11px;
    cursor: pointer;
    transition: all 200ms ease;
    white-space: nowrap;
    font-family: inherit;
}

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

.toolbar-btn.active {
    background: var(--t-active-bg);
    color: var(--t-primary);
    border-color: var(--t-primary);
}

/* ===========================
   LEGACY / COMPAT (Bootstrap accordion panels still used inside left sidebar)
   =========================== */
.panel {
    display: none;
    overflow: auto;
}

/* Left panel sections start expanded and stay persistent (not reset on table reload) */
.tifany-left-panel .panel {
    display: block;
}

.accordion {
    background-color: #eee;
    color: #444;
    cursor: pointer;
    padding: 10px 14px;
    width: 100%;
    border: 1px solid var(--t-border);
    text-align: left;
    outline: none;
    font-size: 12px;
    transition: 0.3s;
    border-radius: 5px;
    font-family: inherit;
}

.accordion.active {
    background-color: #ddd;
}

.accordion::after {
    content: " \25BD";
    float: right;
}

.accordion.active::after {
    content: " \25B3";
}

.side-accordion {
    writing-mode: sideways-rl;
    align-content: space-around;
}

.ha-100.active {
    height: 100%;
}

.input-container {
    display: block;
    padding: 8px 0;
}

.sidebar-container {
    display: none; /* hidden on desktop; replaced by .tifany-left-panel */
}

.sidebar {
    width: 100%;
    padding: 5px;
    background: var(--t-bg-surface);
    overflow-y: auto;
}

.instructions {
    background: var(--t-bg-surface);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--t-text-muted);
}

.control-group {
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
}

.control-group h3 {
    margin-bottom: 8px;
    color: var(--t-text);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.panel-style {
    border: 1px solid var(--t-border);
    border-radius: 8px;
    margin-top: 5px;
    padding: 12px;
}

.style-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}

.button-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: space-between;
    min-width: 100%;
}

.sp-class:hover {
    transition: all 200ms ease;
    transform: scale(1.05);
}

.sp-class.sp-active {
    background-color: #337ab7;
    color: #fff;
    border-color: #2e6da4;
}

/* ===========================
   DARK MODE; Bootstrap 4 overrides
   =========================== */
[data-theme="dark"] body {
    background-color: var(--t-bg-workspace);
    color: var(--t-text);
}

[data-theme="dark"] .tifany-header {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .tifany-left-panel,
[data-theme="dark"] .tifany-right-panel {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .left-section-header,
[data-theme="dark"] .right-section-header {
    border-color: var(--t-border);
}

[data-theme="dark"] .left-section-body,
[data-theme="dark"] .right-section-body {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .right-section {
    border-color: var(--t-border);
}

[data-theme="dark"] .accordion {
    background: #333;
    color: #ccc;
    border-color: var(--t-border);
}

[data-theme="dark"] .accordion.active {
    background: #3a3a3a;
}

[data-theme="dark"] .panel {
    background: var(--t-bg-surface);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea {
    background-color: var(--t-bg-input) !important;
    color: var(--t-text) !important;
    border-color: var(--t-border) !important;
}

[data-theme="dark"] .btn-outline-primary {
    color: #6ab0f5;
    border-color: #6ab0f5;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #ccc;
    border-color: #555;
}

[data-theme="dark"] .btn-outline-danger {
    color: #f87171;
    border-color: #f87171;
}

[data-theme="dark"] .modal-content {
    background-color: var(--t-bg-surface);
    color: var(--t-text);
    border-color: var(--t-border);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--t-border);
}

[data-theme="dark"] .close {
    color: var(--t-text);
}

[data-theme="dark"] label {
    color: var(--t-text-muted);
}

[data-theme="dark"] .cell-controls {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
    color: var(--t-text);
}

[data-theme="dark"] .toolbar-container {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .center-header {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .sidebar-nav-rail {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

/* ===========================
   INPUT TOOLBAR
   =========================== */
.input-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--t-bg-surface);
    border-bottom: 1px solid var(--t-border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.input-toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--t-border);
    flex-shrink: 0;
}

/* Drag & Drop toggle switch */
.toolbar-switch-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    user-select: none;
    font-size: 11px;
    color: var(--t-text-muted);
}

.toolbar-switch-label input[type="checkbox"] {
    display: none;
}

.toolbar-switch-track {
    display: inline-block;
    width: 28px;
    height: 15px;
    background: var(--t-border);
    border-radius: 8px;
    position: relative;
    transition: background 200ms ease;
    flex-shrink: 0;
}

.toolbar-switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    background: #fff;
    border-radius: 50%;
    transition: transform 200ms ease;
}

.toolbar-switch-label input:checked + .toolbar-switch-track {
    background: var(--t-primary);
}

.toolbar-switch-label input:checked + .toolbar-switch-track::after {
    transform: translateX(13px);
}

/* Tab count mini-input */
.toolbar-tab-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--t-text-muted);
}

.toolbar-tab-input {
    border: 1px solid var(--t-border);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 12px;
    background: var(--t-bg-input);
    color: var(--t-text);
    text-align: center;
}

.toolbar-tab-input:focus {
    outline: none;
    border-color: var(--t-primary);
}

/* ===========================
   SHEET TAB BAR
   =========================== */
.sheet-tab-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    background: var(--t-bg-surface);
    border-top: 1px solid var(--t-border);
    flex-shrink: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.sheet-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 12px;
    border: 1px solid var(--t-border);
    border-radius: 4px 4px 0 0;
    background: var(--t-bg-workspace);
    font-size: 12px;
    color: var(--t-text-muted);
    cursor: pointer;
    user-select: none;
    transition: all 150ms ease;
    flex-shrink: 0;
}

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

.sheet-tab.active {
    background: var(--t-bg-surface);
    border-bottom-color: var(--t-bg-surface);
    color: var(--t-primary);
    font-weight: 600;
}

.sheet-tab-label {
    min-width: 40px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
}

.sheet-tab-close {
    background: none;
    border: none;
    color: var(--t-text-light);
    font-size: 13px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 150ms ease;
}

.sheet-tab:hover .sheet-tab-close,
.sheet-tab.active .sheet-tab-close {
    opacity: 1;
}

.sheet-tab-close:hover {
    color: var(--t-text);
}

.sheet-tab-add {
    background: none;
    border: 1px solid var(--t-border);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    color: var(--t-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 150ms ease;
}

.sheet-tab-add:hover {
    background: var(--t-hover-bg);
    color: var(--t-primary);
    border-color: var(--t-primary);
}

/* ===========================
   BOOTSTRAP MODAL; z-index safety
   Ensures modals always render above sticky header (z-200) and all panels.
   =========================== */
.modal { z-index: 1055 !important; }
.modal-backdrop { z-index: 1050 !important; }
/* Ensure the modal dialog is properly centered even with our CSS reset */
.modal-dialog {
    margin: 1.75rem auto !important;
}

/* ===========================
   DRAW CANVAS
   =========================== */
/* When active, Draw Mode hides .table-wrapper and fills the center panel */
body.draw-mode-active .tifany-center-panel {
    display: flex;
    flex-direction: column;
}

.draw-canvas {
    display: none;
    flex-direction: column;
    background: var(--t-bg-surface);
    flex: 1;           /* fill the center panel */
    min-height: 0;     /* allow flex child to shrink */
    overflow: hidden;
}

.draw-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--t-active-bg);
    border-bottom: 1px solid var(--t-border);
    font-size: 12px;
    font-weight: 500;
    color: var(--t-primary);
    flex-shrink: 0;
}

.draw-canvas-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.draw-canvas-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Monaco container inside draw canvas */
.draw-monaco-container {
    flex: 1;
    min-height: 0;
    border-bottom: 1px solid var(--t-border);
}

.draw-input {
    flex: 1;
    width: 100%;
    min-height: 100px;
    max-height: 160px;
    resize: vertical;
    border: none;
    border-bottom: 1px solid var(--t-border);
    padding: 10px 14px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: var(--t-bg-input);
    color: var(--t-text);
    outline: none;
}

.draw-input:focus {
    border-bottom-color: var(--t-primary);
}

.draw-canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--t-bg-surface);
    border-bottom: 1px solid var(--t-border);
    flex-shrink: 0;
}

.draw-toolbar-hint {
    font-size: 11px;
    color: var(--t-text-muted);
    margin-right: 4px;
}

.draw-preview {
    flex: 1;
    overflow-y: auto;
    padding: 8px 14px;
    background: var(--t-bg-workspace);
    min-height: 60px;
}

.draw-preview-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--t-text-muted);
    margin-bottom: 6px;
    display: block;
}

.draw-preview-grid {
    border-collapse: collapse;
    margin-top: 5px;
}

.draw-preview-grid td {
    border: 1px solid var(--t-border);
    padding: 2px 6px;
    min-width: 60px;
    height: 28px;
    font-size: 11px;
    color: var(--t-text);
    background: var(--t-bg-surface);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    transition: all 150ms ease;
    user-select: none;
}

.draw-preview-grid td:hover {
    background: var(--t-hover-bg);
}

.draw-preview-grid td.active-cell {
    border: 2px solid var(--t-primary);
    background: var(--t-active-bg);
    padding: 1px 5px; /* Offset for 2px border */
}

/* Header cells show with a distinct tint */
.draw-preview-grid td.header-cell {
    background: rgba(var(--t-primary-rgb, 99, 102, 241), 0.12);
    color: var(--t-primary);
    font-weight: 600;
}

/* Draw mode indicator on toolbar button */
body.draw-mode-active #drawModeToggle {
    background: var(--t-active-bg);
    color: var(--t-primary);
    border-color: var(--t-primary);
}

/* ===========================
   DRAW MODE (legacy cursor only)
   =========================== */
body.draw-mode-active .table-wrapper {
    cursor: default;
}

/* ===========================
   NODE EDITOR MODE
   =========================== */

/* Toolbar button active state */
body.node-editor-active #nodeEditorToggle {
    background: var(--t-active-bg);
    color: var(--t-primary);
    border-color: var(--t-primary);
}

/* Hide table view and sheet tabs while node editor is active */
body.node-editor-active .table-wrapper,
body.node-editor-active #sheetTabBar {
    display: none !important;
}

/* Center panel needs relative positioning for the absolute overlay */
.tifany-center-panel {
    position: relative;
}

/* Dark mode overrides for new components */
[data-theme="dark"] .input-toolbar {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .sheet-tab-bar {
    background: var(--t-bg-surface);
    border-color: var(--t-border);
}

[data-theme="dark"] .sheet-tab {
    background: var(--t-bg-workspace);
    border-color: var(--t-border);
    color: var(--t-text-muted);
}

[data-theme="dark"] .sheet-tab.active {
    background: var(--t-bg-surface);
    border-bottom-color: var(--t-bg-surface);
}

[data-theme="dark"] .toolbar-tab-input {
    background-color: var(--t-bg-input) !important;
    color: var(--t-text) !important;
    border-color: var(--t-border) !important;
}

/* ===========================
   MOBILE LAYOUT
   Mobile stack order (top → bottom):
   1. Text Input
   2. Instruction
   3. Toolbar + Table Viewer
   4. Generate Code
   =========================== */
@media (max-width: 768px) {
    .tifany-app {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - var(--t-header-height));
        overflow: visible;
    }

    /* Hide desktop-only elements on mobile */
    #sidebar-nav-mount,
    .tifany-left-panel {
        display: none;
    }

    /* Right panel: show stacked at top on mobile */
    .tifany-right-panel {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--t-border);
        order: 1;
    }

    /* Move Text Input section to top */
    .right-section[data-mobile-order="1"] { order: 1; }
    /* Move Instruction section second */
    .right-section[data-mobile-order="2"] { order: 2; }
    /* Move Generate Code section last */
    .right-section[data-mobile-order="3"] { order: 3; }

    /* Center (toolbar + table) in the middle */
    .tifany-center-panel {
        width: 100%;
        order: 2;
        height: auto;
        overflow: visible;
    }

    /* Show mobile toolbar */
    #tableViewer-mb {
        display: block;
    }

    /* Table wrapper takes natural height on mobile */
    .table-wrapper {
        height: auto;
        min-height: 300px;
    }

    /* Monaco editor smaller on mobile */
    #monaco-editor-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .tifany-header .nav {
        display: none;
    }
}
