/* ToolZonee — cookie banner + preferences dialog (js/core/consent.js).
   Self-contained: also used by the static /tools/* landing pages, which
   don't load the main stylesheets. */
.ck-banner,.ck-dialog,.ck-toast{
  --ck-ink:#16130A; --ck-paper:#FFFFFF; --ck-soft:#F4FFF9; --ck-mut:#3A3628;
  --ck-pink:#FF4F8B; --ck-pink-hi:#FF669B; --ck-yellow:#FFE14D; --ck-mint:#4AE3B5; --ck-focus:#C2185B;
  font-family:"Archivo",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--ck-ink); box-sizing:border-box;
}
.ck-banner *,.ck-dialog *,.ck-toast *{box-sizing:border-box}

/* ---------- banner ---------- */
.ck-banner{
  position:fixed; left:20px; bottom:20px; z-index:2147483000;
  width:min(560px,calc(100vw - 40px));
  display:grid; grid-template-columns:auto 1fr; gap:4px 16px; align-items:start;
  padding:20px 20px 18px;
  background:var(--ck-paper); border:3px solid var(--ck-ink); border-radius:18px;
  box-shadow:6px 6px 0 var(--ck-ink);
  opacity:0; transform:translateY(24px);
  transition:opacity .24s ease, transform .24s cubic-bezier(.2,.9,.3,1.2);
}
.ck-banner.ck-in{opacity:1; transform:none}
.ck-art{grid-row:span 2; margin-top:2px; animation:ck-wobble 2.8s ease-in-out 1s 2}
.ck-art svg,.ck-dlg-art svg{display:block}
.ck-title{margin:0 0 4px; font:900 1.12rem/1.2 "Archivo Black","Archivo",system-ui,sans-serif; letter-spacing:-.01em; color:var(--ck-ink)}
.ck-text{margin:0; font-size:.9rem; line-height:1.5; color:var(--ck-mut)}
.ck-text b{color:var(--ck-ink)}
.ck-link{color:var(--ck-ink); font-weight:800; text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:2px; white-space:nowrap}
.ck-link:hover{background:var(--ck-yellow)}
.ck-actions{grid-column:2; display:flex; flex-wrap:wrap; gap:10px; margin-top:12px}

/* ---------- buttons ---------- */
.ck-btn{
  display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 18px;
  font-family:inherit; font-weight:800; font-size:.92rem; line-height:1.1; color:var(--ck-ink);
  background:var(--ck-paper); border:3px solid var(--ck-ink); border-radius:10px;
  box-shadow:3px 3px 0 var(--ck-ink); cursor:pointer; white-space:nowrap;
  transition:transform .1s ease, box-shadow .1s ease, background-color .1s ease;
}
.ck-btn:hover{transform:translate(-1px,-1px); box-shadow:4px 4px 0 var(--ck-ink); background:var(--ck-yellow)}
.ck-btn:active{transform:translate(2px,2px); box-shadow:1px 1px 0 var(--ck-ink)}
.ck-btn-primary{background:var(--ck-pink)}
.ck-btn-primary:hover{background:var(--ck-pink-hi)}
.ck-btn-custom{margin-right:auto}
.ck-btn:focus-visible,.ck-x:focus-visible,.ck-link:focus-visible,.ck-details summary:focus-visible,.ck-switch input:focus-visible+.ck-track{
  outline:3px solid var(--ck-focus); outline-offset:3px;
}

/* ---------- preferences dialog ---------- */
.ck-dialog{
  width:min(600px,calc(100vw - 32px)); max-height:min(88vh,760px); padding:0; overflow:auto;
  background:var(--ck-paper); border:3px solid var(--ck-ink); border-radius:20px;
  box-shadow:8px 8px 0 var(--ck-ink);
}
.ck-dialog[open]{animation:ck-pop .22s cubic-bezier(.2,.9,.3,1.2)}
.ck-dialog::backdrop{background:rgba(22,19,10,.45); backdrop-filter:blur(2px)}
.ck-dlg-head{
  position:sticky; top:0; z-index:1; display:grid; grid-template-columns:auto 1fr auto; gap:14px; align-items:start;
  padding:20px 20px 16px; background:var(--ck-yellow); border-bottom:3px solid var(--ck-ink);
}
.ck-dlg-head .ck-text{color:var(--ck-ink)}
.ck-dlg-art svg{width:48px; height:48px}
.ck-x{
  display:grid; place-items:center; width:40px; height:40px; padding:0; color:var(--ck-ink);
  background:var(--ck-paper); border:3px solid var(--ck-ink); border-radius:10px; box-shadow:2px 2px 0 var(--ck-ink); cursor:pointer;
}
.ck-x:hover{background:var(--ck-pink)}
.ck-cats{display:grid; gap:12px; padding:18px 20px}
.ck-cat{padding:14px 16px; background:var(--ck-soft); border:2px solid var(--ck-ink); border-radius:14px}
.ck-cat-top{display:flex; align-items:center; justify-content:space-between; gap:12px}
.ck-cat-title{font-weight:900; font-size:1rem; cursor:pointer}
.ck-cat-desc{margin:6px 0 0; font-size:.88rem; line-height:1.5; color:var(--ck-mut)}
.ck-badge{
  flex:none; padding:4px 10px; font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  background:var(--ck-mint); border:2px solid var(--ck-ink); border-radius:999px;
}
.ck-switch{position:relative; flex:none; width:56px; height:32px}
.ck-switch input{position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; z-index:1}
.ck-track{
  position:absolute; inset:0; background:#E4E1D8; border:2.5px solid var(--ck-ink); border-radius:999px; transition:background-color .15s;
}
.ck-track::after{
  content:""; position:absolute; top:3px; left:3px; width:21px; height:21px;
  background:var(--ck-paper); border:2.5px solid var(--ck-ink); border-radius:50%; transition:transform .18s cubic-bezier(.2,.9,.3,1.3);
}
.ck-switch input:checked+.ck-track{background:var(--ck-mint)}
.ck-switch input:checked+.ck-track::after{transform:translateX(24px)}
.ck-details{margin-top:8px; font-size:.84rem}
.ck-details summary{cursor:pointer; font-weight:800; width:max-content; border-radius:4px}
.ck-details ul{list-style:none; margin:8px 0 0; padding:0; display:grid; gap:6px}
.ck-details li{display:grid; grid-template-columns:minmax(0,190px) 1fr; gap:10px; padding:8px 10px; background:var(--ck-paper); border:1.5px solid var(--ck-ink); border-radius:8px}
.ck-details code{font:700 .78rem/1.4 ui-monospace,SFMono-Regular,Menlo,monospace; overflow-wrap:anywhere}
.ck-dlg-foot{
  position:sticky; bottom:0; display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end;
  padding:14px 20px 18px; background:var(--ck-paper); border-top:3px solid var(--ck-ink);
}
.ck-dlg-foot .ck-btn:first-child{margin-right:auto}

