.table {
    width: 100%;
    border-collapse: collapse;

    p { margin: 0; }

    th {
        padding: 1rem;
        background-color: black;
        text-transform: uppercase;
        font-weight: lighter;
    }

    tr {
        height: 3.5rem;
        background-color: var(--color-table-even);

        &:nth-child(odd) { background: var(--color-table-odd); }

        &:hover { background-color: var(--color-table-hover); }
    }

    td { padding: 0 0.5rem; }

    .table__caption {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem;
    }

    .table--stacked {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .table__platform {
        display: grid;
        place-items: center;
        gap: 0.5rem;

        svg {
            height: 2rem;
            & .youtube__body { fill: var(--youtube-red); }
            & .twitch__body { fill: var(--twitch-purple); }
        }

        &:visited .youtube__body, &:visited .twitch__body { fill: grey; }
    }

    .table__actions {
        padding: 0.25rem;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 0.5rem;

        svg { height: 1rem; }
    }

    .table__country {
        padding: 0.25rem;
        display: grid;
        place-items: center;

        > img { height: 1.5rem; }
    }

    .table__character {
        overflow: hidden;
        position: relative;
        width: 15ch;
        isolation: isolate;
        padding: 0;

        > .character__image {
            pointer-events: none;
            max-width: 100%;
            position: absolute;
            opacity: 0.4;
            z-index: -1;
            top: -50%;
        }

        .character {
            padding: 1rem;
            display: flex;
            justify-content: space-between;
            margin: 0;
        }
    }

    @container (max-width: 60em) {
        border-collapse: separate;

        thead {
            border: none;
            clip: rect(0 0 0 0);
            height: 1px;
            margin: -1px;
            overflow: hidden;
            padding: 0;
            position: absolute;
            width: 1px;
        }

        tbody {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        td {
            padding: 0.25rem;
            display: flex;
            justify-content: space-between;
            gap: 1rem;
        }

        tr {
            height: inherit;
            border: 1px solid #888;
        }

        td:last-child::before, th:last-child::before {
            flex-grow: 1;
            letter-spacing: 0.1em;
            color: var(--light-gray);
        }

        .table__character {
            width: inherit;

            > .character__image {
                top: 0;
                height: 100%;
                object-fit: cover;
            }

            .character {
                margin: 0;
                padding: 0 0.5rem;
                gap: 0.5rem;
            }
        }

        .table__actions {
            padding: 0 0.5rem;
            height: 1.5rem;
        }

        .table__caption--left { float: none; }
        .table__caption--right { float: none; }

        .table--stacked {
            flex-direction: row;
            gap: 1rem;
        }
    }
}
