/* Per-row "⋯" overflow menu (secondary actions) — floats above the modal. */
.project-more.is-loading .ic, .project-switch.is-loading .ic { animation: spin 0.8s linear infinite; }
/* The chat row menu is aliased onto this block so the two never drift, stacking level too: the
   popup tier (100003) above the chat panel (90000) and its jump pills. */
.project-menu, .chat-row-menu {
    /* max-content hugs the labels; the floor keeps a two-item menu from looking pinched. */
    position: fixed; z-index: 100003; width: max-content;
    min-width: 148px; max-width: min(340px, 90vw); padding: 5px;
    /* Capped to the viewport less the placers' 8px edge gap: only a menu taller than the window scrolls. */
    max-height: calc(100dvh - 16px); overflow-y: auto;
    background: var(--bg-container); border: 1px solid var(--border-main); border-radius: 10px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 2px;
}
.project-menu-item, .chat-row-menu-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    background: transparent; border: 0; color: var(--text-main); border-radius: 7px;
    padding: 8px 10px; font-size: 13px; cursor: pointer; text-align: left;
}
.project-menu-item .ic, .chat-row-menu-item .ic { flex: 0 0 auto; color: var(--text-muted); }
.project-menu-item:hover, .chat-row-menu-item:hover { background: var(--accent); color: var(--on-accent); }
.project-menu-item:hover .ic, .chat-row-menu-item:hover .ic { color: var(--on-accent); }
/* Red text, not the global .danger fill. */
.project-menu-item.is-danger { color: var(--danger); }
.project-menu-item.is-danger .ic { color: var(--danger); }
.project-menu-item.is-danger:hover { background: var(--danger); color: #fff; }
.project-menu-item.is-danger:hover .ic { color: #fff; }
/* A drag fires no hover (list/dragMenu.js): the item under a held row wears the hover's own look. */
.project-menu-item.is-drag-hover { background: var(--accent); color: var(--on-accent); }
.project-menu-item.is-drag-hover .ic { color: var(--on-accent); }
.project-menu-item.is-danger.is-drag-hover { background: var(--danger); color: #fff; }
.project-menu-item.is-danger.is-drag-hover .ic { color: #fff; }
/* Invisible and inert but never display:none: an input with no box sends the picker to the page corner. */
.project-color-picker {
    position: fixed; width: 1px; height: 1px;
    opacity: 0; pointer-events: none;
}
/* The chat variant hugs its content — the 184px floor stays projects-only. */
.chat-row-menu { min-width: 0; }
.chat-row-menu-item { padding: 7px 9px; }

/* The chat bubble's hover "…" trigger; touch opens the menu by long-press instead. */
.chat-row-menu-btn {
    /* Anchored to the row's visible slice (--visible-bottom, 0 = nothing cut), lifted clear of the
       jump pills by --row-menu-lift. */
    position: absolute; bottom: calc(var(--visible-bottom, 0px) + var(--row-menu-lift, 0px)); z-index: 2;
    display: none; align-items: center; justify-content: center;
    width: 21px; height: 21px; padding: 0; border-radius: 50%;
    border: 1px solid var(--border-main); background: var(--bg-container);
    color: var(--text-muted); cursor: pointer;
    opacity: 0; transition: opacity .12s ease, transform .12s ease, box-shadow .12s ease;
    -webkit-user-select: none; user-select: none;
}
/* Fully beside the bubble (21px button + 6px gap), never overlapping it. */
.chat-row-menu-btn-left { left: -27px; }
.chat-row-menu-btn-right { right: -27px; }
@media (hover: hover) {
    .chat-row-menu-btn { display: inline-flex; }
    /* Hover-only in every skin: :root:root (0,4,0) outranks the skins' blanket button opacity:1 (user report). */
    :root:root .chat-msg .chat-row-menu-btn { opacity: 0; }
    :root:root .chat-msg:hover .chat-row-menu-btn { opacity: .7; }
    :root:root .chat-msg:hover .chat-row-menu-btn:hover { opacity: 1; }
    /* Beats button:hover's accent fill: the chrome stays, with a glow and a 1px lift. */
    .chat-row-menu-btn:hover {
        background: var(--bg-container); color: var(--text-muted);
        box-shadow: 0 1px 6px var(--accent);
        transform: translateY(-1px);
    }
    .chat-row-menu-btn::after { display: none; }
}
/* No trigger on a slice too short to hold one: it overflowed onto the neighbour (user report).
   Outranks the hover rule above. */
.chat-msg.reveal-no-trigger .chat-row-menu-btn { display: none; }
/* The jump pills win: a trigger that cannot lift clear of them hides (user report: the arrows are
   the higher-priority control). */
.chat-msg.chat-row-menu-yield .chat-row-menu-btn { opacity: 0 !important; pointer-events: none !important; }

/* Server picker injected into the confirm modal (app.choose). */
.confirm-choose-row { margin-top: 12px; }
.confirm-choose-select {
    width: 100%; padding: 7px 10px; border-radius: 8px;
    /* background-COLOR — the shorthand would reset the hover sweep sizing (layout/shimmer.css). */
    border: 1px solid var(--border-main); background-color: var(--input-bg); color: var(--text-main);
    font-size: 13px; cursor: pointer;
}
/* Text input injected into the confirm modal (app.prompt — copy-with-name). */
.confirm-prompt-input {
    width: 100%; padding: 7px 10px; border-radius: 8px;
    border: 1px solid var(--border-main); background: var(--input-bg); color: var(--text-main);
    font-size: 13px;
}
/* Why the typed value is refused, only while it applies (desktop QLabel#modalPromptReason). */
.confirm-prompt-reason { color: var(--danger); font-size: 12px; margin-top: 6px; }
/* The multi-line shape: a one-line bar read as "type a word" for values routinely a sentence (user report). */
textarea.confirm-prompt-input {
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    min-height: 62px;
    /* Past this the field outgrew the modal and its bottom border clipped. */
    max-height: 50vh;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
/* A textarea is not among the input types animations/overlay/overlays.css rings, so it fell back
   to the browser's outline. */
textarea.confirm-prompt-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
