/* Follow me for more pens like this! */

/* Tweak to change the look and feel */
:root {
    --button-background: #42b2bd;
    --button-color: white;
    --dropdown-highlight: #42b2bd;
    --dropdown-background: white;
    --dropdown-color: black;
}

.dropdown a.button {
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    cursor: pointer;
    background: var(--button-background);
    color: var(--button-color);
    border: none;
}

.dropdown a.button:hover {
    background: var(--button-color-highlight);
}

.dropdown a.button:active {
    filter: brightness(75%);
}

.dropdown summary {
    list-style: none none;
    text-align: center;
}

.dropdown a {
    pointer-events: all;
    touch-action: auto;
}

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

.dropdown summary:focus {
    outline: none;
}

.dropdown summary:focus a.button {
    outline: 2px solid white;
}

.dropdown summary:focus {
    outline: none;
}

.dropdown ul {
    position: absolute;
    margin: 1rem 0 0 0;
    padding: 1rem 0;
    left: 50%;
    box-sizing: border-box;
    z-index: 2;

    background: var(--dropdown-background);
    border-radius: 0.25rem;
    list-style: none;
    transform: translateX(-50%);
}

.dropdown ul li {
    padding: 0;
    margin: 0;
}


.dropdown ul li a {
    display: inline-flex;
    padding: 0.5rem 0.8rem;
    width: 100%;
    box-sizing: border-box;
    align-items: end;
    flex-direction:column;

    color: var(--dropdown-color);
    text-decoration: none;
}
.dropdown ul li a .wrapper {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: end;
    position: relative;
}

.dropdown ul li.selected a,
.dropdown ul li a:hover {
    background-color: var(--dropdown-highlight);
    color: var(--dropdown-background);
}
.dropdown li.selected a .less-important,
.dropdown a:hover .less-important {
    color: var(--dropdown-background);
}

/* Dropdown triangle */
.dropdown ul::before {
    content: ' ';
    position: absolute;
    width: 0;
    height: 0;
    top: -0.5rem;
    left: 50%;
    margin-left: -0.5rem;
    border-style: solid;
    border-width: 0 0.5rem 0.5rem 0.5rem;
    border-color: transparent transparent var(--dropdown-background) transparent;
}


/* Close the dropdown with outside clicks */
.dropdown > summary::before {
    display: none;
}

.dropdown[open] > summary::before {
    content: ' ';
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1;
}


.dropdown .less-important {
    color: gray;
}

.dropdown .resource-value-pair {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}