/* ==========================================================================
   Ghost Coach Shortcuts Drawer & Heads-Up Acrylic Cheatsheet Styles
   ========================================================================== */

/* Header Trigger Button */
#shortcutsBtn {
    background: #1e1b4b;
    border: 1px solid #6366f1;
    color: #c7d2fe;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}
#shortcutsBtn:hover {
    background: #312e81;
    border-color: #818cf8;
    color: #fff;
}
#shortcutsBtn.active {
    background: #4338ca;
    border-color: #a5b4fc;
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* Semi-Transparent Dimming Backdrop (Dismiss on click when unpinned) */
#shortcutsBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10004;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
#shortcutsBackdrop.active:not(.pinned) {
    opacity: 1;
    pointer-events: auto;
}

/* Slide-Over Drawer Container */
#shortcutsDrawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: calc(100vw - 20px);
    height: 100vh;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: -10px 0 45px rgba(0, 0, 0, 0.75);
    z-index: 10005;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e2e8f0;
    user-select: text;
}
#shortcutsDrawer.open {
    transform: translateX(0);
}
/* Translucent / Ghost Mode: Allows viewing host screen directly beneath drawer */
#shortcutsDrawer.translucent {
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Drawer Header */
.shortcuts-header {
    padding: 14px 18px;
    background: rgba(30, 41, 59, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.shortcuts-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.shortcuts-title {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
    margin: 0;
}
.shortcuts-count-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: #312e81;
    color: #c7d2fe;
    border: 1px solid #4338ca;
}
.shortcuts-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.shortcuts-action-btn {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 11.5px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.shortcuts-action-btn:hover {
    background: rgba(71, 85, 105, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}
.shortcuts-action-btn.active {
    background: #1e3a5f;
    border-color: #38bdf8;
    color: #38bdf8;
}
.shortcuts-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.shortcuts-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Toolbar: Search & Platform Switcher */
.shortcuts-toolbar {
    padding: 10px 18px 8px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shortcuts-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.shortcuts-search-wrap input {
    width: 100%;
    padding: 7px 32px 7px 30px;
    font-size: 12.5px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.shortcuts-search-wrap input:focus {
    border-color: #818cf8;
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.shortcuts-search-icon {
    position: absolute;
    left: 9px;
    color: #64748b;
    font-size: 12px;
    pointer-events: none;
}
.shortcuts-search-clear {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 12px;
    padding: 2px 4px;
    cursor: pointer;
    border-radius: 3px;
}
.shortcuts-search-clear:hover {
    color: #e2e8f0;
}

/* Category Filter Chips */
.category-chips-container {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-chips-container::-webkit-scrollbar {
    display: none;
}
.category-chip {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}
.category-chip:hover {
    background: rgba(71, 85, 105, 0.6);
    color: #e2e8f0;
}
.category-chip.active {
    background: #2563eb;
    border-color: #3b82f6;
    color: #fff;
    font-weight: 600;
}

/* Shortcuts Content Scrollable Area */
.shortcuts-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.shortcuts-content::-webkit-scrollbar {
    width: 6px;
}
.shortcuts-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.category-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.category-section-header {
    font-size: 12.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.category-section-count {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}

/* Individual Shortcut Card */
.shortcut-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.15s ease;
}
.shortcut-card:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(255, 255, 255, 0.18);
}

.shortcut-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.shortcut-keys-wrap {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.shortcut-keys-plus {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    margin: 0 1px;
}
.shortcut-keys-or {
    font-size: 10.5px;
    color: #94a3b8;
    font-style: italic;
    margin: 0 4px;
}

/* Keycap Tags (<kbd>) */
.shortcut-card kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 22px;
    padding: 0 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    color: #f1f5f9;
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    border: 1px solid #475569;
    border-bottom: 2px solid #334155;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    user-select: none;
    box-sizing: border-box;
    line-height: 1;
}

/* Scope Badges */
.scope-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.scope-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.scope-global {
    background: rgba(3, 105, 161, 0.25);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}
.scope-global .scope-badge-dot { background: #38bdf8; }

.scope-inapp {
    background: rgba(5, 150, 105, 0.25);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #34d399;
}
.scope-inapp .scope-badge-dot { background: #34d399; }

.scope-input {
    background: rgba(217, 119, 6, 0.25);
    border: 1px solid rgba(251, 191, 36, 0.35);
    color: #fbbf24;
}
.scope-input .scope-badge-dot { background: #fbbf24; }

.scope-overlay {
    background: rgba(147, 51, 234, 0.25);
    border: 1px solid rgba(192, 132, 252, 0.35);
    color: #c084fc;
}
.scope-overlay .scope-badge-dot { background: #c084fc; }

.shortcut-action-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Star Favorite Button */
.shortcut-fav-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.15s ease, text-shadow 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}
.shortcut-fav-btn:hover {
    color: #fbbf24;
    transform: scale(1.28);
}
.shortcut-fav-btn.is-fav {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}
.shortcut-fav-btn.is-fav:hover {
    color: #fbbf24;
    transform: scale(1.32);
    text-shadow: 0 0 14px rgba(251, 191, 36, 0.8);
}

.shortcut-action-title {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.3;
}
.shortcut-details {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Highlights for Favorited Shortcut Cards */
.shortcut-card.is-favorited {
    border-color: rgba(245, 158, 11, 0.28);
}
.shortcut-card.is-favorited:hover {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 41, 59, 0.82);
}

/* Top-Pinned Favorites Section in "All" view & Favorites Category */
.category-section.favorites-section {
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-radius: 8px;
    padding: 10px 10px 4px 10px;
    margin-bottom: 16px;
}
.category-section.favorites-section .category-section-header {
    color: #fbbf24;
    font-weight: 700;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}
.category-section.favorites-section .category-section-count {
    background: rgba(245, 158, 11, 0.2);
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 10px;
    padding: 1px 6px;
}

/* Empty State */
.shortcuts-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}
.shortcuts-empty-state p {
    margin: 6px 0 0;
    font-size: 13px;
}
