/**
 * LeanDeals brand theme for CookieConsent.
 *
 * Overrides only the library's --cc-* custom properties, so vendor/cookieconsent.css
 * stays untouched and can be swapped for a newer release without redoing this.
 *
 * Deliberately self-contained: privacy.html and terms.html have no Tailwind, so
 * nothing here may depend on it.
 */

#cc-main {
  /* Slightly above the library's 16px default — matches the landing's larger base. */
  font-size: 17px;

  --cc-font-family: 'Afacad Flux', Inter, system-ui, sans-serif;

  --cc-bg: #ffffff;
  --cc-primary-color: #000000;
  --cc-secondary-color: #4b5563;
  --cc-link-color: #5A9B65;

  --cc-modal-border-radius: 0.75rem;
  --cc-btn-border-radius: 0.5rem;
  --cc-overlay-bg: rgba(13, 20, 16, 0.65);

  /* Accept — the filled primary, same as the site's Button variant. */
  --cc-btn-primary-bg: #5A9B65;
  --cc-btn-primary-color: #ffffff;
  --cc-btn-primary-border-color: #5A9B65;
  --cc-btn-primary-hover-bg: #7BAF84;
  --cc-btn-primary-hover-color: #ffffff;
  --cc-btn-primary-hover-border-color: #7BAF84;

  /* Reject — outlined green rather than grey. Same footprint as Accept, so the
     two read as equal choices; a muted reject button is a dark pattern. */
  --cc-btn-secondary-bg: #ffffff;
  --cc-btn-secondary-color: #000000;
  --cc-btn-secondary-border-color: #5A9B65;
  --cc-btn-secondary-hover-bg: #DEEBE0;
  --cc-btn-secondary-hover-color: #000000;
  --cc-btn-secondary-hover-border-color: #5A9B65;

  --cc-separator-border-color: #DEEBE0;
  --cc-section-category-border: #DEEBE0;

  --cc-cookie-category-block-bg: #f6faf7;
  --cc-cookie-category-block-border: #DEEBE0;
  --cc-cookie-category-block-hover-bg: #DEEBE0;
  --cc-cookie-category-block-hover-border: #ACCDB2;
  --cc-cookie-category-expanded-block-bg: #ffffff;
  --cc-cookie-category-expanded-block-hover-bg: #f6faf7;

  --cc-toggle-on-bg: #5A9B65;
  --cc-toggle-off-bg: #9ca3af;
  --cc-toggle-on-knob-bg: #ffffff;
  --cc-toggle-off-knob-bg: #ffffff;
  --cc-toggle-enabled-icon-color: #5A9B65;
  --cc-toggle-disabled-icon-color: #9ca3af;
  --cc-toggle-readonly-bg: #ACCDB2;
  --cc-toggle-readonly-knob-bg: #ffffff;
  --cc-toggle-readonly-knob-icon-color: #5A9B65;

  --cc-footer-bg: #f6faf7;
  --cc-footer-color: #4b5563;
  --cc-footer-border-color: #DEEBE0;
}

/* The bar sits above the sticky header on index.html and docs/ (z-50). */
#cc-main {
  --cc-z-index: 2147483000;
}

#cc-main .cm__title,
#cc-main .pm__title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/**
 * Reject: outlined rather than filled.
 *
 * equalWeightButtons gives accept and reject the same primary class, which is
 * what the law cares about — identical size, identical placement, neither
 * hidden. Two identical green buttons side by side are easy to mis-click
 * though, so only the fill differs. Do not make this smaller, greyer or move
 * it: that turns a compliant choice into a dark pattern.
 */
#cc-main .cm__btn[data-role="necessary"],
#cc-main .pm__btn[data-role="necessary"] {
  background: #ffffff;
  color: #000000;
  border-color: #5A9B65;
}

#cc-main .cm__btn[data-role="necessary"]:hover,
#cc-main .pm__btn[data-role="necessary"]:hover {
  background: #DEEBE0;
  color: #000000;
  border-color: #5A9B65;
}

/* Section copy inherits the muted body colour, so links need saying explicitly. */
#cc-main .cm__desc a,
#cc-main .pm__section a,
#cc-main .pm__section-desc a {
  color: #5A9B65;
  text-decoration: underline;
}

/* "Always on" pill next to the necessary category. */
#cc-main .pm__badge {
  background: #ACCDB2;
  color: #1f2937;
}

/**
 * Footer "cookie settings" trigger.
 *
 * A <button>, because it performs an action rather than navigating — but it has
 * to sit among the footer's links without looking like a form control. Colour is
 * inherited so the same class works on the dark footer of index.html/docs and on
 * the light one of privacy.html/terms.html.
 */
.ld-cookie-prefs {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
