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

.toplist-customtheme-v2__wrapper {
    margin-bottom: 24px;
}

.toplist-customtheme-v2__offers {
    display: flex;
    flex-direction: column;
    counter-reset: toplist-customtheme-v2-counter;
    gap: 16px;
}

.toplist-customtheme-v2__offer {
    position: relative;
    display: grid;
    overflow: hidden;
    align-items: center;
    padding: 24px;
    counter-increment: toplist-customtheme-v2-counter;
    transition: all 0.3s ease;
    border: 1px solid #ffffff0d;
    border-radius: 16px;
    background-color: #1a2542;
    gap: 16px;
    grid-template-areas: 'logo main actions';
    grid-template-columns: 296px auto 180px;
    grid-template-rows: 1fr;
    isolation: isolate;
}

.toplist-customtheme-v2__offer:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px #0006;
}

.toplist-customtheme-v2__offer.hidden {
    display: none;
}

.toplist-customtheme-v2__offer:before {
    position: absolute;
    z-index: -1;
    content: '';
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, #ffffff08 0%, transparent 50%, #ffffff03 100%);
    inset: 0;
}

.toplist-customtheme-v2__offer:first-child {
    border-color: #fecc024d;
    background: linear-gradient(135deg, #001d40 0%, #002b5c 25%, #001d40 50%, #002b5c 75%, #001d40 100%);
}

.toplist-customtheme-v2__offer:first-child:after {
    position: absolute;
    z-index: -1;
    content: '';
    animation: toplist-customtheme-v2-shimmer 3s linear infinite;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent 0%, #ffffff0d 50%, transparent 100%);
    background-size: 200% 100%;
    inset: 0;
}

@keyframes toplist-customtheme-v2-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.toplist-customtheme-v2__offer-label {
    font-family: Inter, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    position: relative;
    top: -2px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 15px;
    padding: 0 8px;
    white-space: nowrap;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color);
    border: 1px solid #fecc024d;
    border-radius: 9999px;
    background: var(--background);
}

.toplist-customtheme-v2__offer-logo-wrapper {
    position: relative;
    display: flex;
    gap: 16px;
    grid-area: logo;
}

.toplist-customtheme-v2__offer-logo-wrapper:before {
    font-family: Inter, sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    position: absolute;
    z-index: 2;
    top: -6px;
    left: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    content: counter(toplist-customtheme-v2-counter);
    pointer-events: none;
    color: #002b5c;
    border: 2px solid #1a2542;
    border-radius: 50%;
    background: #fecc02;
}

.toplist-customtheme-v2__offer:first-child .toplist-customtheme-v2__offer-logo-wrapper:before {
    border-color: #001d40;
}

.toplist-customtheme-v2__offer-logo {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: center;
    width: 56px;
    min-width: 56px;
    height: 56px;
    border-radius: 12px;
}

.toplist-customtheme-v2__offer-logo img {
    width: 56px;
    height: 56px;
    border-radius: inherit;
    object-fit: contain;
}

@keyframes toplist-customtheme-v2-pulse-gold {
    0%,
    100% {
        box-shadow: 0 0 0 0 #fecc0266;
    }

    50% {
        box-shadow: 0 0 0 8px #fecc0200;
    }
}

.toplist-customtheme-v2__offer:first-child .toplist-customtheme-v2__offer-logo {
    animation: toplist-customtheme-v2-pulse-gold 2s infinite;
}

.toplist-customtheme-v2__offer:not(:first-child) .toplist-customtheme-v2__offer-label {
    animation: toplist-customtheme-v2-pulse-gold 2s infinite;
}

.toplist-customtheme-v2__offer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toplist-customtheme-v2__offer-brand-row {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    margin-bottom: 2px;
    gap: 8px;
}

.toplist-customtheme-v2__offer-brand {
    font-family: Inter, sans-serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 28px;
    color: #fff;
}

.toplist-customtheme-v2__offer-rating {
    display: flex;
    align-items: center;
    height: 24px;
    gap: 8px;
}

.toplist-customtheme-v2__offer-rating-stars {
    font-size: 14px;
    line-height: 1;
    position: relative;
    display: inline-block;
    letter-spacing: 0.05em;
}

.toplist-customtheme-v2__offer-rating-stars-empty {
    white-space: nowrap;
    color: #fecc02;
}

.toplist-customtheme-v2__offer-rating-stars-full {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    color: #fecc02;
}

.toplist-customtheme-v2__offer-rating-value {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
    color: #fecc02;
}

.toplist-customtheme-v2__offer-main {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    text-align: center;
    gap: 4px;
    grid-area: main;
}

.toplist-customtheme-v2__offer-title {
    font-family: Inter, sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 28px;
    margin: 0;
    color: #fecc02;
    overflow-wrap: anywhere;
}

.toplist-customtheme-v2__offer-key-features {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
    gap: 8px;
}

.toplist-customtheme-v2__offer-key-features-item {
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-weight: 400;
    line-height: 16.5px;
    padding: 2px 8px;
    color: #fff;
    border: 1px solid #ffffff1a;
    border-radius: 9999px;
    background-color: #ffffff0d;
}

.toplist-customtheme-v2__offer-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-area: actions;
}

.toplist-customtheme-v2__offer-cta-btn {
    font-family: Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #002b5c;
    border-radius: 12px;
    background: linear-gradient(135deg, #fecc02 0%, #e6b800 50%, #fecc02 100%);
    box-shadow: 0 4px 15px #fecc0259;
}

.toplist-customtheme-v2__offer-cta-btn:after {
    position: relative;
    top: -1px;
    margin-left: 4px;
    content: '→';
}

.toplist-customtheme-v2__offer-cta-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #002b5c;
    box-shadow: 0 6px 25px #fecc0280;
}

.toplist-customtheme-v2__offer-terms,
.toplist-customtheme-v2__offer-terms p {
    font-family: Inter, sans-serif;
    font-size: 9px;
    font-weight: 400;
    line-height: 13.5px;
    margin-bottom: 0;
    text-align: center;
    color: #bfdbfe;
}

@media (max-width: 1024px) {
    .toplist-customtheme-v2__offer {
        padding: 20px;
        gap: 16px;
        grid-template-areas:
            'logo'
            'main'
            'actions';
        grid-template-columns: auto;
    }

    .toplist-customtheme-v2__offer-brand-row {
        flex-wrap: wrap;
    }

    .toplist-customtheme-v2__offer-main {
        align-items: unset;
        text-align: left;
        gap: 0;
    }

    .toplist-customtheme-v2__offer-key-features {
        justify-content: unset;
        margin-top: 8px;
    }

    .toplist-customtheme-v2__offer-title {
        font-size: 18px;
    }

    .toplist-customtheme-v2__offer-actions {
        align-items: stretch;
    }
}
