/* Cookie consent banner. Loaded on every page (only when Google Analytics is
   configured). Same look as the site's cards and pill buttons. */

.as-consent{
  position:fixed;z-index:400;left:16px;bottom:16px;
  width:min(480px,calc(100vw - 32px));
  font-family:'Inter Tight',system-ui,-apple-system,sans-serif;
  font-size:15px;line-height:1.55;color:#0E1A19;
}
.as-consent[hidden],.as-consent [hidden]{display:none!important;}
.as-consent *,.as-consent *::before,.as-consent *::after{box-sizing:border-box;}
.as-consent__box{
  background:#fff;border:1px solid #E4DFD4;border-radius:20px;
  padding:24px;box-shadow:0 18px 50px rgba(10,22,22,.22);
  max-height:calc(100vh - 32px);overflow-y:auto;outline:none;
}
.as-consent__title{
  margin:0 0 10px;font-family:'Archivo',system-ui,sans-serif;font-weight:700;
  font-size:14px;letter-spacing:.14em;text-transform:uppercase;color:#142D2D;
}
.as-consent p{margin:0 0 16px;color:#0E1A19;}
.as-consent a{color:#142D2D;text-decoration:underline;}

.as-consent__actions{display:flex;gap:10px;}
/* Reject and accept are the same button on purpose: equal prominence. */
.as-consent__btn{
  flex:1 1 0;min-width:0;cursor:pointer;
  font-family:'Archivo',system-ui,sans-serif;font-weight:600;font-size:12px;
  letter-spacing:.14em;text-transform:uppercase;text-align:center;
  padding:14px 18px;border-radius:9999px;
  border:1px solid #142D2D;background:#142D2D;color:#fff;
  transition:background .2s;
}
.as-consent__btn:hover{background:#2C4A46;}
.as-consent__link{
  display:inline-block;margin-top:14px;padding:6px 0;cursor:pointer;
  background:none;border:0;font:inherit;font-size:14px;color:#142D2D;text-decoration:underline;
}
.as-consent button:focus-visible,.as-consent a:focus-visible,.as-consent input:focus-visible + .as-consent__slider{
  outline:2px solid #142D2D;outline-offset:3px;
}

/* settings */
.as-consent__row{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;
  padding:16px 0;border-top:1px solid #E4DFD4;
}
.as-consent__row:last-of-type{border-bottom:1px solid #E4DFD4;margin-bottom:18px;}
.as-consent__row strong{display:block;font-family:'Archivo',system-ui,sans-serif;font-weight:600;font-size:14px;color:#142D2D;margin-bottom:2px;}
.as-consent__row span{display:block;font-size:14px;color:#6E7A77;}
.as-consent__switch{position:relative;flex:none;width:48px;height:28px;margin-top:2px;cursor:pointer;}
.as-consent__switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;}
.as-consent__switch input:disabled{cursor:not-allowed;}
.as-consent__slider{position:absolute;inset:0;border-radius:9999px;background:#cfcabd;transition:background .2s;}
.as-consent__slider::after{
  content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;
  background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.25);
}
.as-consent__switch input:checked + .as-consent__slider{background:#142D2D;}
.as-consent__switch input:checked + .as-consent__slider::after{transform:translateX(20px);}
.as-consent__switch input:disabled + .as-consent__slider{opacity:.55;}
.as-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

@media (max-width:767px){
  /* Sit above the fixed bottom bar (80px) so the bar stays usable. */
  .as-consent{left:12px;right:12px;width:auto;bottom:calc(80px + 12px);}
  .as-consent__box{padding:20px;max-height:calc(100vh - 80px - 40px);}
  .as-consent__btn{padding:14px 10px;}
}
@media (prefers-reduced-motion:reduce){
  .as-consent__slider,.as-consent__slider::after,.as-consent__btn{transition:none;}
}
