/*
 * Cookie consent banner — shared by every page in web-landing.
 *
 * Every page declares its own :root tokens, but only --dark-green, --base,
 * --body and --display exist on all six. Anything else (--green, --mint) is
 * referenced with a literal fallback so the banner renders identically on the
 * legal pages, which define the smaller token set.
 */

.buds-consent,
.buds-consent * {
  box-sizing: border-box;
}

.buds-consent {
  position: fixed;
  z-index: 1000000;
  inset: auto 0 0 0;
  display: none;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--dark-green, #003020);
  color: var(--base, #fff);
  font-family: var(--body, Archivo, Arial, sans-serif);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
}

.buds-consent.is-open {
  display: block;
}

.buds-consent__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
}

.buds-consent__copy {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
}

.buds-consent__title {
  margin: 0 0 6px;
  font-family: var(--display, Anton, Impact, sans-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.buds-consent__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.buds-consent a {
  color: var(--green, #19fe84);
  text-underline-offset: 2px;
}

.buds-consent a:hover {
  text-decoration: none;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────
 * "Reject all" is an outline button against a solid "Accept all". Both sit on
 * the first layer at the same size, in the same row, with the same type — the
 * refusal is one click, exactly like acceptance. Note that the strictest
 * reading (CNIL) asks for identical visual weight; if that becomes the bar,
 * give the reject button `.buds-consent__btn` alone and drop the modifier.
 */

.buds-consent__actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.buds-consent__btn {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 12px 22px;
  border: 1.6px solid var(--base, #fff);
  border-radius: 999px;
  background: var(--base, #fff);
  color: var(--dark-green, #003020);
  font-family: var(--body, Archivo, Arial, sans-serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.buds-consent__btn:hover {
  background: var(--green, #19fe84);
  border-color: var(--green, #19fe84);
  color: var(--dark-green, #003020);
}

.buds-consent__btn--ghost {
  background: transparent;
  color: var(--base, #fff);
}

.buds-consent__btn--ghost:hover {
  background: var(--base, #fff);
  border-color: var(--base, #fff);
  color: var(--dark-green, #003020);
}

/* "Settings" carries no styling of its own — it borrows --ghost so all three
   controls read as one set. The modifier exists only to drive its own row on
   narrow screens, below the two actual choices. */

.buds-consent :focus-visible {
  outline: 2px solid var(--green, #19fe84);
  outline-offset: 3px;
}

/* ─── Settings panel ─────────────────────────────────────────────────────── */

.buds-consent__panel {
  display: none;
  max-width: 1180px;
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.buds-consent.is-settings-open .buds-consent__panel {
  display: block;
}

.buds-consent__group {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.buds-consent__group:last-of-type {
  border-bottom: 0;
}

.buds-consent__group-body {
  flex: 1 1 auto;
  min-width: 0;
}

.buds-consent__group-title {
  display: block;
  margin: 0 0 4px;
  font-weight: 700;
}

.buds-consent__group-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.buds-consent__group-vendors {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.buds-consent__toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.buds-consent__toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green, #19fe84);
  cursor: pointer;
}

.buds-consent__toggle input:disabled {
  cursor: default;
  opacity: 0.55;
}

.buds-consent__toggle-label {
  font-size: 14px;
}

.buds-consent__panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ─── Footer re-open control ─────────────────────────────────────────────── */

/* Strips the UA button chrome and nothing else. Colour, font and underline are
   left to whatever class the host page lends via data-consent-links, so the
   control is indistinguishable from the links beside it. Declaring font here
   would beat those page rules — consent.css is linked after the inline
   <style> blocks — and the button would stop matching its neighbours. */
.buds-consent-open {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* For the pages that have no link class to lend. */
.buds-consent-open--plain {
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.buds-consent-open--plain:hover {
  text-decoration: none;
}

/* ─── Blocked-embed placeholder ──────────────────────────────────────────── */

.buds-consent-placeholder {
  display: none;
  padding: 20px;
  border: 1.6px dashed currentColor;
  border-radius: 16px;
  font-family: var(--body, Archivo, Arial, sans-serif);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
}

.buds-consent-placeholder.is-visible {
  display: block;
}

.buds-consent-placeholder p {
  margin: 0 0 12px;
}

.buds-consent-placeholder .buds-consent-open--plain {
  font-weight: 700;
}

@media (max-width: 720px) {
  .buds-consent {
    max-height: 85vh;
    overflow-y: auto;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    font-size: 14px;
  }

  .buds-consent__inner {
    align-items: stretch;
  }

  .buds-consent__actions {
    width: 100%;
  }

  .buds-consent__btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .buds-consent__btn--settings {
    flex-basis: 100%;
    order: -1;
  }
}
