/*
 * Brand fill — #56A3A6 is the colour of every filled block, button, tab and chip.
 *
 * White text fails on #56A3A6 (2.9:1), so everything sitting on it is ink #1F2326 (5.4:1).
 * Hover and "pressed" states go one step darker (#1C4A4C) with white text (9.8:1).
 * Photo cards keep their dark shade and white text: the photo decides the contrast there.
 *
 * Loaded after every other stylesheet of the plugin, with higher specificity, so it wins
 * without editing the original files. Switch it off: Settings → General → "Brand fill colour".
 */

/* ---------- 1. Tokens ---------- */
:root{
  --kb-fill:#56A3A6;
  --kb-fill-ink:#1F2326;
  --kb-fill-ink-m:#1F2326;
  --kb-fill-line:rgba(31,35,38,.22);
  --kb-fill-hover:#1C4A4C;
}

/* ---------- 2. Big blocks: heroes, bands, panels, bars ---------- */
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,
  .kb-el-cta--forest .kb-el-cta,.kb-el-cta--terra .kb-el-cta,.kb-film__hero:not(.has-image),.kb-film__sec.is-dark,
  .kb-planhero,.kb-bookbar,.kb-nav,.kb-ctaband__inner,.kb-bcard--trip,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead,.kb-ask__head){
  background-color:var(--kb-fill)!important;background-image:none;color:var(--kb-fill-ink)!important;
  --kb-inv:var(--kb-fill-ink);--kb-invm:var(--kb-fill-ink-m);--kb-invb:var(--kb-fill-line);--kb-border-inv:rgba(31,35,38,.35);
  border-color:var(--kb-fill-line);
}
/* every word inside them, except inside photo cards, buttons and form fields */
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,
  .kb-el-cta--forest .kb-el-cta,.kb-el-cta--terra .kb-el-cta,.kb-film__hero:not(.has-image),.kb-film__sec.is-dark,
  .kb-planhero,.kb-bookbar,.kb-nav,.kb-ctaband__inner,.kb-bcard--trip,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead,.kb-ask__head)
  :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,span,b,strong,small,em,i,time,label,figcaption,blockquote,cite,a,div,button):not(.kb-btn,.kb-btn2,[class*="btn"],[class*="__go"],.kb-bookbar__deps,.kb-tpanel__all,[type=submit]):not(:is(.kb-tcard,.kb-card2,.kb-card,.kb-photo,.kb-btn,.kb-btn2,[class*="btn"],[class*="__go"],.kb-bookbar__deps,.kb-tpanel__all,form,[class*="__form"],.kb-ask__lang) *){
  color:var(--kb-fill-ink)!important;
}
html body .kb-trip.kb-trip .kb-nav a{color:var(--kb-fill-ink-m)!important}
html body .kb-trip.kb-trip .kb-nav a:hover,html body .kb-trip.kb-trip .kb-nav a.is-on{color:var(--kb-fill-ink)!important;box-shadow:inset 0 -2px 0 var(--kb-fill-ink)}
html body :is(.kb-hero2,.kb-planhero,.kb-tray,.kb-bookbar,.kb-tpanel) [class*="__l"],
html body :is(.kb-hero2) dt{color:var(--kb-fill-ink-m)!important}
html body :is(.kb-tray,.kb-bookbar){border-top-color:var(--kb-fill-line)!important}

