/* ==========================================================================
   DAILY PAWS — CLAUDE EDITION
   footer.css · the shared chrome at the foot of every page:
                the masthead's opposite number, the anonymous feedback panel,
                and the cookie notice
   --------------------------------------------------------------------------
   The markup is injected by nav.js (see footerHTML) so that one definition
   serves every page. This file is the only place these components are
   styled; the originals have been removed.

   Self-contained on purpose, in the same way as nav.css and teddy.css: every
   button, list and field it touches is reset here rather than relying on a
   page-wide reset, because the pages that load this file do not all load
   core.css. Tokens come from shared/css/tokens.css.
   ========================================================================== */

/* The container is .dp-shell, from shared/css/primitives.css, which every page
   now loads. */

/* ── Local reset ───────────────────────────────────────────────────────
   Written with :where() so it carries zero specificity. The component rules
   below are plain classes and therefore always win; without this, the reset's
   `background:none` outranked .cp-feedback-submit and stripped its fill. */
:where(.dp-footer, .cookie-banner), :where(.dp-footer, .cookie-banner) *{ box-sizing:border-box }
:where(.dp-footer, .cookie-banner) :where(p, h2, h3, ul, li, strong){ margin:0; padding:0 }
:where(.dp-footer) a{ color:inherit; text-decoration:none }
:where(.dp-footer, .cookie-banner) :where(button, input, textarea, select){
  margin:0; background:none; border:0;
  font-family:var(--f-sans); color:inherit; line-height:inherit;
  touch-action:manipulation;
}
:where(.dp-footer, .cookie-banner) button{ cursor:pointer }

/* ── Legacy bleed guard ────────────────────────────────────────────────
   A bare element rule on a host page outranks the zero-specificity reset
   above, so paragraphs here state their weight and spacing outright. This
   once let the strapline render brown on every page except the front page. */
:where(.dp-footer, .cookie-banner) p{ margin-top:0; font-weight:400 }
.dp-footer-say{ color:var(--cream) }
.cp-feedback-status{ line-height:1.5 }

/* ── Footer ────────────────────────────────────────────────────────────── */
.dp-footer{
  position:relative;
  background:var(--night); color:var(--cream);
  padding-block:clamp(52px,7vw,86px) 30px;
  /* Stated rather than inherited, so the footer reads identically whatever
     the host page sets on body. These are the edition's body values. */
  font-family:var(--f-sans); font-weight:400; line-height:1.62;
}
.dp-footer-top{ display:grid; gap:44px; padding-bottom:44px; border-bottom:1px solid var(--night-line) }
@media (min-width:820px){ .dp-footer-top{ grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,.75fr)); gap:32px } }
.dp-footer-brand{ display:flex; flex-direction:column; gap:16px; max-width:30ch }
.dp-footer-mark{ display:block; width:56px; height:56px }
/* Balanced so the last line never strands a single word. */
.dp-footer-say{ font-family:var(--f-display); font-size:1.32rem; line-height:1.28; font-weight:400;
                letter-spacing:-.01em; max-width:22ch; text-wrap:balance }
@supports not (text-wrap:balance){ .dp-footer-say{ text-wrap:pretty } }
.dp-footer-say em{ font-style:italic; color:var(--amber) }
.dp-footer-col h3{ font-family:var(--f-mono); font-size:.6875rem; font-weight:500; letter-spacing:.19em;
                   text-transform:uppercase; color:var(--cream-mute); margin-bottom:16px }
.dp-footer-col ul{ list-style:none; display:flex; flex-direction:column; gap:10px }
.dp-footer-col a{ font-size:.9375rem; color:rgba(244,234,214,.82); transition:color .28s var(--e-out), padding-left .32s var(--e-out) }
.dp-footer-col a:hover{ color:var(--amber); padding-left:5px }
.dp-footer-base{ padding-top:24px; display:flex; flex-wrap:wrap; gap:8px 22px; align-items:center;
                 font-family:var(--f-mono); font-size:.6875rem; letter-spacing:.11em; text-transform:uppercase;
                 color:rgba(244,234,214,.42) }
.dp-footer-base .dp-tag{ margin-left:auto; color:var(--amber) }

/* ── Footer feedback (behaviour lives in nav.js; IDs must not change) ──── */
.visually-hidden{ position:absolute; width:1px; height:1px; padding:0; margin:-1px;
                  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }
.cp-feedback-trap{ position:absolute !important; left:-9999px !important; opacity:0 !important;
                   width:1px !important; height:1px !important; pointer-events:none }

