/* Small additions on top of Pico. */

.tabs {
    margin-bottom: var(--pico-spacing);
}

/* Fixed layout so the column widths below are honoured; narrow screens
   scroll horizontally instead of squashing the columns. */
#list table {
    table-layout: fixed;
    min-width: 50rem;
}

#list th,
#list td {
    padding-inline: 0.5rem;
}

th.col-date {
    width: 6.5rem;
}

th.col-short {
    width: 13rem;
}

th.col-count {
    width: 6.5rem;
}

th.col-seen {
    width: 9rem;
}

th.col-del {
    width: 3.5rem;
}

/* Sortable headers: a faint double arrow when inactive, a solid one on the
   active column. Arrows are CSS escapes to keep this file ASCII. */
th[data-sort] {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th[data-sort]::after {
    content: " \2195";
    opacity: 0.35;
}

th[aria-sort="ascending"]::after {
    content: " \25B2";
    opacity: 1;
}

th[aria-sort="descending"]::after {
    content: " \25BC";
    opacity: 1;
}

td.date {
    white-space: nowrap;
}

td.muted {
    color: var(--pico-muted-color);
}

td.url {
    overflow-wrap: anywhere;
}

/* One line per destination; the full URL is in the tooltip. */
td.dest {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

button.del {
    padding: 0.15rem 0.5rem;
    margin: 0;
    width: auto;
}

small.error {
    display: block;
    color: var(--pico-del-color);
    margin-bottom: var(--pico-spacing);
}

#toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--pico-border-radius);
    background: var(--pico-contrast-background);
    color: var(--pico-contrast-inverse);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

#toast.show {
    opacity: 1;
}

#toast.error {
    background: var(--pico-del-color);
    color: #fff;
}
