/**
 * Excel Toolbar Styles
 * Reusable styling for Excel-like toolbar component
 *
 * Extracted from my-selected-toolbar.html and optimized for reusability
 * Works with Procurement, Risk Management, and other Excel grids
 *
 * Created: 2025-01-17
 */

/* ============================================
   MAIN TOOLBAR CONTAINER
   ============================================ */

.excel-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 7px 18px;  /* 15% bigger */
    display: flex;
    gap: 7px;  /* 15% bigger */
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============================================
   TOOLBAR GROUPS
   ============================================ */

.excel-toolbar .toolbar-group {
    display: flex;
    gap: 4px;  /* 15% bigger */
    padding: 0 7px;  /* 15% bigger */
    border-right: 1px solid #dee2e6;
}

.excel-toolbar .toolbar-group:last-child {
    border-right: none;
}

.excel-toolbar .toolbar-group label {
    font-size: 10px;  /* 15% bigger */
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    align-self: center;
    margin-right: 7px;  /* 15% bigger */
}

/* ============================================
   TOOLBAR BUTTONS
   ============================================ */

.excel-toolbar .toolbar-btn {
    position: relative;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;  /* 15% bigger */
    padding: 6px 9px;  /* 15% bigger */
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;  /* 15% bigger */
    font-size: 13px;  /* 15% bigger */
    color: #495057;
    min-width: 32px;  /* 15% bigger */
    justify-content: center;
}

.excel-toolbar .toolbar-btn:hover {
    background: #e7f3ff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.excel-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

.excel-toolbar .toolbar-btn.active {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
    box-shadow: inset 0 1px 3px rgba(37, 99, 235, 0.2);
}

/* ============================================
   COLOR INDICATOR BARS (under text/bg color buttons)
   ============================================ */

.excel-toolbar .toolbar-btn .color-indicator {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 3px;
    border-radius: 1px;
    transition: background-color 0.15s;
}

.excel-toolbar .toolbar-btn .text-color-indicator {
    background-color: #000000;
}

.excel-toolbar .toolbar-btn .bg-color-indicator {
    background-color: transparent;
    border: 1px solid #dee2e6;
}

/* Extra bottom padding for buttons with color indicators */
.excel-toolbar .toolbar-btn:has(.color-indicator) {
    padding-bottom: 8px;
}

.excel-toolbar .toolbar-btn i {
    font-size: 15px;  /* 15% bigger */
}

.excel-toolbar .toolbar-btn .label {
    font-size: 12px;  /* 15% bigger */
    font-weight: 500;
}

.excel-toolbar .toolbar-btn.icon-only {
    padding: 6px;  /* 15% bigger */
}

/* ============================================
   TOOLTIPS
   ============================================ */

/* Tooltip box */
.excel-toolbar .toolbar-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 9px); /* Position above button with gap - 15% bigger */
    left: 50%;
    transform: translateX(-50%) translateY(5px); /* Start slightly lower for animation */
    background: #1e293b;
    color: white;
    padding: 6px 9px;  /* 15% bigger */
    border-radius: 5px;  /* 15% bigger */
    font-size: 12px;  /* 15% bigger */
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    z-index: 10001; /* Above everything */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Tooltip arrow */
.excel-toolbar .toolbar-btn::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px); /* Position arrow just below tooltip */
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    z-index: 10001;
}

/* Show tooltip on hover with animation */
.excel-toolbar .toolbar-btn:hover::before,
.excel-toolbar .toolbar-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); /* Slide up into position */
}

/* Ensure toolbar doesn't clip tooltips */
.excel-toolbar {
    overflow: visible !important;
}

/* Prevent tooltips on disabled buttons */
.excel-toolbar .toolbar-btn:disabled::before,
.excel-toolbar .toolbar-btn:disabled::after {
    display: none;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */

.excel-toolbar .dropdown {
    position: relative;
}

.excel-toolbar .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 3px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    min-width: 176px; /* Reduced 20% */
    max-width: 224px; /* Reduced 20% */
    width: max-content; /* Fit content width */
    z-index: 999999 !important; /* CRITICAL: Above all grid elements (procurement headers max 100) */
    display: none;
    max-height: 320px;
    overflow-y: auto; /* Vertical scroll when needed */
    overflow-x: hidden; /* CRITICAL: Prevent horizontal scrollbar */
}

.excel-toolbar .dropdown-menu.show {
    display: block;
}

/* Dynamic dropdowns (e.g. baseline selector) use inline width — don't clamp */
.excel-toolbar .dropdown-menu.dynamic-dropdown {
    max-width: none;
    width: auto;
}

/* Menu Header */
.excel-toolbar .dropdown-menu .menu-header {
    padding: 7px 14px;  /* 15% bigger */
    font-size: 10px;  /* 15% bigger */
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Keep header on one line */
}

