/* ==========================================================================
   tp-check / tp-option-list — Mehrfachauswahl und klickbare Listen
   --------------------------------------------------------------------------
   .tp-check       Einzelne Checkbox mit Beschriftung (auch als Karte)
   .tp-check-group Mehrere Checkboxen nebeneinander (Filterzeile)
   .tp-option-list Scrollbare Liste auswählbarer Zeilen (.tp-option)

   Die Liste begrenzt ihre Höhe selbst und scrollt intern, damit sie den
   Dialog nicht in die Länge zieht.
   ========================================================================== */

/* ── Checkbox ────────────────────────────────────────────────────────────── */

.tp-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}

.tp-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.tp-check__text {
    min-width: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-check:hover .tp-check__text {
    color: var(--text-1);
}

.tp-check input:focus-visible {
    outline: 2px solid var(--tp-focus-border);
    outline-offset: 2px;
}

/* Karten-Variante — für eine hervorgehobene Einzeloption. */
.tp-check--card {
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    font-weight: 600;
    transition:
        border-color var(--dur-fast) var(--ease),
        background var(--dur-fast) var(--ease);
}

.tp-check--card:hover {
    border-color: var(--border-strong);
}

.tp-check--card:has(input:checked) {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: var(--accent-soft);
}

/* ── Checkbox-Gruppe ─────────────────────────────────────────────────────── */

.tp-check-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
}

.tp-check-group--bar {
    padding: 9px 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

/* Zwischenüberschrift innerhalb einer Gruppe — bricht die Zeile um, damit
   die folgenden Checkboxen darunter beginnen. */
.tp-check-group__label {
    width: 100%;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-4);
}

.tp-check-group__divider {
    width: 100%;
    height: 1px;
    margin: 2px 0;
    background: var(--border-soft);
}

/* Vollbreiter Slot für eingebettete Auswahlblöcke (z. B. Notizliste). */
.tp-check-group__block {
    width: 100%;
    min-width: 0;
}

/* ── Auswahlliste ────────────────────────────────────────────────────────── */

.tp-option-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: var(--tp-option-list-h, 260px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.tp-option-list__empty {
    display: block;
    padding: 18px 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-4);
}

.tp-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: var(--r-xs);
    background: transparent;
    font-size: 13px;
    color: var(--text-2);
    text-align: left;
    line-height: 1.4;
    cursor: pointer;
    transition:
        background var(--dur-fast) var(--ease),
        border-color var(--dur-fast) var(--ease),
        color var(--dur-fast) var(--ease);
}

.tp-option:hover {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-1);
}

.tp-option input[type="checkbox"] {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.tp-option__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Zusatz rechts (Kategorie, Status, Datum). */
.tp-option__meta {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-4);
}

/* Abgeschwächte Zeilen — erledigt bzw. archiviert. */
.tp-option--muted .tp-option__text {
    color: var(--text-4);
    text-decoration: line-through;
}

.tp-option--archived .tp-option__text {
    color: var(--text-4);
    font-style: italic;
}
