* {
    box-sizing: border-box;
}
:root {
    font-size: 16px;
}
.no-padding {
    padding: 0 !important;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow: hidden; */
}

body {
    background: top left url(bg-body.jpg) no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
}

.header {
    display: flex;
    flex: 0 0 auto;
    padding: 12px;
    background: rgba(80,10,10,.85);
    justify-content: right;
}

.content {
    display: flex;
    flex: 1 0 auto;
    padding: 15px;
    align-items: flex-start;
    /* max-height: 400px;
    overflow: scroll; */
    overflow: auto;
    height: 0;
}

.bottom {
    display: flex;
    flex: 0 0 auto;
    padding: 15px 15px 15px;
    flex-direction: column;
    user-select: none;
}



.categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    user-select: none;
}
.category {
    display: flex;
    flex-basis: 40%;
    margin: 5%;
    flex-direction: column;
    border-radius: 40px;
    /* margin: 10px 0; */
}
.category__image {
    display: flex;
    justify-content: center;
}
.category__image img {
    width: 90%;
}
.category__image {
    background: rgba(255,255,255,.8);
    padding: 15px;
    border-radius: 8px 8px 0 0;
}
.category__value {
    display: flex;
    /* outline: 1px solid green; */
    justify-content: center;
    color: white;
    background: rgba(80,10,10,.85);
    padding: 5px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
}









.selector {
    display: flex;
    width: 100%;
    /* padding: 10px 5px; */
    border-radius: 4px;
    color: white;
    margin: 8px 0;
    /* cursor: pointer; */
    background: rgba(80,10,10,.85);

}
.selector__content {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255,255,255,.1);
    border-width: 0 1px;
    font-size: 14px;
    /* transition: .2s; */
    /* cursor: pointer; */
}
.selector__content_small {
    font-size: 12px;
}

.selector__left,
.selector__right {
    display: flex;
    flex: 0 0 30px;
    justify-content: center;
    padding: 10px;
    transition: .2s;
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    background: center center url(src/right.svg) no-repeat;
}

.selector__left {
    transform: rotate(180deg);
}





.distances {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-width: 1px 1px 0 1px;
    user-select: none;
}
.distances__item {
    /* outline: 1px solid red; */
    padding: 0;
}
.distances__text {
    border-bottom: 1px solid #ddd;
    /* font-weight: bold; */
    border-width: 1px 0;
    padding: 6px 0 6px 35px;
    position: relative;
    /* cursor: pointer; */
    transition: .2s;
}
.distances__text:active {
    background-color: rgba(255,0,0,.04);
}
.distances__text:before {
    content: "";
    display: block;
    background: left center url(src/more-arrow.svg?v6) no-repeat;
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    transition: .2s;
}
.distances__item.active .distances__text:before {
    /* transform: translateY(-50%) rotate(180deg); */
    transform: translateY(-50%) scaleY(-1);
}
.distances__item.active .mode {
    display: block;
}
.distances__item.active .mode__item:last-child {}

.mode {
    display: none;
    font-size: 14px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.mode__item {
    padding: 6px 0 6px 40px;
    border-bottom: 1px solid #ddd;
    /* cursor: pointer; */
    transition: .2s;
    /* font-size: 10px; */
}
.mode__item:active {
    background-color: rgba(255,0,0,.04);
}
.mode__item:last-child {
    /* border-bottom: 0; */
}





.modal-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(0,0,0,.5);
    will-change: transform;
    transform: translateX(-100%);
}

.modal {
    flex-direction: column;
    display: flex;
    /* flex: 0 0 80%; */
    width: 80%;
    max-height: 80%;

    margin: 0 auto;
    overflow-y: auto;
    transition: .2s;
    transform: scale(.9);
    background: white;
    border-radius: 4px;
    will-change: transform;
    overflow: hidden;
}
.modal__header {
    background: #a00;
    text-align: center;
    padding: 6px;
    color: #ddd;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 36px;
}
.modal__close {
    vertical-align: middle;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
}
.modal__content {
    padding: 15px;
    overflow: scroll;
}
.modal-wrap.active {
    transform: translateX(0);
}
.modal-wrap.active .modal {
    transform: scale(1);
}