.dp-footer-base .cp-feedback-toggle{
  padding:0;
  font-family:inherit; font-size:inherit; font-weight:inherit;
  letter-spacing:inherit; text-transform:inherit;
  color:rgba(244,234,214,.42); transition:color .28s var(--e-out);
}
.dp-footer-base .cp-feedback-toggle:hover{ color:var(--amber) }

.cp-feedback-panel{
  margin-top:24px; padding:22px; max-width:620px;
  background:var(--night-2); border:1px solid var(--night-line); border-radius:var(--r-md);
  opacity:0; transform:translateY(8px);
  transition:opacity .32s var(--e-out), transform .32s var(--e-out);
}
.cp-feedback-panel[hidden]{ display:none }
.cp-feedback-panel.is-open{ opacity:1; transform:none }
.cp-feedback-title{ font-family:var(--f-display); font-weight:600; font-size:1.18rem;
                    letter-spacing:-.01em; color:var(--cream); margin-bottom:6px }
.cp-feedback-note{ font-size:.875rem; line-height:1.5; color:var(--cream-mute); margin-bottom:16px }
.cp-feedback-form textarea{
  display:block; width:100%; padding:12px 14px; resize:vertical; min-height:104px;
  background:rgba(244,234,214,.05); color:var(--cream);
  border:1px solid var(--night-line); border-radius:var(--r-sm);
  font-family:var(--f-sans); font-size:.9375rem; line-height:1.5;
}
.cp-feedback-form textarea::placeholder{ color:rgba(244,234,214,.38) }
.cp-feedback-form textarea:focus{ outline:2px solid var(--amber); outline-offset:1px }
.cp-feedback-actions{ display:flex; align-items:center; gap:16px; margin-top:12px }
.cp-feedback-submit{
  min-height:42px; padding:0 20px; border-radius:var(--r-pill);
  background:var(--rust); color:#FFF6EA; font-size:.875rem; font-weight:600;
  transition:background .28s var(--e-out);
}
.cp-feedback-submit:hover:not(:disabled){ background:var(--rust-deep) }
.cp-feedback-submit:disabled{ opacity:.6; cursor:default }
.cp-feedback-count{ margin-left:auto; font-family:var(--f-mono); font-size:.6875rem;
                    letter-spacing:.12em; color:rgba(244,234,214,.42) }
.cp-feedback-status{ margin-top:10px; font-size:.8125rem; min-height:1.2em; color:var(--cream-mute) }
.cp-feedback-status--ok{ color:#A9C48A }
.cp-feedback-status--error{ color:#E8926A }

/* ── Cookie notice ─────────────────────────────────────────────────────── */
.cookie-banner{
  font-family:var(--f-sans); font-weight:400; line-height:1.62;
  position:fixed; left:var(--gutter); right:var(--gutter);
  bottom:max(18px,env(safe-area-inset-bottom,0px)); z-index:400;
  display:flex; flex-wrap:wrap; align-items:center; gap:14px 22px;
  max-width:760px; margin-inline:auto;
  padding:16px 18px;
  background:rgba(21,14,8,.94); color:var(--cream);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border:1px solid var(--night-line); border-radius:var(--r-md);
  box-shadow:0 22px 50px -22px rgba(0,0,0,.7);
  opacity:0; transform:translateY(20px);
  transition:opacity .55s var(--e-out), transform .55s var(--e-out);
}
.cookie-banner[hidden]{ display:none }
.cookie-banner.is-visible{ opacity:1; transform:none }
.cookie-banner.is-hiding{ opacity:0; transform:translateY(12px) }
.cookie-banner strong{ display:block; font-family:var(--f-display); font-weight:600; font-size:1rem; margin-bottom:3px }
.cookie-banner p{ font-size:.8125rem; line-height:1.5; color:var(--cream-mute) }
.cookie-banner p a{ color:var(--amber); text-decoration:underline; text-underline-offset:2px }
.cookie-actions{ margin-left:auto }
.cookie-banner button{
  min-height:40px; padding:0 20px; border-radius:var(--r-pill);
  background:var(--cream); color:var(--night); font-size:.8125rem; font-weight:600;
  transition:transform .3s var(--e-spring), background .3s var(--e-out);
}
.cookie-banner button:hover{ background:#fff; transform:translateY(-1px) }

/* Narrow screens: the notice stacks and the button goes full width rather
   than being squeezed against the text. */
@media (max-width:560px){
  .cookie-banner{ flex-direction:column; align-items:stretch; gap:12px }
  .cookie-actions{ margin-left:0 }
  .cookie-banner button{ width:100% }
}

@media (prefers-reduced-motion:reduce){
  .cookie-banner, .cp-feedback-panel{ transition:none }
  .cookie-banner button:hover{ transform:none }
}
