/* =============================================================================
   Cookie consent card — shared by the v3 design (segments/v3/header.php) and
   the old v1 design (segments/header.php) via segments/v3/consent.php.
   Card A = blocking modal, Card B (.cookie-card--b) = non-blocking sheet.
   Loaded on its own so both headers can include it without site.css.
   ============================================================================= */
.cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10,14,20,0.55);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.cookie-card {
  position: fixed;
  z-index: 130;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 640px;
  padding: 22px var(--pad, 18px) calc(18px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: #fffdf8;
  color: #222936;
  box-shadow: 0 -24px 70px rgba(8,11,16,0.38);
  transform: translateY(105%);
  transition: transform 0.24s ease;
  outline: none;
}
.cookie-backdrop.is-open { opacity: 1; }
.cookie-card.is-open { transform: translateY(0); }
.cookie-card[hidden],
.cookie-backdrop[hidden] { display: none; }
body.cookie-open { overflow: hidden; }
/* Old (Bootstrap) pages don't load site.css, so set the bits the v3 reset
   normally provides (box-sizing, margins, button line-height). */
.cookie-card, .cookie-card * { box-sizing: border-box; }
.cookie-btn { line-height: 1.2; }
.cookie-card h2 {
  margin: 0;
  font-family: var(--body, "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.cookie-card > p {
  margin: 8px 0 0;
  color: #555d67;
  font-size: 0.93rem;
  line-height: 1.45;
}
.cookie-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.cookie-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: var(--body, "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.cookie-btn--decline {
  background: #fffdf8;
  color: #222936;
  border: 1.5px solid #c9ccd0;
}
.cookie-btn--decline:hover { border-color: #222936; }
.cookie-btn--accept {
  background: #222936;
  color: #fff;
  border: 1.5px solid #222936;
}
.cookie-btn--accept:hover { background: #343c4a; border-color: #343c4a; }
.cookie-btn:focus-visible { outline: 3px solid rgba(242,139,42,0.55); outline-offset: 2px; }
.cookie-card__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.78rem;
  color: #68707b;
}
.cookie-card__links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cookie-card__links a:hover { color: #222936; }
@media (min-width: 700px) {
  .cookie-card {
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    width: min(100% - 36px, 440px);
    padding: 26px 28px 22px;
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(8,11,16,0.4);
    transform: translate(-50%, -50%) scale(0.96);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .cookie-card.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-card,
  .cookie-backdrop { transition: none; }
}

/* Card B — non-blocking sheet (CONSENT_CARD_VERSION / AB_VARIANT B).
   Lighter, shorter, no backdrop. Accept in the orange accent, No thanks a
   bordered button of the same size: same ease, different emphasis. */
.cookie-card--b {
  padding: 16px var(--pad, 18px) calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #e4ded1;
  box-shadow: 0 -12px 40px rgba(8,11,16,0.22);
  z-index: 60; /* above the sticky bar (50), below the fault sheet / drawer */
}
.cookie-card--b h2 { font-size: 1.08rem; }
.cookie-card--b > p { margin-top: 6px; font-size: 0.9rem; line-height: 1.4; }
.cookie-card--b > p a { color: #68707b; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cookie-card__trust { display: flex; justify-content: center; margin-top: 8px; min-height: 24px; }
.cookie-card__trust .tpbox { max-width: 260px; }
.cookie-card--b .cookie-card__actions { margin-top: 12px; }
.cookie-card--b .cookie-btn { min-height: 48px; }
.cookie-card--b .cookie-btn--accept { background: #f28b2a; color: #222936; border-color: #f28b2a; }
.cookie-card--b .cookie-btn--accept:hover { background: #e07a1e; border-color: #e07a1e; }
/* Sit above the sticky Call/Book bar once it has slid in, so neither hides the other. */
body:has(.sticky.is-shown) .cookie-card--b { bottom: calc(74px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
@media (min-width: 700px) {
  .cookie-card--b {
    top: auto;
    bottom: 18px;
    left: auto;
    right: 18px;
    width: min(100% - 36px, 400px);
    padding: 20px 22px 18px;
    border-radius: 16px;
    border: 1px solid #e4ded1;
    box-shadow: 0 18px 50px rgba(8,11,16,0.28);
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .cookie-card--b.is-open { transform: none; opacity: 1; }
  body:has(.sticky.is-shown) .cookie-card--b { bottom: calc(92px + env(safe-area-inset-bottom)); border-radius: 16px; }
}
@media (min-width: 992px) {
  body:has(.sticky.is-shown) .cookie-card--b { bottom: 18px; } /* no sticky bar on desktop */
}

