.theme-switcher-wrapper {
    user-select: none;
    margin: 15px 0 0 15px;
    /*display: flex;
    gap: 10px;*/
    font-family: Roboto, sans-serif;
}

details {
    position: relative;
    width: 200px;
    margin-right: 1rem;
    z-index: 100;
}

details[open] {
    z-index: 1;
}

summary {
    pointer-events: auto;
    justify-content: space-between;
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 48px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 24px;
    background-color: #fff;
    list-style: none;
    z-index: 100;
    box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.28);
}

summary::-webkit-details-marker {
    display: none;
}

details[open] summary:before {
    content: '';
    display: block;
    width: 100vw;
    height: 100vh;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
}

summary:after {
    content: '';
    display: inline-block;
    float: right;
    top: -5px;
    position: relative;
    width: .5rem;
    height: .5rem;
    border-bottom: 1px solid currentColor;
    border-left: 1px solid currentColor;
    /*border-bottom-left-radius: 2px;*/
    transform: rotate(-45deg) translate(0%, 0%);
    transform-origin: center center;
    /*transition: transform ease-in-out 100ms;*/
}

summary:focus {
    outline: none;
}

details[open] summary:after {
    transform: rotate(135deg) translate(50%, -50%);
}

details[open] summary {
    border-radius: 24px 24px 0 0;
}

#theme-switcher fieldset {
    border: 0;
    padding: 0;
}

#theme-switcher ul::before {
    position: absolute;
    top: -5px;
    height: 8px;
    width: 100%;
    content: ' ';
    background-color: #fff;
    left: 0;
}

#theme-switcher ul {
    width: 100%;
    background: #fff;
    position: absolute;
    top: calc(100%);
    left: 0;
    padding: 1rem;
    margin: 0;
    box-sizing: border-box;
    border-radius: 0 0 24px 24px;
    /*max-height: 200px;*/
    overflow-y: visible;
    list-style-type: none;
    box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.28);
}

#theme-switcher li {
    margin: 0;
    border-bottom: 1px solid #ccc;
}

#theme-switcher li:first-child label {
    margin-top: 0;
}

#theme-switcher li:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* FAKE SELECT */

summary.radios {
    counter-reset: radios;
}

summary.radios:before {
    content: var(--selection);
}

input[type=radio] {
    counter-increment: radios;
    appearance: none;
    display: none;
}

input[type=radio]:checked {
    pointer-events: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    --display: block;
    margin: 0;
}

input[type=radio]:before {
    content: attr(alt);
    font-family: 'Material Symbols Outlined';
    font-size: 24px;
}

input[type=radio]:after {
    content: attr(title);
    display: inline;
    font-size: 14px;
}

#theme-switcher ul.list {
    counter-reset: labels;
    pointer-events: auto;
}

label {
    width: 100%;
    display: flex;
    cursor: pointer;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    margin: 1rem 0;
}

label span {
    --display: block;
    display: var(--display);
    width: 1rem;
    height: 1rem;
    border: 1px solid #727272;
    border-radius: 3px;
}
