@layer components {
    .evaluation-controls {
        align-items: center;
    }

    .filter-groups {
        margin-right: 0;
        margin-left: 0;
    }

    .owner-search-row {
        margin-bottom: var(--space-4);
    }

    @media (min-width: 992px) {
        .owner-search-row {
            margin-bottom: 0;
        }

        .owner-search-column {
            margin-left: auto;
        }
    }

    .evaluations-filter {
        background: #fcfcfc;
        padding: 1.5rem 1.5rem .5rem;
    }

    .evaluations-filter.striped {
        background-color: rgba(252, 252, 252, 0.3);
    }

    .filters-toggle {
        border: none;
        background: var(--theme-color-dark-prev);
        cursor: pointer;
        border-radius: 0;
        color: #fff;
        text-transform: uppercase;
        font-weight: 300;
        font-size: 0.875rem;
        letter-spacing: .025rem;
    }

    .filters-toggle:hover {
        color: #fff;
    }

    .filters-toggle::after {
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: 0.255em;
        vertical-align: 0.255em;
        content: "";
        border-right: 0.3em solid transparent;
        border-left: 0.3em solid transparent;
        border-top: 0;
        border-bottom: 0.3em solid;
        vertical-align: middle;
    }

    /* The columns panel keeps the caret up when closed, as it was drawn before: Bootstrap flipped it only after a click. */
    .filters-panel:not([open]) > summary .filters-toggle::after {
        border-top: 0.3em solid;
        border-bottom: 0;
    }

    .filters-panel > summary,
    .columns-panel > summary {
        display: block;
        cursor: pointer;
        list-style: none;
    }

    .filters-panel > summary::-webkit-details-marker,
    .columns-panel > summary::-webkit-details-marker {
        display: none;
    }

    @media (min-width: 992px) {
        .filters-panel > .filters-panel__summary {
            display: none;
        }
    }

    .evaluation-types-nav,
    .evaluations-search {
        margin-bottom: 0.875rem;
    }

    .switch {
        margin-bottom: 0.25rem;
    }

    .switch label {
        cursor: pointer;
        margin-bottom: 0;
    }

    .switch input,
    .radio input {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

    .radio {
        margin-right: .25rem;
    }

    .radio label .lever {
        content: "";
        display: inline-block;
        position: relative;
        vertical-align: middle;
        margin-right: 0.25rem;
        background: transparent;
        width: 1rem;
        height: 1rem;
        top: -1px;
    }

    .radio label .lever::before,
    .radio label .lever::after {
        content: "";
        position: absolute;
        display: block;
        border-radius: 50%;
        transition: background .3s ease, box-shadow 0.1s ease, transform .3s ease;
        width: 100%;
        height: 100%;
    }

    .radio label .lever::before {
        background-color: #fff;
        border: 1px solid #797977;
    }

    .radio label .lever::after {
        background-color: var(--theme-color-main);
        transform: scale(0);
    }

    .radio label input[type="radio"]:checked + .lever::before {
        border-width: 2px;
        border-color: inherit;
    }

    .radio label input[type="radio"]:checked + .lever::after {
        transform: scale(.48);
    }

    .radio label input[type="radio"]:checked + .action-button {
        background-color: var(--theme-color-dark-prev);
        color: #fff;
    }

    .switch,
    .switch * {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    .genetic-traits-columns-filter h6 {
        margin-bottom: 1rem;
    }

    .evaluations-filter .radio {
        display: inline-block;
    }

    @media (min-width: 576px) {
        .evaluations-filter .filter-option {
            display: block;
        }
    }

    @media (min-width: 1200px) {
        .evaluations-filter .filter-option {
            display: inline-block;
        }
    }

    .evaluations-filter .switch label {
        font-size: 0.875rem;
    }

    .filter-group {
        background: rgba(255, 255, 255, 0.4);
        padding-top: .75rem;
        padding-bottom: .75rem;
        margin: 0 1rem 1rem 0;
    }

    .filter-group:last-child {
        margin-right: 0;
    }

    .filter-group--search {
        align-self: flex-end;
    }

    @media (min-width: 1200px) {
        .filter-group--search {
            margin-left: auto;
        }
    }

    .genetic-traits-columns-filter .filter-group {
        flex: 1 1 auto;
        margin-right: 0;
    }

    .evaluation-types-nav .radio {
        margin-right: 0;
        margin-bottom: 0;
    }

    .evaluation-types-nav .button-group .radio:not(:first-child) .action-button {
        margin-left: -1px;
    }

    .button-group .radio {
        position: relative;
        flex: 1 1 auto;
    }

    .button-group .radio label,
    .button-group .radio .action-button {
        display: block;
    }

    .switch.checkbox label {
        display: inline-flex;
        align-items: center;
        line-height: 1.25;
        margin-right: .5rem;
        font-weight: 400;
    }

    .checkbox .input-state {
        position: relative;
        display: inline-block;
        left: 0;
        height: 18px;
        width: 18px;
        background: #fff;
        border: 1px solid rgba(57, 56, 54, 0.7);
        border-radius: 0px;
        margin-right: 0.25rem;
    }

    .checkbox:hover input ~ .input-state,
    .checkbox input:focus ~ .input-state {
        background: #f5f5f5;
    }

    .checkbox input:checked ~ .input-state {
        background: var(--theme-color-main);
    }

    .checkbox input:disabled ~ .input-state {
        background: #e6e6e6;
        opacity: 0.6;
        pointer-events: none;
    }

    .input-state:after {
        box-sizing: unset;
        content: '';
        position: absolute;
        display: none;
    }

    .checkbox input:checked ~ .input-state:after {
        display: block;
    }

    .checkbox .input-state:after {
        left: 50%;
        top: 50%;
        width: 3px;
        height: 8px;
        border: solid #ffffff;
        border-width: 0 2px 2px 0;
        transform: translate(-40%, -65%) rotate(45deg);
    }

    .checkbox input:disabled ~ .input-state:after {
        border-color: #7b7b7b;
    }

    @media (min-width: 576px) {
        .genetic-traits-columns-filter {
            padding: 1.5rem 0.5rem 0.5rem 1.5rem;
        }
    }

    @media (min-width: 576px) {
        .genetic-traits-columns-filter .filter-group {
            margin-right: 1rem;
        }
    }

    @media (min-width: 1200px) {
        .genetic-traits-columns-filter .filter-group:nth-child(1) .switch {
            min-width: 5rem;
        }
    }
}