/* Menu Items */
.excel-toolbar .dropdown-menu .menu-item {
    padding: 8px 14px;  /* 15% bigger */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;  /* 15% bigger */
    font-size: 13px;  /* 15% bigger */
    transition: background 0.15s;
    border-bottom: 1px solid #f1f3f5;
    min-width: 0; /* Allow flex items to shrink below content size */
    width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

.excel-toolbar .dropdown-menu .menu-item:last-child {
    border-bottom: none;
}

.excel-toolbar .dropdown-menu .menu-item:hover {
    background: #e7f3ff;
}

.excel-toolbar .dropdown-menu .menu-item.active {
    background: #2563eb;
    color: white;
}

.excel-toolbar .dropdown-menu .menu-item.active i {
    color: white;
}

.excel-toolbar .dropdown-menu .menu-item i {
    width: 18px;  /* 15% bigger */
    font-size: 14px;  /* 15% bigger */
    flex-shrink: 0; /* Prevent icon from shrinking */
    text-align: center;
    color: #6c757d;
}

.excel-toolbar .dropdown-menu .menu-item span:not(.shortcut) {
    flex: 1; /* Take remaining space */
    min-width: 0; /* Allow text to wrap/truncate */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.excel-toolbar .dropdown-menu .menu-item .shortcut {
    margin-left: auto;
    flex-shrink: 0; /* Prevent shortcut from shrinking */
    font-size: 10px;  /* 15% bigger */
    color: #adb5bd;
    font-family: 'Courier New', monospace;
    white-space: nowrap; /* Keep shortcut on one line */
}

/* Menu Divider */
.excel-toolbar .dropdown-menu .menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* Menu Separator (alias for menu-divider) */
.excel-toolbar .dropdown-menu .menu-separator {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* ============================================
   CHECKBOX ITEMS (Column Selection)
   ============================================ */

.excel-toolbar .dropdown-menu .checkbox-item {
    display: flex;
    align-items: center;
    gap: 7px;  /* 15% bigger */
    padding: 7px 14px;  /* 15% bigger */
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f1f3f5;
    user-select: none;
    min-width: 0; /* Allow flex items to shrink */
    width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width */
}

.excel-toolbar .dropdown-menu .checkbox-item:hover {
    background: #e7f3ff;
}

.excel-toolbar .dropdown-menu .checkbox-item input[type="checkbox"] {
    cursor: pointer;
    width: 15px;  /* 15% bigger */
    height: 15px;  /* 15% bigger */
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    accent-color: #2563eb;
}

.excel-toolbar .dropdown-menu .checkbox-item span {
    flex: 1;
    min-width: 0; /* Allow text to wrap/truncate */
    font-size: 12px;  /* 15% bigger */
    color: #495057;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Keep label on one line */
}

/* Columns dropdown - wider to accommodate checkbox labels */
.excel-toolbar .columns-dropdown {
    min-width: 176px;
}

/* ============================================
   SEARCH BOX - Icon-Only Expandable Style
   ============================================ */

.excel-toolbar .search-group {
    border-right: none;
    padding: 0;
    margin-left: auto;
}

.excel-toolbar .search-expandable {
    position: relative;
    display: flex;
    align-items: center;
}

.excel-toolbar .search-expandable .search-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.excel-toolbar .search-expandable .search-icon-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.excel-toolbar .search-expandable .search-expanded {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    gap: 6px;
}

.excel-toolbar .search-expandable:hover .search-expanded,
.excel-toolbar .search-expandable:focus-within .search-expanded {
    opacity: 1;
    visibility: visible;
}

.excel-toolbar .search-expandable .search-expanded input {
    border: none;
    outline: none;
    width: 160px;
    font-size: 13px;
    padding: 2px 4px;
    color: #333;
}

.excel-toolbar .search-expandable .search-expanded input::placeholder {
    color: #999;
}

.excel-toolbar .search-expandable .search-counter {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    margin: 0 4px;
}

.excel-toolbar .search-expandable .search-nav-btns {
    display: flex;
    gap: 2px;
}

.excel-toolbar .search-expandable .search-nav-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    border-radius: 3px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.15s;
}

.excel-toolbar .search-expandable .search-nav-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.excel-toolbar .search-expandable .search-close-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.15s;
}

.excel-toolbar .search-expandable .search-close-btn:hover {
    background: #fee;
    color: #c00;
}

/* ============================================
   COLOR UTILITIES
   ============================================ */

.excel-toolbar .color-green { color: #10b981; }
.excel-toolbar .color-red { color: #ef4444; }
.excel-toolbar .color-blue { color: #3b82f6; }
.excel-toolbar .color-purple { color: #8b5cf6; }
.excel-toolbar .color-yellow { color: #f59e0b; }
.excel-toolbar .color-orange { color: #f97316; }

/* ============================================
   FONT SIZE CONTROLS
   ============================================ */

/* Font size display button */
.excel-toolbar .font-size-display {
    min-width: 41px;  /* 15% bigger */
    padding: 6px 7px;  /* 15% bigger */
    font-weight: 500;
}

.excel-toolbar .font-size-display .font-size-value {
    font-size: 12px;  /* 15% bigger */
    font-weight: 600;
    color: #374151;
}

/* Font size dropdown - narrower than other dropdowns */
.excel-toolbar .font-size-dropdown {
    min-width: 110px;  /* 15% bigger */
    max-width: 129px;  /* 15% bigger */
}

.excel-toolbar .font-size-dropdown .menu-item {
    justify-content: center;
    padding: 7px 14px;  /* 15% bigger */
    font-size: 12px;  /* 15% bigger */
    font-weight: 500;
}

.excel-toolbar .font-size-dropdown .menu-item:hover {
    background: #e7f3ff;
}

.excel-toolbar .font-size-dropdown .menu-item.active {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

/* +/- buttons for font size - smaller than regular buttons */
.excel-toolbar [data-action="font-size-decrease"],
.excel-toolbar [data-action="font-size-increase"] {
    min-width: 28px;  /* 15% bigger */
    padding: 5px 7px;  /* 15% bigger */
}

.excel-toolbar [data-action="font-size-decrease"] i,
.excel-toolbar [data-action="font-size-increase"] i {
    font-size: 12px;  /* 15% bigger */
}

/* ========================================
   HAMBURGER SETTINGS MENU
   ======================================== */
.hamburger-group {
    margin-left: 8px !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: auto !important;
}

.hamburger-menu-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: auto !important;
}

.hamburger-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    background: #f8fafc !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 100 !important;
}

.hamburger-btn:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
}

.hamburger-btn:active {
    background: #cbd5e1 !important;
}

.hamburger-icon {
    width: 14px !important;
    height: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    pointer-events: none !important; /* Let clicks pass through to button */
}

.hamburger-icon span {
    display: block !important;
    height: 2px !important;
    background: #475569 !important;
    border-radius: 1px !important;
    pointer-events: none !important; /* Let clicks pass through to button */
}

/* Dropdown Menu */
.hamburger-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 4px !important;
    background: #fff !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1) !important;
    min-width: 240px !important;
    padding: 6px 0 !important;
    z-index: 999999 !important; /* CRITICAL: Above all grid elements */
    display: none !important;
    max-height: calc(100vh - 100px) !important;
    overflow: visible !important; /* CRITICAL: Allow submenus to extend outside */
    border: 1px solid #e2e8f0 !important;
}

.hamburger-dropdown.open {
    display: block !important;
}

/* Menu Section Label */
.hm-section-label {
    padding: 6px 12px 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: block !important;
}

/* Menu Item Base */
.hm-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: background 0.1s !important;
    font-size: 12px !important;
    color: #334155 !important;
    background: transparent !important;
}

.hm-item:hover {
    background: #f1f5f9 !important;
}

/* Menu Icon */
.hm-icon {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #64748b !important;
    flex-shrink: 0 !important;
}

/* Menu Label */
.hm-label {
    flex: 1 !important;
    font-size: 12px !important;
    color: inherit !important;
}

/* Menu Value */
.hm-value {
    font-size: 11px !important;
    color: #64748b !important;
    margin-left: 6px !important;
}

/* Arrow for submenu */
.hm-arrow {
    font-size: 8px !important;
    color: #94a3b8 !important;
    margin-left: 4px !important;
}

/* Divider */
.hm-divider {
    height: 1px !important;
    background: #e2e8f0 !important;
    margin: 4px 0 !important;
    display: block !important;
}

/* Toggle Switch */
.hm-switch {
    width: 28px !important;
    height: 16px !important;
    background: #cbd5e1 !important;
    border-radius: 8px !important;
    position: relative !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.hm-switch::after {
    content: '' !important;
    position: absolute !important;
    width: 12px !important;
    height: 12px !important;
    background: #fff !important;
    border-radius: 50% !important;
    top: 2px !important;
    left: 2px !important;
    transition: transform 0.2s !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

.hm-switch.active {
    background: #2563eb !important;
}

.hm-switch.active::after {
    transform: translateX(12px) !important;
}

/* Checkbox */
.hm-check {
    width: 14px !important;
    height: 14px !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 3px !important;
    margin-right: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.15s !important;
    background: transparent !important;
}

.hm-check span {
    color: #fff !important;
    font-size: 10px !important;
    font-weight: bold !important;
    opacity: 0 !important;
}

.hm-item.checked .hm-check {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

.hm-item.checked .hm-check span {
    opacity: 1 !important;
}

/* Radio Button */
.hm-radio-dot {
    width: 14px !important;
    height: 14px !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    position: relative !important;
    background: transparent !important;
}

.hm-radio-dot::after {
    content: '' !important;
    width: 6px !important;
    height: 6px !important;
    background: #2563eb !important;
    border-radius: 50% !important;
    opacity: 0 !important;
    transition: opacity 0.15s !important;
}

.hm-item.selected .hm-radio-dot {
    border-color: #2563eb !important;
}

.hm-item.selected .hm-radio-dot::after {
    opacity: 1 !important;
}

/* Submenu */
.hm-has-submenu {
    position: relative !important;
}

.hm-submenu {
    position: absolute !important;
    right: 100% !important;
    top: -6px !important; /* Align with parent padding */
    background: #fff !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1) !important;
    min-width: 200px !important;
    padding: 6px 0 !important;
    display: none !important;
    margin-right: 0 !important; /* Remove gap */
    border: 1px solid #e2e8f0 !important;
    z-index: 1000000 !important; /* Above main dropdown */
    overflow: visible !important;
    /* Add padding on the right side to create hover bridge */
    padding-right: 12px !important;
}

/* Invisible hover bridge - extends hover area between parent and submenu */
.hm-submenu::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: -12px !important;
    width: 16px !important;
    height: 100% !important;
    background: transparent !important;
}

.hm-has-submenu:hover > .hm-submenu,
.hm-submenu.sticky {
    display: block !important;
}

/* Highlight parent when submenu is open */
.hm-has-submenu:hover,
.hm-has-submenu:has(.hm-submenu.sticky) {
    background: #e7f3ff !important;
}

/* Submenu items inherit base item styles */
.hm-submenu .hm-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: #334155 !important;
    background: transparent !important;
    white-space: nowrap !important;
}

.hm-submenu .hm-item:hover {
    background: #f1f5f9 !important;
}

.hm-submenu .hm-section-label {
    display: block !important;
    padding: 6px 12px 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #64748b !important;
}

.hm-submenu .hm-divider {
    display: block !important;
    height: 1px !important;
    background: #e2e8f0 !important;
    margin: 4px 0 !important;
}

/* Submenu radio and checkbox items */
.hm-submenu .hm-radio-dot {
    display: flex !important;
    width: 14px !important;
    height: 14px !important;
    border: 1.5px solid #94a3b8 !important;
    border-radius: 50% !important;
    margin-right: 8px !important;
    background: transparent !important;
}

.hm-submenu .hm-item.selected .hm-radio-dot {
    border-color: #2563eb !important;
}

.hm-submenu .hm-item.selected .hm-radio-dot::after {
    opacity: 1 !important;
}

.hm-submenu .hm-label {
    display: inline !important;
    flex: 1 !important;
    font-size: 12px !important;
    color: #334155 !important;
}

.hm-submenu .hm-icon {
    display: flex !important;
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    color: #64748b !important;
}

/* Palette items in submenu */
.hm-submenu .hm-palette {
    display: flex !important;
    align-items: center !important;
}

.hm-submenu .hm-palette-preview {
    display: flex !important;
    gap: 2px !important;
}

.hm-submenu .hm-swatch {
    display: block !important;
    width: 10px !important;
    height: 10px !important;
}

/* Wide submenu for color schemes */
.hm-submenu-wide {
    min-width: 240px !important;
}

/* Selected palette indicator */
.hm-item.hm-palette.selected {
    background: #e0f2fe !important;
}

.hm-item.hm-palette.selected::before {
    content: '✓' !important;
    position: absolute !important;
    right: 12px !important;
    color: #2563eb !important;
    font-weight: bold !important;
}

/* Color pickers container */
.hm-color-pickers {
    padding: 8px 12px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    display: block !important;
}

.hm-color-picker-row {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.hm-color-picker-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    cursor: pointer !important;
}

.hm-color-level {
    font-size: 9px !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.hm-color-input {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    background: transparent !important;
}

.hm-color-input::-webkit-color-swatch-wrapper {
    padding: 2px !important;
}

.hm-color-input::-webkit-color-swatch {
    border-radius: 2px !important;
    border: none !important;
}

.hm-apply-colors-btn {
    width: 100% !important;
    padding: 6px 12px !important;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
}

.hm-apply-colors-btn:hover {
    background: #1d4ed8 !important;
}

/* Color Palette Preview */
.hm-palette-preview {
    display: flex !important;
    gap: 2px !important;
    margin-left: auto !important;
}

.hm-swatch {
    width: 10px !important;
    height: 10px !important;
    border-radius: 2px !important;
}

/* Hamburger Overlay (for closing menu) */
.hamburger-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999998 !important; /* Just below dropdown */
    display: none !important;
}

.hamburger-overlay.open {
    display: block !important;
}

/* Remove padding from Gantt Schedule Toolbar */
#gantt-schedule-toolbar > div {
    padding: 0 !important;
}
