/* Simple SITTEMP - Style Sheet */

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Map Container ===== */
#map-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* ===== Classification Banner (Top Center) ===== */
#classification-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: #007a33;
    color: #fff;
    padding: 4px 24px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

#map {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* ===== Classification Warning Modal ===== */
#classification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#classification-modal .modal-content {
    background: #1a1a1a;
    border: 3px solid #CC0000;
    border-radius: 8px;
    padding: 40px;
    max-width: 520px;
    text-align: center;
    color: #fff;
}

#classification-modal .modal-content h2 {
    color: #CC0000;
    font-size: 24px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

#classification-modal .modal-content p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #ccc;
}

#classification-modal .modal-content button {
    background: #CC0000;
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
}

#classification-modal .modal-content button:hover {
    background: #990000;
}

/* ===== Toolbar (Left Side) ===== */
#toolbar {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.toolbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    transition: background 0.2s ease, color 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #222;
}

.toolbar-btn.active {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

/* Toolbar Tooltip */
.toolbar-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1001;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toolbar-btn:hover::after {
    opacity: 1;
}

/* Toolbar Divider */
.toolbar-divider {
    width: 28px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 3px auto;
}

/* ===== Sub-menus / Flyouts ===== */
.submenu {
    position: absolute;
    left: 58px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 10px;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 8px 24px rgba(0, 0, 0, 0.14);
    display: none;
    max-height: 70vh;
    overflow-y: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.submenu.visible {
    display: block;
}

.submenu h3 {
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.submenu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

/* Wider grid for equipment submenu (6 columns to match reference chart rows) */
#submenu-equipment {
    min-width: 480px;
}

#equipment-grid {
    grid-template-columns: repeat(6, 1fr);
}

.submenu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    cursor: pointer;
    color: #333;
    font-size: 10px;
    text-align: center;
    min-width: 70px;
    transition: background 0.15s ease;
}

.submenu-item:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111;
}

.submenu-item.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

.submenu-item svg {
    width: 28px;
    height: 28px;
}

/* Shapes sub-menu - 2 column for line types */
.submenu-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.submenu-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    cursor: pointer;
    color: #333;
    font-size: 12px;
    transition: background 0.15s ease;
}

.submenu-list-item:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
    color: #111;
}

.submenu-list-item.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

.submenu-list-item .line-preview {
    width: 40px;
    height: 2px;
    flex-shrink: 0;
}

/* ===== Color Picker Panel ===== */
.color-section {
    margin-bottom: 12px;
}

.color-section label {
    display: block;
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

/* Color Picker Selection Indicator */
.color-selection-indicator {
    background: #007AFF;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    text-align: center;
}

.color-swatches {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.color-swatch:hover {
    border-color: rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: #007AFF;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

.opacity-section {
    margin-top: 12px;
}

.opacity-section label {
    display: block;
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.opacity-section input[type="range"] {
    width: 100%;
    accent-color: #007AFF;
}

.opacity-value {
    color: #555;
    font-size: 12px;
    text-align: center;
    margin-top: 2px;
}

/* ===== Text Submenu Action Button ===== */
.submenu-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: #007AFF;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 4px;
}

.submenu-action-btn:hover {
    background: #0066DD;
}

.submenu-action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== Font Style Controls ===== */
.font-style-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.font-style-section > label {
    display: block;
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.font-style-toggles {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.font-toggle {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.font-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    color: #222;
}

.font-toggle.active {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

.font-size-control label {
    display: block;
    color: #86868b;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.font-size-control input[type="range"] {
    width: 100%;
    accent-color: #007AFF;
}

.font-size-value {
    color: #555;
    font-size: 12px;
    text-align: center;
    margin-top: 2px;
}

/* ===== Map Type Submenu ===== */
.map-type-toggles {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.map-type-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.map-type-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #222;
}

.map-type-btn.active {
    background: #007AFF;
    border-color: #007AFF;
    color: #fff;
}

.map-overlay-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}

.toggle-row input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    transition: background 0.25s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-row input:checked + .toggle-slider {
    background: #34C759;
}

.toggle-row input:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: #fff;
}

.toggle-row.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== Style Panel (Right Side) ===== */
#style-panel {
    position: absolute;
    right: 10px;
    top: calc(60px + 2vh);
    width: 232px;
    background: rgba(255, 255, 255, 0.96);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    padding: 8px;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.style-panel-section {
    margin-bottom: 6px;
}

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

.style-panel-section h3 {
    color: #86868b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Line type compact grid */
.line-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.line-type-grid .submenu-list-item {
    padding: 3px 4px;
    font-size: 10px;
    gap: 3px;
    border-radius: 3px;
}

.line-type-grid .submenu-list-item span:first-child {
    width: 22px;
    display: inline-block;
    flex-shrink: 0;
}

/* Compact color rows */
.color-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.color-row label {
    color: #86868b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 24px;
    flex-shrink: 0;
}

.color-row .color-swatches {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.color-row .color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border-width: 1.5px;
}

/* Compact slider rows */
.slider-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
}

.slider-row:last-child {
    margin-bottom: 0;
}

.slider-row label {
    color: #86868b;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 40px;
    flex-shrink: 0;
}

.slider-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #007AFF;
    height: 14px;
}

.slider-val {
    color: #555;
    font-size: 10px;
    width: 26px;
    text-align: right;
    flex-shrink: 0;
}

/* ===== Coordinate Display (Top Right) ===== */
#coord-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #333;
    padding: 8px 14px;
    border-radius: 10px;
    font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

#coord-display .label {
    color: #86868b;
    font-size: 11px;
}

/* ===== Toast Notification ===== */
#toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#toast.visible {
    opacity: 1;
}

/* ===== Ad Banner (Bottom Center) ===== */

/* ===== Export Dialog ===== */
#export-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

#export-dialog.visible {
    display: flex;
}

