/* ==========================================================================
   Contextual Menus & Cmd+Tab Application Switcher
   ========================================================================== */

.context-menu {
    position: fixed;
    min-width: 190px;
    padding: 5px;
    background: rgba(46, 46, 48, 0.82);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
    z-index: 99000;
    font-size: 13px;
    animation: ctx-in 0.09s ease-out;
}

@keyframes ctx-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.context-menu.hidden { display: none; }

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 9px;
    border-radius: 5px;
    color: #f2f2f2;
    cursor: default;
    white-space: nowrap;
}

.context-menu-item i {
    width: 15px;
    font-size: 11.5px;
    text-align: center;
    opacity: 0.75;
}

.context-menu-item:not(.disabled):hover {
    background: var(--accent);
    color: #fff;
}

.context-menu-item.disabled {
    color: #8b8b8d;
    font-weight: 600;
    cursor: default;
}

.context-menu-sep {
    height: 1px;
    margin: 4px 8px;
    background: rgba(255, 255, 255, 0.13);
}

/* ── Cmd+Tab switcher ──────────────────────────────────────────────────── */

.app-switcher {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px 34px;
    background: rgba(40, 40, 42, 0.62);
    backdrop-filter: blur(34px) saturate(180%);
    -webkit-backdrop-filter: blur(34px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
    z-index: 98000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.11s ease, transform 0.11s ease;
}

.app-switcher.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.app-switcher-item {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.app-switcher-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.45));
}

.app-switcher-item.selected {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.app-switcher-label {
    position: absolute;
    bottom: 11px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12.5px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

@media (prefers-reduced-motion: reduce) {
    .context-menu, .app-switcher { animation: none; transition: none; }
}
