﻿.compare {
    position: relative;
}

.compare.compare--shorts .compare__table {
    margin-top: 40px;
    background-color: #fff;
}

.compare .compare__table {
    position: relative;
}

.compare.compare--shorts::-webkit-scrollbar,
.compare .compare__table.compare__table--detailed .compare__row::-webkit-scrollbar {
    display: none;
}

.compare .compare__table.compare__table--detailed {
    display: flex;
    flex-direction: column;
}

.compare .compare__table--detailed .compare__row-scrollable--head {
    position: sticky;
    top: 64px;
    z-index: 10000;
}

.compare .compare__table--detailed .compare__row--head {
    padding-top: 25px;
    background-color: #f3f5f6;
}

.compare .compare__table--detailed .compare__row-scrollable--footer {
    position: sticky;
    bottom: 0;
    overflow-x: auto;
    z-index: 10000;
}

.compare .compare__table--detailed .compare__row--footer {
    opacity: 0;
    visibility: hidden;
}

.compare .compare__table--detailed .compare__row--footer.compare__row--visible {
    opacity: 1;
    visibility: visible;
}

.compare .compare__table--detailed .compare__row--head.compare__row--static,
.compare .compare__table--detailed .compare__row--footer.compare__row--static {
    transition: none;
}

.compare .compare__row {
    display: flex;
    align-items: stretch;
    position: relative;
    z-index: 3;
}

.compare .compare__row::-webkit-scrollbar {
    display: none;
}

.compare .compare__row--head {
    z-index: 4;
}

.compare .compare__row--head .cell {
    padding-top: 40px;
    padding-bottom: 40px;
}

.compare .compare__row--head .cell:not(.cell--label) {
    gap: 10px;
    font-size: 32px;
    line-height: 1.52;
    font-weight: 700;
    color: #0b0c0e;
    font-family: Inter, Roboto, Helvetica, Arial, sans-serif;
}

.compare--shorts .compare__row:nth-child(1) .highlight__cell {
    top: -2px;
}

.compare--shorts .compare__row:nth-child(2) .highlight__cell {
    top: -6px;
}

.compare--shorts .compare__row:nth-child(3) .highlight__cell {
    top: -3px;
}

.compare--shorts .compare__row:nth-child(4) .highlight__cell {
    top: -1px;
}

.compare--shorts .compare__row:nth-child(5) .highlight__cell {
    top: 2px;
}

.compare--shorts .compare__row:nth-child(6) .highlight__cell {
    top: 5px;
}

.compare .cell {
    display: flex;
    align-items: center;
    position: relative;
    width: 28%;
    background-color: #fff;
    border-bottom: 1px solid #eaedf0;
    padding: 28px 20px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #71797f;
}

.compare .cell:not(:last-of-type) {
    border-inline-end: 1px solid #eaedf0;
}

.compare--shorts .cell.highlight__cell {
    scale: 1.03;
    border-bottom: 1px solid #eaedf0;
    border-inline-end: none;
    z-index: 4;
}

.compare--shorts .compare__row:first-child .cell:not(.cell--label)::before,
.compare--shorts .compare__row:first-child .cell:not(.cell--label)::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: calc(var(--shadow-height) - 13px);
    -webkit-box-shadow: -29px 0px 52px -25px rgba(0,0,0,0.2);
    -moz-box-shadow: -29px 0px 52px -25px rgba(0,0,0,0.2);
    box-shadow: -29px 0px 52px -25px rgba(0,0,0,0.2);
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s ease-in-out;
}

.compare--shorts .compare__row:first-child .cell:not(.cell--label)::before {
    left: 0;
}

.compare--shorts .compare__row:first-child .cell:not(.cell--label)::after {
    left: auto;
    right: 0;
    rotate: 180deg;
}

.compare--shorts .compare__row:first-child .cell.highlight__cell:not(.cell--label)::before,
.compare--shorts .compare__row:first-child .cell.highlight__cell:not(.cell--label)::after {
    width: 100%;
    opacity: 1;
}

.compare .cell.cell--label {
    position: sticky;
    inset-inline-start: 0;
    width: 100%;
    max-width: 198px;
    background-color: #f7f8f9;
    font-weight: 700;
    color: #252e37;
}

.compare .compare__abbre {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -25px;
    left: 0;
    right: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    border: 6px solid #fff;
    box-sizing: content-box;
}

.compare .compare__abbre span {
    font-size: 14px;
    line-height: 1.5;
    text-transform: uppercase;
    font-weight: 800;
    color: #383f46;
}

.compare .compare__star {
    width: 30px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    background-image: url(../image/icon_star.svg);
}

.compare .compare__tooltip {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 2;
}

.compare .compare__tooltip span {
    display: none;
    position: absolute;
    inset-inline-start: 0;
    top: 25px;
    width: 130px;
    padding: 6px;
    border-radius: 6px;
    background-color: #383f46;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    color: #fff;
    z-index: 2;
}

