.tsv-product-rewards {
    --tsv-ink: #102a43;
    --tsv-muted: #62748a;
    --tsv-brand: #0b8fb0;
    --tsv-brand-dark: #056a91;
    --tsv-gold: #c88a16;
    --tsv-border: #e7c878;
    margin: 16px 0;
    color: var(--tsv-ink);
    font-size: 14px;
}

.tsv-product-rewards *,
.tsv-product-rewards *::before,
.tsv-product-rewards *::after {
    box-sizing: border-box;
}

.tsv-pr-first {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 13px 15px;
    border: 1px solid #cde4ff;
    border-left: 4px solid #2d8cff;
    border-radius: 9px;
    background: #edf6ff;
    box-shadow: 0 4px 14px rgba(16, 42, 67, .06);
}

.tsv-pr-first__copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.tsv-pr-first__copy small {
    color: #1763a6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.tsv-pr-first__copy strong {
    color: #0750a1;
    font-size: 14px;
    line-height: 1.35;
}

.tsv-product-rewards details {
    overflow: hidden;
    border: 1px solid var(--tsv-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffdf5 0%, #fffaf0 100%);
    box-shadow: 0 8px 24px rgba(153, 111, 19, .08);
}

.tsv-product-rewards summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 18px;
    border-bottom: 1px solid #f1e7bb;
    color: var(--tsv-gold);
    cursor: pointer;
    list-style: none;
}

.tsv-product-rewards summary::-webkit-details-marker {
    display: none;
}

.tsv-product-rewards summary::after {
    content: '⌄';
    flex: 0 0 auto;
    color: var(--tsv-gold);
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-2px);
    transition: transform .2s ease;
}

.tsv-product-rewards details[open] summary::after {
    transform: rotate(180deg) translateY(-2px);
}

.tsv-pr-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 16px;
}

.tsv-pr-summary-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tsv-pr-summary-meta {
    margin-left: auto;
    color: #9b7a2d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tsv-pr-progress {
    margin: 15px 14px 13px;
    padding: 14px 15px;
    border: 1px solid #cfe7ef;
    border-radius: 12px;
    background: #fff;
}

.tsv-pr-progress__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--tsv-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tsv-pr-progress__header strong {
    color: var(--tsv-brand-dark);
    font-size: 13px;
}

.tsv-pr-progress p {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
    margin: 7px 0 10px;
    color: var(--tsv-muted);
    font-size: 13px;
    line-height: 1.45;
}

.tsv-pr-progress p strong {
    color: var(--tsv-brand-dark);
}

.tsv-pr-progress__bar {
    height: 9px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0f4;
}

.tsv-pr-progress__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tsv-brand-dark), #1fc2dd);
    transition: width .25s ease;
}

.tsv-product-rewards ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0 14px;
    list-style: none;
}

.tsv-product-rewards li {
    display: grid;
    grid-template-columns: 14px minmax(62px, 78px) minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid rgba(16, 42, 67, .05);
    border-radius: 10px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 7px rgba(16, 42, 67, .035);
}

.tsv-pr-tier-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border: 2px solid #d9dfe5;
    border-radius: 50%;
}

.tsv-product-rewards li.is-unlocked .tsv-pr-tier-marker {
    border-color: var(--tsv-brand);
    background: var(--tsv-brand);
}

.tsv-product-rewards li.is-unlocked .tsv-pr-tier-marker::after {
    content: '✓';
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.tsv-pr-tier-min {
    color: var(--tsv-ink);
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
}

.tsv-pr-tier-benefit {
    min-width: 0;
    color: #40566d;
    font-size: 13px;
    line-height: 1.35;
}

.tsv-product-rewards button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 38px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--tsv-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.tsv-product-rewards button:hover:not(.is-locked) {
    background: var(--tsv-brand-dark);
    transform: translateY(-1px);
}

.tsv-product-rewards button:active:not(.is-locked) {
    transform: translateY(0);
}

.tsv-product-rewards button:focus-visible,
.tsv-pr-view-cart:focus-visible {
    outline: 3px solid #ffcf4e;
    outline-offset: 2px;
}

.tsv-product-rewards button.is-locked {
    border-color: #bcdde5;
    background: #edf7f9;
    color: #07556a;
}

.tsv-product-rewards button.is-copied {
    border-color: #15803d;
    background: #16a34a;
    color: #fff;
}

.tsv-product-rewards button.is-applied {
    border-color: var(--tsv-brand-dark);
    background: var(--tsv-brand-dark);
    color: #fff;
}

.tsv-pr-foot {
    margin: 13px 14px 16px;
    color: #7a8da3;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.tsv-pr-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 14px 16px;
    padding: 11px 12px;
    border: 1px solid #cce8d4;
    border-radius: 9px;
    background: #f1fbf3;
}

.tsv-pr-status {
    margin: 0;
    color: #176235;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.tsv-pr-status.is-error {
    color: #b42318;
}

.tsv-pr-view-cart {
    display: inline-block;
    flex: 0 0 auto;
    padding: 10px 12px;
    border-radius: 7px;
    background: var(--tsv-brand);
    color: #fff !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.tsv-pr-view-cart:hover {
    background: var(--tsv-brand-dark);
    color: #fff;
}

@media (max-width: 560px) {
    .tsv-pr-first {
        align-items: stretch;
        flex-direction: column;
    }

    .tsv-pr-first .tsv-pr-coupon {
        width: 100%;
    }

    .tsv-pr-summary-meta {
        display: none;
    }

    .tsv-product-rewards li {
        grid-template-columns: 14px minmax(0, 1fr) auto;
        row-gap: 4px;
        align-items: center;
    }

    .tsv-pr-tier-marker {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .tsv-pr-tier-min {
        grid-column: 2;
        grid-row: 1;
    }

    .tsv-pr-tier-benefit {
        grid-column: 2;
        grid-row: 2;
    }

    .tsv-product-rewards li .tsv-pr-coupon {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .tsv-pr-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .tsv-pr-view-cart {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .tsv-product-rewards summary {
        padding-right: 14px;
        padding-left: 14px;
    }

    .tsv-pr-summary-title {
        font-size: 14px;
    }

    .tsv-product-rewards ul {
        padding-right: 10px;
        padding-left: 10px;
    }
}