/* ---------- toast ---------- */
.ck-toast{
  position:fixed; left:50%; bottom:24px; z-index:2147483001; padding:10px 18px;
  font-weight:800; font-size:.9rem; background:var(--ck-mint); border:3px solid var(--ck-ink); border-radius:999px;
  box-shadow:3px 3px 0 var(--ck-ink); opacity:0; pointer-events:none; transform:translate(-50%,16px);
  transition:opacity .2s, transform .2s;
}
.ck-toast.ck-in{opacity:1; transform:translate(-50%,0)}

/* footer "Cookie settings" link rendered as a button */
.ck-foot-link{padding:6px 0; background:none; border:0; font-family:inherit; font-size:.88rem !important; font-weight:600 !important; line-height:inherit; color:var(--mut,#3A3628) !important; cursor:pointer; text-align:left}
.ck-foot-link:hover{color:var(--ink,#16130A) !important; text-decoration:underline}

/* ---------- mobile: bottom sheet above the app's bottom nav ---------- */
@media (max-width:768px){
  .ck-banner{
    left:10px; right:10px; width:auto;
    bottom:calc(76px + env(safe-area-inset-bottom,0px));
    grid-template-columns:auto 1fr; padding:16px 16px 14px; gap:2px 12px;
  }
  .ck-art{grid-row:auto}
  .ck-art svg{width:44px; height:44px}
  .ck-title{font-size:1.02rem}
  .ck-text{font-size:.85rem}
  .ck-actions{grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:8px}
  .ck-actions .ck-btn-primary{grid-column:1 / -1; order:-1}
  .ck-btn-custom{margin-right:0}
  .ck-btn{min-height:46px; padding:0 12px}
  .ck-toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  .ck-dialog{max-height:92vh; border-radius:18px}
  .ck-dlg-head{grid-template-columns:1fr auto; padding:16px}
  .ck-dlg-art{display:none}
  .ck-cats{padding:14px 16px}
  .ck-details li{grid-template-columns:1fr; gap:2px}
  .ck-dlg-foot{display:grid; grid-template-columns:1fr 1fr; padding:12px 16px 16px}
  .ck-dlg-foot .ck-btn:first-child{margin-right:0}
  .ck-dlg-foot .ck-btn-primary{grid-column:1 / -1; order:-1}
  /* static landing pages have no bottom nav */
  body:not(:has(.mobile-bottom-nav)) .ck-banner{bottom:max(10px,env(safe-area-inset-bottom,0px))}
  body:not(:has(.mobile-bottom-nav)) .ck-toast{bottom:24px}
}

@keyframes ck-pop{from{opacity:0; transform:translateY(14px) scale(.97)}to{opacity:1; transform:none}}
@keyframes ck-wobble{0%,100%{transform:rotate(0)}20%{transform:rotate(-12deg)}40%{transform:rotate(9deg)}60%{transform:rotate(-5deg)}80%{transform:rotate(3deg)}}
@media (prefers-reduced-motion:reduce){
  .ck-banner,.ck-toast,.ck-track,.ck-track::after,.ck-btn{transition:none}
  .ck-art,.ck-dialog[open]{animation:none}
}

/* The site's global heading rules use !important; keep the consent titles compact. */
.ck-banner .ck-title{font-size:1.2rem !important; line-height:1.2 !important; margin:0 0 6px !important}
.ck-dialog .ck-title{font-size:1.45rem !important; line-height:1.15 !important; margin:0 0 6px !important}
@media (max-width:768px){
  .ck-banner .ck-title{font-size:1.05rem !important}
  .ck-dialog .ck-title{font-size:1.25rem !important}
}
