/* contextMenu.css — Card-level context menu (D12) */

.ctx-menu {
    display: none;
    position: fixed;
    z-index: 9000;
    min-width: 200px;
    max-width: 260px;
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 12px 28px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    /* Animate in */
    animation: ctx-appear 0.12s ease-out;
    user-select: none;
    -webkit-user-select: none;
}

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

/* ── Header ─────────────────────────────────────────────────────────────── */

.ctx-menu-header {
    padding: 10px 14px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── List ────────────────────────────────────────────────────────────────── */

.ctx-menu-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

/* ── Item ────────────────────────────────────────────────────────────────── */

.ctx-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.3;
    outline: none;
    transition: background 0.1s ease;
    /* Minimum touch target (D1 / WCAG) */
    min-height: 44px;
}

.ctx-menu-item:hover,
.ctx-menu-item:focus {
    background: rgba(255, 255, 255, 0.09);
}

.ctx-menu-item:active {
    background: rgba(255, 255, 255, 0.15);
}

.ctx-menu-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    /* Prevent emoji from triggering long-press default behaviour on iOS */
    pointer-events: none;
}

.ctx-menu-label {
    flex: 1;
}

/* ── Disabled item ───────────────────────────────────────────────────────── */

.ctx-menu-item--disabled {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;  /* no hover, no click */
}

.ctx-menu-disabled-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    margin-left: auto;
    white-space: nowrap;
    padding-left: 6px;
}

/* ── Separator (optional, add .ctx-menu-sep class to an <li> if needed) ─── */

.ctx-menu-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
    padding: 0;
    pointer-events: none;
}

/* ── Mobile adjustments ─────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .ctx-menu {
        min-width: 180px;
        border-radius: 12px;
    }

    .ctx-menu-item {
        font-size: 15px;
        padding: 11px 14px;
    }
}
