/* Nestor cookie consent — Quebec Bill 25 / Law 25 opt-in consent bar.

   Everything is nl- prefixed so the imported theme can't collide with it and
   the platform's overlay-cleanup sweep never treats it as junk to hide.

   Deliberate: the three actions (Accept all / Reject all / Save preferences)
   share ONE button class with no modifiers. Bill 25 forbids dark patterns, so
   refusing must be exactly as easy — and as visible — as accepting. There is
   no brand-coloured "accept" here on purpose; if a future edit adds an accent
   to one of the three, that is a compliance regression, not a design tweak. */

.nl-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000; /* above the managed promo popup (2147482000) */
  background: #12131a;
  color: #f4f4f6;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  transform: translateY(100%);
  transition: transform 0.24s ease;
}
.nl-consent.nl-open { transform: none; }
.nl-consent[hidden] { display: none !important; }

.nl-consent__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px 32px;
  align-items: start;
}

.nl-consent__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0;
}

.nl-consent__desc { margin: 0; color: #dfe1e8; }

.nl-consent__desc a,
.nl-consent__cats a {
  color: #cfe0ff;
  text-decoration: underline;
}
.nl-consent__desc a:hover,
.nl-consent__cats a:hover { color: #ffffff; }

/* Category toggles ------------------------------------------------------- */

.nl-consent__cats {
  grid-column: 1;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.nl-consent__legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #b9bcc8;
}

.nl-consent__cat {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 340px;
  cursor: pointer;
}
.nl-consent__cat--fixed { cursor: default; }

.nl-consent__cat input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #f4f4f6;
  cursor: inherit;
}

.nl-consent__catname {
  display: block;
  font-weight: 600;
  color: #ffffff;
}
.nl-consent__catnote {
  display: block;
  font-size: 12.5px;
  color: #b9bcc8;
}

/* Actions ---------------------------------------------------------------- */

.nl-consent__actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: center;
}

.nl-consent__btn {
  display: block;
  width: 100%;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  /* Set by applyBrandColor() when the owner chose one — on the ROOT, so all
     three actions move together and none can be singled out. */
  color: var(--nl-consent-btn-fg, #12131a);
  background: var(--nl-consent-btn-bg, #f4f4f6);
  border: 2px solid var(--nl-consent-btn-bg, #f4f4f6);
  border-radius: 6px;
  cursor: pointer;
}
.nl-consent__btn:hover { filter: brightness(1.12); }
.nl-consent__btn:focus-visible,
.nl-consent-fab:focus-visible,
.nl-consent__cat input:focus-visible {
  outline: 3px solid #8ab4ff;
  outline-offset: 2px;
}

/* Floating re-open button ------------------------------------------------ */

.nl-consent-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147482900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #12131a;
  background: #f4f4f6;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}
.nl-consent-fab:hover { background: #ffffff; }
.nl-consent-fab[hidden] { display: none !important; }
.nl-consent-fab svg { flex: 0 0 auto; }

/* Narrow screens --------------------------------------------------------- */

@media (max-width: 780px) {
  .nl-consent__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    max-height: 82vh;
    overflow-y: auto;
  }
  .nl-consent__cats { grid-column: 1; }
  .nl-consent__actions { grid-column: 1; grid-row: auto; }
  .nl-consent__cat { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nl-consent { transition: none; }
}

/* Style variants --------------------------------------------------------
   The consent wizard lets the owner pick a placement, so the choice has to
   mean something here. Everything above is the default ("bar-bottom"); the
   two variants below only move and size the box. They deliberately do NOT
   touch .nl-consent__btn — the three actions stay identical in every
   variant, because that equality is the compliance property, not a style. */

/* modal-center — a centred card over a dimmed page. */
.nl-consent--modal {
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 7, 10, 0.6);
  border-top: 0;
  box-shadow: none;
  transform: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.nl-consent--modal.nl-open { opacity: 1; }
.nl-consent--modal .nl-consent__inner {
  max-width: 560px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  grid-template-columns: minmax(0, 1fr);
  background: #12131a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.nl-consent--modal .nl-consent__cats,
.nl-consent--modal .nl-consent__actions {
  grid-column: 1;
  grid-row: auto;
}
.nl-consent--modal .nl-consent__cat { max-width: none; }

/* card-corner — a compact card pinned to the bottom-right. */
.nl-consent--corner {
  left: auto;
  right: 16px;
  bottom: 16px;
  width: min(400px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(calc(100% + 24px));
}
.nl-consent--corner.nl-open { transform: none; }
.nl-consent--corner .nl-consent__inner {
  grid-template-columns: minmax(0, 1fr);
  max-height: 80vh;
  overflow-y: auto;
  padding: 16px;
}
.nl-consent--corner .nl-consent__cats,
.nl-consent--corner .nl-consent__actions {
  grid-column: 1;
  grid-row: auto;
}
.nl-consent--corner .nl-consent__cat { max-width: none; }
/* The re-open button would sit under the card; move it across. */
.nl-consent--corner ~ .nl-consent-fab { left: 16px; right: auto; }

@media (prefers-reduced-motion: reduce) {
  .nl-consent--modal,
  .nl-consent--corner { transition: none; }
}
