@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

.dw-toplist-cp__wrapper {
    margin: 48px 0;
}

.dw-toplist-cp__offers {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dw-toplist-cp__offer {
    position: relative;
    display: grid;
    align-items: flex-start;
    padding: 24px 24px 20px;
    border-radius: 4px;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08);
    grid-template-columns: 166.67px auto 225px;
    grid-template-rows: auto 1fr;
    gap: 0 32px;
    grid-template-areas:
    "logo title cta-btn"
    "rating facts payments";
}

.dw-toplist-cp__offer.hidden {
    display: none;
}

.dw-toplist-cp__offer-logo-wrapper {
    grid-area: logo;
}

.dw-toplist-cp__offer-logo img {
    width: 100%;
    height: 80px;
    object-fit: contain;
}

.dw-toplist-cp__offer-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    grid-area: rating;
}

.dw-toplist-cp__offer-rating img {
    height: 13.86px;
}

.dw-toplist-cp__offer-title {
    grid-area: title;
}

.dw-toplist-cp__offer-title,
.dw-toplist-cp__offer-title p {
    font-family: 'Montserrat', serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 135%;
    color: #3327B4;
}

.dw-toplist-cp__offer-title p {
    margin: 0;
    padding: 0;
}

.dw-toplist-cp__offer-facts {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    grid-area: facts;
    gap: 8px;
}

.dw-toplist-cp__offer-fact {
    display: flex;
    align-items: center;
    width: fit-content;
    height: 22px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #EFECFD;
    gap: 4px;
}

.dw-toplist-cp__offer-fact-head {
    font-family: 'Montserrat', serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 150%;
    letter-spacing: 0.03em;
    color: #42466A;
}

.dw-toplist-cp__offer-fact-body {
    font-family: 'Montserrat', serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    color: #1A1B1D;
}

.dw-toplist-cp__offer-cta-btn {
    font-family: 'Montserrat', serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 135%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    text-align: center;
    text-transform: uppercase;
    color: #FFFFFF;
    border-radius: 12px;
    background: linear-gradient(90deg, #F42C04 41%, #FF5735 100%);
    gap: 4px;
    grid-area: cta-btn;
}

.dw-toplist-cp__offer-cta-btn:after {
    width: 24px;
    height: 24px;
    content: '';
    background-image: url("data:image/svg+xml,%3Csvg width='25' height='24' viewBox='0 0 25 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.4215 11.0757L11.7261 4.3902C11.4795 4.13003 11.1716 4 10.8018 4C10.4319 4 10.124 4.13017 9.87747 4.3902L9.097 5.16053C8.84363 5.41386 8.71694 5.7218 8.71694 6.08466C8.71694 6.44066 8.84359 6.75226 9.097 7.01919L14.0879 12L9.09678 16.9911C8.84348 17.2445 8.7168 17.5524 8.7168 17.9153C8.7168 18.2713 8.84345 18.583 9.09678 18.8498L9.87733 19.62C10.1307 19.8734 10.4389 20 10.8016 20C11.1645 20 11.4727 19.8734 11.726 19.62L18.4215 12.9345C18.675 12.6675 18.8018 12.356 18.8018 12C18.8018 11.6371 18.675 11.329 18.4215 11.0757Z' fill='white'/%3E%3C/svg%3E%0A");
}

.dw-toplist-cp__offer-cta-btn:hover {
    text-decoration: none;
    color: #FFFFFF;
    background: #D14900;
}

.dw-toplist-cp__show-more-btn {
    font-family: 'Montserrat', serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 130%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 220px;
    height: 48px;
    margin: 16px auto 0;
    padding: 0 16px;
    text-transform: capitalize;
    color: #3327B4;
    border-radius: 12px;
    gap: 8px;
    text-decoration-line: underline;
}

.dw-toplist-cp__show-more-btn:after {
    width: 32px;
    height: 32px;
    content: '';
    border-radius: 100px;
    background-image: url("data:image/svg+xml,%3Csvg width='33' height='32' viewBox='0 0 33 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='32' height='32' transform='translate(0.5)' fill='white'/%3E%3Cpath d='M16.5 11.3334V20.6667' stroke='%233327B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11.8335 16H21.1668' stroke='%233327B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: center center;
}

.dw-toplist-cp__show-more-btn:hover {
    cursor: pointer;
    opacity: 0.6;
}

.dw-toplist-cp__offer-payments-wrapper {
    grid-area: payments;
}

.dw-toplist-cp__offer-payments {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.dw-toplist-cp__offer-payment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 22px;
    padding: 0 5px;
    border: 1px solid #D7DEF0;
    border-radius: 6px;
    background: #fff;
}

.dw-toplist-cp__offer-payments-hidden-counter {
    font-family: 'Montserrat', serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    cursor: pointer;
    color: #1A1B1D;
    border-radius: 8px;
    outline: 3px solid #FFFFFF;
    background: #EFECFD;
}

.dw-toplist-cp__offer-payment-image {
    width: auto;
    height: 14px;
    object-fit: contain;
}

.dw-toplist-cp__offer-payment-tooltip,
.dw-toplist-cp__offer-payments-tooltip {
    font-family: 'Montserrat', serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 150%;
    position: absolute;
    z-index: 10;
    top: 28px;
    left: 50%;
    flex-direction: column;
    width: max-content;
    padding: 12px 16px;
    transform: translateX(-50%);
    color: #FFFFFF;
    border-radius: 4px;
    background: rgba(14, 8, 29, 0.9);
    filter: drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.04)) drop-shadow(0px 8px 32px rgba(0, 0, 0, 0.1));
}

.dw-toplist-cp__offer-payment-tooltip:before,
.dw-toplist-cp__offer-payments-tooltip:before {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    content: '';
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent #0E081DE5 transparent;
    border-top-width: 0;
}

.dw-toplist-cp__offer-payment:hover .dw-toplist-cp__offer-payment-tooltip {
    display: flex !important;
}

.dw-toplist-cp__offer-payments-tooltip {
    top: 29px;
    width: max-content;
    min-width: 144px;
}

.dw-toplist-cp__offer-payments-hidden-counter:hover .dw-toplist-cp__offer-payments-tooltip {
    display: flex !important;
}

.dw-toplist-cp__offer-payment-in-tooltip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.dw-toplist-cp__offer-payment-in-tooltip .dw-toplist-cp__offer-payment-image {
    width: auto;
    max-height: 24px;
}

.dw-toplist-cp__offer-payment-in-tooltip-image-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 24px;
}

@media screen and (max-width: 991px) {
    .dw-toplist-cp__wrapper {
        margin: 24px 0;
    }

    .dw-toplist-cp__offer {
        padding: 12px 16px;
        grid-template-columns: 141px auto;
        grid-template-rows: auto;
        grid-template-areas:
        "logo title"
        "rating title"
        "facts facts"
        "cta-btn cta-btn"
        "payments payments";
        gap: 0 12px;
    }

    .dw-toplist-cp__offer-facts {
        justify-content: center;
        margin-top: 12px;
    }

    .dw-toplist-cp__offer-title,
    .dw-toplist-cp__offer-title p {
        font-size: 18px;
    }

    .dw-toplist-cp__offer-cta-btn {
        height: 46px;
        margin-top: 16px;
    }

    .dw-toplist-cp__offer-payments-wrapper {
        margin-top: 16px;
    }

    .dw-toplist-cp__offer-payments {
        justify-content: center;
    }
}
