/*
 * Shared look for brand themes of the v2 whitelabel design (Clean & Glossy, Money4Travel, ...).
 * Colours come from each theme's tokens (wl_v2_theme_tokens()): --color-* plus two highlight
 * colours, --wl-hl (highlighted words on light backgrounds) and --wl-hl-on-dark (on dark bands).
 * Montserrat (SIL Open Font Licence) is bundled, so no font is fetched from a third party.
 */
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Variable.woff2?v=1") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.wl-brand-theme { background: var(--color-canvas); color: var(--color-text); }
.wl-brand-theme,
.wl-brand-theme button,
.wl-brand-theme input,
.wl-brand-theme select,
.wl-brand-theme textarea { font-family: var(--font-family-brand); }
.wl-brand-theme :is(h1, h2, h3, .wl-h3, .wl-h4) { font-family: var(--font-family-brand); font-weight: 700; letter-spacing: -0.01em; }
.wl-brand-theme .fw-800 { font-weight: 700; }

/* Highlighted words: solid colour, deeper on light backgrounds and lighter on dark bands. */
.wl-brand-theme .gradient-text { background: none; -webkit-text-fill-color: currentColor; color: var(--wl-hl); }
.wl-brand-theme :is(.wl-welcome, .wl-bp, .cta-section, .brand-banner, .reward-section) .gradient-text,
.wl-brand-theme .wl-bp-rate,
.wl-brand-theme .subpage-brand-banner .gradient-text { color: var(--wl-hl-on-dark); -webkit-text-fill-color: var(--wl-hl-on-dark); }
.wl-brand-theme .wl-stat-extra { color: var(--wl-hl-on-dark); }
.wl-brand-theme .wl-bp-last a { color: #fff; text-decoration: underline; }

/* Buttons and controls. */
.wl-brand-theme :is(.btn, .wl-usual-btn, .voucher-continue-btn, .amount-chip, .wl-buy-bar-btn, .wl-again-row .btn),
.wl-brand-theme .header-search-form button,
.wl-brand-theme .wl-welcome-search button { border-radius: 8px !important; }
.wl-brand-theme .btn { font-weight: 600; }
.wl-brand-theme .dark-green-btn,
.wl-brand-theme .voucher-continue-btn { background: var(--color-brand-dark) !important; color: #fff !important; }
.wl-brand-theme .dark-green-btn:hover,
.wl-brand-theme .voucher-continue-btn:hover { background: var(--color-brand-mid) !important; }
.wl-brand-theme .wl-text-btn { color: var(--color-brand-dark); }
.wl-brand-theme :is(.wl-welcome, .wl-bp, .cta-section) .wl-text-btn { color: #fff; }
.wl-brand-theme .wl-welcome-card .wl-text-btn { color: var(--color-brand-dark); }
.wl-brand-theme .menu-btn,
.wl-brand-theme .step-pill,
.wl-brand-theme .wl-buy-bar-btn { border-radius: 8px !important; }

/* Bands: the brand's dark colour, with the design's green/yellow imagery removed. */
.wl-brand-theme .cta-section { background: var(--color-brand-dark); }
.wl-brand-theme .brand-detail-banner,
.wl-brand-theme .brand-listing-banner { background-image: none; background-color: var(--color-brand-dark); }
.wl-brand-theme .subpage-brand-banner { background-color: var(--color-brand-dark); }
.wl-brand-theme .subpage-brand-banner :is(h1, p, .ft-16) { color: #fff; }

/* Cards, tags and badges. */
.wl-brand-theme .card-box { border: 1px solid var(--color-border); box-shadow: none; }
.wl-brand-theme .card-box .gradient-text { color: var(--wl-hl); }
.wl-brand-theme .badge.ending-soon,
.wl-brand-theme .wl-bp-badge { background: var(--color-brand-dark) !important; color: #fff !important; }
.wl-brand-theme .wl-news { box-shadow: 0 14px 30px rgba(11, 18, 38, 0.12); }

/* Text on accent buttons and panels: the theme's "on accent" colour. */
.wl-brand-theme form.header-search-form button:not(:hover) span,
.wl-brand-theme header .menu-btn:not(:hover) span { color: var(--color-on-accent); }
.wl-brand-theme .support-panel,
.wl-brand-theme .support-panel :is(h2, p, label, small, a:not(.btn)) { color: var(--color-on-accent); opacity: 1; }
.wl-brand-theme .support-panel a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.wl-brand-theme .legal-nav a { color: var(--color-on-accent); }

/* Header: the theme's header colour (components.css defaults to white). */
.wl-brand-theme header,
.wl-brand-theme header#header { background: var(--color-header-bg); color: var(--color-header-text); }

/* Small text on the theme's coloured bands and header: kept above 4.5:1. */
.wl-brand-theme .wl-account-name { color: var(--color-header-text); opacity: 1; }
.wl-brand-theme .wl-stat > span { color: #fff; opacity: 0.92; }

/* Every element uses the publisher's font (older stylesheets name "Plus Jakarta Sans" directly). */
.wl-brand-theme :is(body, output, input, select, textarea, button, .cashback-estimator, .cashback-estimator *, .modal-content, .modal-content *):not(.fa):not([class*="icon"]):not(i) { font-family: var(--font-family-brand); }
/* Tighter vertical rhythm on the home page for Money4Travel and Clean & Glossy (the default gaps looked empty). */
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) :is(#how_it_works, #site_credits, .wl-calculator-section) { padding-top: 44px; padding-bottom: 44px; }
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .wl-home-cats { padding-top: 36px; padding-bottom: 48px; }
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .wl-recent:not(:has(a, li, .wl-brand-card, article)) { padding: 0; }
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .wl-source { margin-top: 12px; margin-bottom: 0; }
@media (max-width: 767px) {
  :is(.wl-theme-money4travel, .wl-theme-cleanglossy) :is(#how_it_works, #site_credits, .wl-calculator-section) { padding-top: 32px; padding-bottom: 32px; }
  :is(.wl-theme-money4travel, .wl-theme-cleanglossy) .wl-home-cats { padding-top: 28px; padding-bottom: 36px; }
}
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .all-brands-page #choose_brands, :is(.wl-theme-money4travel, .wl-theme-cleanglossy) section#choose_brands { padding-top: 48px; padding-bottom: 40px; }
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .category-section { padding-top: 36px; padding-bottom: 48px; }
:is(.wl-theme-money4travel, .wl-theme-cleanglossy) .featured-section { padding-bottom: 8px; }
@media (max-width: 767px) {
  :is(.wl-theme-money4travel, .wl-theme-cleanglossy) section#choose_brands { padding-top: 32px; padding-bottom: 32px; }
  :is(.wl-theme-money4travel, .wl-theme-cleanglossy) .category-section { padding-top: 28px; padding-bottom: 36px; }
}

/* All brands: the search and filter boxes sit on a white page here, so they need a visible fill and outline. */
.wl-brand-theme .card-section.brand-page form.wl-brand-filters input[type="search"],
.wl-brand-theme .card-section.brand-page form.wl-brand-filters input.brand_name { background-color: var(--color-surface); border: 1px solid var(--color-border); }
.wl-brand-theme .card-section.brand-page form.wl-brand-filters select { background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: 40px; height: 48px; padding-left: 18px; padding-right: 36px; text-align: left; }
.wl-brand-theme .card-section.brand-page form.wl-brand-filters .search:focus-within input { border-color: var(--color-brand-dark); }
