/* ============================================================
   Consent banner — BeRi
   ============================================================
   Uses the site's own tokens where they exist and falls back to
   literals, because the banner also renders on pages that do
   not carry the .beri-root wrapper (404, any future template).

   Accept and reject are the same size, the same shape and sit
   next to each other. That is a legal requirement here, not a
   style choice: under TTDSG §25 refusing must be no harder than
   agreeing, and a greyed-out "decline" next to a bright
   "accept" is the pattern regulators specifically name.
   ============================================================ */

/* Tokens on :root, not on .beri-consent-root. The placeholder cards are
   emitted inside post content, nowhere near the banner element, so tokens
   scoped to the banner never reached them — "Google Maps laden" rendered as
   white text on a transparent button, because background:var(--bc-blue)
   resolved to nothing. */
:root{
  --bc-ink:#1B232E;
  --bc-body:#5A5F66;
  --bc-blue:#0099CC;
  --bc-line:#D4D8DD;
  --bc-bg:#ffffff;
  --bc-sans:'Segoe UI',system-ui,-apple-system,Roboto,'Helvetica Neue',Arial,sans-serif;
}
.beri-consent-root{
  font-family:var(--bc-sans);
}
.beri-consent-root[hidden]{display:none;}


/* ---------- the bar ---------- */

.beri-consent-bar{
  position:fixed;
  inset:auto 16px 16px 16px;
  z-index:9999;
  background:var(--bc-bg);
  color:var(--bc-ink);
  border:1px solid var(--bc-line);
  border-radius:14px;
  box-shadow:0 18px 44px rgba(16,24,34,.20),0 3px 10px rgba(16,24,34,.10);
  max-width:1080px;
  margin:0 auto;
  animation:bc-rise .34s cubic-bezier(.16,.84,.32,1) both;
}
@keyframes bc-rise{
  from{opacity:0;transform:translateY(14px);}
  to{opacity:1;transform:none;}
}
@media (prefers-reduced-motion:reduce){
  .beri-consent-bar{animation:none;}
}
.beri-consent-bar-inner{
  display:grid;
  grid-template-columns:1fr auto;
  grid-template-areas:"copy actions" "legal actions";
  gap:6px 32px;
  align-items:center;
  padding:20px 24px;
}
.beri-consent-copy{grid-area:copy;}
.beri-consent-actions{grid-area:actions;display:flex;gap:10px;flex-wrap:wrap;}
.beri-consent-legal{grid-area:legal;}

.beri-consent-title{
  margin:0 0 4px;
  font-size:16px;
  font-weight:600;
  color:var(--bc-ink);
  line-height:1.3;
}
.beri-consent-text{
  margin:0;
  font-size:14px;
  line-height:1.55;
  color:var(--bc-body);
  max-width:62ch;
}
.beri-consent-legal{
  margin:6px 0 0;
  font-size:13px;
  color:var(--bc-body);
}
.beri-consent-legal a{color:var(--bc-blue);text-decoration:underline;text-underline-offset:2px;}
.beri-consent-legal span{margin:0 6px;color:var(--bc-line);}


/* ---------- buttons ---------- */

.beri-consent-btn{
  font-family:var(--bc-sans);
  font-size:15px;
  font-weight:600;
  line-height:1;
  padding:0 20px;
  min-height:46px;
  min-width:150px;
  border-radius:99px;
  border:1px solid transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}
