/* Intake — the List Builder question (owner, 2026-09-22).
   Its own class names, its own rules: nothing here is shared with another tool.
   Colours come from the theme's own labels only. On a phone each line becomes a stack of
   labelled boxes, so nothing is ever cut off and the page never scrolls sideways. */

.fb-lb {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fb-lb-none {
    margin: 0;
    font-size: 13px;
    color: var(--at-color-muted-foreground);
}

.fb-lb-head {
    display: none;
    gap: 8px;
    padding: 0 4px;
}

.fb-lb-h {
    flex: 1 1 0;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--at-color-muted-foreground);
    overflow-wrap: anywhere;
}

.fb-lb-h-act {
    flex: 0 0 44px;
    text-align: right;
}

.fb-lb-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--at-color-border);
    border-radius: var(--at-radius, 7px);
    background: var(--at-color-card);
}

.fb-lb-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    min-width: 0;
    font-weight: 400;
}

.fb-lb-cell-label {
    font-size: 12px;
    color: var(--at-color-muted-foreground);
    overflow-wrap: anywhere;
}

.fb-lb .fb-lb-in {
    width: 100%;
    min-width: 0;
}

.fb-lb-act {
    display: flex;
    justify-content: flex-end;
}

.fb-lb-del {
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--at-color-border);
    border-radius: var(--at-radius, 7px);
    background: var(--at-color-card);
    color: var(--at-color-destructive);
    cursor: pointer;
}

.fb-lb-del:hover {
    background: color-mix(in srgb, var(--at-color-destructive) 10%, var(--at-color-card));
}

.fb-lb-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 8px 10px;
    border-radius: var(--at-radius, 7px);
    background: var(--at-color-muted);
    color: var(--at-color-muted-foreground);
    font-size: 13px;
}

.fb-lb-total {
    display: flex;
    gap: 6px;
    align-items: baseline;
    min-width: 0;
    overflow-wrap: anywhere;
}

.fb-lb-total-value {
    color: var(--at-color-foreground);
}

.fb-lb-add {
    align-self: flex-start;
    white-space: normal;
}

/* From tablet up the lines read as a table, with the labels in one heading row. */
@media (min-width: 768px) {
    .fb-lb-head {
        display: flex;
    }

    .fb-lb-row {
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }

    .fb-lb-cell {
        flex: 1 1 0;
    }

    .fb-lb-cell-label {
        display: none;
    }

    .fb-lb-act {
        flex: 0 0 44px;
    }
}

@media (pointer: coarse) {
    .fb-lb .fb-lb-in,
    .fb-lb .fb-lb-add {
        min-height: 44px;
    }
}
