Download renderer/css/app.css from chahuadev/chahua-database-manager: direct link, hf CLI and curl.
- Browser
- Download file 103 kB
-
https://huggingface.co/datasets/chahuadev/chahua-database-manager/resolve/main/renderer/css/app.css
- Command line
-
hf download hf://datasets/chahuadev/chahua-database-manager/renderer/css/app.css
-
curl -L -o app.css https://huggingface.co/datasets/chahuadev/chahua-database-manager/resolve/main/renderer/css/app.css
103 kB
| /** | |
| * ============================================================================ | |
| * CHAHUA DATABASE MANAGER - APPLICATION STYLES | |
| * ============================================================================ | |
| * | |
| * @fileoverview Main application styles and layout system | |
| * @author Chahua Development Thailand | |
| * @version 1.0.0 | |
| * | |
| * @description | |
| * This file contains core application styles including: | |
| * - Global CSS reset and base styles | |
| * - CSS custom properties (CSS variables) | |
| * - Layout system (sidebar, main content, tabs) | |
| * - Typography and spacing system | |
| * - Utility classes | |
| * | |
| * @dependencies | |
| * - themes.css (theme overrides) | |
| * - components.css (component styles) | |
| * | |
| * @z-index-usage | |
| * 1000 - Tab controls, sidebar elements | |
| * 9999 - Dropdown menus, query editor header | |
| * | |
| * @css-variables | |
| * All CSS custom properties are defined in :root for global access | |
| * Theme colors, spacing, fonts, borders, shadows, etc. | |
| * | |
| * @responsive | |
| * Layout adapts to different screen sizes | |
| * Sidebar can be collapsed on smaller screens | |
| */ | |
| /* ============================================================================ | |
| GLOBAL RESET & BASE STYLES | |
| ============================================================================ | |
| @description CSS reset for consistent rendering across browsers | |
| @note Uses box-sizing: border-box for all elements | |
| ============================================================================ */ | |
| /* ============================================================================ | |
| GLOBAL STYLES & BASE ELEMENTS | |
| ============================================================================ | |
| @component GlobalStyles | |
| @description Universal reset and base element styling | |
| @purpose Establish consistent foundation across all browsers | |
| @scope Global application styling | |
| @base-elements | |
| * - Universal box-sizing and reset | |
| body - Main application container with flex layout | |
| @features | |
| - Consistent box model (border-box) | |
| - Full viewport height layout | |
| - No margin/padding reset | |
| - Overflow hidden for contained layout | |
| ============================================================================ */ | |
| /* Global Styles */ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; /* @layout Consistent box model */ | |
| } | |
| /* ============================================================================ | |
| CSS CUSTOM PROPERTIES (VARIABLES) | |
| ============================================================================ | |
| @description Central definition of all design tokens | |
| @usage var(--property-name) throughout the application | |
| @theme These can be overridden in themes.css for different themes | |
| ============================================================================ */ | |
| :root { | |
| /* @theme Dark Theme Colors - Primary color palette */ | |
| --bg-primary: #1e1e1e; /* Main background */ | |
| --bg-secondary: #252526; /* Secondary background (modals, cards) */ | |
| --bg-tertiary: #2d2d30; /* Tertiary background (elevated elements) */ | |
| --bg-hover: #3e3e42; /* Hover state background */ | |
| /* @theme Text Colors - Text hierarchy */ | |
| --text-primary: #cccccc; /* Primary text color */ | |
| --text-secondary: #969696; /* Secondary text color */ | |
| --text-muted: #6a6a6a; /* Muted/disabled text */ | |
| /* @theme UI Colors */ | |
| --border-color: #3e3e42; /* Standard border color */ | |
| --accent-primary: #007acc; /* Primary accent (buttons, links) */ | |
| --accent-hover: #1177bb; /* Accent hover state */ | |
| /* @theme Status Colors - Semantic color system */ | |
| --success-color: #4caf50; /* Success states */ | |
| --warning-color: #ff9800; /* Warning states */ | |
| --error-color: #f44336; /* Error states */ | |
| --info-color: #2196f3; /* Info states */ | |
| /* @typography Font System */ | |
| --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* UI font */ | |
| --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace; /* Code font */ | |
| /* @spacing Spacing Scale - 8px base unit */ | |
| --spacing-xs: 4px; /* Extra small spacing */ | |
| --spacing-sm: 8px; | |
| --spacing-md: 16px; | |
| --spacing-lg: 24px; | |
| --spacing-xl: 32px; | |
| /* @z-index Z-Index Scale - Centralized z-index management */ | |
| --z-base: 1; /* Base level */ | |
| --z-dropdown: 1000; /* Dropdowns, select options */ | |
| --z-sticky: 1001; /* Sticky headers */ | |
| --z-overlay: 9000; /* Background overlays */ | |
| --z-modal: 10000; /* Modal dialogs */ | |
| --z-popover: 11000; /* Popovers, tooltips */ | |
| --z-tooltip: 12000; /* Tooltips (highest) */ | |
| /* Borders */ | |
| --border-radius: 4px; | |
| --border-radius-lg: 8px; | |
| /* Shadows */ | |
| --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3); | |
| --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3); | |
| --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3); | |
| } | |
| /* ============================================================================ | |
| NATIVE DIALOG COMPONENT (MODERN MODAL REPLACEMENT) | |
| ============================================================================ | |
| @component NativeDialog | |
| @description Modern HTML5 <dialog> element styling | |
| @purpose Replace div-based modals with semantic, accessible dialogs | |
| @browser-support Modern browsers with native dialog support | |
| @advantages | |
| - No z-index conflicts (browser manages stacking) | |
| - Built-in backdrop and focus management | |
| - Semantic HTML with accessibility features | |
| - ESC key support out of the box | |
| - Proper modal behavior | |
| @structure | |
| <dialog class="app-dialog"> | |
| <div class="modal-header"> | |
| <div class="modal-body"> | |
| <div class="modal-footer"> | |
| </dialog> | |
| @javascript-api | |
| dialog.showModal() - Show as modal | |
| dialog.close() - Close dialog | |
| dialog.open - Check if open | |
| @backdrop | |
| Uses ::backdrop pseudo-element for overlay | |
| No need for separate overlay divs | |
| ============================================================================ */ | |
| .app-dialog { | |
| border: 0; | |
| padding: 0; | |
| width: min(560px, 90vw); | |
| max-height: 90vh; | |
| background: var(--bg-secondary); | |
| color: var(--text-primary); | |
| border-radius: var(--border-radius-lg); | |
| box-shadow: var(--shadow-lg); | |
| overflow: hidden; | |
| /* Remove default browser styling */ | |
| margin: auto; | |
| position: fixed; | |
| inset: 0; | |
| } | |
| .app-dialog::backdrop { | |
| background: rgba(0, 0, 0, 0.7); | |
| backdrop-filter: blur(2px); | |
| /* Backdrop automatically handles z-index */ | |
| } | |
| /* Large dialog variant for complex forms */ | |
| .app-dialog.dialog-large { | |
| width: min(800px, 95vw); | |
| max-height: 95vh; | |
| } | |
| /* Small dialog variant for confirmations */ | |
| .app-dialog.dialog-small { | |
| width: min(400px, 85vw); | |
| } | |
| /* Dialog animation (optional - for smooth appearance) */ | |
| .app-dialog { | |
| transition: opacity 0.2s ease-out, transform 0.2s ease-out; | |
| } | |
| .app-dialog:not([open]) { | |
| opacity: 0; | |
| transform: scale(0.95); | |
| pointer-events: none; | |
| } | |
| body { | |
| font-family: var(--font-family); | |
| background-color: var(--bg-primary); | |
| color: var(--text-primary); | |
| height: 100vh; | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* ============================================================================ | |
| APPLICATION HEADER LAYOUT | |
| ============================================================================ | |
| @component AppHeaderLayout | |
| @description Modern gradient header with branding and navigation | |
| @purpose Top application bar with logo, title, and primary controls | |
| @height Fixed 60px with gradient accent line | |
| @features | |
| - Gradient background for visual appeal | |
| - Animated accent line at bottom | |
| - Responsive flex layout | |
| - Consistent spacing system | |
| - Professional shadows | |
| @structure | |
| Fixed header with flex justify-space-between layout | |
| Decorative gradient line at bottom edge | |
| ============================================================================ */ | |
| /* Header - Modern Style */ | |
| .app-header { | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| border-bottom: 2px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| height: 60px; | |
| flex-shrink: 0; | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); | |
| position: relative; | |
| } | |
| .app-header::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| height: 2px; | |
| background: linear-gradient(90deg, var(--accent-primary), transparent, var(--accent-primary)); | |
| } | |
| /* ============================================================================ | |
| MAIN LAYOUT CONTAINER SYSTEM | |
| ============================================================================ | |
| @component MainLayoutContainer | |
| @description Core application layout containers | |
| @purpose Structure the main application interface | |
| @layout Flexbox-based responsive layout system | |
| @containers | |
| .main-container - Root application container (100vh) | |
| .content-wrapper - Main content area with sidebar and content | |
| .sidebar - Collapsible left navigation panel | |
| .main-content - Primary content display area | |
| @features | |
| - Full viewport height layout | |
| - Responsive flex containers | |
| - Modern card-style panels | |
| - Consistent spacing and shadows | |
| - Smooth resize transitions | |
| @responsive | |
| Adapts from desktop sidebar layout to mobile stacked layout | |
| ============================================================================ */ | |
| /* Main Layout Improvements */ | |
| .main-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| background: var(--bg-primary); | |
| } | |
| .content-wrapper { | |
| display: flex; | |
| flex: 1; | |
| overflow: hidden; | |
| gap: var(--spacing-md); | |
| padding: var(--spacing-md); | |
| } | |
| .sidebar { | |
| width: 300px; | |
| min-width: 250px; | |
| max-width: 400px; | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); | |
| overflow-y: auto; | |
| resize: horizontal; | |
| } | |
| .main-content { | |
| flex: 1; | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* ============================================================================ | |
| RESPONSIVE LAYOUT SYSTEM | |
| ============================================================================ | |
| @component ResponsiveLayout | |
| @description Mobile-first responsive layout system | |
| @breakpoints 1024px (tablet), 768px (mobile) | |
| @features Flexible sidebar, collapsible content | |
| @behavior Sidebar becomes full-width on smaller screens | |
| ============================================================================ */ | |
| /* Responsive Layout */ | |
| @media (max-width: 1024px) { | |
| .content-wrapper { | |
| flex-direction: column; | |
| } | |
| .sidebar { | |
| width: 100%; | |
| min-width: unset; | |
| max-width: unset; | |
| resize: none; | |
| } | |
| } | |
| @media (max-width: 768px) { | |
| .content-wrapper { | |
| padding: var(--spacing-sm); | |
| gap: var(--spacing-sm); | |
| } | |
| } | |
| /* ============================================================================ | |
| APPLICATION HEADER COMPONENT | |
| ============================================================================ | |
| @component AppHeader | |
| @description Top navigation bar with logo, connection selector, and actions | |
| @layout Fixed height (60px) with flex layout | |
| @features Gradient background, connection management, responsive design | |
| @structure .header-left + .header-center + .header-right | |
| @sections | |
| .header-left - Logo and app title | |
| .header-center - Connection selector dropdown | |
| .header-right - Action buttons and user menu | |
| @responsive | |
| Adapts to smaller screens by hiding less important elements | |
| ============================================================================ */ | |
| .header-left { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .app-logo { | |
| width: 24px; | |
| height: 24px; | |
| } | |
| .header-left h1 { | |
| font-size: 16px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .header-center { | |
| flex: 1; | |
| display: flex; | |
| justify-content: center; | |
| max-width: 500px; | |
| } | |
| .connection-selector { | |
| display: flex; | |
| gap: var(--spacing-sm); | |
| align-items: center; | |
| } | |
| .connection-select { | |
| background-color: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| color: var(--text-primary); | |
| padding: var(--spacing-xs) var(--spacing-md); | |
| border-radius: var(--border-radius); | |
| font-size: 14px; | |
| min-width: 200px; | |
| } | |
| .connection-select:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| } | |
| /* ============================================================================ | |
| CONNECTION MANAGEMENT CONTROLS | |
| ============================================================================ | |
| @component ConnectionControls | |
| @description Connection selector and management buttons | |
| @purpose Allow users to select and manage database connections | |
| @location Header center section | |
| @elements | |
| .connection-select - Dropdown for selecting active connection | |
| #deleteConnectionBtn - Button for removing selected connection | |
| @features | |
| - Styled select dropdown | |
| - Disabled states for safety | |
| - Consistent spacing and sizing | |
| - Focus states for accessibility | |
| @behavior | |
| Delete button disabled when no connection selected | |
| ============================================================================ */ | |
| /* ✅ เพิ่ม CSS สำหรับปุ่มลบ Connection */ | |
| #deleteConnectionBtn { | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| min-width: auto; | |
| font-size: 14px; | |
| } | |
| #deleteConnectionBtn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| background-color: var(--bg-secondary); | |
| color: var(--text-muted); | |
| } | |
| #deleteConnectionBtn:disabled:hover { | |
| background-color: var(--bg-secondary); | |
| transform: none; | |
| } | |
| .header-right { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .license-badge { | |
| padding: 6px 12px; | |
| border-radius: 12px; | |
| font-size: 11px; | |
| font-weight: 500; | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| transition: all 0.2s ease; | |
| cursor: default; | |
| display: none; | |
| } | |
| .license-badge.active { | |
| display: block; | |
| } | |
| .license-badge.safe { | |
| background: linear-gradient(135deg, #d3f9d8, #a8e6af); | |
| color: #2d5a2f; | |
| border-color: #7dd87f; | |
| } | |
| .license-badge.warning { | |
| background: linear-gradient(135deg, #fff3bf, #ffeaa0); | |
| color: #8b6b00; | |
| border-color: #e6cc00; | |
| } | |
| .license-badge.danger { | |
| background: linear-gradient(135deg, #ffe3e3, #ffb3b3); | |
| color: #8b0000; | |
| border-color: #ff6666; | |
| animation: pulse-warning 2s infinite; | |
| } | |
| .license-badge.error { | |
| background: linear-gradient(135deg, #f0f0f0, #d0d0d0); | |
| color: #666; | |
| border-color: #999; | |
| } | |
| @keyframes pulse-warning { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.7; } | |
| } | |
| .status-indicator { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| font-size: 12px; | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background-color: var(--error-color); | |
| } | |
| .status-dot.connected { | |
| background-color: var(--success-color); | |
| } | |
| .status-dot.connecting { | |
| background-color: var(--warning-color); | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| /* ============================================================================ | |
| SIDEBAR NAVIGATION COMPONENT | |
| ============================================================================ | |
| @component Sidebar | |
| @description Left sidebar containing database browser and navigation | |
| @features Collapsible, resizable, database tree view | |
| @width 300px default, collapsible to 0px | |
| @resize-range 200px - 400px when expanded | |
| @structure | |
| .sidebar (main container) | |
| ├── .sidebar-header (title and controls) | |
| ├── .sidebar-content (scrollable content area) | |
| │ ├── .database-tree (database browser) | |
| │ └── .connection-list (saved connections) | |
| └── .sidebar-footer (additional controls) | |
| @states | |
| .sidebar.collapsed - Hidden sidebar (width: 0) | |
| .sidebar:hover - Interaction feedback | |
| @responsive | |
| Full-width on mobile, collapsible on tablet/desktop | |
| ============================================================================ */ | |
| /* Main Layout */ | |
| .app-main { | |
| flex: 1; | |
| display: flex; | |
| overflow: hidden; | |
| } | |
| /* Sidebar */ | |
| .sidebar { | |
| width: 300px; | |
| min-width: 200px; | |
| background-color: var(--bg-secondary); | |
| border-right: 1px solid var(--border-color); | |
| display: flex; | |
| flex-direction: column; | |
| flex-shrink: 0; | |
| transition: width 0.3s ease; | |
| } | |
| .sidebar.collapsed { | |
| width: 0; | |
| min-width: 0; | |
| border-right: none; | |
| overflow: hidden; | |
| } | |
| .sidebar-header { | |
| padding: var(--spacing-md); | |
| border-bottom: 1px solid var(--border-color); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| } | |
| .sidebar-controls { | |
| display: flex; | |
| gap: var(--spacing-xs); | |
| } | |
| .sidebar-header h3 { | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| /* ============================================================================ | |
| VERTICAL SPLITTER COMPONENT | |
| ============================================================================ | |
| @component VerticalSplitter | |
| @description Draggable divider between sidebar and main content | |
| @purpose Allow users to resize sidebar width | |
| @width 4px with expanded hover area | |
| @cursor ew-resize (east-west resize) | |
| @features | |
| - Hover highlight effect | |
| - Smooth color transitions | |
| - Extended click area for easier interaction | |
| - Visual feedback on hover | |
| @interaction | |
| Drag left/right to resize adjacent panels | |
| ============================================================================ */ | |
| /* Vertical Splitter */ | |
| .vertical-splitter { | |
| width: 4px; | |
| background-color: var(--border-color); | |
| cursor: ew-resize; | |
| position: relative; | |
| flex-shrink: 0; | |
| transition: background-color 0.2s; | |
| } | |
| .vertical-splitter:hover { | |
| background-color: var(--accent-primary); | |
| } | |
| .vertical-splitter::before { | |
| content: ''; | |
| position: absolute; | |
| left: -2px; | |
| right: -2px; | |
| top: 0; | |
| bottom: 0; | |
| background: transparent; | |
| } | |
| /* Collapsed sidebar show button */ | |
| .show-sidebar-btn { | |
| position: fixed; | |
| top: 50%; | |
| left: 10px; | |
| transform: translateY(-50%); | |
| background: var(--accent-primary); | |
| border: none; | |
| border-radius: var(--border-radius); | |
| color: white; | |
| padding: var(--spacing-sm); | |
| cursor: pointer; | |
| z-index: var(--z-dropdown); /* Use centralized z-index system */ | |
| opacity: 0; | |
| visibility: hidden; | |
| box-shadow: var(--shadow-md); | |
| transition: all 0.3s ease; | |
| } | |
| .show-sidebar-btn:hover { | |
| background: var(--accent-hover); | |
| transform: translateY(-50%) scale(1.1); | |
| } | |
| .sidebar.collapsed ~ * .show-sidebar-btn, | |
| body:has(.sidebar.collapsed) .show-sidebar-btn { | |
| opacity: 1; | |
| visibility: visible; | |
| } | |
| .database-tree { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: var(--spacing-sm); | |
| } | |
| .tree-placeholder { | |
| padding: var(--spacing-lg); | |
| text-align: center; | |
| color: var(--text-muted); | |
| font-size: 14px; | |
| } | |
| .tree-node { | |
| margin-bottom: var(--spacing-xs); | |
| } | |
| .tree-item { | |
| display: flex; | |
| align-items: center; | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| border-radius: var(--border-radius); | |
| cursor: pointer; | |
| font-size: 14px; | |
| color: var(--text-secondary); | |
| transition: all 0.2s; | |
| } | |
| .tree-item:hover { | |
| background-color: var(--bg-hover); | |
| color: var(--text-primary); | |
| } | |
| .tree-item.active { | |
| background-color: var(--accent-primary); | |
| color: white; | |
| } | |
| .tree-icon { | |
| width: 16px; | |
| height: 16px; | |
| margin-right: var(--spacing-xs); | |
| flex-shrink: 0; | |
| } | |
| .tree-label { | |
| flex: 1; | |
| } | |
| .tree-meta { | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| margin-left: var(--spacing-xs); | |
| } | |
| /* ============================================================================ | |
| CONTENT AREA CONTAINER | |
| ============================================================================ | |
| @component ContentArea | |
| @description Main content display area for tabs and views | |
| @purpose Container for tab-based content navigation | |
| @layout Flex column with tab bar and content sections | |
| @structure | |
| .content-area (main container) | |
| ├── .tab-bar (navigation tabs) | |
| └── .tab-content (active content) | |
| @features | |
| - Full height flex layout | |
| - Overflow handling | |
| - Seamless integration with tab system | |
| - Responsive content sizing | |
| ============================================================================ */ | |
| /* Content Area */ | |
| .content-area { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| /* ============================================================================ | |
| TAB BAR NAVIGATION SYSTEM | |
| ============================================================================ | |
| @component TabBar | |
| @description Horizontal tab navigation for multiple views | |
| @purpose Allow users to switch between different database views/queries | |
| @layout Fixed height (36px) with flex alignment | |
| @behavior Active tab highlighted, hover effects, closeable tabs | |
| @structure | |
| .tab-bar (container) | |
| └── .tab-item (individual tab) | |
| ├── .tab-icon (optional icon) | |
| ├── .tab-label (tab title) | |
| └── .tab-close (close button) | |
| @states | |
| .tab-item.active - Currently selected tab | |
| .tab-item:hover - Tab hover state | |
| .tab-item.dirty - Tab with unsaved changes | |
| @features | |
| - Browser-like tab interface | |
| - Closeable tabs with confirmation | |
| - Visual indicators for unsaved changes | |
| - Keyboard navigation support | |
| ============================================================================ */ | |
| /* Tab Bar */ | |
| .tab-bar { | |
| background-color: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border-color); | |
| display: flex; | |
| align-items: flex-end; | |
| padding: 0 var(--spacing-md); | |
| min-height: 36px; | |
| } | |
| .tab-item { | |
| background-color: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| border-bottom: none; | |
| border-radius: var(--border-radius) var(--border-radius) 0 0; | |
| padding: var(--spacing-xs) var(--spacing-md); | |
| margin-right: var(--spacing-xs); | |
| cursor: pointer; | |
| font-size: 13px; | |
| color: var(--text-secondary); | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| transition: all 0.2s; | |
| max-width: 200px; | |
| } | |
| .tab-item:hover { | |
| background-color: var(--bg-hover); | |
| color: var(--text-primary); | |
| } | |
| .tab-item.active { | |
| background-color: var(--bg-primary); | |
| color: var(--text-primary); | |
| border-bottom: 1px solid var(--bg-primary); | |
| margin-bottom: -1px; | |
| } | |
| .tab-close { | |
| background: none; | |
| border: none; | |
| color: var(--text-muted); | |
| cursor: pointer; | |
| font-size: 16px; | |
| line-height: 1; | |
| padding: 0; | |
| width: 16px; | |
| height: 16px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| border-radius: 2px; | |
| } | |
| .tab-close:hover { | |
| background-color: var(--bg-hover); | |
| color: var(--text-primary); | |
| } | |
| /* ============================================================================ | |
| TAB CONTENT SYSTEM | |
| ============================================================================ | |
| @component TabContent | |
| @description Content containers for tab-based navigation | |
| @purpose Display different views based on active tab | |
| @behavior Show/hide content using display: flex/none | |
| @structure | |
| .tab-content (main container) | |
| └── .tab-pane (individual content panels) | |
| └── [specific content layouts] | |
| @types | |
| .tab-pane.active - Currently visible content | |
| .table-only-tab - Dedicated table view layout | |
| .query-editor-tab - SQL query editor layout | |
| .database-browser-tab - Database structure browser | |
| @features | |
| - Smooth content switching | |
| - Full-height content areas | |
| - Overflow handling | |
| - Flexible content types | |
| ============================================================================ */ | |
| /* Tab Content */ | |
| .tab-content { | |
| flex: 1; | |
| overflow: hidden; | |
| } | |
| .tab-pane { | |
| height: 100%; | |
| display: none; | |
| flex-direction: column; | |
| } | |
| .tab-pane.active { | |
| display: flex; | |
| } | |
| /* ============================================================================ | |
| TABLE-ONLY TAB LAYOUT | |
| ============================================================================ | |
| @component TableOnlyTab | |
| @description Dedicated full-screen table view layout | |
| @purpose Display database tables without query editor | |
| @layout Full-height table container with toolbar | |
| @structure | |
| .table-only-tab (main container) | |
| └── .table-only-container (table layout) | |
| ├── .table-toolbar (table actions) | |
| └── .table-container (AG Grid table) | |
| @features | |
| - Full-height table display | |
| - Optimized for data browsing | |
| - No height restrictions (auto sizing) | |
| - Clean, minimal interface | |
| ============================================================================ */ | |
| /* ✅ Table-only Tab Styles */ | |
| .table-only-tab { | |
| background: var(--bg-primary); | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .table-only-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| height: 100%; | |
| } | |
| .table-only-container .results-content { | |
| flex: 1; | |
| overflow: auto; | |
| position: relative; | |
| height: 100%; | |
| } | |
| /* ============================================================================ | |
| AG GRID INTEGRATION FIXES | |
| ============================================================================ | |
| @component AGGridFixes | |
| @description CSS fixes for AG Grid integration in table tabs | |
| @purpose Resolve height and layout issues with AG Grid Community | |
| @integration AG Grid Community Edition v31 | |
| @fixes | |
| - Full height grid display in table tabs | |
| - Proper flex layout for grid wrapper | |
| - Override default height constraints | |
| - Seamless container integration | |
| @ag-grid-classes | |
| .ag-grid-wrapper - Custom wrapper for grid container | |
| .ag-theme-balham-dark - AG Grid dark theme integration | |
| ============================================================================ */ | |
| /* แก้ไขปัญหา AG Grid ใน Table Tab */ | |
| .table-only-tab .ag-grid-wrapper { | |
| height: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .table-only-tab .ag-theme-balham-dark { | |
| flex: 1; | |
| height: auto ; | |
| } | |
| /* ============================================================================ | |
| TABLE HEADER FIXES | |
| ============================================================================ | |
| @component TableHeaderFixes | |
| @description Layout fixes for table toolbar in table-only tabs | |
| @purpose Ensure toolbar doesn't interfere with table height calculations | |
| @issue Toolbar height affecting AG Grid sizing | |
| @fix | |
| .table-toolbar with flex-shrink: 0 prevents compression | |
| Ensures consistent toolbar height in table layouts | |
| ============================================================================ */ | |
| /* แก้ไขปัญหา Table Header */ | |
| .table-only-tab .table-toolbar { | |
| flex-shrink: 0; | |
| } | |
| .table-only-tab .table-container { | |
| flex: 1; | |
| height: auto; | |
| max-height: none; | |
| } | |
| /* ============================================================================ | |
| SQL QUERY TAB LAYOUT | |
| ============================================================================ | |
| @component SQLQueryTab | |
| @description Split-view layout for SQL query editing and results | |
| @purpose Provide IDE-like SQL development environment | |
| @layout Split between query editor (top) and results (bottom) | |
| @resize Query section is resizable (300px default, 200px minimum) | |
| @structure | |
| .sql-query-tab (main container) | |
| ├── .query-section (SQL editor area) | |
| │ └── .query-editor-container | |
| │ ├── .query-toolbar (execute, save, etc.) | |
| │ └── .sql-editor (code editor) | |
| └── .results-section (results display area) | |
| └── .results-container | |
| ├── .results-info (execution metadata) | |
| └── .results-table (AG Grid results) | |
| @features | |
| - Resizable split layout | |
| - Syntax highlighted SQL editor | |
| - Query execution controls | |
| - Results with metadata | |
| - Error display | |
| ============================================================================ */ | |
| /* SQL Query Tab Styles */ | |
| .sql-query-tab { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .sql-query-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .sql-query-tab .query-section { | |
| flex: 0 0 300px; /* ความสูงของ Query Editor */ | |
| min-height: 200px; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .sql-query-tab .results-section { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .sql-query-tab .query-editor-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .sql-query-tab .results-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .sql-query-tab .results-content { | |
| flex: 1; | |
| overflow: auto; | |
| position: relative; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .sql-query-tab .ag-grid-wrapper { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| } | |
| .sql-query-tab .ag-theme-balham-dark { | |
| flex: 1; | |
| min-height: 0; | |
| } | |
| /* ============================================================================ | |
| SIDEBAR SQL QUERY ITEMS | |
| ============================================================================ | |
| @component SidebarSQLQueryItems | |
| @description Special styling for SQL query items in sidebar navigation | |
| @purpose Distinguish SQL query tabs from other navigation items | |
| @visual Left border accent with enhanced background | |
| @features | |
| - Visual distinction with left border accent | |
| - Enhanced background color | |
| - Hover state improvements | |
| - Font weight emphasis | |
| @usage | |
| Applied to tree items representing saved/open SQL queries | |
| ============================================================================ */ | |
| /* Sidebar SQL Query Item Styles */ | |
| .tree-item.sql-query-item { | |
| background: var(--bg-tertiary); | |
| border-left: 3px solid var(--accent-primary); | |
| font-weight: 500; | |
| } | |
| .tree-item.sql-query-item:hover { | |
| background: var(--bg-hover); | |
| } | |
| /* ============================================================================ | |
| SPLIT LAYOUT SYSTEM | |
| ============================================================================ | |
| @component SplitLayout | |
| @description Flexible split-view layouts for query editor and results | |
| @purpose Provide resizable, responsive layout containers | |
| @types Horizontal split (side-by-side) and Vertical split (top-bottom) | |
| @structure-horizontal | |
| .horizontal-split-container | |
| ├── .query-panel (45% width, min 300px, max 70%) | |
| └── .results-panel (remaining width) | |
| @structure-vertical | |
| .vertical-split-container | |
| ├── .query-panel (200px height, min 150px, no max) | |
| └── .results-panel (remaining height, min 200px) | |
| @features | |
| - Responsive flex layouts | |
| - Minimum and maximum size constraints | |
| - Smooth resize transitions | |
| - Overflow handling | |
| - Consistent spacing | |
| @usage | |
| Used in SQL query tabs and database browser views | |
| ============================================================================ */ | |
| /* Horizontal Split Layout */ | |
| .horizontal-split-container { | |
| display: flex; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| /* Vertical Split Layout */ | |
| .vertical-split-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .query-panel { | |
| flex: 0 0 200px; /* Initial height for vertical layout */ | |
| min-height: 150px; | |
| max-height: none; /* ลบ max-height เพื่อให้ย่อขยายได้เต็มที่ */ | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--bg-primary); | |
| border-top: 1px solid var(--border-color); | |
| overflow: auto; | |
| } | |
| /* For horizontal split (if still used elsewhere) */ | |
| .horizontal-split-container .query-panel { | |
| flex: 0 0 45%; /* Initial width: 45% */ | |
| min-width: 300px; | |
| max-width: 70%; | |
| border-right: 1px solid var(--border-color); | |
| border-top: none; | |
| } | |
| .results-panel { | |
| flex: 1; | |
| min-height: 200px; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--bg-primary); | |
| overflow: hidden; | |
| } | |
| /* For horizontal split (if still used elsewhere) */ | |
| .horizontal-split-container .results-panel { | |
| min-width: 300px; | |
| } | |
| /* ============================================================================ | |
| RESIZABLE SPLITTER COMPONENT | |
| ============================================================================ | |
| @component ResizableSplitter | |
| @description Interactive splitter for resizing layout panels | |
| @purpose Allow dynamic panel resizing with visual feedback | |
| @width Fixed 4px with extended interaction area | |
| @features | |
| - Hover highlight effect | |
| - Active drag state styling | |
| - High z-index for interaction priority | |
| - Smooth color transitions | |
| - Visual grip indicators | |
| @interaction | |
| - Hover shows highlighted state | |
| - Drag operation changes cursor globally | |
| - Visual feedback during resize operation | |
| ============================================================================ */ | |
| /* Resizable Splitter */ | |
| .splitter { | |
| flex: 0 0 4px; | |
| background: var(--border-color); | |
| position: relative; | |
| transition: background-color 0.2s; | |
| z-index: 10; /* ให้อยู่ด้านหน้า */ | |
| } | |
| .splitter:hover { | |
| background: var(--accent-primary); | |
| } | |
| .splitter::before { | |
| content: ''; | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| background: var(--text-muted); | |
| border-radius: 1px; | |
| } | |
| .vertical-splitter { | |
| cursor: col-resize; | |
| } | |
| .vertical-splitter::before { | |
| width: 2px; | |
| height: 20px; | |
| } | |
| .horizontal-splitter { | |
| cursor: row-resize; | |
| user-select: none; /* ป้องกันการเลือกข้อความ */ | |
| } | |
| .horizontal-splitter::before { | |
| width: 20px; | |
| height: 2px; | |
| } | |
| /* เพิ่ม style เมื่อกำลัง resize */ | |
| .splitter.resizing { | |
| background: var(--accent-primary); | |
| } | |
| body.resizing { | |
| cursor: row-resize ; | |
| user-select: none ; | |
| } | |
| /* ============================================================================ | |
| SPLITTER HANDLES | |
| ============================================================================ | |
| @component Splitter | |
| @description Draggable handles for resizing split panels | |
| @types .vertical-splitter (column resize) and .horizontal-splitter (row resize) | |
| @size 4px thick with extended hover area | |
| @features | |
| - Visual indicators (lines) at center | |
| - Hover highlighting | |
| - Resize cursors (col-resize/row-resize) | |
| - Active state during dragging | |
| - Smooth transitions | |
| @states | |
| :hover - Highlighted splitter | |
| .resizing - Active during drag operation | |
| body.resizing - Global cursor override during resize | |
| @interaction | |
| Drag to resize adjacent panels with constraints | |
| ============================================================================ */ | |
| /* ============================================================================ | |
| QUERY EDITOR COMPONENT | |
| ============================================================================ | |
| @component QueryEditor | |
| @description SQL code editor with syntax highlighting and execution | |
| @purpose Advanced SQL development environment | |
| @features Syntax highlighting, auto-complete, query execution | |
| @integration Monaco Editor or CodeMirror for advanced editing | |
| @structure | |
| .query-editor-container (main container) | |
| ├── .query-toolbar (execution controls) | |
| │ ├── .execute-btn (run query) | |
| │ ├── .save-btn (save query) | |
| │ └── .format-btn (format SQL) | |
| └── .sql-editor (code editor area) | |
| @features | |
| - SQL syntax highlighting | |
| - Line numbers | |
| - Auto-completion | |
| - Error indicators | |
| - Query execution | |
| ============================================================================ */ | |
| /* Query Editor */ | |
| .query-editor-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| /* ============================================================================ | |
| EDITOR TOOLBAR COMPONENT | |
| ============================================================================ | |
| @component EditorToolbar | |
| @description Top toolbar for query editor with action buttons and metadata | |
| @purpose Provide quick access to common query operations | |
| @layout Horizontal flex with left-aligned controls and right-aligned metadata | |
| @structure | |
| .editor-toolbar (main container) | |
| ├── [action buttons] (execute, save, format) | |
| ├── .toolbar-separator (visual divider) | |
| ├── .toolbar-spacer (flex spacer) | |
| └── .execution-time (query performance info) | |
| @elements | |
| - Execute query button | |
| - Save query button | |
| - Format SQL button | |
| - Export results button | |
| - Execution time display | |
| - Row count display | |
| @features | |
| - Responsive button grouping | |
| - Visual separators | |
| - Performance metrics | |
| - Keyboard shortcuts | |
| ============================================================================ */ | |
| .editor-toolbar { | |
| background-color: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| flex-shrink: 0; | |
| } | |
| .toolbar-spacer { | |
| flex: 1; | |
| } | |
| .toolbar-separator { | |
| width: 1px; | |
| height: 20px; | |
| background: var(--border-color); | |
| margin: 0 var(--spacing-sm); | |
| } | |
| .execution-time { | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| } | |
| .query-editor { | |
| flex: 1; | |
| position: relative; | |
| overflow: hidden; | |
| min-height: 100px; | |
| } | |
| .sql-editor { | |
| width: 100%; | |
| height: 100%; | |
| background-color: var(--bg-primary); | |
| color: var(--text-primary); | |
| border: none; | |
| padding: var(--spacing-md); | |
| font-family: var(--font-mono); | |
| font-size: 14px; | |
| line-height: 1.5; | |
| resize: none; | |
| outline: none; | |
| overflow-y: auto; | |
| white-space: pre; | |
| word-wrap: break-word; | |
| } | |
| .sql-editor::placeholder { | |
| color: var(--text-muted); | |
| } | |
| /** | |
| * @subsection Parameters Section | |
| * @description Query parameters input interface | |
| */ | |
| .params-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| margin-top: 8px; | |
| } | |
| .params-label { | |
| font-size: 12px; | |
| font-weight: 500; | |
| color: var(--text-secondary); | |
| display: flex; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| .params-help { | |
| cursor: help; | |
| opacity: 0.7; | |
| transition: opacity 0.2s ease; | |
| } | |
| .params-help:hover { | |
| opacity: 1; | |
| } | |
| .params-editor { | |
| width: 100%; | |
| padding: 8px; | |
| border: 1px solid var(--border-color); | |
| border-radius: 4px; | |
| background: var(--bg-tertiary); | |
| color: var(--text-primary); | |
| font-family: var(--font-mono); | |
| font-size: 12px; | |
| resize: vertical; | |
| transition: border-color 0.2s ease; | |
| } | |
| .params-editor:focus { | |
| outline: none; | |
| border-color: var(--primary-color); | |
| box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1); | |
| } | |
| /* ============================================================================ | |
| RESULTS DISPLAY SYSTEM | |
| ============================================================================ | |
| @component ResultsContainer | |
| @description Query results display with headers, actions, and data grid | |
| @purpose Show query execution results with metadata and export options | |
| @integration AG Grid for data display with custom theming | |
| @structure | |
| .results-container (main container) | |
| ├── .results-header (title and action buttons) | |
| │ ├── h3 (results title) | |
| │ └── .results-actions (export, copy, etc.) | |
| └── .results-content (data display area) | |
| ├── .ag-grid-wrapper (AG Grid container) | |
| └── .results-placeholder (empty state) | |
| @features | |
| - Query execution metadata | |
| - Export functionality | |
| - Scrollable data grid | |
| - Empty state handling | |
| - Performance information | |
| - Row count display | |
| @states | |
| - Loading state during query execution | |
| - Results state with data | |
| - Error state for failed queries | |
| - Empty state for no results | |
| ============================================================================ */ | |
| /* Results Container */ | |
| .results-container { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| overflow: hidden; | |
| } | |
| .results-header { | |
| background-color: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| flex-shrink: 0; | |
| } | |
| .results-header h3 { | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .results-actions { | |
| display: flex; | |
| gap: var(--spacing-xs); | |
| } | |
| .results-content { | |
| flex: 1; | |
| overflow: auto; | |
| position: relative; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .results-content .ag-grid-wrapper { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| } | |
| .results-content .ag-grid-wrapper .ag-theme-balham-dark { | |
| flex: 1; | |
| min-height: 0; | |
| } | |
| .results-placeholder { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| height: 100%; | |
| color: var(--text-muted); | |
| font-size: 14px; | |
| } | |
| /* ============================================================================ | |
| DATA TABLE COMPONENT | |
| ============================================================================ | |
| @component DataTable | |
| @description Custom styled table for displaying query results and data | |
| @purpose Alternative to AG Grid for simpler data display needs | |
| @features Sortable columns, editable cells, responsive design | |
| @structure | |
| .data-table (main table) | |
| ├── thead | |
| │ └── th.sortable (sortable column headers) | |
| └── tbody | |
| └── td.editing (editable cells) | |
| @interactions | |
| - Column sorting (click headers) | |
| - Cell editing (double-click) | |
| - Column resizing (drag headers) | |
| - Row selection (click rows) | |
| @sorting-indicators | |
| th.sortable::after - Neutral sort indicator (↕) | |
| th.sort-asc::after - Ascending indicator (↑) | |
| th.sort-desc::after - Descending indicator (↓) | |
| @responsive | |
| - Text overflow handling | |
| - Minimum/maximum column widths | |
| - Horizontal scrolling on small screens | |
| ============================================================================ */ | |
| /* Table Styles */ | |
| .data-table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| font-size: 13px; | |
| font-family: var(--font-mono); | |
| background-color: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| position: relative; | |
| } | |
| .data-table th { | |
| background-color: var(--bg-tertiary); | |
| color: var(--text-primary); | |
| padding: 8px 12px; | |
| text-align: left; | |
| border-bottom: 2px solid var(--border-color); | |
| border-right: 1px solid var(--border-color); | |
| font-weight: 600; | |
| position: sticky; | |
| top: 0; | |
| z-index: 10; | |
| cursor: pointer; | |
| user-select: none; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| min-width: 100px; | |
| max-width: 300px; | |
| } | |
| .data-table th:hover { | |
| background-color: var(--bg-hover); | |
| } | |
| .data-table th.sortable::after { | |
| content: ' ↕'; | |
| color: var(--text-muted); | |
| font-size: 10px; | |
| } | |
| .data-table th.sort-asc::after { | |
| content: ' ↑'; | |
| color: var(--accent-primary); | |
| } | |
| .data-table th.sort-desc::after { | |
| content: ' ↓'; | |
| color: var(--accent-primary); | |
| } | |
| .data-table td { | |
| padding: 6px 12px; | |
| border-bottom: 1px solid var(--border-color); | |
| border-right: 1px solid var(--border-color); | |
| color: var(--text-secondary); | |
| max-width: 300px; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| cursor: text; | |
| position: relative; | |
| } | |
| .data-table td:hover { | |
| background-color: var(--bg-hover); | |
| } | |
| .data-table td.editing { | |
| padding: 0; | |
| background-color: var(--bg-primary); | |
| } | |
| .data-table td.editing input { | |
| width: 100%; | |
| height: 100%; | |
| border: 2px solid var(--accent-primary); | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| padding: 6px 12px; | |
| font-family: inherit; | |
| font-size: inherit; | |
| outline: none; | |
| } | |
| .data-table tr:hover { | |
| background-color: rgba(255, 255, 255, 0.05); | |
| } | |
| .data-table tr.selected { | |
| background-color: rgba(0, 122, 204, 0.3); | |
| } | |
| .data-table td.null-value { | |
| color: var(--text-muted); | |
| font-style: italic; | |
| } | |
| .data-table td.modified { | |
| background-color: rgba(255, 152, 0, 0.2); | |
| border-left: 3px solid var(--warning-color); | |
| } | |
| .data-table td.new-row { | |
| background-color: rgba(76, 175, 80, 0.2); | |
| border-left: 3px solid var(--success-color); | |
| } | |
| .data-table td.deleted-row { | |
| background-color: rgba(244, 67, 54, 0.2); | |
| border-left: 3px solid var(--error-color); | |
| text-decoration: line-through; | |
| } | |
| /* ============================================================================ | |
| TABLE ROW ACTIONS & STATES | |
| ============================================================================ | |
| @component TableRowActions | |
| @description Interactive row-level actions and visual state indicators | |
| @purpose Provide CRUD operations and visual feedback for data changes | |
| @position Left side of rows (hover to reveal) | |
| @row-states | |
| .selected - Selected row (blue background) | |
| .null-value - NULL value cells (italicized, muted) | |
| .modified - Modified cells (orange left border) | |
| .new-row - New rows (green left border) | |
| .deleted-row - Deleted rows (red border + strikethrough) | |
| @actions | |
| .row-actions (container) | |
| └── .row-action-btn (individual action buttons) | |
| ├── Edit button | |
| ├── Delete button | |
| └── Duplicate button | |
| @behavior | |
| - Actions appear on row hover | |
| - Color-coded state indicators | |
| - Smooth transitions | |
| - Absolute positioning for overlay effect | |
| @accessibility | |
| - Visual and color indicators combined | |
| - Keyboard navigation support | |
| - Clear action button styling | |
| ============================================================================ */ | |
| /* Row actions */ | |
| .row-actions { | |
| position: absolute; | |
| left: -30px; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| opacity: 0; | |
| transition: opacity 0.2s; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 2px; | |
| } | |
| .data-table tr:hover .row-actions { | |
| opacity: 1; | |
| } | |
| .row-action-btn { | |
| width: 20px; | |
| height: 20px; | |
| border: none; | |
| border-radius: 3px; | |
| cursor: pointer; | |
| font-size: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: var(--text-primary); | |
| background: var(--bg-tertiary); | |
| } | |
| .row-action-btn:hover { | |
| background: var(--bg-hover); | |
| } | |
| .row-action-btn.delete { | |
| color: var(--error-color); | |
| } | |
| .row-action-btn.add { | |
| color: var(--success-color); | |
| } | |
| /* ============================================================================ | |
| TABLE TOOLBAR COMPONENT | |
| ============================================================================ | |
| @component TableToolbar | |
| @description Top toolbar for table views with title, filters, and actions | |
| @purpose Provide table management controls and filtering capabilities | |
| @layout Horizontal flex with space-between alignment | |
| @structure | |
| .table-toolbar (main container) | |
| ├── .table-name (table title/identifier) | |
| ├── .table-filter (search and filter controls) | |
| │ └── input (search field) | |
| └── .table-actions (action buttons) | |
| ├── Save button | |
| ├── Refresh button | |
| ├── Export button | |
| └── Settings button | |
| @features | |
| - Live search/filtering | |
| - Bulk actions for selected rows | |
| - Table configuration options | |
| - Export functionality | |
| - Responsive button grouping | |
| @responsive | |
| On smaller screens, actions may wrap or hide less important items | |
| ============================================================================ */ | |
| /* Table toolbar */ | |
| .table-toolbar { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| background-color: var(--bg-secondary); | |
| border-bottom: 1px solid var(--border-color); | |
| gap: var(--spacing-md); | |
| } | |
| .table-toolbar .table-name { | |
| font-size: 16px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| margin: 0; | |
| } | |
| .table-actions { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .table-filter { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .table-filter input { | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border-color); | |
| color: var(--text-primary); | |
| padding: 4px 8px; | |
| border-radius: var(--border-radius); | |
| font-size: 12px; | |
| width: 200px; | |
| } | |
| .table-filter input:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| } | |
| /* Table container with scroll */ | |
| .table-container { | |
| position: relative; | |
| overflow: auto; | |
| max-height: calc(100vh - 300px); | |
| border: 1px solid var(--border-color); | |
| } | |
| .table-container::-webkit-scrollbar { | |
| width: 12px; | |
| height: 12px; | |
| } | |
| .table-container::-webkit-scrollbar-track { | |
| background: var(--bg-primary); | |
| } | |
| .table-container::-webkit-scrollbar-thumb { | |
| background: var(--bg-tertiary); | |
| border-radius: 6px; | |
| } | |
| .table-container::-webkit-scrollbar-thumb:hover { | |
| background: var(--bg-hover); | |
| } | |
| /* ============================================================================ | |
| CONTEXT MENU COMPONENT | |
| ============================================================================ | |
| @component ContextMenu | |
| @description Right-click context menus for table rows, cells, and UI elements | |
| @purpose Provide contextual actions based on user selection | |
| @z-index 1000 (above most elements but below modals) | |
| @positioning Fixed positioning based on mouse coordinates | |
| @structure | |
| .context-menu (main container) | |
| ├── .context-menu-item (individual menu options) | |
| │ ├── [icon] (optional action icon) | |
| │ └── [text] (action label) | |
| └── .context-menu-separator (visual dividers) | |
| @item-types | |
| - Copy actions (copy cell, copy row, copy table) | |
| - Edit actions (edit cell, insert row, delete row) | |
| - Export actions (export selection, export table) | |
| - Navigation actions (go to, filter by) | |
| @states | |
| .context-menu-item.disabled - Unavailable actions (greyed out) | |
| .context-menu-item:hover - Highlighted menu item | |
| @behavior | |
| - Appears on right-click | |
| - Closes on click outside or ESC key | |
| - Position adjusts to stay within viewport | |
| ============================================================================ */ | |
| /* Context menu */ | |
| .context-menu { | |
| position: fixed; | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow-lg); | |
| z-index: var(--z-popover); /* Context menus above modals */ | |
| min-width: 150px; | |
| padding: 4px 0; | |
| } | |
| .context-menu-item { | |
| padding: 8px 16px; | |
| cursor: pointer; | |
| font-size: 13px; | |
| color: var(--text-primary); | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .context-menu-item:hover { | |
| background: var(--bg-hover); | |
| } | |
| .context-menu-item.disabled { | |
| color: var(--text-muted); | |
| cursor: not-allowed; | |
| } | |
| .context-menu-separator { | |
| height: 1px; | |
| background: var(--border-color); | |
| margin: 4px 0; | |
| } | |
| /* Row numbers and table stats */ | |
| .row-number-header, | |
| .row-number { | |
| background-color: var(--bg-tertiary) ; | |
| color: var(--text-muted); | |
| text-align: center; | |
| font-weight: normal; | |
| width: 50px; | |
| min-width: 50px; | |
| max-width: 50px; | |
| user-select: none; | |
| } | |
| .row-number:hover { | |
| background-color: var(--bg-hover) ; | |
| } | |
| .table-stats { | |
| color: var(--text-muted); | |
| font-size: 12px; | |
| margin-left: 8px; | |
| } | |
| .table-info { | |
| display: flex; | |
| align-items: center; | |
| } | |
| .table-wrapper { | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| overflow: hidden; | |
| } | |
| /* ============================================================================ | |
| RESULTS INFO BAR COMPONENT | |
| ============================================================================ | |
| @component ResultsInfoBar | |
| @description Bottom information bar showing query/table metadata | |
| @purpose Display execution statistics and data information | |
| @position Bottom of table/results containers | |
| @content | |
| - Row count (total, selected, filtered) | |
| - Execution time for queries | |
| - Change status indicators | |
| - Performance metrics | |
| - Data source information | |
| @features | |
| - Responsive text layout | |
| - Real-time updates | |
| - Status color coding | |
| - Compact information display | |
| @integration | |
| Updates automatically from query execution and table operations | |
| ============================================================================ */ | |
| /* Results info bar */ | |
| .results-info { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| background-color: var(--bg-tertiary); | |
| border-top: 1px solid var(--border-color); | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| } | |
| .results-info span { | |
| margin-right: var(--spacing-md); | |
| } | |
| #changesStatus { | |
| font-weight: 500; | |
| } | |
| /* ============================================================================ | |
| ENHANCED BUTTON STYLES | |
| ============================================================================ | |
| @component EnhancedButtons | |
| @description Additional button variants and states | |
| @purpose Extend base button system with specialized styles | |
| @extends Base button system from earlier definitions | |
| @variants | |
| .btn-sm - Small button variant (compact spacing) | |
| @states | |
| :disabled - Disabled button state (opacity + pointer blocking) | |
| @features | |
| - Consistent sizing system | |
| - Proper disabled states | |
| - Accessibility considerations | |
| - Reduced padding for compact UIs | |
| ============================================================================ */ | |
| /* Enhanced button styles */ | |
| .btn-sm { | |
| padding: 4px 8px; | |
| font-size: 12px; | |
| border-radius: 3px; | |
| } | |
| .btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| /* ============================================================================ | |
| LOADING STATES SYSTEM | |
| ============================================================================ | |
| @component LoadingStates | |
| @description Visual indicators for loading and processing states | |
| @purpose Provide user feedback during data operations | |
| @types Table loading, button loading, general loading overlays | |
| @implementations | |
| .table-loading - Table-specific loading overlay | |
| .btn.loading - Button with inline spinner | |
| .loading-overlay - Full-screen loading state | |
| @features | |
| - Semi-transparent overlays | |
| - Animated spinners | |
| - Non-blocking UI feedback | |
| - Smooth transitions | |
| @animations | |
| - Spinning indicators | |
| - Fade in/out effects | |
| - Pulse animations for attention | |
| @accessibility | |
| - Screen reader announcements | |
| - Keyboard interaction preservation | |
| - Clear visual indicators | |
| ============================================================================ */ | |
| /* Loading states */ | |
| .table-loading { | |
| position: relative; | |
| } | |
| .table-loading::after { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(0, 0, 0, 0.5); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 100; | |
| } | |
| /* ============================================================================ | |
| SELECTION & INTERACTION STATES | |
| ============================================================================ | |
| @component SelectionStates | |
| @description Visual feedback for selected rows, cells, and interactive elements | |
| @purpose Indicate user selections and active elements | |
| @color-scheme Blue accent colors for consistency | |
| @selection-types | |
| .selected (row) - Entire row selected (light blue background) | |
| .selected (cell) - Individual cell selected (stronger blue + border) | |
| @features | |
| - Multi-row selection support | |
| - Individual cell selection | |
| - Visual hierarchy (cell > row selection) | |
| - Keyboard navigation feedback | |
| ============================================================================ */ | |
| /* ============================================================================ | |
| DRAG & DROP INTERACTION SYSTEM | |
| ============================================================================ | |
| @component DragDrop | |
| @description Column resizing and drag-drop interactions | |
| @purpose Allow users to customize table layout | |
| @features Column width adjustment, drag handles | |
| @elements | |
| .resizing - Active resize state with visual feedback | |
| .column-resize-handle - Invisible resize trigger area | |
| @behavior | |
| - Hover shows resize cursor | |
| - Active resize shows blue border | |
| - Smooth visual feedback | |
| ============================================================================ */ | |
| /* Selection styles */ | |
| .data-table tr.selected td { | |
| background-color: rgba(0, 122, 204, 0.3); | |
| } | |
| .data-table td.selected { | |
| background-color: rgba(0, 122, 204, 0.5); | |
| border: 2px solid var(--accent-primary); | |
| } | |
| /* Drag and drop styles */ | |
| .data-table th.resizing { | |
| cursor: col-resize; | |
| border-right: 2px solid var(--accent-primary); | |
| } | |
| .column-resize-handle { | |
| position: absolute; | |
| right: 0; | |
| top: 0; | |
| width: 4px; | |
| height: 100%; | |
| cursor: col-resize; | |
| background: transparent; | |
| } | |
| .column-resize-handle:hover { | |
| background: var(--accent-primary); | |
| } | |
| /* ============================================================================ | |
| BUTTON COMPONENT SYSTEM | |
| ============================================================================ | |
| @component Buttons | |
| @description Modern button system with animations and visual effects | |
| @purpose Provide consistent, interactive UI controls throughout the app | |
| @features Gradients, shadows, hover effects, shine animation | |
| @base-class .btn | |
| - Gradient backgrounds for depth | |
| - Box shadows for elevation | |
| - Hover lift effect (translateY) | |
| - Shine animation on hover | |
| - Disabled states | |
| @variants | |
| .btn-primary - Primary action buttons (blue gradient) | |
| .btn-secondary - Secondary actions (default styling) | |
| .btn-success - Success actions (green) | |
| .btn-warning - Warning actions (orange) | |
| .btn-danger - Destructive actions (red) | |
| .btn-sm - Small size buttons | |
| @states | |
| :hover - Elevated with enhanced shadow | |
| :active - Pressed state (reduced elevation) | |
| :disabled - Greyed out, no interactions | |
| @animations | |
| - Hover lift effect (translateY: -2px) | |
| - Shine sweep animation on hover | |
| - Smooth transitions for all states | |
| ============================================================================ */ | |
| /* Buttons - Modern Style with Shadow and Hover Effects */ | |
| .btn { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| padding: 10px 16px; | |
| border: 2px solid var(--border-color); | |
| border-radius: 8px; | |
| font-size: 13px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| text-decoration: none; | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| color: var(--text-primary); | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2); | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .btn:hover:not(:disabled) { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3); | |
| border-color: var(--accent-primary); | |
| } | |
| .btn:active:not(:disabled) { | |
| transform: translateY(0); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); | |
| } | |
| .btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| transform: none; | |
| } | |
| .btn::before { | |
| content: ''; | |
| position: absolute; | |
| top: 0; | |
| left: -100%; | |
| width: 100%; | |
| height: 100%; | |
| background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent); | |
| transition: left 0.5s; | |
| } | |
| .btn:hover::before { | |
| left: 100%; | |
| } | |
| .btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .btn-primary { | |
| background: linear-gradient(145deg, #007acc, #005599); | |
| color: white; | |
| border-color: #007acc; | |
| } | |
| .btn-primary:hover:not(:disabled) { | |
| background: linear-gradient(145deg, #1177bb, #007acc); | |
| border-color: #1177bb; | |
| box-shadow: 0 8px 15px rgba(0, 122, 204, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3); | |
| } | |
| .btn-success { | |
| background: linear-gradient(145deg, #4caf50, #45a049); | |
| color: white; | |
| border-color: #4caf50; | |
| } | |
| .btn-success:hover:not(:disabled) { | |
| background: linear-gradient(145deg, #66bb6a, #4caf50); | |
| border-color: #66bb6a; | |
| box-shadow: 0 8px 15px rgba(76, 175, 80, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3); | |
| } | |
| .btn-secondary { | |
| background: linear-gradient(145deg, #ffffff, #f8f9fa); | |
| color: #2c3e50; | |
| border-color: #e9ecef; | |
| } | |
| .btn-secondary:hover:not(:disabled) { | |
| background: linear-gradient(145deg, #f8f9fa, #e9ecef); | |
| border-color: #007acc; | |
| color: #007acc; | |
| box-shadow: 0 8px 15px rgba(0, 122, 204, 0.2), 0 3px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| color: var(--text-secondary); | |
| border-color: var(--border-color); | |
| } | |
| .btn-outline:hover:not(:disabled) { | |
| background: linear-gradient(145deg, var(--bg-hover), var(--bg-tertiary)); | |
| color: var(--accent-primary); | |
| border-color: var(--accent-primary); | |
| } | |
| .btn-icon { | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 32px; | |
| height: 32px; | |
| padding: 0; | |
| border: 2px solid var(--border-color); | |
| border-radius: 8px; | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| color: var(--text-secondary); | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); | |
| } | |
| .btn-icon:hover:not(:disabled) { | |
| background: linear-gradient(145deg, var(--bg-hover), var(--bg-tertiary)); | |
| color: var(--accent-primary); | |
| border-color: var(--accent-primary); | |
| transform: translateY(-1px); | |
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); | |
| } | |
| /* ============================================================================ | |
| MODERN CARD & SECTION SYSTEM | |
| ============================================================================ | |
| @component ModernCard | |
| @description Elevated card components for content sections | |
| @purpose Organize content in visually appealing, interactive containers | |
| @features Gradient backgrounds, shadows, hover effects | |
| @types | |
| .modern-card - General content cards with hover lift | |
| .section-header - Header sections with subtle gradients | |
| .section-content - Content containers with inset shadows | |
| @features | |
| - Gradient backgrounds for depth | |
| - Smooth hover animations | |
| - Consistent spacing system | |
| - Color-coded headers | |
| - Subtle shadow effects | |
| @responsive | |
| Cards stack on smaller screens, maintain consistent spacing | |
| ============================================================================ */ | |
| /* ============================================================================ | |
| RESPONSIVE GRID SYSTEM | |
| ============================================================================ | |
| @component ResponsiveGrid | |
| @description CSS Grid layouts for responsive content organization | |
| @purpose Flexible grid systems that adapt to screen size | |
| @breakpoint-behavior Auto-fit columns based on minimum widths | |
| @grid-types | |
| .responsive-grid - Auto-fit columns (min 250px) | |
| .responsive-grid-2 - 2-column layout with responsive fallback | |
| .responsive-grid-3 - 3-column layout with responsive fallback | |
| @features | |
| - Automatic column sizing | |
| - Consistent gap spacing | |
| - Mobile-first responsive design | |
| - Flexible content areas | |
| ============================================================================ */ | |
| /* Modern Card/Section Styles */ | |
| .modern-card { | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| padding: var(--spacing-lg); | |
| margin-bottom: var(--spacing-lg); | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2); | |
| transition: all 0.3s ease; | |
| } | |
| .modern-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4), 0 3px 6px rgba(0, 0, 0, 0.3); | |
| } | |
| .modern-card h2, .modern-card h3 { | |
| color: var(--accent-primary); | |
| margin-bottom: var(--spacing-md); | |
| font-weight: 600; | |
| padding-bottom: var(--spacing-sm); | |
| border-bottom: 2px solid var(--accent-primary); | |
| } | |
| .section-header { | |
| background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-hover)); | |
| border: 1px solid var(--border-color); | |
| border-radius: 8px; | |
| padding: var(--spacing-md); | |
| margin-bottom: var(--spacing-md); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); | |
| } | |
| .section-content { | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 8px; | |
| padding: var(--spacing-lg); | |
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| /* Responsive Grid System */ | |
| .responsive-grid { | |
| display: grid; | |
| gap: var(--spacing-md); | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| } | |
| .responsive-grid-2 { | |
| display: grid; | |
| gap: var(--spacing-md); | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| } | |
| .responsive-grid-3 { | |
| display: grid; | |
| gap: var(--spacing-md); | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| } | |
| @media (max-width: 768px) { | |
| .responsive-grid, | |
| .responsive-grid-2, | |
| .responsive-grid-3 { | |
| grid-template-columns: 1fr; | |
| } | |
| .modern-card { | |
| padding: var(--spacing-md); | |
| margin-bottom: var(--spacing-md); | |
| } | |
| } | |
| /* ============================================================================ | |
| FORM ELEMENTS SYSTEM | |
| ============================================================================ | |
| @component FormElements | |
| @description Styled form inputs and layout components | |
| @purpose Consistent form styling throughout the application | |
| @integration Works with modal dialogs and settings panels | |
| @layout-components | |
| .form-group - Vertical spacing for form sections | |
| .form-row - Horizontal layout for related inputs | |
| .form-col - Flexible column within form rows | |
| @input-elements | |
| .form-control - Base input styling | |
| .form-select - Dropdown selects | |
| .form-check - Checkbox/radio containers | |
| @features | |
| - Consistent spacing system | |
| - Responsive form layouts | |
| - Focus states and validation | |
| - Accessibility considerations | |
| ============================================================================ */ | |
| /* Form Elements */ | |
| .form-group { | |
| margin-bottom: var(--spacing-md); | |
| } | |
| .form-row { | |
| display: flex; | |
| gap: var(--spacing-md); | |
| } | |
| .form-row .form-group { | |
| flex: 1; | |
| } | |
| label { | |
| display: block; | |
| margin-bottom: var(--spacing-xs); | |
| font-size: 13px; | |
| font-weight: 500; | |
| color: var(--text-primary); | |
| } | |
| input[type="text"], | |
| input[type="password"], | |
| input[type="number"], | |
| select, | |
| textarea { | |
| width: 100%; | |
| padding: var(--spacing-sm); | |
| background-color: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| color: var(--text-primary); | |
| font-size: 14px; | |
| font-family: var(--font-family); | |
| } | |
| input:focus, | |
| select:focus, | |
| textarea:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2); | |
| } | |
| input::placeholder, | |
| textarea::placeholder { | |
| color: var(--text-muted); | |
| } | |
| /* ============================================================================ | |
| LOADING OVERLAY COMPONENT | |
| ============================================================================ | |
| @component LoadingOverlay | |
| @description Full-screen loading overlay for blocking operations | |
| @purpose Prevent user interaction during critical operations | |
| @z-index 1000 (high priority overlay) | |
| @features | |
| - Full viewport coverage | |
| - Semi-transparent backdrop | |
| - Centered loading indicator | |
| - Hidden by default (display: none) | |
| - High z-index for overlay priority | |
| @usage | |
| Shown during: | |
| - Database connection establishment | |
| - Large data imports/exports | |
| - Plugin installations | |
| - Critical system operations | |
| @states | |
| .loading-overlay.active - Visible overlay state | |
| ============================================================================ */ | |
| /* Loading Overlay */ | |
| .loading-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background-color: rgba(0, 0, 0, 0.7); | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: var(--z-overlay); /* Loading below modals and dialogs */ | |
| } | |
| .loading-overlay.active { | |
| display: flex; | |
| } | |
| .loading-spinner { | |
| text-align: center; | |
| } | |
| .spinner { | |
| width: 40px; | |
| height: 40px; | |
| border: 3px solid var(--border-color); | |
| border-top: 3px solid var(--accent-primary); | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| margin: 0 auto var(--spacing-md); | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| .loading-text { | |
| color: var(--text-primary); | |
| font-size: 14px; | |
| } | |
| /* Utility Classes */ | |
| .hidden { | |
| display: none ; | |
| } | |
| .text-center { | |
| text-align: center; | |
| } | |
| .text-muted { | |
| color: var(--text-muted); | |
| } | |
| .text-success { | |
| color: var(--success-color); | |
| } | |
| .text-error { | |
| color: var(--error-color); | |
| } | |
| .text-warning { | |
| color: var(--warning-color); | |
| } | |
| /* ============================================================================ | |
| DIALOG UTILITIES & MODAL MIGRATION | |
| ============================================================================ | |
| @component DialogUtilities | |
| @description Utility classes and migration helpers for dialog system | |
| @purpose Smooth transition from div-based modals to native dialogs | |
| @utilities | |
| .dialog-open - Applied to body when dialog is open | |
| .modal-legacy - Backward compatibility for existing modals | |
| .no-scroll - Prevent body scrolling when dialog open | |
| @migration-note | |
| Legacy .modal classes are maintained for backward compatibility | |
| New dialogs should use .app-dialog class | |
| ============================================================================ */ | |
| /* Prevent body scroll when dialog is open */ | |
| body.dialog-open { | |
| overflow: hidden; | |
| } | |
| /* Legacy modal support (for gradual migration) */ | |
| .modal { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| z-index: var(--z-modal); | |
| display: none; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .modal.active { | |
| display: flex; | |
| } | |
| .modal-overlay { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background-color: rgba(0, 0, 0, 0.7); | |
| backdrop-filter: blur(2px); | |
| } | |
| .modal-content { | |
| background-color: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius-lg); | |
| box-shadow: var(--shadow-lg); | |
| width: 90%; | |
| max-width: 500px; | |
| max-height: 90vh; | |
| overflow: hidden; | |
| position: relative; | |
| z-index: 1; | |
| } | |
| /* Scrollbars */ | |
| ::-webkit-scrollbar { | |
| width: 8px; | |
| height: 8px; | |
| } | |
| ::-webkit-scrollbar-track { | |
| background-color: var(--bg-secondary); | |
| } | |
| ::-webkit-scrollbar-thumb { | |
| background-color: var(--border-color); | |
| border-radius: 4px; | |
| } | |
| ::-webkit-scrollbar-thumb:hover { | |
| background-color: var(--bg-hover); | |
| } | |
| /* Responsive */ | |
| @media (max-width: 1200px) { | |
| .sidebar { | |
| width: 250px; | |
| } | |
| } | |
| @media (max-width: 900px) { | |
| .app-header { | |
| flex-wrap: wrap; | |
| height: auto; | |
| padding: var(--spacing-sm); | |
| } | |
| .header-center { | |
| order: 3; | |
| flex-basis: 100%; | |
| margin-top: var(--spacing-sm); | |
| max-width: none; | |
| } | |
| } | |
| /* DBeaver-style Table Enhancements */ | |
| .table-wrapper.dbeaver-style { | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| background: var(--bg-secondary); | |
| } | |
| .table-toolbar.enhanced { | |
| background: var(--bg-tertiary); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: var(--spacing-sm); | |
| } | |
| .table-info .table-name { | |
| font-weight: 600; | |
| color: var(--accent-primary); | |
| font-size: 14px; | |
| } | |
| .table-info .table-stats { | |
| color: var(--text-muted); | |
| font-size: 12px; | |
| margin-left: var(--spacing-sm); | |
| } | |
| .table-controls { | |
| display: flex; | |
| gap: var(--spacing-xs); | |
| align-items: center; | |
| } | |
| .filter-input { | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border-color); | |
| color: var(--text-primary); | |
| padding: 4px 8px; | |
| border-radius: var(--border-radius); | |
| font-size: 12px; | |
| width: 200px; | |
| } | |
| .filter-input:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| } | |
| .table-container.scrollable { | |
| max-height: 600px; | |
| overflow: auto; | |
| border: 1px solid var(--border-color); | |
| } | |
| .data-table.dbeaver-table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| font-size: 13px; | |
| font-family: var(--font-mono); | |
| } | |
| .data-table.dbeaver-table th { | |
| background: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| padding: 6px 8px; | |
| text-align: left; | |
| font-weight: 600; | |
| position: sticky; | |
| top: 0; | |
| z-index: 10; | |
| } | |
| .column-header-content { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .column-name { | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| } | |
| .column-type { | |
| font-size: 10px; | |
| color: var(--text-muted); | |
| font-weight: normal; | |
| } | |
| .sort-indicator { | |
| font-size: 10px; | |
| color: var(--text-muted); | |
| } | |
| .sortable:hover { | |
| background: var(--bg-hover); | |
| cursor: pointer; | |
| } | |
| .sortable.sort-asc .sort-indicator::after { | |
| content: ' ▲'; | |
| color: var(--accent-primary); | |
| } | |
| .sortable.sort-desc .sort-indicator::after { | |
| content: ' ▼'; | |
| color: var(--accent-primary); | |
| } | |
| .data-table.dbeaver-table td { | |
| border: 1px solid var(--border-color); | |
| padding: 4px 8px; | |
| background: var(--bg-secondary); | |
| max-width: 300px; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| } | |
| .data-cell:hover { | |
| background: var(--bg-hover); | |
| } | |
| .data-cell:focus { | |
| outline: 2px solid var(--accent-primary); | |
| outline-offset: -2px; | |
| } | |
| .sticky-column { | |
| position: sticky; | |
| left: 0; | |
| z-index: 5; | |
| background: var(--bg-tertiary) ; | |
| border-right: 2px solid var(--border-color) ; | |
| font-weight: 600; | |
| } | |
| .null-indicator { | |
| color: var(--text-muted); | |
| font-style: italic; | |
| font-size: 11px; | |
| } | |
| .data-cell.null-value { | |
| background: var(--bg-primary); | |
| color: var(--text-muted); | |
| } | |
| .data-cell.modified { | |
| background: rgba(255, 152, 0, 0.2); | |
| border-color: var(--warning-color); | |
| } | |
| .data-cell.empty-cell { | |
| background: var(--bg-primary); | |
| opacity: 0.7; | |
| } | |
| .data-cell.long-text { | |
| cursor: help; | |
| } | |
| .data-row:hover td { | |
| background: var(--bg-hover); | |
| } | |
| .data-row.empty-row td { | |
| background: var(--bg-primary); | |
| opacity: 0.6; | |
| } | |
| .data-row.new-row td { | |
| background: rgba(76, 175, 80, 0.1); | |
| border-color: var(--success-color); | |
| } | |
| .data-row.deleted-row { | |
| opacity: 0.5; | |
| text-decoration: line-through; | |
| } | |
| .results-info.enhanced { | |
| background: var(--bg-tertiary); | |
| border-top: 1px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| font-size: 12px; | |
| } | |
| .info-left, | |
| .info-right { | |
| display: flex; | |
| gap: var(--spacing-md); | |
| } | |
| .info-item { | |
| color: var(--text-muted); | |
| display: flex; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| /* Context Menu Enhancements */ | |
| .context-menu { | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow-lg); | |
| padding: 4px 0; | |
| min-width: 160px; | |
| font-size: 12px; | |
| z-index: 1000; | |
| } | |
| .context-menu-item { | |
| padding: 6px 12px; | |
| cursor: pointer; | |
| color: var(--text-primary); | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .context-menu-item:hover { | |
| background: var(--bg-hover); | |
| } | |
| .context-menu-separator { | |
| height: 1px; | |
| background: var(--border-color); | |
| margin: 4px 0; | |
| } | |
| /* Enhanced Button Styles */ | |
| .btn.btn-sm { | |
| padding: 4px 8px; | |
| font-size: 11px; | |
| border-radius: var(--border-radius); | |
| border: 1px solid var(--border-color); | |
| background: var(--bg-secondary); | |
| color: var(--text-primary); | |
| cursor: pointer; | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 4px; | |
| } | |
| .btn.btn-sm:hover { | |
| background: var(--bg-hover); | |
| } | |
| .btn.btn-success { | |
| background: var(--success-color); | |
| border-color: var(--success-color); | |
| color: white; | |
| } | |
| .btn.btn-warning { | |
| background: var(--warning-color); | |
| border-color: var(--warning-color); | |
| color: white; | |
| } | |
| .btn.btn-info { | |
| background: var(--info-color); | |
| border-color: var(--info-color); | |
| color: white; | |
| } | |
| .btn.btn-primary { | |
| background: var(--accent-primary); | |
| border-color: var(--accent-primary); | |
| color: white; | |
| } | |
| .btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| /* Cell Editing */ | |
| .data-cell.editing input { | |
| width: 100%; | |
| background: var(--bg-primary); | |
| border: 2px solid var(--accent-primary); | |
| color: var(--text-primary); | |
| padding: 2px 4px; | |
| font-family: var(--font-mono); | |
| font-size: 13px; | |
| } | |
| .data-cell.editing input:focus { | |
| outline: none; | |
| } | |
| /* Responsive Enhancements */ | |
| @media (max-width: 768px) { | |
| .table-toolbar.enhanced { | |
| flex-direction: column; | |
| align-items: stretch; | |
| gap: var(--spacing-sm); | |
| } | |
| .table-controls { | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| } | |
| .filter-input { | |
| width: 100%; | |
| } | |
| .table-container.scrollable { | |
| max-height: 400px; | |
| } | |
| .info-left, | |
| .info-right { | |
| flex-direction: column; | |
| gap: var(--spacing-xs); | |
| } | |
| } | |
| /* AG Grid Styles */ | |
| .ag-grid-wrapper { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100%; | |
| background: var(--bg-secondary); | |
| border-radius: var(--border-radius); | |
| overflow: hidden; | |
| } | |
| .ag-grid-toolbar { | |
| background: var(--bg-tertiary); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| flex-wrap: wrap; | |
| gap: var(--spacing-sm); | |
| } | |
| .table-controls { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-md); | |
| } | |
| .table-filter { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .filter-input { | |
| background: var(--bg-primary); | |
| border: 1px solid var(--border-color); | |
| color: var(--text-primary); | |
| padding: 4px 8px; | |
| border-radius: var(--border-radius); | |
| font-size: 12px; | |
| width: 200px; | |
| } | |
| .filter-input:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| } | |
| .ag-theme-balham-dark { | |
| --ag-background-color: var(--bg-secondary); | |
| --ag-header-background-color: var(--bg-tertiary); | |
| --ag-odd-row-background-color: var(--bg-secondary); | |
| --ag-even-row-background-color: rgba(255, 255, 255, 0.02); | |
| --ag-row-hover-color: var(--bg-hover); | |
| --ag-selected-row-background-color: var(--accent-primary); | |
| --ag-border-color: var(--border-color); | |
| --ag-header-foreground-color: var(--text-primary); | |
| --ag-data-color: var(--text-primary); | |
| --ag-secondary-foreground-color: var(--text-secondary); | |
| --ag-input-focus-box-shadow: 0 0 0 2px var(--accent-primary); | |
| --ag-font-family: var(--font-family); | |
| border: 1px solid var(--border-color); | |
| } | |
| .ag-theme-balham-dark .ag-cell { | |
| border-right: 1px solid var(--border-color); | |
| border-bottom: 1px solid var(--border-color); | |
| padding: 4px 8px; | |
| line-height: 1.4; | |
| } | |
| .ag-theme-balham-dark .ag-header-cell { | |
| border-right: 1px solid var(--border-color); | |
| background: var(--bg-tertiary); | |
| font-weight: 600; | |
| padding: 6px 8px; | |
| } | |
| .ag-theme-balham-dark .ag-header-cell-text { | |
| color: var(--text-primary); | |
| } | |
| .ag-theme-balham-dark .ag-cell-focus { | |
| border: 2px solid var(--accent-primary) ; | |
| background-color: rgba(0, 122, 204, 0.1) ; | |
| } | |
| .ag-theme-balham-dark .ag-cell-inline-editing { | |
| background-color: var(--bg-primary) ; | |
| border: 2px solid var(--accent-primary) ; | |
| } | |
| .ag-theme-balham-dark .ag-cell-edit-input { | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| border: none; | |
| outline: none; | |
| width: 100%; | |
| height: 100%; | |
| padding: 2px 4px; | |
| } | |
| /* Row selection like DBeaver */ | |
| .ag-theme-balham-dark .ag-row-selected { | |
| background-color: rgba(0, 122, 204, 0.3) ; | |
| } | |
| .ag-theme-balham-dark .ag-row-hover { | |
| background-color: var(--bg-hover) ; | |
| } | |
| /* Column hover like DBeaver */ | |
| .ag-theme-balham-dark .ag-header-cell:hover { | |
| background-color: var(--bg-hover); | |
| } | |
| .ag-theme-balham-dark .row-number-cell { | |
| background-color: var(--bg-tertiary) ; | |
| font-weight: 600; | |
| text-align: center; | |
| border-right: 2px solid var(--border-color) ; | |
| } | |
| .ag-theme-balham-dark .data-cell { | |
| padding: var(--spacing-xs); | |
| } | |
| .ag-theme-balham-dark .null-value { | |
| color: var(--text-muted); | |
| font-style: italic; | |
| } | |
| .ag-theme-balham-dark .ag-cell-focus { | |
| border: 2px solid var(--accent-primary) ; | |
| } | |
| .ag-theme-balham-dark .ag-cell-inline-editing { | |
| background-color: var(--bg-hover) ; | |
| border: 2px solid var(--accent-primary) ; | |
| } | |
| /* Enhanced AG Grid scrollbars */ | |
| .ag-theme-balham-dark .ag-body-horizontal-scroll { | |
| background: var(--bg-tertiary); | |
| } | |
| .ag-theme-balham-dark .ag-body-vertical-scroll { | |
| background: var(--bg-tertiary); | |
| } | |
| .ag-theme-balham-dark .ag-scrollbar-thumb { | |
| background: var(--text-muted); | |
| border-radius: var(--border-radius); | |
| } | |
| .ag-theme-balham-dark .ag-scrollbar-thumb:hover { | |
| background: var(--text-secondary); | |
| } | |
| /* AG Grid Visual State Management - แสดงสถานะการเปลี่ยนแปลงของข้อมูล */ | |
| /* เซลล์ที่ถูกแก้ไข (DBeaver-style) */ | |
| .ag-row .ag-cell.cell-dirty { | |
| background-color: #3a3a20 ; /* สีเหลืองเข้มสำหรับเซลล์ที่แก้ */ | |
| border-left: 3px solid var(--warning-color) ; | |
| } | |
| /* แถวใหม่ที่เพิ่งเพิ่มเข้ามา */ | |
| .ag-row.ag-row-new { | |
| background-color: #203a20 ; /* สีเขียวเข้มสำหรับแถวใหม่ */ | |
| border-left: 5px solid var(--success-color) ; | |
| } | |
| /* แถวที่ถูกแก้ไข */ | |
| .ag-row.ag-row-modified { | |
| background-color: #3a3020 ; /* สีเหลืองเข้มสำหรับแถวที่แก้ไข */ | |
| border-left: 5px solid var(--warning-color) ; | |
| } | |
| /* แถวใหม่ที่ถูกเลือก */ | |
| .ag-row.ag-row-new.ag-row-selected { | |
| background-color: #2a4a2a ; | |
| } | |
| /* แถวที่แก้ไขและถูกเลือก */ | |
| .ag-row.ag-row-modified.ag-row-selected { | |
| background-color: #4a4030 ; | |
| } | |
| /* แถวที่ถูกมาร์คให้ลบ */ | |
| .ag-row.ag-row-deleted { | |
| background-color: rgba(244, 67, 54, 0.15) ; | |
| border-left: 5px solid #f44336 ; | |
| text-decoration: line-through; | |
| opacity: 0.7; | |
| } | |
| /* แถวที่ถูกมาร์คให้ลบและถูกเลือก */ | |
| .ag-row.ag-row-deleted.ag-row-selected { | |
| background-color: rgba(244, 67, 54, 0.25) ; | |
| } | |
| /* เซลล์ที่มีการเปลี่ยนแปลงและถูกโฟกัส */ | |
| .ag-row .ag-cell.cell-dirty.ag-cell-focus { | |
| background-color: #4a4a30 ; | |
| border: 2px solid var(--warning-color) ; | |
| } | |
| /* ปุ่ม Save Changes ที่ active */ | |
| .btn.btn-warning:not(:disabled) { | |
| background-color: var(--warning-color) ; | |
| border-color: var(--warning-color) ; | |
| animation: pulse-save 1.5s infinite; | |
| } | |
| @keyframes pulse-save { | |
| 0% { opacity: 1; } | |
| 50% { opacity: 0.7; } | |
| 100% { opacity: 1; } | |
| } | |
| /* Explain Plan Styles */ | |
| .explain-plan-container { | |
| height: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| background: var(--bg-secondary); | |
| border-radius: var(--border-radius); | |
| overflow: hidden; | |
| } | |
| .explain-header { | |
| background: var(--bg-tertiary); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| border-bottom: 1px solid var(--border-color); | |
| } | |
| /* Modern Table Styles */ | |
| .modern-table { | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| overflow: hidden; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); | |
| margin-bottom: var(--spacing-lg); | |
| } | |
| .modern-table-header { | |
| background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-hover)); | |
| padding: var(--spacing-md) var(--spacing-lg); | |
| border-bottom: 2px solid var(--accent-primary); | |
| } | |
| .modern-table-header h3 { | |
| color: var(--accent-primary); | |
| margin: 0; | |
| font-weight: 600; | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| .modern-table-content { | |
| padding: var(--spacing-lg); | |
| } | |
| /* Modern Form Styles */ | |
| .modern-form { | |
| background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary)); | |
| border: 1px solid var(--border-color); | |
| border-radius: 12px; | |
| padding: var(--spacing-lg); | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); | |
| } | |
| .form-section { | |
| margin-bottom: var(--spacing-lg); | |
| padding: var(--spacing-md); | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: 8px; | |
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| .form-section h4 { | |
| color: var(--accent-primary); | |
| margin-bottom: var(--spacing-md); | |
| padding-bottom: var(--spacing-sm); | |
| border-bottom: 1px solid var(--border-color); | |
| font-weight: 600; | |
| } | |
| /* Input Styles */ | |
| .modern-input { | |
| background: var(--bg-tertiary); | |
| border: 2px solid var(--border-color); | |
| border-radius: 8px; | |
| padding: 10px 14px; | |
| color: var(--text-primary); | |
| font-size: 13px; | |
| transition: all 0.3s ease; | |
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| .modern-input:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| /* Select Styles */ | |
| .modern-select { | |
| background: var(--bg-tertiary); | |
| border: 2px solid var(--border-color); | |
| border-radius: 8px; | |
| padding: 10px 14px; | |
| color: var(--text-primary); | |
| font-size: 13px; | |
| transition: all 0.3s ease; | |
| cursor: pointer; | |
| box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2); | |
| } | |
| .modern-select:focus { | |
| outline: none; | |
| border-color: var(--accent-primary); | |
| box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.2); | |
| } | |
| /* Toolbar Styles */ | |
| .modern-toolbar { | |
| background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-hover)); | |
| border: 1px solid var(--border-color); | |
| border-radius: 8px; | |
| padding: var(--spacing-md); | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: var(--spacing-md); | |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); | |
| margin-bottom: var(--spacing-md); | |
| } | |
| .toolbar-left, | |
| .toolbar-right { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| } | |
| /* Status Indicators */ | |
| .status-indicator { | |
| display: inline-flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| padding: 4px 8px; | |
| border-radius: 6px; | |
| font-size: 11px; | |
| font-weight: 600; | |
| text-transform: uppercase; | |
| } | |
| .status-success { | |
| background: rgba(76, 175, 80, 0.2); | |
| color: #4caf50; | |
| border: 1px solid #4caf50; | |
| } | |
| .status-warning { | |
| background: rgba(255, 152, 0, 0.2); | |
| color: #ff9800; | |
| border: 1px solid #ff9800; | |
| } | |
| .status-error { | |
| background: rgba(244, 67, 54, 0.2); | |
| color: #f44336; | |
| border: 1px solid #f44336; | |
| } | |
| .status-info { | |
| background: rgba(33, 150, 243, 0.2); | |
| color: #2196f3; | |
| border: 1px solid #2196f3; | |
| } | |
| .explain-header h3 { | |
| font-size: 14px; | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| margin: 0; | |
| } | |
| .explain-content { | |
| flex: 1; | |
| overflow: auto; | |
| padding: var(--spacing-md); | |
| } | |
| .explain-text { | |
| background: var(--bg-primary); | |
| color: var(--text-primary); | |
| padding: var(--spacing-md); | |
| border-radius: var(--border-radius); | |
| font-family: var(--font-mono); | |
| font-size: 12px; | |
| line-height: 1.4; | |
| white-space: pre-wrap; | |
| word-wrap: break-word; | |
| border: 1px solid var(--border-color); | |
| margin: 0; | |
| } | |
| /* Results Message Styles */ | |
| .results-message { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| height: 100%; | |
| padding: var(--spacing-xl); | |
| text-align: center; | |
| } | |
| .results-message p { | |
| margin: var(--spacing-sm) 0; | |
| font-size: 14px; | |
| } | |
| .results-message p:first-child { | |
| color: var(--text-primary); | |
| font-weight: 500; | |
| font-size: 16px; | |
| } | |
| /* Enhanced Button States */ | |
| .btn:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| background-color: var(--bg-secondary) ; | |
| color: var(--text-muted) ; | |
| border-color: var(--border-color) ; | |
| } | |
| .btn:disabled:hover { | |
| transform: none; | |
| } | |
| /* Transaction Button Colors */ | |
| .btn-success { | |
| background-color: var(--success-color); | |
| border-color: var(--success-color); | |
| color: white; | |
| } | |
| .btn-success:hover:not(:disabled) { | |
| background-color: #45a049; | |
| border-color: #45a049; | |
| } | |
| .btn-warning { | |
| background-color: var(--warning-color); | |
| border-color: var(--warning-color); | |
| color: white; | |
| } | |
| .btn-warning:hover:not(:disabled) { | |
| background-color: #e68900; | |
| border-color: #e68900; | |
| } | |
| .btn-info { | |
| background-color: var(--info-color); | |
| border-color: var(--info-color); | |
| color: white; | |
| } | |
| .btn-info:hover:not(:disabled) { | |
| background-color: #1976d2; | |
| border-color: #1976d2; | |
| } | |
| /* Import Summary Styles */ | |
| .import-stats { | |
| background: var(--bg-tertiary); | |
| padding: var(--spacing-md); | |
| border-radius: var(--border-radius); | |
| margin: var(--spacing-md) 0; | |
| border: 1px solid var(--border-color); | |
| } | |
| .stat-row { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| margin: var(--spacing-xs) 0; | |
| } | |
| .stat-label { | |
| font-weight: 600; | |
| color: var(--text-primary); | |
| min-width: 140px; | |
| } | |
| .stat-value { | |
| font-weight: 500; | |
| padding: 2px 6px; | |
| border-radius: 3px; | |
| font-size: 0.9em; | |
| } | |
| .stat-value.success { | |
| color: var(--success-color); | |
| background: rgba(76, 175, 80, 0.1); | |
| } | |
| .stat-value.error { | |
| color: var(--error-color); | |
| background: rgba(244, 67, 54, 0.1); | |
| } | |
| .stat-value.muted { | |
| color: var(--text-muted); | |
| } | |
| .stat-divider { | |
| color: var(--text-muted); | |
| margin: 0 2px; | |
| } | |
| .error-details { | |
| margin-top: var(--spacing-md); | |
| border: 1px solid var(--error-color); | |
| border-radius: var(--border-radius); | |
| background: rgba(244, 67, 54, 0.05); | |
| } | |
| .error-details summary { | |
| padding: var(--spacing-sm); | |
| cursor: pointer; | |
| background: rgba(244, 67, 54, 0.1); | |
| color: var(--error-color); | |
| font-weight: 500; | |
| border-radius: var(--border-radius) var(--border-radius) 0 0; | |
| } | |
| .error-details summary:hover { | |
| background: rgba(244, 67, 54, 0.15); | |
| } | |
| .error-list { | |
| margin: 0; | |
| padding: var(--spacing-sm); | |
| list-style: none; | |
| max-height: 200px; | |
| overflow-y: auto; | |
| } | |
| .error-list li { | |
| padding: var(--spacing-xs) 0; | |
| border-bottom: 1px solid rgba(244, 67, 54, 0.1); | |
| font-family: var(--font-mono); | |
| font-size: 0.85em; | |
| color: var(--text-secondary); | |
| } | |
| .error-list li:last-child { | |
| border-bottom: none; | |
| } | |
| .success-text { | |
| color: var(--success-color); | |
| font-weight: 500; | |
| } | |
| /* Dropdown Menu Styles for Toolbar */ | |
| .dropdown { | |
| position: relative; | |
| display: inline-block; | |
| } | |
| .dropdown-button { | |
| background: var(--bg-tertiary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| padding: var(--spacing-xs) var(--spacing-sm); | |
| color: var(--text-primary); | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| font-size: 13px; | |
| transition: all 0.2s; | |
| min-width: 100px; | |
| justify-content: space-between; | |
| } | |
| .dropdown-button:hover { | |
| background: var(--bg-hover); | |
| border-color: var(--accent-primary); | |
| } | |
| .dropdown-button.active { | |
| background: var(--accent-primary); | |
| color: white; | |
| border-color: var(--accent-primary); | |
| } | |
| .dropdown-arrow { | |
| font-size: 10px; | |
| transition: transform 0.2s; | |
| } | |
| .dropdown.open .dropdown-arrow { | |
| transform: rotate(180deg); | |
| } | |
| .dropdown-menu { | |
| position: absolute; | |
| top: calc(100% + 2px); | |
| left: 0; | |
| background: var(--bg-secondary); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow-lg); | |
| z-index: 9999; | |
| min-width: 180px; | |
| display: none; | |
| } | |
| .dropdown.open .dropdown-menu { | |
| display: block; | |
| } | |
| .dropdown-item { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| border: none; | |
| background: none; | |
| color: var(--text-primary); | |
| cursor: pointer; | |
| width: 100%; | |
| text-align: left; | |
| font-size: 13px; | |
| transition: background-color 0.2s; | |
| } | |
| .dropdown-item:hover { | |
| background: var(--bg-hover); | |
| } | |
| .dropdown-item:disabled { | |
| opacity: 0.5; | |
| cursor: not-allowed; | |
| } | |
| .dropdown-item:disabled:hover { | |
| background: none; | |
| } | |
| .dropdown-separator { | |
| height: 1px; | |
| background: var(--border-color); | |
| margin: var(--spacing-xs) 0; | |
| } | |
| /* Toolbar Improvements */ | |
| .editor-toolbar { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-sm); | |
| padding: var(--spacing-sm) var(--spacing-md); | |
| background: var(--bg-tertiary); | |
| border-bottom: 1px solid var(--border-color); | |
| flex-wrap: wrap; | |
| } | |
| .toolbar-group { | |
| display: flex; | |
| align-items: center; | |
| gap: var(--spacing-xs); | |
| } | |
| .toolbar-separator { | |
| width: 1px; | |
| height: 20px; | |
| background: var(--border-color); | |
| margin: 0 var(--spacing-xs); | |
| } | |
| .toolbar-spacer { | |
| flex: 1; | |
| } | |
| /* ============================================================================ | |
| RESPONSIVE TOOLBAR LAYOUTS | |
| ============================================================================ | |
| @component ResponsiveToolbar | |
| @description Adaptive toolbar layouts for different screen sizes | |
| @purpose Ensure toolbar usability across desktop, tablet, and mobile | |
| @breakpoints 1200px (laptop), 768px (tablet/mobile) | |
| @behavior-1200px | |
| - Remove toolbar spacer for tighter layout | |
| - Maintain horizontal button grouping | |
| - Optimize for laptop screens | |
| @behavior-768px | |
| - Stack toolbar vertically | |
| - Full-width buttons | |
| - Center-aligned button groups | |
| - Increased touch targets | |
| @features | |
| - Progressive enhancement approach | |
| - Smooth responsive transitions | |
| - Maintained functionality across sizes | |
| - Touch-friendly mobile interface | |
| ============================================================================ */ | |
| /* Responsive Toolbar */ | |
| @media (max-width: 1200px) { | |
| .editor-toolbar { | |
| justify-content: flex-start; | |
| } | |
| .toolbar-spacer { | |
| display: none; | |
| } | |
| } | |
| @media (max-width: 768px) { | |
| .editor-toolbar { | |
| flex-direction: column; | |
| align-items: stretch; | |
| gap: var(--spacing-xs); | |
| } | |
| .toolbar-group { | |
| justify-content: center; | |
| } | |
| .dropdown-button { | |
| min-width: auto; | |
| flex: 1; | |
| } | |
| } | |
| /* ============================================================================ | |
| Z-INDEX SYSTEM SUMMARY | |
| ============================================================================ | |
| @summary Z-Index Management | |
| @description Centralized z-index system using CSS custom properties | |
| @purpose Eliminate z-index conflicts and provide clear stacking hierarchy | |
| @hierarchy (from lowest to highest) | |
| --z-base: 1 Base level elements | |
| --z-dropdown: 1000 Dropdowns, select options | |
| --z-sticky: 1001 Sticky headers, fixed navigation | |
| --z-overlay: 9000 Background overlays, loading screens | |
| --z-modal: 10000 Modal dialogs (legacy support) | |
| --z-popover: 11000 Context menus, popovers | |
| --z-tooltip: 12000 Tooltips (highest interactive elements) | |
| @native-dialogs | |
| <dialog> elements use browser-managed stacking context | |
| No manual z-index required - automatically above all other content | |
| Recommended for new modal implementations | |
| @migration-path | |
| 1. New modals: Use <dialog class="app-dialog"> | |
| 2. Existing modals: Gradually migrate to dialog elements | |
| 3. Context menus: Use --z-popover for consistent stacking | |
| 4. Loading overlays: Use --z-overlay to stay below modals | |
| @best-practices | |
| - Always use CSS custom properties for z-index values | |
| - Prefer native <dialog> for new modal implementations | |
| - Test stacking order across different UI states | |
| - Document any exceptions to the standard hierarchy | |
| ============================================================================ */ | |