/* The cookie notice and preferences (resources/views/site/cookie-banner.blade.php), on the
   homepage, the legal pages and the panel. Self-contained: its own tokens (copies of the
   palette in home.css and plataforma.css), so it looks the same over either. */

.pof-cookies,
.pof-cookies-dialog {
  --pc-papel: #FCFDFD;
  --pc-balcao: #EDEFF0;
  --pc-tinta: #121315;
  --pc-desbotado: #50565C;
  --pc-verde: #17734A;
  --pc-tracejado: rgba(18, 19, 21, .3);
  --pc-display: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--pc-tinta);
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}
.pof-cookies *,
.pof-cookies-dialog * { box-sizing: border-box; }

/* ---------- the notice: a slip in the bottom-left corner, never in the way ---------- */
.pof-cookies {
  position: fixed;
  z-index: 35;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  max-width: 27rem;
  display: grid;
  gap: .85rem;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--pc-papel);
  border: 1.5px solid var(--pc-tinta);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(18, 19, 21, .09), 0 14px 30px rgba(40, 33, 20, .24);
  font-size: .9rem;
  line-height: 1.45;
}
.pof-cookies[hidden] { display: none; }
.pof-cookies-text { margin: 0; }
.pof-cookies-text strong { font-weight: 700; }
.pof-cookies a,
.pof-cookies-dialog a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.pof-cookies-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pof-cookies-btn {
  appearance: none;
  margin: 0;
  padding: .65em 1.1em;
  font-family: var(--pc-display);
  font-stretch: 87.5%;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--pc-tinta);
  background: var(--pc-papel);
  border: 1.5px solid var(--pc-tinta);
  border-radius: 2px;
  cursor: pointer;
}
.pof-cookies-btn:hover { background: var(--pc-balcao); }
.pof-cookies-btn.is-primary { background: var(--pc-tinta); color: var(--pc-papel); }
.pof-cookies-btn.is-primary:hover { background: #2a2c30; }
.pof-cookies-btn:focus-visible,
.pof-cookies a:focus-visible,
.pof-cookies-dialog a:focus-visible { outline: 3px solid var(--pc-tinta); outline-offset: 2px; }

/* ---------- the preferences ---------- */
.pof-cookies-dialog {
  /* Tailwind's preflight (in the panel) zeroes every margin, which un-centres a modal dialog. */
  margin: auto;
  width: min(34rem, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  background: var(--pc-papel);
  border: 1.5px solid var(--pc-tinta);
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(40, 33, 20, .3);
  font-size: .95rem;
  line-height: 1.5;
}
.pof-cookies-dialog::backdrop { background: rgba(18, 19, 21, .45); }
.pof-cookies-form { display: grid; gap: 1rem; padding: 1.4rem clamp(1rem, 4vw, 1.6rem) 1.5rem; margin: 0; }
.pof-cookies-form p { margin: 0; }
.pof-cookies-title {
  margin: 0;
  font-family: var(--pc-display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.pof-cookies-cats { display: grid; margin: 0; padding: 0; list-style: none; border-block: 1.5px dashed var(--pc-tracejado); }
.pof-cookies-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-block: .85rem; }
.pof-cookies-cat + .pof-cookies-cat { border-top: 1.5px dashed var(--pc-tracejado); }
.pof-cookies-cat h3 { margin: 0 0 .15rem; font-size: .95rem; font-weight: 700; font-family: inherit; letter-spacing: normal; }
.pof-cookies-cat p { font-size: .875rem; color: var(--pc-desbotado); }
.pof-cookies-state {
  flex: none;
  margin-top: .1rem;
  padding: .3em .6em;
  font-family: var(--pc-display);
  font-stretch: 87.5%;
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--pc-desbotado);
  border: 1.5px solid var(--pc-tracejado);
  border-radius: 2px;
}
.pof-cookies-state.is-on { color: var(--pc-verde); border-color: var(--pc-verde); }
.pof-cookies-note { font-size: .875rem; color: var(--pc-desbotado); }

@media (max-width: 420px) {
  .pof-cookies-cat { flex-direction: column; gap: .5rem; }
}
