/* Scrimpr Cashback Pages — self-contained styles.
   Section 1 mirrors the offer-pages design system (so this plugin has no runtime
   dependency on another plugin's CSS). Section 2 is the cashback-specific UI. */

/* ===== 1. Design system (bundled) ===== */
.cb-page {
    --gpt-shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --gpt-shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
    --gpt-accent: #1F6A95;
    --gpt-accent-light: #3b9dd1;
    max-width: 1200px; margin: 0 auto; padding: 16px;
    font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px; color: #374151; line-height: 1.6;
}
.cb-page .gpt-offer-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.cb-page .gpt-offer-main { min-width: 0; }
.cb-page .gpt-offer-breadcrumbs-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.cb-page .gpt-offer-breadcrumbs { font-size: 13px; color: #64748b; margin: 0; padding: 0; }
.cb-page .gpt-offer-breadcrumbs a { color: #1F6A95; text-decoration: none; }
.cb-page .gpt-offer-breadcrumbs a:hover { text-decoration: underline; }
.cb-page .breadcrumb-sep { margin: 0 4px; color: #cbd5e1; }
.cb-page .breadcrumb-current { color: #374151; }
.cb-page .gpt-offer-section { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--gpt-shadow-sm); position: relative; overflow: hidden; }
.cb-page .gpt-offer-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gpt-accent), var(--gpt-accent-light)); }
.cb-page .gpt-offer-section__title { margin: 0 0 16px; font-size: 1.25rem; font-weight: 700; color: #1E293B; }
.cb-page .gpt-offer-section p { margin: 0 0 8px; line-height: 1.6; }
.cb-page .gpt-offer-section p:last-child { margin-bottom: 0; }
.cb-page .gpt-offer-recommendation { border-color: #bbf7d0; background: #f0fdf4; }
.cb-page .gpt-offer-recommendation::before { background: linear-gradient(90deg, #16A34A, #4ade80); }
.cb-page .gpt-offer-guide { margin: 0; padding: 0; list-style: none; counter-reset: guide-step; }
.cb-page .gpt-offer-guide__step { counter-increment: guide-step; position: relative; padding-left: 40px; margin-bottom: 16px; }
.cb-page .gpt-offer-guide__step:last-child { margin-bottom: 0; }
.cb-page .gpt-offer-guide__step::before { content: counter(guide-step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: #1F6A95; color: #fff; border-radius: 50%; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cb-page .gpt-offer-guide__step strong { display: block; font-size: 14px; color: #1E293B; margin-bottom: 4px; }
.cb-page .gpt-offer-guide__step p { margin: 0; font-size: 14px; color: #475569; line-height: 1.6; }
.cb-page .gpt-offer-chart-container { height: 250px; background: #f8f9fa; border-radius: 8px; padding: 16px; }
.cb-page .gpt-offer-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.cb-page .gpt-offer-related__card { display: flex; align-items: center; gap: 8px; padding: 16px; background: #fff; border: 1px solid #e9ecef; border-radius: 8px; text-decoration: none; color: #374151; box-shadow: var(--gpt-shadow-sm); transition: box-shadow .15s, transform .15s, border-color .15s; }
.cb-page .gpt-offer-related__card:hover { border-color: var(--gpt-accent); box-shadow: var(--gpt-shadow-md); transform: translateY(-2px); }
.cb-page .gpt-offer-related__image { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; background: #fff; flex-shrink: 0; }
.cb-page .gpt-offer-related__name { display: block; font-weight: 600; font-size: 14px; color: #1E293B; }
.cb-page .gpt-offer-related__payout { display: block; font-size: 13px; color: #16A34A; font-weight: 500; }
.cb-page .gpt-offer-related__more { text-align: center; }
.cb-page .gpt-offer-sidebar { position: sticky; top: 16px; }
.cb-page .gpt-offer-sidebar__card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--gpt-shadow-sm); }
.cb-page .gpt-offer-sidebar__title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #1E293B; }
.cb-page .gpt-offer-toc__list { list-style: none; margin: 0; padding: 0; }
.cb-page .gpt-offer-toc__list li { margin-bottom: 4px; }
.cb-page .gpt-offer-toc__link { display: block; padding: 4px 8px; border-radius: 6px; font-size: 13px; color: #374151; text-decoration: none; }
.cb-page .gpt-offer-toc__link:hover { background: #f0f8ff; color: #1F6A95; }
.cb-page .gpt-offer-cta-btn { display: block; text-align: center; padding: 9px 16px; background: #1F6A95; color: #fff; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; }
.cb-page .gpt-offer-cta-btn:hover { background: #034063; color: #fff; }
.cb-page .gpt-offer-sidebar__best-link { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f0fff4; border: 1px solid #bbf7d0; border-radius: 8px; color: #374151; }
.cb-page .gpt-offer-sidebar__best-name { flex: 1; font-weight: 500; }
.cb-page .gpt-offer-sidebar__best-payout { font-weight: 700; color: #16A34A; }
@media (max-width: 900px) {
    .cb-page .gpt-offer-layout { grid-template-columns: 1fr 250px; gap: 16px; }
    .cb-page .gpt-offer-related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cb-page.gpt-offer-page { padding: 16px 8px; }
    .cb-page .gpt-offer-layout { grid-template-columns: 1fr; gap: 0; }
    .cb-page .gpt-offer-sidebar { position: static; }
    .cb-page .gpt-offer-related__grid { grid-template-columns: 1fr; }
}

/* ===== 2. Cashback-specific UI ===== */
.cb-muted { font-size: 12px; color: #94a3b8; margin: 10px 0 0; }
.cb-note { font-size: 12px; color: #64748b; background: #f8fafc; border: 1px solid #eef2f5; border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; line-height: 1.5; }

/* Save (heart) + alert (mail) actions */
.cb-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cb-act {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border: 1px solid #cbd5e1; border-radius: 999px;
    background: #fff; color: #334155; font-size: 14px; font-weight: 600;
    line-height: 1; text-decoration: none; cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.cb-act:disabled { opacity: .6; cursor: default; }
.cb-act__icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Heart */
.cb-act--heart:hover { border-color: #fca5a5; color: #dc2626; }
.cb-act--heart.is-on { border-color: #fecaca; background: #fef2f2; color: #dc2626; }
.cb-act--heart.is-on .cb-act__icon { fill: #dc2626; stroke: #dc2626; }
/* Mail */
.cb-act--mail:hover { border-color: #16a34a; color: #15803d; }
.cb-act--mail.is-on { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.cb-act--mail.is-on .cb-act__icon { stroke: #15803d; }
.cb-actions__hint { font-size: 12px; color: #94a3b8; }
.cb-actions__hint a { color: #16a34a; }

/* Provider logos (same assets as the cashback tool's source badges) */
.cb-plogo {
    display: inline-block; width: 30px; height: 30px; flex-shrink: 0;
    background-size: contain; background-repeat: no-repeat; background-position: center;
    border-radius: 6px; background-color: #fff;
}
.cb-page .topcashback_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2025/08/Topcashback-Logo.webp'); }
.cb-page .quidco_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/Quidco-Cashback-App-Website-Logo.webp'); }
.cb-page .rakuten_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/Rakuten-Cashback-App-Website-Logo.webp'); }
.cb-page .swagbucks_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/Swagbucks-Savings-Cashback-App-Website-Logo.webp'); }
.cb-page .custard_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2025/01/Custard-Logo.webp'); }
.cb-page .kidstart_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/KidStart-Cashback-App-Website-Logo.webp'); }
.cb-page .avios_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/Avios-Cashback-App-Website-Logo.webp'); }
.cb-page .budgey_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2025/11/Budgey-App-Logo.webp'); }
.cb-page .picodi_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2024/09/Picodi-Cashback-App-Website-Logo.webp'); }
.cb-page .completesavings_image { background-image: url('https://scrimpr.co.uk/wp-content/uploads/2025/12/Complete-Savings-Logo.webp'); }

/* Light hero */
.cb-hero {
    display: flex; gap: 22px; align-items: stretch; flex-wrap: wrap;
    background: #fff; border: 1px solid #e9ecef; border-radius: 12px;
    padding: 22px; margin-bottom: 16px; box-shadow: var(--gpt-shadow-sm);
}
.cb-hero__info { display: flex; gap: 16px; flex: 1; min-width: 240px; }
.cb-hero__logo { width: 72px; height: 72px; border-radius: 16px; object-fit: contain; border: 1px solid #f0f0f0; background: #fff; flex-shrink: 0; }
.cb-cat-pill { display: inline-block; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; }
.cb-hero__title { font-size: 1.6rem; font-weight: 700; color: #1E293B; margin: 0 0 6px; line-height: 1.15; }
.cb-hero__subtitle { font-size: 0.95rem; color: #475569; margin: 0 0 12px; line-height: 1.4; max-width: 52ch; }
.cb-hero__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-pill { font-size: 12px; font-weight: 500; color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 16px; }
.cb-pill--live { color: #16A34A; background: #dcfce7; border-color: #bbf7d0; }
.cb-pill--up { color: #b45309; background: #fef3c7; border-color: #fde68a; }

.cb-hero__best { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 12px; padding: 16px 18px; width: 240px; flex-shrink: 0; }
.cb-hero__best-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #15803d; text-transform: uppercase; }
.cb-hero__best-rate { font-size: 36px; font-weight: 800; color: #15803d; line-height: 1; margin: 4px 0; }
.cb-hero__best-src { font-size: 13px; color: #475569; margin-bottom: 12px; }
.cb-hero__cta { display: block; text-align: center; background: #16A34A; color: #fff; font-weight: 700; font-size: 14px; padding: 11px; border-radius: 10px; text-decoration: none; }
.cb-hero__cta:hover { background: #15803D; color: #fff; }
.cb-hero__stack { font-size: 12px; color: #b45309; margin-top: 10px; }

.cb-funding { font-size: 12px; color: #94a3b8; margin: 0 0 20px; line-height: 1.5; }

/* Ranked provider rows */
.cb-rows { display: flex; flex-direction: column; gap: 8px; }
.cb-prow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #f1f1f1; border-radius: 10px; }
.cb-prow--best { background: #f0fff4; border-color: #bbf7d0; }
.cb-rank { width: 26px; height: 26px; border-radius: 50%; background: #e5e7eb; color: #64748b; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cb-rank--1 { background: #f59e0b; color: #fff; }
.cb-rank--2 { background: #9ca3af; color: #fff; }
.cb-rank--3 { background: #d97706; color: #fff; }
.cb-prow__main { flex: 1; min-width: 0; }
.cb-prow__name { font-size: 14px; font-weight: 600; color: #1E293B; }
.cb-best-pill { font-size: 10px; font-weight: 700; background: #16A34A; color: #fff; padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.cb-bar { height: 5px; background: #eef2f5; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.cb-bar span { display: block; height: 100%; background: #94a3b8; border-radius: 3px; }
.cb-prow--best .cb-bar span { background: #16A34A; }
.cb-prow__rate { font-size: 17px; font-weight: 800; color: #1E293B; width: 56px; text-align: right; }
.cb-prow--best .cb-prow__rate { color: #15803d; }
.cb-visit { font-size: 13px; font-weight: 600; color: #fff; background: #16A34A; padding: 7px 16px; border-radius: 8px; text-decoration: none; flex-shrink: 0; }
.cb-visit:hover { background: #15803D; color: #fff; }

/* Rate history */
.cb-rh-insight { font-size: 14px; color: #4b5563; margin: 0 0 14px; }
.cb-rh-hint { margin: 0 0 8px !important; }
.cb-rh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.cb-rh-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; cursor: pointer; font: inherit; }
.cb-rh-card.is-active { border-color: #1E293B; background: #fff; box-shadow: var(--gpt-shadow-sm); }
.cb-rh-card .cb-plogo { width: 24px; height: 24px; margin-bottom: 4px; }
.cb-rh-card__name { font-size: 13px; font-weight: 600; color: #1E293B; }
.cb-rh-card__rate { font-size: 18px; font-weight: 800; color: #1E293B; }
.cb-rh-card__chg { font-size: 11px; font-weight: 600; color: #94a3b8; }
.cb-rh-card__chg.up { color: #15803d; }
.cb-rh-card__chg.down { color: #b91c1c; }

.cb-rh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cb-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #eee; border-radius: 10px; }
.cb-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; }
.cb-stat strong { font-size: 18px; font-weight: 700; color: #1E293B; }

/* Tracking checklist */
.cb-check { list-style: none; margin: 14px 0 0; padding: 0; }
.cb-check li { position: relative; padding: 0 0 12px 30px; font-size: 14px; color: #475569; line-height: 1.55; }
.cb-check li:last-child { padding-bottom: 0; }
.cb-check li::before { content: '\2713'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: #dcfce7; color: #15803d; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cb-check strong { color: #1E293B; }

/* Tips */
.cb-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cb-tip { padding: 14px 16px; border: 1px solid #e9ecef; border-radius: 10px; background: #fff; }
.cb-tip strong { display: block; font-size: 14px; color: #1E293B; margin-bottom: 4px; }
.cb-tip p { margin: 0; font-size: 13px; color: #475569; line-height: 1.5; }

/* FAQ */
.cb-faq { border: 1px solid #e9ecef; border-radius: 10px; overflow: hidden; }
.cb-faq__item { border-bottom: 1px solid #f0f0f0; }
.cb-faq__item:last-child { border-bottom: none; }
.cb-faq__item summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 600; font-size: 15px; color: #1E293B; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cb-faq__item summary::-webkit-details-marker { display: none; }
.cb-faq__item summary::after { content: '+'; color: #94a3b8; font-size: 20px; font-weight: 400; }
.cb-faq__item[open] summary::after { content: '\2013'; }
.cb-faq__a { padding: 0 16px 16px; font-size: 14px; color: #475569; line-height: 1.6; }

@media (max-width: 768px) {
    .cb-hero__best { width: 100%; }
    .cb-rh-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .cb-hero__info { flex-direction: column; }
}
