@layer components {
    .dropdown {
        position: relative;
    }

    .dropdown__toggle {
        white-space: nowrap;
    }

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

    .dropdown__toggle:empty::after {
        margin-left: 0;
    }

    .dropdown__panel {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        display: none;
        float: left;
        min-width: 10rem;
        padding: 0.5rem 0;
        margin: 0.125rem 0 0;
        font-size: 1rem;
        color: #212529;
        text-align: left;
        list-style: none;
        background-color: #fff;
        background-clip: padding-box;
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: 0.25rem;
    }

    .dropdown__panel--right {
        right: 0;
        left: auto;
    }

    .dropdown__item {
        display: block;
        width: 100%;
        padding: 0.25rem 1.5rem;
        clear: both;
        font-weight: 400;
        color: #212529;
        text-align: inherit;
        white-space: nowrap;
        background-color: transparent;
        border: 0;
    }

    .dropdown__item:hover,
    .dropdown__item:focus {
        color: #16181b;
        text-decoration: none;
        background-color: #e9ecef;
    }

    .dropdown__item.active,
    .dropdown__item:active {
        color: #fff;
        text-decoration: none;
        background-color: #007bff;
    }

    .dropdown__item.disabled,
    .dropdown__item:disabled {
        color: #adb5bd;
        pointer-events: none;
        background-color: transparent;
    }

    .dropdown__header {
        display: block;
        padding: 0.5rem 1.5rem;
        margin-bottom: 0;
        font-size: 0.875rem;
        color: #6c757d;
        white-space: nowrap;
    }

    details.dropdown > summary {
        cursor: pointer;
        list-style: none;
    }

    details.dropdown > summary::-webkit-details-marker {
        display: none;
    }

    details.dropdown[open] > .dropdown__panel {
        display: block;
    }
}