#export-dialog .dialog-content {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 24px;
    min-width: 320px;
    color: #fff;
}

#export-dialog .dialog-content h3 {
    margin-bottom: 16px;
    font-size: 18px;
}

.export-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    color: #ccc;
    margin-bottom: 8px;
    transition: background 0.1s;
}

.export-option:hover {
    background: #444;
    color: #fff;
}

.export-option svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.export-option .export-label {
    font-size: 14px;
    font-weight: 500;
}

.export-option .export-desc {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.dialog-close {
    display: block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
}

.dialog-close:hover {
    background: #666;
}

/* ===== Interstitial Ad (Export Pre-screen) ===== */
#interstitial-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9500;
    flex-direction: column;
}

#interstitial-ad.visible {
    display: flex;
}

#interstitial-ad .ad-placeholder {
    width: 400px;
    height: 300px;
    background: rgba(245, 222, 179, 0.85);
    border: 2px solid #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 16px;
    margin-bottom: 20px;
}

#interstitial-ad .countdown {
    color: #fff;
    font-size: 18px;
}

/* ===== PDF Size Selection Dialog ===== */
#pdf-size-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9100;
}

#pdf-size-dialog.visible {
    display: flex;
}

#pdf-size-dialog .dialog-content {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 24px;
    min-width: 280px;
    color: #fff;
}

#pdf-size-dialog .dialog-content h3 {
    margin-bottom: 16px;
}

.size-option {
    padding: 10px 14px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    color: #ccc;
    margin-bottom: 6px;
    font-size: 14px;
    transition: background 0.1s;
}

.size-option:hover {
    background: #444;
    color: #fff;
}

/* ===== Symbol Text Dialog ===== */
#symbol-text-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9200;
}

#symbol-text-dialog.visible {
    display: flex;
}

#symbol-text-dialog .dialog-content {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 24px;
    min-width: 300px;
    color: #fff;
}

#symbol-text-dialog .dialog-content h3 {
    margin-bottom: 16px;
    font-size: 16px;
}

#symbol-text-dialog .dialog-content label {
    display: block;
    color: #aaa;
    font-size: 12px;
    margin-bottom: 4px;
    margin-top: 10px;
}

#symbol-text-dialog .dialog-content input,
#symbol-text-dialog .dialog-content select {
    width: 100%;
    padding: 8px;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

#symbol-text-dialog .dialog-btns {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

#symbol-text-dialog .dialog-btns button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

#symbol-text-dialog .btn-ok {
    background: #4a7;
    color: #fff;
}

#symbol-text-dialog .btn-cancel {
    background: #555;
    color: #fff;
}

/* ===== Text Placement Dialog ===== */
#text-input-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9200;
}

#text-input-dialog.visible {
    display: flex;
}

#text-input-dialog .dialog-content {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 24px;
    min-width: 300px;
    color: #fff;
}

#text-input-dialog .dialog-content h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

#text-input-dialog input {
    width: 100%;
    padding: 8px;
    background: #444;
    border: 1px solid #666;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
}

#text-input-dialog .dialog-btns {
    display: flex;
    gap: 8px;
}

#text-input-dialog .dialog-btns button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* ===== MGRS Grid Controls ===== */
#mgrs-controls {
    position: absolute;
    top: 10px;
    left: 70px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

#mgrs-controls label {
    color: #555;
    font-size: 12px;
    font-weight: 500;
}

#mgrs-controls select {
    background: rgba(0, 0, 0, 0.04);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    transition: border-color 0.15s ease;
}

#mgrs-controls select:focus {
    border-color: #007AFF;
    outline: none;
}

#mgrs-controls .grid-toggle {
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.04);
    color: #555;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.15s ease;
}

#mgrs-controls .grid-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
}

#mgrs-controls .grid-toggle.active {
    background: #007AFF;
    color: #fff;
    border-color: #007AFF;
}

/* ===== Scrollbar styling for sub-menus ===== */
.submenu::-webkit-scrollbar {
    width: 6px;
}

.submenu::-webkit-scrollbar-track {
    background: transparent;
}

.submenu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ===== API Key Prompt ===== */

/* ===== Help Dialog ===== */
#help-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

#help-dialog.visible {
    display: flex;
}

#help-dialog .dialog-content {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    color: #ddd;
    display: flex;
    flex-direction: column;
}

#help-dialog h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #fff;
    text-align: center;
}

.help-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 6px;
}

.help-body section {
    margin-bottom: 16px;
}

.help-body h4 {
    font-size: 14px;
    color: #8cf;
    margin: 0 0 6px;
    border-bottom: 1px solid #444;
    padding-bottom: 4px;
}

.help-body p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 4px;
    color: #bbb;
}

.help-body ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #bbb;
}

.help-body ul li {
    margin-bottom: 2px;
}

.help-body ul li strong {
    color: #ddd;
}

.help-shortcuts {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.help-shortcuts td {
    padding: 4px 8px;
    border-bottom: 1px solid #3a3a3a;
    color: #bbb;
}

.help-shortcuts td:first-child {
    white-space: nowrap;
    width: 130px;
}

.help-shortcuts kbd {
    display: inline-block;
    background: #444;
    border: 1px solid #666;
    border-radius: 3px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: 12px;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

#help-dialog .dialog-close {
    margin-top: 16px;
    padding: 8px 20px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    align-self: center;
}

#help-dialog .dialog-close:hover {
    background: #666;
}

.help-body::-webkit-scrollbar {
    width: 6px;
}

.help-body::-webkit-scrollbar-track {
    background: transparent;
}

.help-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.help-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}
