/* Atom: button — star-btn, edit-pencil, badge-restore, toolbar-btn */

.star-btn {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--bn-colour-icon-idle);
    cursor: pointer;
    padding: var(--bn-space-xs);
    line-height: 1;
    transition: color var(--bn-transition-normal);
}

.star-btn:hover {
    color: var(--bn-colour-accent);
}

.edit-pencil {
    position: absolute;
    top: 0.65rem;
    right: 3.35rem;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: var(--bn-colour-icon-idle);
    cursor: pointer;
    padding: var(--bn-space-xs);
    line-height: 1;
    transition: color var(--bn-transition-normal);
}

.edit-pencil:hover {
    color: var(--bn-colour-accent);
}

.edit-pencil-inline {
    position: static;
    display: inline;
    margin-left: 0.4em;
    vertical-align: baseline;
    font-size: 0.75em;
}

.badge-restore {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--bn-colour-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.1rem 0.25rem;
    line-height: 1;
    transition: color var(--bn-transition-fast);
    flex-shrink: 0;
}

.badge-restore:hover {
    color: var(--bn-colour-accent);
}

/* .toolbar-btn — round-rect button used for all toolbar controls.
   Tokens: bg, border, border-hover, quote-bg, text, muted, accent.
   Variants:
     default       — Codebook, Copy CSV, Export names (icon + label)
     dropdown      — Tag filter, View switcher (icon + label + arrow)
     toggle        — .toolbar-btn-toggle: active/inactive binary state
   Child elements:
     .toolbar-icon     — emoji/text icon (0.95rem, muted)
     .toolbar-icon-svg — SVG icon (muted, baseline-aligned)
     .toolbar-arrow    — dropdown chevron SVG (muted, right side) */
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--bn-space-sm);
    background: var(--bn-colour-bg);
    border: 1px solid var(--bn-colour-border);
    border-radius: var(--bn-radius-md);
    padding: 0.4rem 0.85rem;
    font-family: var(--bn-font-body);
    font-size: 0.82rem;
    color: var(--bn-colour-text);
    cursor: pointer;
    transition: background var(--bn-transition-fast), border-color var(--bn-transition-fast);
}

.toolbar-btn:hover {
    background: var(--bn-colour-quote-bg);
    border-color: var(--bn-colour-border-hover);
}

.toolbar-btn .toolbar-icon {
    font-size: 0.95rem;
    color: var(--bn-colour-muted);
}

.toolbar-btn .toolbar-icon-svg {
    color: var(--bn-colour-muted);
    vertical-align: -0.15em;
}

.toolbar-btn .toolbar-arrow {
    color: var(--bn-colour-muted);
    vertical-align: -0.05em;
    flex-shrink: 0;
    margin-left: -0.1rem;
}

/* Toggle variant — pressed/active state for AI tag toggle etc. */
.toolbar-btn-toggle {
    user-select: none;
}

.toolbar-btn-toggle.active {
    background: var(--bn-colour-quote-bg);
    border-color: var(--bn-colour-accent);
    color: var(--bn-colour-accent);
}

.toolbar-btn-toggle:not(.active) {
    color: var(--bn-colour-muted);
}
