/* ADD AN ACTION - THE ACTION CHOOSER (docs/claude/CONVERSATION-BUILDER.md section 32; builder-design-bible 5.4).
   The + picker's panel (.conv-cmd-pop.conv-cmd-picker - conv-commands.css) and its boxed-scroll flex chain (.conv-pick);
   this sheet owns ONLY the chooser's own classes (.conv-achoose*). Tokens only (--theme-* / --conv-*); the Action family's
   hue arrives through .conv-fam-act on the panel (--conv-fam / --conv-fam-soft). */

/* The parts that stay put while the list scrolls. */
.conv-pick > .conv-achoose-head,
.conv-pick > .conv-achoose-ways {
    flex: none;
}

.conv-achoose-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 4px;
}

.conv-achoose-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: var(--theme-radius-button);
    background: var(--conv-fam-soft, var(--conv-act-soft));
    color: var(--conv-fam, var(--conv-act));
    font-size: 0.9rem;
}

.conv-achoose-head-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.conv-achoose-title {
    color: var(--theme-text-emphasis);
    font-size: var(--theme-font-size-sm);
    font-weight: 600;
}

.conv-achoose-where {
    overflow: hidden;
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The list: the + picker's scroller (.conv-pick-list), its groups (.conv-pick-group). */
.conv-achoose-group.is-quiet {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--theme-border-subtle);
}

.conv-achoose-group-hint {
    padding: 0 8px 4px;
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-xs);
    line-height: 1.35;
}

/* One call: icon tile, its name, what it does, what it gives back. */
.conv-achoose-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: var(--theme-radius-button);
    background: none;
    color: var(--theme-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background var(--conv-motion);
}

.conv-achoose-row:hover,
.conv-achoose-row.is-active {
    background: var(--theme-surface-hover);
}

.conv-achoose-row.is-active {
    box-shadow: inset 2px 0 0 var(--conv-fam, var(--conv-act));
}

.conv-achoose-row:focus-visible {
    outline: 0;
    box-shadow: var(--theme-focus-ring);
}

/* A call a conversation cannot make yet: greyed, never hidden - with why. */
.conv-achoose-row.is-off {
    cursor: default;
}

.conv-achoose-row.is-off:hover {
    background: none;
}

.conv-achoose-row.is-off .conv-pick-tile-icon {
    background: var(--theme-surface-hover);
    color: var(--theme-text-muted);
}

.conv-achoose-row.is-off .conv-achoose-name {
    color: var(--theme-text-muted);
}

/* Beneath the list (they are no options - ruling C3): its own group, each greyed row with Publish it BESIDE it, never inside. */
.conv-achoose-offbox {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid var(--theme-border-subtle);
}

.conv-achoose-offlist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.conv-achoose-offrow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.conv-achoose-offrow > .conv-achoose-row {
    flex: 1;
    min-width: 0;
}

.conv-achoose-offrow > .conv-achoose-publish {
    flex: none;
    align-self: center;
    margin-right: 8px;
}

/* The quieter "Without waiting" lines. */
.conv-achoose-row.is-quiet .conv-pick-tile-icon {
    background: var(--theme-surface-hover);
    color: var(--theme-text-secondary);
}

.conv-achoose-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.conv-achoose-name {
    overflow: hidden;
    color: var(--theme-text-emphasis);
    font-size: var(--theme-font-size-sm);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-achoose-does {
    display: -webkit-box;
    overflow: hidden;
    color: var(--theme-text-secondary);
    font-size: var(--theme-font-size-xs);
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.conv-achoose-gives {
    overflow: hidden;
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conv-achoose-why {
    color: var(--theme-text-muted);
    font-size: var(--theme-font-size-xs);
    line-height: 1.35;
}

/* Links: Publish it, the ways to a call, the examples. */
.conv-achoose-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--conv-act-ink);
    font: inherit;
    font-size: var(--theme-font-size-xs);
    font-weight: 600;
    cursor: pointer;
}

.conv-achoose-link:hover:not(:disabled) {
    text-decoration: underline;
}

.conv-achoose-link:disabled {
    color: var(--theme-text-muted);
    cursor: default;
}

.conv-achoose-link:focus-visible {
    outline: 0;
    border-radius: var(--theme-radius-button);
    box-shadow: var(--theme-focus-ring);
}

.conv-achoose-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.conv-achoose-empty .conv-achoose-link {
    align-self: center;
}

.conv-achoose-ways {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 8px 12px;
    border-top: 1px solid var(--theme-border-subtle);
}

@media (prefers-reduced-motion: reduce) {
    .conv-achoose-row {
        transition: none;
    }
}