/* Buttons that sit on a filled block go dark, so they still stand out. */
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,.kb-el-cta,.kb-film__sec.is-dark,.kb-film__hero:not(.has-image),.kb-planhero,.kb-bookbar,.kb-ctaband__inner,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead)
  :is(.kb-btn:not(.kb-btn--ghost),.kb-btn2:not(.kb-btn2--ghost),.kb-film__btn.is-primary,[class*="__go"],.kbj-btn,[type=submit]){
  background:var(--kb-fill-hover)!important;border-color:var(--kb-fill-hover)!important;color:#fff!important;
}
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,.kb-el-cta,.kb-film__sec.is-dark,.kb-film__hero:not(.has-image),.kb-planhero,.kb-bookbar,.kb-ctaband__inner,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead)
  :is(.kb-btn:not(.kb-btn--ghost),.kb-btn2:not(.kb-btn2--ghost),.kb-film__btn.is-primary,[class*="__go"],.kbj-btn,[type=submit]):hover{
  background:#12393B!important;border-color:#12393B!important;color:#fff!important;
}
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,.kb-el-cta,.kb-film__sec.is-dark,.kb-planhero,.kb-bookbar,.kb-ctaband__inner,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead)
  :is(.kb-btn--ghost,.kb-btn2--ghost,.kb-bookbar__deps,.kb-tpanel__all,.kb-film__btn:not(.is-primary)){
  background:transparent!important;border-color:var(--kb-fill-ink)!important;color:var(--kb-fill-ink)!important;
}
html body :is(#kb-bf,.kb-hero2,.kb-band,.kb-tray,.kb-bcta,.kb-bhero,.kb-tpanel,.kb-dephero,.kb-el-cta,.kb-film__sec.is-dark,.kb-planhero,.kb-bookbar,.kb-ctaband__inner,.kbj-enquire,.kb-stay__cta,.kb-trip .kb-lead)
  :is(.kb-btn--ghost,.kb-btn2--ghost,.kb-bookbar__deps,.kb-tpanel__all,.kb-film__btn:not(.is-primary)):hover{
  background:var(--kb-fill-ink)!important;border-color:var(--kb-fill-ink)!important;color:#fff!important;
}

/* ---------- 3. Buttons on white ---------- */
html body .kb-trip.kb-trip .kb-btn:not(.kb-btn--ghost),html body .kb-trip--part .kb-btn:not(.kb-btn--ghost),
html body .kb-panel .kb-btn2:not(.kb-btn2--ghost),html body .kb-sec .kb-btn2:not(.kb-btn2--ghost),
html body .kb-atlas-page.kb-atlas-page .kb-btn2,
html body .kb-pdf__go,html body .kb-trip .kb-search__go,html body .kb-film__btn.is-primary,
html body .kb-trip .kb-hdep__btn,html body .kb-trip.kb-trip .kb-gd__join,html body .kb-trip.kb-trip .kb-gd__morebtn{
  background:var(--kb-fill)!important;border-color:var(--kb-fill)!important;color:var(--kb-fill-ink)!important;background-image:none!important;
}
html body .kb-trip.kb-trip .kb-btn:not(.kb-btn--ghost):is(:hover,:focus-visible),html body .kb-trip--part .kb-btn:not(.kb-btn--ghost):is(:hover,:focus-visible),
html body .kb-panel .kb-btn2:not(.kb-btn2--ghost):hover,html body .kb-sec .kb-btn2:not(.kb-btn2--ghost):hover,
html body .kb-atlas-page.kb-atlas-page .kb-btn2:hover,
html body .kb-pdf__go:hover,html body .kb-trip .kb-search__go:hover,html body .kb-film__btn.is-primary:hover,
html body .kb-trip .kb-hdep__btn:hover,html body .kb-trip.kb-trip .kb-gd__join:hover,html body .kb-trip.kb-trip .kb-gd__morebtn:hover{
  background:var(--kb-fill-hover)!important;border-color:var(--kb-fill-hover)!important;color:#fff!important;
}
/* a button's own text and icons follow the button */
html body :is(.kb-btn,.kb-btn2,.kb-pdf__go,.kb-search__go,.kb-hdep__btn,.kb-gd__join,.kb-gd__morebtn) :is(span,b,svg,i){color:inherit!important;fill:currentColor}

/* ---------- 4. Chosen chips, tabs, switches and date tiles ---------- */
html body :is(.kb-chip[aria-pressed=true],.kb-add[aria-pressed=true],.kb-month[aria-pressed=true],
  .kb-bpager .page-numbers.current,.kb-trip .kb-depf__year.is-on,.kb-trip .kb-depf__month.is-on,
  .kb-trip .kb-gd__chip[aria-pressed="true"],.kb-trip .kb-rc__tab[aria-selected="true"],
  .kb-viewsw__b.is-on,.kb-yearsw__b.is-on,.kb-trip .kb-tab.is-on),
html body .kb-atlas-page.kb-atlas-page :is(.kb-chip,.kb-add,.kb-month)[aria-pressed=true],
html body .kb-trip.kb-trip :is(.kb-gd__chip[aria-pressed="true"],.kb-rc__tab[aria-selected="true"],.kb-viewsw__b.is-on){
  background:var(--kb-fill)!important;border-color:var(--kb-fill)!important;color:var(--kb-fill-ink)!important;
}
html body :is(.kb-trip .kb-hdep__date,.kb-trip .kb-gd__d){background:var(--kb-fill)!important;color:var(--kb-fill-ink)!important}
html body :is(.kb-trip .kb-hdep__date,.kb-trip .kb-gd__d) :is(b,span){color:var(--kb-fill-ink)!important}
html body :is(.kb-switch input:checked+.kb-switch__track,.kb-opt input:checked+.kb-opt__box){background:var(--kb-fill)!important;border-color:var(--kb-fill)!important}
html body .kb-el-list--check li::before{background:var(--kb-fill)!important;color:var(--kb-fill-ink)!important}

/* ---------- 5. Trip page ("journal"), stays, reviews block, the Ask button ---------- */
html body .kbj .kbj-btn,html body .kbj-enquire__form button[type=submit]{background:var(--kb-fill)!important;border-color:var(--kb-fill)!important;color:var(--kb-fill-ink)!important}
html body .kbj .kbj-btn:hover,html body .kbj-enquire__form button[type=submit]:hover{background:var(--kb-fill-hover)!important;border-color:var(--kb-fill-hover)!important;color:#fff!important}
html body .kbj-enquire .kbj-enquire__form{color:var(--kb-fill-ink)}
html body .kbj-nav__links a.is-on,html body .kbj-route__map span,html body .kbj-table thead th,
html body :is(.kbj-stops li:first-child,.kbj-stops li:last-child)::before,
html body .kb-stays__row button.is-on,html body .kb-stay-level--ultra-luxury,html body .kb-ask__tab{
  background:var(--kb-fill)!important;border-color:var(--kb-fill)!important;color:var(--kb-fill-ink)!important;
}
html body .kb-ask__tab:hover{background:var(--kb-fill-hover)!important;color:#fff!important}
html body .kb-ask__head :is(.kb-ask__lang button,.kb-ask__icon){color:var(--kb-fill-ink)!important}
html body .kb-ask__head .kb-ask__lang button.is-on{background:var(--kb-fill-ink)!important;color:#fff!important}
html body .kb-chat__row button:hover{background:var(--kb-fill-hover)!important;color:#fff!important}
html body :is(#kb-bf,.kb-bcard--trip,.kb-bcta) .kb-btrip__go,html body :is(#kb-bf,.kb-bcta) .kb-bcta__ask{color:var(--kb-fill-ink)!important;text-decoration:underline;text-underline-offset:3px}
/* a white form card inside a filled block: its button is on white again */
html body :is(#kb-bf,.kbj-enquire__form) button[type=submit]{background:var(--kb-fill)!important;border-color:var(--kb-fill)!important;color:var(--kb-fill-ink)!important}
html body :is(#kb-bf,.kbj-enquire__form) button[type=submit]:hover{background:var(--kb-fill-hover)!important;border-color:var(--kb-fill-hover)!important;color:#fff!important}
