/* =============================================
   右键上下文菜单 — 像素级复刻 dropdown-menu.html
   ACM = Assets Context Menu
   ============================================= */

/* ── 容器 ── */
.acm-menu {
    position: fixed;
    z-index: 80;
    width: 14rem;                    /* w-56 */
    min-width: 8rem;                 /* min-w-[8rem] */
    max-height: 300px;
    padding: 0.25rem;                /* p-1 */
    border-radius: 0.75rem;          /* rounded-xl */
    background-color: #0f0f0f;       /* dark:bg-primary-950 */
    border: 0.5px solid rgba(64, 64, 64, 0.5);  /* thin-border */
    backdrop-filter: blur(40px);     /* backdrop-blur-2xl */
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);  /* shadow-2xl */
    overflow-x: hidden;
    overflow-y: auto;
    user-select: none;
    pointer-events: auto;
    display: none;                   /* 默认隐藏，data-state="open" 显示 */
}
.acm-menu > * + * { margin-top: 0.125rem; }  /* space-y-0.5 */

.acm-menu[data-state="open"] { display: block; }

/* ── 菜单项（通用） ── */
.acm-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.625rem;                   /* gap-2.5 */
    height: 2.25rem;                 /* h-9 */
    padding: 0.625rem 0.75rem;       /* py-2.5 px-3 */
    font-size: 0.875rem;             /* text-sm */
    color: #ffffff;                  /* text-popover-foreground */
    background: transparent;
    border: none;
    border-radius: 0.5rem;           /* rounded-lg */
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: background-color 0.15s;
}
.acm-item:hover { background-color: #1a1a1a; }  /* dark:hover:bg-primary-850 */
.acm-item:active { background-color: #272727; }

/* ── 图标区 ── */
.acm-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;                     /* w-4 */
    min-width: 1rem;
}
.acm-item-icon svg {
    width: 14px; height: 14px;       /* size-3.5 */
    color: #a1a1aa;                  /* text-muted-foreground */
    flex-shrink: 0;
    pointer-events: none;
}

/* ── Destructive 变体 ── */
.acm-item[data-variant="destructive"] { color: #ef4444; }
.acm-item[data-variant="destructive"]:hover { background-color: rgba(239, 68, 68, 0.2); }
.acm-item[data-variant="destructive"] .acm-item-icon svg { color: #ef4444; }

/* ── Sub-trigger（Add to folder 右侧箭头） ── */
.acm-sub-arrow {
    margin-left: auto;               /* ms-auto */
    width: 1rem; height: 1rem;       /* size-4 */
    color: #a1a1aa;                  /* text-muted-foreground */
    flex-shrink: 0;
}

/* ── 分隔线 ── */
.acm-separator {
    height: 1px;                     /* h-px */
    margin: 0.25rem -0.25rem;        /* my-1 -mx-1 */
    background-color: #1f1f1f;       /* dark:bg-primary-800 */
}

/* ── 动画 ── */
.acm-menu[data-state="open"] {
    animation: acmFadeIn 0.15s ease-out, acmZoomIn 0.15s ease-out;
}
@keyframes acmFadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes acmZoomIn  { from { transform: scale(0.95); } to { transform: scale(1); } }

[data-placeholder] {
    opacity: 0.35;
    pointer-events: none;
}
