/* * Vencord, a Discord client mod * Copyright (c) 2025 Vendicated and contributors * SPDX-License-Identifier: GPL-3.0-or-later */ /* Command Palette Modal Container */ .vc-command-palette { --cp-bg: #0f0f10; --cp-bg-secondary: #18181a; --cp-bg-tertiary: #1f1f21; --cp-bg-dropdown: #0b0b0d; --cp-bg-hover: #252528; --cp-bg-selected: #2a2a2e; --cp-text-primary: #f0f0f0; --cp-text-secondary: #a0a0a0; --cp-text-muted: #6b6b6b; --cp-border: rgb(255 255 255 / 12%); --cp-border-strong: rgb(255 255 255 / 24%); --cp-accent: #5865f2; --cp-surface-dropdown: #0b0b0d; --cp-surface-dropdown-hover: #232327; --cp-dropdown-border: rgb(255 255 255 / 15%); --cp-dropdown-shadow: 0 10px 28px rgb(0 0 0 / 38%); --cp-radius: 14px; --cp-radius-sm: 8px; --cp-shadow: 0 16px 44px rgb(0 0 0 / 38%), 0 6px 18px rgb(0 0 0 / 28%); width: min(900px, 92vw) !important; max-width: min(900px, 92vw) !important; background: var(--cp-bg) !important; border-radius: var(--cp-radius) !important; box-shadow: var(--cp-shadow) !important; border: 1px solid var(--cp-border) !important; overflow: visible !important; box-sizing: border-box; will-change: opacity, transform; transform: translateZ(0); backface-visibility: hidden; isolation: isolate; } .vc-command-palette-shell { display: flex; flex-direction: column; width: 100%; max-width: 100%; min-height: 67vh; max-height: 67vh; background: var(--cp-bg); border-radius: var(--cp-radius); box-sizing: border-box; position: relative; overflow: hidden; } /* Input Area */ .vc-command-palette-input { padding: 12px 22px 10px; border-bottom: 1px solid var(--cp-border); position: relative; } .vc-command-palette-main-input input { background: transparent !important; border: none !important; color: var(--cp-text-primary) !important; font-size: 20px !important; font-weight: 400 !important; padding: 0 0 2px !important; min-height: 48px !important; height: 48px !important; box-shadow: none !important; } .vc-command-palette-main-input input::placeholder { color: var(--cp-text-muted) !important; } /* Query Preview */ .vc-command-palette-query-preview { position: absolute; left: 22px; right: 22px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; align-items: center; gap: 18px; width: calc(100% - 44px); pointer-events: none; overflow: visible; } .vc-command-palette-query-preview-without-label { justify-content: flex-start; } .vc-command-palette-query-preview-command-label { color: var(--cp-text-muted); font-size: 20px; font-weight: 400; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; max-width: min(56%, 420px); } .vc-command-palette-query-preview-prompt { position: relative; display: flex; align-items: center; gap: 10px; pointer-events: auto; flex-shrink: 0; min-width: 0; } .vc-command-palette-query-prompt-capsule { display: inline-flex; align-items: center; gap: 8px; width: auto; max-width: min(68vw, 420px); min-height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--cp-border-strong); background: rgb(255 255 255 / 5%); color: var(--cp-text-secondary); box-sizing: border-box; flex-shrink: 0; pointer-events: auto; appearance: none; font: inherit; line-height: 1; text-align: left; cursor: pointer; min-width: 0; } .vc-command-palette-query-prompt-capsule-active { background: rgb(255 255 255 / 7%); cursor: text; } .vc-command-palette-query-prompt-capsule-label { color: var(--cp-text-secondary); font-size: 17px; font-weight: 500; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; } .vc-command-palette-prompt-active-input { background: transparent !important; border: none !important; border-radius: 0 !important; padding: 0 !important; min-height: 0 !important; height: auto !important; box-shadow: none !important; } .vc-command-palette-prompt-active-input input { background: transparent !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; color: var(--cp-text-primary) !important; font-size: 17px !important; font-weight: 500 !important; line-height: 1 !important; padding: 0 !important; min-height: 24px !important; height: 24px !important; width: 100% !important; } .vc-command-palette-prompt-active-input input::placeholder { color: var(--cp-text-secondary) !important; font-size: 17px !important; font-weight: 500 !important; line-height: 1 !important; opacity: 1; } .vc-command-palette-query-prompt-capsule .vc-command-palette-prompt-active-input { flex: 1; min-width: 0; width: 100%; } .vc-command-palette-query-preview-dropdown { position: absolute; top: calc(100% + 10px); left: 0; width: min(440px, 72vw); pointer-events: auto; margin-top: 0; z-index: 70; } /* Shared Dropdown */ .vc-command-palette-dropdown { border: 1px solid var(--cp-dropdown-border); border-radius: 10px; background: var(--cp-surface-dropdown); box-shadow: var(--cp-dropdown-shadow); overflow: hidden; } .vc-command-palette-dropdown-list { max-height: 280px; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 4px; } .vc-command-palette-dropdown-item { width: 100%; border: none; border-radius: 8px; background: transparent; color: var(--cp-text-primary); text-align: left; display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; } .vc-command-palette-dropdown-item:hover, .vc-command-palette-dropdown-item-selected { background: var(--cp-surface-dropdown-hover); } .vc-command-palette-dropdown-icon { width: 22px; height: 22px; border-radius: 999px; background: var(--cp-bg-secondary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; color: var(--cp-text-secondary); } .vc-command-palette-dropdown-icon img { width: 100%; height: 100%; object-fit: cover; } .vc-command-palette-dropdown-icon-fallback { font-size: 12px; font-weight: 600; } .vc-command-palette-dropdown-label { color: var(--cp-text-primary); font-size: 14px; font-weight: 500; line-height: 1.25; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vc-command-palette-query-preview-dropdown .vc-command-palette-dropdown-item { gap: 10px; padding: 10px 12px; } .vc-command-palette-query-preview-dropdown .vc-command-palette-dropdown-label { font-size: 15px; } .vc-command-palette-dropdown-sublabel { margin-left: auto; color: var(--cp-text-secondary); font-size: 12px; } /* List Container */ .vc-command-palette-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0; } .vc-command-palette-list::-webkit-scrollbar { width: 6px; } .vc-command-palette-list::-webkit-scrollbar-track { background: transparent; } .vc-command-palette-list::-webkit-scrollbar-thumb { background: var(--cp-bg-tertiary); border-radius: 3px; } /* Section Labels */ .vc-command-palette-section-label { padding: 16px 24px 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cp-text-secondary); } /* Command Rows */ .vc-command-palette-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin: 0 8px; background: transparent; border: none; border-radius: 10px; color: var(--cp-text-primary); cursor: pointer; transition: background 0.12s ease; text-align: left; width: calc(100% - 16px); } .vc-command-palette-row:hover { background: var(--cp-bg-hover); } .vc-command-palette-row-selected { background: rgb(255 255 255 / 6%) !important; } .vc-command-palette-row-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--cp-bg-secondary); border-radius: 8px; flex-shrink: 0; } .vc-command-palette-row-icon svg { width: 16px; height: 16px; color: var(--cp-text-secondary); } .vc-command-palette-row-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .vc-command-palette-row-title { font-size: 15px; font-weight: 500; color: var(--cp-text-primary); line-height: 1.4; } .vc-command-palette-row-subtitle { font-size: 13px; color: var(--cp-text-secondary); line-height: 1.4; } .vc-command-palette-row-meta { font-size: 14px; font-weight: 500; color: var(--cp-text-muted); flex-shrink: 0; text-transform: capitalize; } /* Query Rows */ .vc-command-palette-query-title { display: flex; align-items: center; gap: 8px; } .vc-command-palette-query-prefix { color: var(--cp-text-primary); } .vc-command-palette-query-field { color: var(--cp-text-secondary); background: var(--cp-bg-tertiary); padding: 2px 8px; border-radius: 4px; font-size: 13px; font-family: monospace; } /* Empty State */ .vc-command-palette-empty { padding: 48px 20px; text-align: center; color: var(--cp-text-muted); font-size: 14px; } /* Action Bar */ .vc-command-palette-action-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: var(--cp-bg); border-top: 1px solid var(--cp-border); gap: 16px; min-height: 48px; } .vc-command-palette-picker .vc-command-palette-shell { max-height: 62vh; } .vc-command-palette-picker .vc-command-palette-input { padding: 12px 16px 10px; } .vc-command-palette-picker .vc-command-palette-list { max-height: 54vh; } .vc-command-palette-action-bar-action { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cp-text-secondary); flex-shrink: 0; } .vc-command-palette-action-bar-placeholder { color: var(--cp-text-muted); } .vc-command-palette-action-bar-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; } .vc-command-palette-action-bar-actions-button { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--cp-bg-secondary); border: 1px solid var(--cp-border); border-radius: 8px; color: var(--cp-text-secondary); font-size: 12px; cursor: pointer; transition: all 0.15s ease; line-height: 1; } .vc-command-palette-action-bar-actions-button:hover { background: var(--cp-bg-hover); border-color: var(--cp-border-strong); } .vc-command-palette-action-bar-actions-label { font-weight: 500; } .vc-command-palette-action-bar-key { display: inline-flex; align-items: center; justify-content: center; padding: 2px 5px; background: var(--cp-bg-tertiary); border: 1px solid var(--cp-border-strong); border-radius: 4px; font-size: 10px; font-weight: 600; color: var(--cp-text-secondary); font-family: inherit; min-width: 20px; text-align: center; } /* Calculator Cards */ .vc-command-palette-calculator { padding: 12px 16px; background: transparent; border-bottom: 1px solid var(--cp-border); } .vc-command-palette-calculator-title { font-size: 13px; font-weight: 600; color: var(--cp-text-secondary); margin: 0 0 10px; } .vc-command-palette-calculator-card { display: flex; align-items: center; justify-content: space-between; min-width: 0; padding: 28px 32px; background: var(--cp-bg-tertiary); border: 1px solid var(--cp-border-strong); border-radius: 16px; gap: 16px; } .vc-command-palette-calculator-section { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; min-width: 0; } .vc-command-palette-calculator-value { font-size: 40px; font-weight: 700; color: var(--cp-text-primary); text-align: center; width: 100%; white-space: nowrap; overflow: hidden; line-height: 1.15; } .vc-command-palette-calculator-value-wrapped { white-space: normal; overflow-wrap: anywhere; } .vc-command-palette-calculator-arrow { font-size: 48px; color: var(--cp-text-primary); flex-shrink: 0; padding: 0 24px; font-weight: 500; line-height: 1; } .vc-command-palette-calculator-label { font-size: 14px; font-weight: 500; color: var(--cp-text-secondary); line-height: 1.25; text-transform: capitalize; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vc-command-palette-calculator-graph-card { flex-direction: column; align-items: stretch; padding: 20px 22px 18px; } .vc-command-palette-calculator-graph-header { display: flex; flex-direction: column; gap: 12px; } .vc-command-palette-calculator-graph-title { font-size: 20px; font-weight: 600; color: var(--cp-text-primary); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vc-command-palette-calculator-graph-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; } .vc-command-palette-calculator-graph-readout { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--cp-text-secondary); } .vc-command-palette-calculator-graph-readout-value { color: var(--cp-text-primary); white-space: nowrap; } .vc-command-palette-calculator-graph-swatch { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; } .vc-command-palette-calculator-graph-surface { width: 100%; } .vc-command-palette-calculator-graph-svg { display: block; width: 100%; height: auto; max-height: 300px; } .vc-command-palette-calculator-graph-bg { fill: rgb(255 255 255 / 2%); stroke: rgb(255 255 255 / 8%); } .vc-command-palette-calculator-graph-axis { stroke: rgb(255 255 255 / 14%); stroke-width: 1.5; } .vc-command-palette-calculator-graph-crosshair { stroke: rgb(255 255 255 / 20%); stroke-width: 1.5; stroke-dasharray: 6 6; } .vc-command-palette-calculator-graph-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--cp-text-secondary); font-size: 13px; } /* Page Platform */ .vc-command-palette-page { flex: 1 1 auto; min-height: 0; overflow: hidden auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; border-bottom: 1px solid var(--cp-border); } .vc-command-palette-page-title { font-size: 15px; font-weight: 600; color: var(--cp-text-primary); line-height: 1.2; } .vc-command-palette-page-content { display: flex; flex-direction: column; gap: 12px; } .vc-command-palette-doom-page { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 0; width: 100%; } .vc-command-palette-doom-iframe { width: min(100%, 960px); min-height: 68vh; border: none; border-radius: 14px; background: #050505; } .vc-command-palette-page-field { display: flex; flex-direction: column; gap: 6px; position: relative; } .vc-command-palette-page-field-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cp-text-muted); } .vc-command-palette-page-input input { background: var(--cp-bg-secondary) !important; border: 1px solid var(--cp-border) !important; border-radius: 8px !important; padding: 10px 12px !important; color: var(--cp-text-primary) !important; font-size: 14px !important; min-height: 40px !important; box-shadow: none !important; } .vc-command-palette-page-input input::placeholder { color: var(--cp-text-muted) !important; } .vc-command-palette-page-picker { position: relative; } .vc-command-palette-page-picker .vc-command-palette-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; } .vc-command-palette-page-error { padding: 10px 12px; background: rgb(237 66 69 / 10%); border: 1px solid rgb(237 66 69 / 30%); border-radius: 8px; color: #ed4245; font-size: 13px; } /* Compact Mode */ .vc-command-palette-compact .vc-command-palette-shell { max-height: fit-content; min-height: 100%; overflow: hidden; } .vc-command-palette-compact { min-height: 0 !important; } .vc-command-palette-action-bar-logo { display: flex; align-items: center; color: var(--cp-text-muted); } .vc-command-palette-compact .vc-command-palette-input { border-bottom: none; } .vc-command-palette-action-bar-compact-btn { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--cp-bg-secondary); border: 1px solid var(--cp-border); border-radius: 8px; color: var(--cp-text-secondary); font-size: 12px; cursor: pointer; transition: all 0.15s ease; line-height: 1; } .vc-command-palette-action-bar-compact-btn:hover { background: var(--cp-bg-hover); border-color: var(--cp-border-strong); } .vc-command-palette-keybind-input { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; border-radius: 8px; } .vc-command-palette-keybind-info { display: flex; flex-direction: column; gap: 4px; flex: 1; } .vc-command-palette-keybind-controls { display: flex; flex-direction: column; align-items: center; gap: 8px; } .vc-command-palette-keybind-button { padding: 8px 16px; background-color: var(--background-base-low); border: 2px solid var(--input-border-default, var(--input-border)); border-radius: 8px; cursor: pointer; min-width: 140px; text-align: center; font-family: var(--font-code); font-weight: 600; color: var(--text-strong); transition: all 0.2s ease; outline: none; box-shadow: 0 0 0 1px var(--background-mod-muted); } .vc-command-palette-keybind-button:disabled { opacity: 0.5; cursor: not-allowed; } .vc-command-palette-keybind-button:hover:not(:disabled) { background-color: var(--background-mod-subtle); border-color: var(--brand-experiment); transform: translateY(-1px); box-shadow: 0 2px 8px rgb(0 0 0 / 20%); } .vc-command-palette-keybind-button:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 4px rgb(0 0 0 / 20%); } .vc-command-palette-keybind-button.listening { border-color: var(--text-feedback-critical); box-shadow: 0 0 0 1px var(--text-feedback-critical); } .vc-command-palette-keybind-conflict { color: var(--text-feedback-critical); font-size: 12px; font-weight: 500; margin-top: 2px; animation: vc-command-palette-keybind-shake 0.3s ease; } /* Actions Dropdown Menu */ .vc-command-palette-actions-dropdown { position: absolute; right: 16px; bottom: 64px; width: 320px; max-height: 360px; background: var(--cp-bg-dropdown); border: 1px solid var(--cp-border); border-radius: var(--cp-radius); box-shadow: 0 8px 32px rgb(0 0 0 / 40%), 0 2px 8px rgb(0 0 0 / 30%); display: flex; flex-direction: column; overflow: hidden; z-index: 100; opacity: 0; animation: vc-cp-actions-fade-in 0.15s ease forwards; will-change: opacity; contain: layout paint; backface-visibility: hidden; } .vc-command-palette-actions-dropdown[data-closing="true"] { opacity: 0; transition: opacity 0.15s ease; pointer-events: none; } @keyframes vc-cp-actions-fade-in { from { opacity: 0; } to { opacity: 1; } } .vc-command-palette-actions-dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--cp-border); } .vc-command-palette-actions-dropdown-title { font-size: 14px; font-weight: 600; color: var(--cp-text-primary); } .vc-command-palette-actions-dropdown-list { flex: 1; overflow: hidden auto; overscroll-behavior: contain; padding: 8px 12px; min-height: 0; } .vc-command-palette-actions-dropdown-empty { padding: 24px 16px; text-align: center; color: var(--cp-text-muted); font-size: 14px; } .vc-command-palette-action-dropdown-item { border: none; background: transparent; color: var(--cp-text-primary); text-align: left; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; min-height: 48px; cursor: pointer; border-radius: 10px; transition: background-color 0.12s ease; } .vc-command-palette-action-dropdown-item-selected, .vc-command-palette-action-dropdown-item:is(:hover, :focus-visible) { background: var(--cp-bg-hover); } .vc-command-palette-action-dropdown-icon { flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--cp-bg-secondary); color: var(--cp-text-secondary); } .vc-command-palette-action-dropdown-icon svg { width: 18px; height: 18px; } .vc-command-palette-action-dropdown-item-selected .vc-command-palette-action-dropdown-icon { background: var(--cp-bg-tertiary); } .vc-command-palette-action-dropdown-item-selected .vc-command-palette-action-dropdown-icon svg { color: var(--cp-text-primary); } .vc-command-palette-row-selected .vc-command-palette-row-icon { background: var(--cp-bg-tertiary); } .vc-command-palette-row-selected .vc-command-palette-row-icon svg { color: var(--cp-text-primary); } .vc-command-palette-action-dropdown-label { flex: 1; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--cp-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .vc-command-palette-action-dropdown-shortcuts { display: flex; align-items: center; gap: 4px; flex-shrink: 0; } .vc-command-palette-action-dropdown-key { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; padding: 4px 8px; background: var(--cp-bg-secondary); border: 1px solid var(--cp-border); border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--cp-text-secondary); font-family: inherit; line-height: 1; } .vc-command-palette-actions-dropdown-search { padding: 12px 16px; border-top: 1px solid var(--cp-border); background: var(--cp-bg-dropdown); } .vc-command-palette-actions-search-input input { background: var(--cp-bg-secondary) !important; border: 1px solid var(--cp-border) !important; border-radius: 8px !important; color: var(--cp-text-primary) !important; font-size: 14px !important; padding: 10px 14px !important; min-height: 40px !important; box-shadow: none !important; } .vc-command-palette-picker .vc-command-palette-main-input input { min-height: 40px !important; height: 40px !important; font-size: 18px !important; } .vc-command-palette-actions-search-input input::placeholder { color: var(--cp-text-muted) !important; } .vc-command-palette-actions-search-input input:focus { border-color: var(--cp-border-strong) !important; outline: none !important; } .vc-command-palette-main-input input:focus { outline: none !important; } .vc-command-palette-page-input input:focus { border-color: var(--cp-accent) !important; outline: none !important; } input.vc-command-palette-main-search-input:read-only, .vc-command-palette-main-search-input input:read-only { color: var(--cp-text-muted) !important; cursor: pointer; } input.vc-command-palette-main-search-input:not(:read-only), .vc-command-palette-main-search-input input:not(:read-only) { color: var(--cp-text-primary) !important; }