/* ===== Help Window Overlay ===== */
#help-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: var(--z-help-overlay);
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    box-sizing: border-box;
}

#help-window {
    background: var(--bg-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 var(--border-subtle);
    width: 450px;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
}

#help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: 10px 10px 0 0;
}

#help-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--font-size-body-sm);
    font-weight: 500;
}

#help-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: var(--font-size-h3);
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

#help-close-btn:hover {
    background-color: var(--interactive-hover);
    color: var(--text-primary);
}

#help-search-container {
    padding: 12px 16px;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
}

#help-search-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: var(--font-size-ui-md);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#help-search-input:focus {
    border-color: var(--interactive-focus);
    background: var(--bg-surface);
}

#help-search-input::placeholder {
    color: var(--text-disabled);
}

#help-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

#help-content::-webkit-scrollbar {
    width: 6px;
}

#help-content::-webkit-scrollbar-track {
    background: var(--bg-subtle);
    border-radius: 3px;
}

#help-content::-webkit-scrollbar-thumb {
    background-color: var(--neutral-600);
    border-radius: 3px;
}

#help-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--neutral-500);
}

#help-keybind-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#help-spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.help-category-header {
    padding: 12px 16px 6px 16px;
    color: var(--text-muted);
    font-size: var(--font-size-ui-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.help-category-header:first-child {
    margin-top: 0;
}

.help-keybind-item {
    display: flex;
    gap: 15px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background-color 0.15s ease;
}

.help-keybind-item:hover {
    background-color: var(--interactive-hover);
}

.help-keybind-item:last-child {
    border-bottom: none;
}

/* Help-specific keybind layout */
.help-keybind-key {
    flex-shrink: 0;
    width: 270px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 2px;
}

.help-keybind-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.help-keybind-action {
    color: var(--text-primary);
    font-size: var(--font-size-ui-md);
    font-weight: 500;
}

.help-keybind-description {
    color: var(--text-muted);
    font-size: var(--font-size-ui-sm);
    line-height: 1.4;
}

.help-keybind-context {
    color: var(--text-disabled);
    font-size: var(--font-size-ui-sm);
    font-style: italic;
}