.beri-consent-btn-primary{background:var(--bc-blue);color:#fff;}
.beri-consent-btn-primary:hover{background:#0086B3;}
/* same footprint as accept — solid, not a faded outline */
.beri-consent-btn-solid{background:var(--bc-ink);color:#fff;}
.beri-consent-btn-solid:hover{background:#2C3846;}
.beri-consent-btn-ghost{
  background:transparent;
  color:var(--bc-ink);
  border-color:var(--bc-line);
  min-width:0;
  padding:0 16px;
}
.beri-consent-btn-ghost:hover{border-color:var(--bc-ink);}
.beri-consent-btn:focus-visible{
  outline:2px solid var(--bc-ink);
  outline-offset:3px;
}
.beri-consent-btn-solid:focus-visible{outline-color:var(--bc-blue);}


/* ---------- settings dialog ---------- */

.beri-consent-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  background:rgba(14,20,28,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  overflow-y:auto;
}
.beri-consent-modal[hidden]{display:none;}
.beri-consent-modal-card{
  position:relative;
  background:var(--bc-bg);
  border-radius:16px;
  padding:30px 30px 26px;
  width:100%;
  max-width:600px;
  max-height:calc(100vh - 40px);
  overflow-y:auto;
  box-shadow:0 30px 70px rgba(10,16,24,.34);
}
.beri-consent-modal-title{
  margin:0 0 10px;
  font-size:20px;
  font-weight:600;
  color:var(--bc-ink);
}
.beri-consent-list{margin:22px 0 24px;}
.beri-consent-item{
  padding:16px 0;
  border-top:1px solid var(--bc-line);
}
.beri-consent-item:last-child{border-bottom:1px solid var(--bc-line);}
.beri-consent-item-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:6px;
}
.beri-consent-item-label{
  font-size:15px;
  font-weight:600;
  color:var(--bc-ink);
  cursor:pointer;
}
.beri-consent-always{
  font-size:13px;
  font-weight:600;
  color:var(--bc-body);
}
.beri-consent-item-desc{
  margin:0;
  font-size:14px;
  line-height:1.55;
  color:var(--bc-body);
}
.beri-consent-item-host{
  margin:6px 0 0;
  font-size:12.5px;
  color:#7C838B;
}
.beri-consent-switch input{
  appearance:none;
  -webkit-appearance:none;
  width:46px;
  height:26px;
  border-radius:99px;
  background:#C7CCD2;
  position:relative;
  cursor:pointer;
  transition:background-color .18s ease;
  margin:0;
  flex:0 0 auto;
}
.beri-consent-switch input::after{
  content:"";
  position:absolute;
  top:3px;left:3px;
  width:20px;height:20px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.28);
  transition:transform .18s cubic-bezier(.16,.84,.32,1);
}
.beri-consent-switch input:checked{background:var(--bc-blue);}
.beri-consent-switch input:checked::after{transform:translateX(20px);}
.beri-consent-switch input:focus-visible{outline:2px solid var(--bc-ink);outline-offset:3px;}
@media (prefers-reduced-motion:reduce){
  .beri-consent-switch input,
  .beri-consent-switch input::after{transition:none;}
}
.beri-consent-actions-modal{margin-top:4px;}
.beri-consent-close{
  position:absolute;
  top:12px;right:14px;
  width:40px;height:40px;
  border:0;background:transparent;
  font-size:26px;line-height:1;
  color:var(--bc-body);
  cursor:pointer;
  border-radius:8px;
}
.beri-consent-close:hover{color:var(--bc-ink);}
.beri-consent-close:focus-visible{outline:2px solid var(--bc-ink);outline-offset:2px;}


/* ---------- blocked-embed placeholder ---------- */

.beri-consent-ph{
  min-height:var(--ph-h,420px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:#EEEEEE;
  border:1px dashed #C4CAD1;
  border-radius:12px;
  text-align:center;
}
.beri-consent-ph-inner{max-width:460px;}
.beri-consent-ph-title{
  margin:0 0 8px;
  font-family:var(--bc-sans);
  font-size:16px;
  font-weight:600;
  color:var(--bc-ink);
}
.beri-consent-ph-text{
  margin:0 0 18px;
  font-family:var(--bc-sans);
  font-size:14px;
  line-height:1.6;
  color:var(--bc-body);
}
.beri-consent-ph-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}
.beri-consent-ph-note{
  margin:14px 0 0;
  font-family:var(--bc-sans);
  font-size:12.5px;
  color:#7C838B;
}


/* ---------- footer reopen link ---------- */

.beri-consent-reopen{
  font-family:var(--bc-sans);
  font-size:14px;
  color:inherit;
  text-decoration:none;
}
.beri-consent-reopen:hover{text-decoration:underline;}


/* ---------- phones ---------- */

@media (max-width:820px){
  .beri-consent-bar{
    inset:auto 10px 10px 10px;
    border-radius:14px;
    max-height:calc(100vh - 20px);
    overflow-y:auto;
  }
  .beri-consent-bar-inner{
    grid-template-columns:1fr;
    grid-template-areas:"copy" "actions" "legal";
    gap:16px;
    padding:20px 18px;
  }
  .beri-consent-actions{flex-direction:column;}
  .beri-consent-btn{width:100%;min-height:48px;}
  .beri-consent-btn-ghost{order:3;}
  .beri-consent-legal{margin:0;}
  .beri-consent-modal-card{padding:26px 20px 22px;border-radius:14px;}
  .beri-consent-actions-modal{flex-direction:column;}
}
