﻿/* https://moderncss.dev/custom-select-styles-with-pure-css/ */

.custom-dropdown select {
    position: relative;
    /* A reset of styles, including removing the default dropdown arrow */
    appearance: none;
    /* Additional resets for further consistency */
    background-color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px;
    padding-left: 15px;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    cursor: inherit;
    line-height: inherit;
    outline: none;
    height: 30px;
}

    /*.focus {
    display: none;
}
*/
    .custom-dropdown select:focus + .focus {
        position: absolute;
        top: -1px;
        left: -1px;
        right: -1px;
        bottom: -1px;
        border: 2px solid var(--darkgray);
        border-radius: inherit;
    }

.custom-dropdown {
    position: relative;
    display: grid;
    grid-template-areas: "custom-dropdown";
    align-items: center;
    width: 100%;
    border: 1px solid var(--darkgray);
    border-radius: 4px;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1.2;
    background-color: #fff;
    background-image: linear-gradient(to top, #f9f9f9, #fff 33%);
}

    .custom-dropdown:after {
        position: relative;
        left: -10px;
        content: "";
        width: 0.8em;
        height: 0.5em;
        background-color: var(--darkgray);
        clip-path: polygon(100% 0%, 0 0%, 50% 100%);
        justify-self: end;
    }

    .custom-dropdown select,
    .custom-dropdown:after {
        grid-area: custom-dropdown;
    }

    .custom-dropdown.disabled {
        background-color: var(--gray) !important;
        background-image: none;
        cursor: initial;
    }

        .custom-dropdown.disabled:after {
            clip-path: none;
            background-color: initial;
        }
