/* Cookie consent banner.
 *
 * Visibility is driven entirely by data-consent on <html>, which consent-boot.js
 * sets before the first paint. That means the static markup can ship on every
 * page without a flash of the wrong state, and a visitor whose JavaScript never
 * runs simply sees no banner and is never tracked.
 *
 * "Accept all" and "Reject all" are deliberately identical in size, weight and
 * position: consent that is cheaper to give than to refuse is not valid consent.
 */

.consent-banner {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 80;
  display: none;
  padding: 0 var(--gutter) max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(8, 8, 8, .98) 60%, rgba(8, 8, 8, .88));
  border-top: 1px solid var(--line);
  color: var(--paper);
}

html[data-consent="unset"] .consent-banner { display: block; }

/* Keep the banner from covering the end of the page, including the enquiry
   form's submit button on a phone. */
html[data-consent="unset"] body {
  padding-bottom: var(--consent-height, 0px);
}

.consent-inner {
  display: grid;
  gap: 1rem 2rem;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-block: 1.1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.consent-copy { min-width: 0; }

.consent-title {
  margin: 0 0 .35rem;
  font-family: "Clash Display", sans-serif;
  font-size: .95rem;
  letter-spacing: .01em;
}

.consent-message {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}

.consent-policy {
  display: inline-block;
  margin-top: .45rem;
  color: var(--paper);
  font-size: .78rem;
  text-underline-offset: .25em;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.consent-button {
  min-height: 44px;
  padding: .7rem 1.5rem;
  font: inherit;
  font-size: .84rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(242, 240, 235, .55);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.consent-accept {
  color: var(--black);
  background: var(--paper);
  border-color: var(--paper);
}

.consent-button:hover,
.consent-button:focus-visible {
  color: var(--black);
  background: var(--paper);
  border-color: var(--paper);
}

.consent-link {
  min-height: 44px;
  padding: .7rem .25rem;
  font: inherit;
  font-size: .8rem;
  color: var(--muted);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: .3em;
  cursor: pointer;
}

.consent-link:hover,
.consent-link:focus-visible { color: var(--paper); }

.consent-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: .55rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}

.consent-detail[hidden] { display: none; }

.consent-option {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--muted);
}

.consent-option input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .15rem;
  accent-color: var(--accent);
}

.consent-option--fixed { opacity: .72; }

.consent-save {
  justify-self: start;
  min-height: 44px;
  margin-top: .3rem;
  padding: .7rem 1.4rem;
  font: inherit;
  font-size: .84rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(242, 240, 235, .55);
  cursor: pointer;
}

.consent-save:hover,
.consent-save:focus-visible { color: var(--black); background: var(--paper); border-color: var(--paper); }

/* Footer control that reopens the choice at any later visit. */
.consent-reopen {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: .25em;
  cursor: pointer;
}

.consent-reopen:hover,
.consent-reopen:focus-visible { color: var(--paper); }

