.select {
    margin: 2px 0 0 0;
    padding: 4px 0 0px 0px;
    border-bottom: 1px solid #bdc3c7;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    color: #2c3e50;
    height: 22px;
    line-height: 22px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.select>img {
    border: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    right: 5px;
    bottom: 5px;
    height: 12px;
    width: 12px;
    cursor: pointer;
    opacity: 40%;
    content: url("/img/selectDownArrow.svg");
}

.selectWindow {
    visibility: hidden;
    position: absolute;

    opacity: 0;

    background-color: white;
}

.selectWindow>input {
    font-family: rubik;
    line-height: 36px;
    letter-spacing: 1px;
    font-size: 11pt;
    margin: 0;
    padding: 0px 10px 0px 10px;
    border-bottom: 1px solid #bdc3c7;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    box-sizing: border-box;
    color: #2c3e50;
    outline: none !important;
    width: 100%;
}


.selectElementsContainer {
    overflow: auto;
}

/* Выбранный в данный момент элемент */
.selectWindow .selectElementsContainer .selected {
    background-color: #3498db;
    color: white;
}

/* Строка о том, сколько ещё есть строк */
.selectElementsContainer>span {
    display: block;
    text-align: center;
    color: #aaa;
    padding: 10px 5px 10px 5px;
}



.selectDropdownUnder {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: auto;

    transition: opacity 500ms;
    opacity: 0;
}


/* Медиа запросы в самом низу потому что они переопределяют уже имеющееся */

/* Мобильная версия */
@media (max-width: 576px) {
    .selectWindow {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px - 50px);
        /* 50px потому что неверно определяется VH на мобильном */
        margin-left: 10px;
        margin-right: 10px;
        top: 0;
        transform: translate(0, -100%) rotateX(-20deg) translateY(50%);
        transition: opacity 200ms, transform 200ms;
    }


    .selectAnimationEnd {
        transform: translate(0, -100%) rotateX(0) translateY(50%);
        opacity: 1;
    }

    .selectElementsContainer {
        max-height: calc(100vh - 34px - 36px - 20px - 2px - 50px);
        /* 50px потому что неверно определяется VH на мобильном */
    }



    /* Заголовок окна */
    .selectWindowTitle {
        background-color: #006266;
        color: white;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }


    /* Текст заголовка */
    .selectWindowTitle>div {
        line-height: 34px;
        font-weight: 500;
        padding: 0 10px 0 10px;
        cursor: default;
    }

    /* Картинка закрытия окна */
    .selectWindowTitle>img {
        border: 0;
        margin: 3px;
        height: 28px;
        width: 28px;
        cursor: pointer;
        content: url("/img/Close.svg");
    }

    .selectElementsContainer>div {
        padding: 10px 10px 10px 10px;
        cursor: pointer;
    }

    .selectDropdownUnder {
        background: rgba(100, 100, 100, 0.5);
    }
}



/* Настольная версия */
@media (min-width: 576px) {
    .selectWindow {
        top: 0;
        transform: translate(0, -50%) rotateX(-45deg) translateY(50%);
        transition: opacity 200ms, transform 200ms;

    }

    .selectAnimationEnd {
        transform: translate(0, -50%) rotateX(0) translateY(50%);
        opacity: 1;
    }

    .selectElementsContainer {
        max-height: 300px;
    }


    /* Заголовок выпадающего списка */
    .selectWindowTitle {
        display: none;
    }

    .selectElementsContainer>div {
        padding: 8px 10px 8px 10px;
        cursor: pointer;
    }


    .selectDropdownUnder {
        background: rgba(100, 100, 100, 0.2);
    }
}