@layer components {
    .data-table {
        width: 100%;
        margin-bottom: 1rem;
        color: #212529;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 1px solid #dee2e6;
    }

    .data-table thead th {
        vertical-align: bottom;
        border-bottom: 2px solid #dee2e6;
    }

    .data-table tbody + tbody {
        border-top: 2px solid #dee2e6;
    }

    .data-table--compact th,
    .data-table--compact td {
        padding: 0.3rem;
    }

    .data-table--striped tbody tr:nth-of-type(odd) {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .data-table--hover tbody tr:hover {
        color: #212529;
        background-color: rgba(0, 0, 0, 0.075);
    }

    .table-scroll {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    @media print {
        .data-table {
            border-collapse: collapse !important;
        }
    }

    @media print {
        .data-table td,
        .data-table th {
            background-color: #fff !important;
        }
    }

    .eval-type[title] {
        cursor: help;
    }

    .eval-type {
        display: table;
        border-collapse: separate;
        border-spacing: 0;
        font-family: var(--font-heading);
        border: 1px solid;
        font-size: .8333em;
        line-height: 1;
        font-weight: 600;
        letter-spacing: -.01em;
        padding: 2px;
        background: #fcfcee;
        color: var(--theme-color-main-dark);
        margin: auto;
    }

    .animals-table {
        font-size: .875rem;
        margin-bottom: 0;
        border-right: 1px solid var(--theme-color-main-dark);
    }

    .animals-table th a {
        color: inherit;
    }

    .animals-table th[colspan] {
        background: var(--theme-color-main);
        border-left: 1px solid var(--theme-color-main-dark);
    }

    .animals-table th[colspan]:first-child {
        border-left: none;
    }

    /* Keeps the columns about equal across the whole table, not only under the grouped heading. */
    .animals-table th[colspan="4"] {
        width: 52.3333%;
    }

    .animals-table td,
    .animals-table th {
        border-bottom: 1px solid var(--theme-color-main-dark);
        border-top: 1px solid var(--theme-color-main-dark);
    }

    .animals-table thead th {
        padding: 0.75rem 0.3rem;
        background: var(--theme-color-main-dark);
        border-bottom: none;
        color: #fff;
    }

    .animals-table td:last-child,
    .animals-table th:last-child {
        padding-right: 0.75rem;
    }

    .animals-table td.animal-info {
        font-family: var(--font-heading);
        padding: 0.65rem 0.75rem;
        background: #fff;
        width: 14%;
        line-height: 1.15;
    }

    .animals-table td.num {
        background: var(--theme-color-main);
        color: #fff;
        width: 2.5%;
    }

    .animals-table td.breed {
        font-weight: 500;
        width: 4%;
        background: var(--theme-color-white-solid);
    }

    .animals-table td.i_pf {
        font-weight: 800;
        background: #fcfcfc;
    }

    .animals-table .animal-name {
        font-weight: 700;
        color: var(--theme-color-main);
        text-transform: uppercase;
    }

    .animals-table td.animal-info .animal-name {
        border-bottom: 1px dashed var(--theme-color-main);
        margin: 0 0.5rem 0.25rem;
        padding-bottom: 0.2rem;
    }

    .grid-loading {
        cursor: progress;
    }

    .grid-loading .data-table {
        opacity: 0.6;
    }

    .animals-table .animal-name,
    .animals-table .animal-number,
    .animals-table .animal-int-number,
    .animals-table .trait-heading {
        display: block;
    }

    .animals-table .animal-name a {
        text-decoration: none;
        text-transform: uppercase;
    }

    .animals-table .animal-number a,
    .animals-table .animal-int-number a {
        font-weight: 400;
        color: inherit;
        font-size: 0.8571em;
        letter-spacing: 0.025em;
    }

    .animals-table.data-table td,
    .animals-table.data-table th {
        vertical-align: middle;
        text-align: center;
    }

    .parentage-grid td span.parentage-indicator {
        display: inline-block;
        width: 1rem;
        height: 1rem;
        border-radius: 50%;
        text-indent: -99999rem;
        line-height: 1;
        border: 1px solid;
    }

    span.accepted {
        color: #33724F;
        background-color: #22A563;
    }

    span.doubtful {
        background-color: rgba(234, 217, 23, 0.6);
        color: #ccaf4a;
    }

    span.excluded {
        background-color: rgba(243, 41, 41, 0.5);
        color: #9b3333;
    }

    span.not_checked {
        color: #398B5F;
        background-color: #fff;
    }

    span.low_call {
        background-color: rgba(41, 121, 243, 0.5);
        color: #2a5a9b;
    }

    span.not_genotyped,
    span.unknown {
        background-color: rgba(0, 0, 0, 0.03);
        color: rgba(0, 0, 0, 0.3);
    }

    .summary {
        font-weight: 400;
        text-align: center;
        margin: 1rem auto 1.5rem;
        font-size: 0.875rem;
        color: #5e5d5b;
    }

    .summary b {
        color: var(--theme-color-dark-prev);
    }

    .data-grid-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        flex-wrap: wrap;
        margin: var(--space-2) 0;
    }

    .grid-apply {
        margin: var(--space-2) 0;
    }

    .export-links {
        margin-bottom: 0;
    }

    .export-menu > summary {
        display: block;
    }

    .export-icon--csv {
        color: #007bff;
    }

    .export-icon--text {
        color: #6c757d;
    }

    .export-icon--excel {
        color: #28a745;
    }

    .data-grid-toolbar .per-page {
        align-items: center;
    }

    .grid-export-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .export-zip-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        border-radius: 999px;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1;
        padding: 0.45rem 0.85rem;
    }

    .export-zip-link.is-pending {
        opacity: 0.85;
    }

    .export-zip-link .svgicon {
        width: 0.9rem;
        height: 0.9rem;
    }

    .data-grid-toolbar .per-page label {
        margin-bottom: 0;
        margin-left: 0.5rem;
        font-size: 0.875rem;
    }

    .per-page select {
        font-size: 0.875rem;
    }

    .grid-header {
        background: linear-gradient(to bottom, #fff 0%, #eee 100%);
    }

    .grid-container {
        position: relative;
    }

    .sort-link .sort-icon {
        text-decoration: none;
        margin-left: 5px;
    }
}