@media (max-width: 760px) {
  .consent-inner { grid-template-columns: minmax(0, 1fr); gap: .9rem; padding-block: 1rem; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .consent-actions .consent-link { grid-column: 1 / -1; }
  .consent-button { padding-inline: 1rem; }
  .consent-message { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-button, .consent-save { transition: none; }
}

/* ---------------------------------------------------------------------------
 * 20261009-consent01 — compact, theme-safe banner.
 *
 * site-light.css remaps --paper/--black/--muted for the light theme, which left
 * this dark banner with dark text (title and "Reject all" were unreadable).
 * The banner now pins its own palette. Accept and Reject share one identical
 * style so refusing is exactly as easy and visible as accepting (UK/EU PECR,
 * GDPR). On phones the banner is a short bottom bar instead of a tall sheet.
 * ------------------------------------------------------------------------- */
.consent-banner {
  --paper: #f2f0eb;
  --black: #10140f;
  --muted: #d3d8cb;
  --line: rgba(242, 240, 235, .24);
  color: #f2f0eb;
  background: #10140f;
  border-top: 1px solid rgba(242, 240, 235, .3);
}
.consent-banner .consent-title { color: #f2f0eb; }
.consent-banner .consent-message,
.consent-banner .consent-option { color: #d3d8cb; }
.consent-banner .consent-policy { color: #f2f0eb; }
.consent-banner .consent-link { color: #d3d8cb; }
.consent-banner .consent-link:hover,
.consent-banner .consent-link:focus-visible { color: #ffffff; }

.consent-banner .consent-button,
.consent-banner .consent-accept,
.consent-banner .consent-reject {
  color: #10140f;
  background: #f2f0eb;
  border: 1px solid #f2f0eb;
  font-weight: 600;
}
.consent-banner .consent-button:hover,
.consent-banner .consent-button:focus-visible {
  color: #10140f;
  background: #ffffff;
  border-color: #ffffff;
}
.consent-banner :focus-visible { outline: 2px solid #d69a2d; outline-offset: 2px; }
.consent-banner .consent-save { color: #f2f0eb; border-color: rgba(242, 240, 235, .7); }
.consent-banner .consent-save:is(:hover, :focus-visible) { color: #10140f; background: #f2f0eb; border-color: #f2f0eb; }

.consent-inner { padding-block: .8rem; }

/* Use the measured cookie height for both fixed product controls. */
html[data-consent="unset"] .b2b-mobile-quote { bottom: var(--consent-height, 0px); }
html[data-consent="unset"] .b2b-compare-tray { bottom: calc(var(--consent-height, 0px) + 22px); }
@media (max-width: 700px) {
  html[data-consent="unset"] .b2b-compare-tray { bottom: var(--consent-height, 0px); }
}

@media (max-width: 760px) {
  /* One short bar: message on top; Reject | Accept | (Choose individually /
     Privacy Policy) below. .consent-copy/.consent-actions become layout-
     transparent so their children share one grid; DOM and tab order unchanged. */
  .consent-banner { padding: 0 12px max(.45rem, env(safe-area-inset-bottom)); }
  .consent-inner {
    display: grid; grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto auto auto; gap: 0 .4rem; padding-block: .45rem 0;
  }
  .consent-copy, .consent-actions { display: contents; }
  .consent-title {
    position: absolute; width: 1px; height: 1px; margin: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .consent-message {
    grid-column: 1 / -1; grid-row: 1; margin: 0 0 .4rem;
    font-size: .72rem; line-height: 1.35;
  }
  .consent-reject { grid-column: 1; grid-row: 2 / span 2; }
  .consent-accept { grid-column: 2; grid-row: 2 / span 2; }
  .consent-button { min-height: 44px; padding: .4rem .5rem; font-size: .8rem; }
  .consent-actions .consent-link,
  .consent-policy {
    grid-column: 3; display: flex; align-items: center; justify-content: center;
    min-height: 22px; margin: 0; padding: 0 .1rem; font-size: .72rem;
    line-height: 1.15; max-width: 7.5rem; text-align: center;
  }
  .consent-actions .consent-link { grid-row: 2; }
  .consent-policy { grid-row: 3; }
  .consent-detail { grid-column: 1 / -1; grid-row: 4; max-height: 45vh; overflow: auto; padding-top: .5rem; }
}

/* ---------------------------------------------------------------------------
 * 20261009-fix02 — mobile fixed-bar stacking.
 * While the cookie choice is still open on a phone, the product page's fixed
 * "Request quote" bar is hidden (the same quote button stays in the page body),
 * so header + quote bar + banner no longer stack at the bottom of the screen.
 * It returns as soon as a choice is made. Short screens (≤700px tall, e.g.
 * 375×667) get a tighter banner so it stays at or near 15% of the viewport.
 * ------------------------------------------------------------------------- */
@media (max-width: 760px) {
  html[data-consent="unset"] .b2b-mobile-quote { display: none !important; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .consent-banner { padding-bottom: max(.3rem, env(safe-area-inset-bottom)); }
  .consent-inner { padding-block: .35rem 0; }
  .consent-message { font-size: .68rem; line-height: 1.3; margin-bottom: .3rem; }
  .consent-button { min-height: 40px; padding-block: .3rem; font-size: .78rem; }
  .consent-actions .consent-link,
  .consent-policy { min-height: 20px; font-size: .68rem; }
}

/* Keep all mobile cookie choices independently tappable, including short screens. */
@media (max-width: 760px) {
  .consent-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .consent-reject { grid-column: 1; grid-row: 2; }
  .consent-accept { grid-column: 2; grid-row: 2; }
  .consent-actions .consent-link { grid-column: 1; grid-row: 3; }
  .consent-policy { grid-column: 2; grid-row: 3; }
  .consent-banner .consent-button,
  .consent-actions .consent-link,
  .consent-policy { min-height: 44px; min-width: 44px; max-width: none; }
}

@media (max-height: 500px) {
  html[data-consent="unset"] .b2b-compare-tray { bottom: var(--consent-height, 0px); }
  .consent-detail { max-height: 25dvh; overflow: auto; }
}