.compare .compare__tooltip img {
    opacity: .75;
    transition: opacity .25s ease;
}

.compare .compare__row--btns {
    z-index: unset;
}

.compare .compare__tooltip:hover span {
    display: block;
}

.compare .compare__tooltip:hover img {
    opacity: 1;
}

.compare .compare__btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 190px;
    margin: 0 auto;
    padding: 11px 0;
    color: #0b0c0e;
    font-size: 16px;
    line-height: 1.78;
    font-weight: 700;
    background-color: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 5px;
}

.compare .compare__btn--green,
.compare .highlight__cell .compare__btn {
    color: #fff;
    background-color: #4caf51;
    border-color: #48a24c;
}

.compare__title {
    margin: 58px 0 38px 0;
    font-size: 24px;
    line-height: 1.78;
    font-weight: 400;
    color: #979797;
    text-align: center;
}

.compare__note {
    max-width: 630px;
    margin: 40px auto 58px;
}

.compare__note li {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
    color: #0b0c0e;
}

@media (hover: hover) and (pointer: fine) {
    .compare .compare__row:not(.compare__row--btns, .compare__row--footer, .compare__row--head):hover .cell:not(.cell--label) {
        background-color: #f9f9fa;
    }

    .compare .compare__btn:hover {
        background-color: #fff;
        color: #252e37;
        border: 1px solid #252e37;
    }

    .compare .compare__btn--green:hover,
    .compare .highlight__cell .compare__btn:hover {
        color: #fff;
        background-color: #47a34a;
        border-color: #47a34a;
    }
}

@media (max-width: 1200px) {
    .compare .compare__row--head .cell:not(.cell--label) {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .compare__title {
        margin: 38px 0;
    }

    .compare .compare__tooltip {
        display: none;
    }

    .compare.compare--shorts {
        overflow: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .compare--shorts .compare__btn,
    .compare--shorts .compare__btn:hover {
        color: #fff;
        background-color: #4caf51;
        border-color: #48a24c;
    }

    .compare.compare--shorts::-webkit-scrollbar,
    .compare .compare__table--detailed .compare__row-scrollable::-webkit-scrollbar {
        display: none;
    }

    .compare .compare__table--detailed .compare__row-scrollable {
        -ms-overflow-style: none;
        scrollbar-width: none;
        overscroll-behavior-x: none;
        will-change: scroll-position;
        transform: translateZ(0);
    }

    .compare .compare__table--detailed .compare__row-scrollable--main {
        overflow-x: auto;
    }

    .compare .compare__table--detailed .compare__row-scrollable--head {
        order: 2;
        top: unset;
        bottom: 104px;
        margin-top: -25px;
        overflow-x: auto;
    }

    .compare .compare__table--detailed .compare__row--head {
        background-color: transparent;
        opacity: 0;
        visibility: hidden;
    }

    .compare .compare__table--detailed .compare__row--head.compare__row--visible {
        opacity: 1;
        visibility: visible;
    }

    .compare .cell {
        padding-left: 15px;
        padding-right: 15px;
    }

    .compare .cell.cell--label {
        max-width: 120px;
        z-index: 3;
    }

    .compare .compare__table--detailed .compare__row-scrollable--footer {
        order: 3;
    }

    .compare .compare__table--detailed .compare__row--footer {
        height: 104px;
    }

    .compare .compare__row--head .cell:not(.cell--label) {
        font-size: 20px;
        gap: 0;
    }

    .compare--shorts .cell.highlight__cell {
        scale: 1;
        top: 0 !important;
        border-bottom: 1px solid #eaedf0;
        border-inline-end: 1px solid #eaedf0;
        z-index: 0;
    }

    .compare--shorts .cell.highlight__cell::before,
    .compare--shorts .cell.highlight__cell::after {
        display: none;
    }

    .compare .compare__abbre {
        position: relative;
        top: 0;
        margin-inline-end: 8px;
        margin-inline-start: 0;
        width: 100%;
        max-width: 28px;
        height: 28px;
        border: none;
    }

    .compare .compare__star {
        width: 100%;
        max-width: 20px;
        margin-inline-end: 8px;
    }
}

@media (max-width: 767px) {
    .compare.compare--shorts .compare__table {
        min-width: 790px;
    }

    .compare__title {
        margin: 26px 0;
        font-size: 18px;
    }

    .compare .cell {
        font-size: 12px;
    }

    .compare .compare__row--head .cell:not(.cell--label) {
        font-size: 20px;
    }

    .compare .compare__row--head .cell,
    .compare .cell {
        padding: 18px;
    }

    .compare .cell.cell--label {
        min-width: 120px;
    }

    .compare .cell {
        min-width: 224px;
    }
}

@media (max-width: 575px) {
    .compare__note {
        padding: 0 15px;
    }
}

@media (max-width: 520px) {
    .compare.compare--shorts .compare__table,
    .compare__table--detailed .compare__row {
        min-width: 690px;
    }

    .compare .cell {
        width: auto;
        min-width: 192px;
    }
}
