.f-dropdown {
    --max-scroll: 3;
    position: relative;
    z-index: 10;
    user-select: none;
}

.f-dropdown select {
    display: none;
}
.f-dropdown > span {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    color: #000;
    border: 1px solid #ccc;
    background: #fff;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.f-dropdown > span > span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px;
    font-size: 14px;
}
.f-dropdown > span img {
    width: 30px;
    margin-right: 10px;
}

.f-dropdown > span:before, .f-dropdown > span:after {
    content: "";
    display: block;
    position: absolute;
    width: 8px;
    height: 2px;
    border-radius: 1px;
    top: 50%;
    right: 12px;
    background: #000;
    transition: all 0.3s ease;
}
.f-dropdown > span:before {
    margin-right: 4px;
    transform: scale(0.96, 0.8) rotate(50deg);
}
.f-dropdown > span:after {
    transform: scale(0.96, 0.8) rotate(-50deg);
}
.f-dropdown ul {
    list-style: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    max-height: calc(var(--max-scroll) * 46px);
    top: 40px;
    left: 0;
    z-index: 1;
    right: 0;
    min-height: 200px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    transform-origin: 0 0;
    transition: opacity 0.2s ease, visibility 0.2s ease,
        transform 0.3s cubic-bezier(0.4, 0.6, 0.5, 1.32);
    transform: translate(0, 5px);
}
.f-dropdown ul , .f-dropdown ul li {
    padding: 0;
    margin: 0;
}
.f-dropdown ul li a {
    cursor: pointer;
    display: block;
    padding: 8px 12px;
    color: #000;
    text-decoration: none;
    outline: none;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
.f-dropdown ul li a img {
    width: 30px;
    margin-right: 10px;
}
.f-dropdown ul li a:hover {
    color: #5c6bc0;
}
.f-dropdown ul li a span {
    font-size: 14px;
    pointer-events: none;
}
.f-dropdown ul li.active a {
    color: #fff;
    background: #303f9f;
}
.f-dropdown ul li.active a:before, /* white cross */
.f-dropdown ul li.active a:after {
    --scale: 0.6;
    content: "";
    display: block;
    width: 10px;
    height: 2px;
    position: absolute;
    right: 12px;
    top: 50%;
    opacity: 0;
    transition: all 0.2s ease;
    background: #FFF;
}
.f-dropdown ul li.active a:before {
    transform: rotate(45deg) scale(var(--scale));
}
.f-dropdown ul li.active a:after {
    transform: rotate(-45deg) scale(var(--scale));
}
.f-dropdown ul li.active a:hover:before,
.f-dropdown ul li.active a:hover:after {
    --scale: 0.9;
    opacity: 1;
}
.f-dropdown ul li:first-child a {
    border-radius: 6px 6px 0 0;
}
.f-dropdown ul li:last-child a {
    border-radius: 0 0 6px 6px;
}
.f-dropdown.disabled {
    opacity: 0.7;
}
.f-dropdown.disabled > span {
    cursor: not-allowed;
}
.f-dropdown.filled > span {
    color: #000;
}
.f-dropdown.open {
    z-index: 15;
}
.f-dropdown.open > span {
    border-color: #aaa;
}
.f-dropdown.open > span:before,
.f-dropdown.open > span:after {
    background: #000;
}
.f-dropdown.open > span:before {
    transform: scale(0.96, 0.8) rotate(-50deg);
}
.f-dropdown.open > span:after {
    transform: scale(0.96, 0.8) rotate(50deg);
}
.f-dropdown.open ul {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 12px);
    transition: opacity 0.3s ease, visibility 0.3s ease,
        transform 0.3s cubic-bezier(0.4, 0.6, 0.5, 1.32);
}

/* Added (select option on key down) */
.f-dropdown > span:focus {
    outline: -webkit-focus-ring-color auto 1px;
}

/* --------------------------- */

.f-group {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    text-align: center;
}
select.f-control {
    width: 100%;
    height: 100%;
}

.f-control {
    line-height: normal;
    color: #000;
    display: inline-block;
    background-color: #fff;
    border: #ccc 1px solid;
    border-radius: 6px;
    padding: 8px 12px;
    outline: none;
    max-width: 250px;
}