/* shared/context-menu.css — generic styles for window.zddc.menu.
   Mirrors the look-and-feel of native context menus: tight rows,
   five-column grid (check | icon | label | accel | arrow), subtle
   border + shadow, hover background from the shared --bg-hover token,
   danger items tinted with --danger. */

.zddc-menu {
    position: fixed;
    z-index: 10000;
    min-width: 12rem;
    max-width: 22rem;
    padding: 0.25rem 0;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18),
                0 2px 6px  rgba(0, 0, 0, 0.10);
    font-family: var(--font);
    font-size: 0.85rem;
    line-height: 1.2;
    user-select: none;
    /* Allow focus styles inside without leaking to the menu itself. */
    outline: none;
}

.zddc-menu__sep {
    height: 1px;
    margin: 0.25rem 0;
    background: var(--border);
}

.zddc-menu__item {
    display: grid;
    grid-template-columns: 1.1rem 1.25rem 1fr auto 0.9rem;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    color: var(--text);
    /* Suppress the focus ring on the row itself — hover/focus
       background handles the cue. */
    outline: none;
}

.zddc-menu__item:hover,
.zddc-menu__item:focus,
.zddc-menu__item:focus-visible {
    background: var(--bg-hover);
}

.zddc-menu__item.is-disabled {
    color: var(--text-muted);
    cursor: default;
}

.zddc-menu__item.is-disabled:hover,
.zddc-menu__item.is-disabled:focus {
    background: transparent;
}

.zddc-menu__item--danger {
    color: var(--danger);
}

.zddc-menu__item--danger:hover,
.zddc-menu__item--danger:focus {
    background: var(--danger);
    color: var(--text-light);
}

.zddc-menu__check {
    font-size: 0.9rem;
    text-align: center;
    color: var(--primary);
}

.zddc-menu__icon {
    font-size: 0.95rem;
    text-align: center;
}

.zddc-menu__label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.zddc-menu__accel {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    padding-left: 0.5rem;
}

.zddc-menu__item--danger .zddc-menu__accel {
    color: inherit;
    opacity: 0.85;
}

.zddc-menu__arrow {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
}

.zddc-menu__item--has-sub .zddc-menu__arrow {
    color: var(--text);
}
