/* Cookie preference center: a small persistent tab (bottom-right) that
   opens a modal with per-category detail and, for Analytics, a real
   toggle. Never auto-opens; consent stays denied until a visitor
   deliberately interacts with it.

   PORTED FROM gdbi-website-v2's src/styles/03-components.css (full
   port, 2026-09-16) - structure and rules copied as closely as
   possible; only the custom-property names were remapped, since gdbi's
   tokens (--gold, --navy-deep, --slate, --gray-50/200/300, --font-body)
   don't exist on this site. Mapped onto noemex's own tokens (defined in
   public/assets/css/site.css's :root): --blue/--navy for the accent
   (no gold equivalent here), --ink for headings/primary text, --gray
   for body copy, --muted for de-emphasized text, --soft/--hair for
   light backgrounds/borders. This file is hand-authored and loaded
   directly (no build-time extraction/scoping), same as
   consent-banner.js itself - see tools/build-pages.mjs for where both
   get linked into every page. */
.cookie-tab {
  position: fixed;
  right: 20px;
  bottom: -8px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}
.cookie-tab:hover {
  color: #C7D9FA;
}
.cookie-tab-icon {
  width: 26px;
  height: 26px;
}

.consent-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 17, 20, 0.55);
}
/* The [hidden] attribute alone loses to the class rule above (equal
   specificity, author origin wins either way); this is what actually
   makes hiding the overlay via JS (`el.hidden = true`) take effect. */
.consent-modal-overlay[hidden] {
  display: none;
}
.consent-modal {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(16, 17, 20, 0.4);
}
.consent-modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hair);
  background: var(--white);
}
.consent-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--ink);
}
.consent-modal-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  padding: 4px 8px;
}
.consent-modal-close:hover {
  color: var(--ink);
}
.consent-modal-body {
  padding: 20px 24px;
}
.consent-modal-body > p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray);
}
.consent-modal-body > p a {
  color: var(--blue);
  text-decoration: underline;
}
.consent-modal-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--hair);
  background: var(--white);
}
.consent-modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.consent-modal-footer .btn-secondary {
  border-color: var(--hair);
  background: var(--white);
  color: var(--ink);
}
.consent-modal-footer .btn-secondary:hover {
  border-color: var(--gray);
}
.consent-modal-footer .btn-primary {
  background: var(--navy);
  color: #fff;
}
.consent-modal-footer .btn-primary:hover {
  background: var(--blue);
}

.consent-category {
  border-top: 1px solid var(--hair);
}
.consent-category:first-of-type {
  border-top: none;
}
.consent-category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 4px;
  border: none;
  background: none;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.consent-category-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--muted);
}
.consent-category-chevron--open {
  transform: rotate(90deg);
}
.consent-category-name {
  flex: 1;
}
.consent-category-always {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.consent-category-always--muted {
  font-weight: 400;
  color: var(--muted);
}
.consent-category-body {
  padding: 0 4px 16px 34px;
}
.consent-category-description {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--gray);
}
.consent-category-empty {
  margin: 0;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 14px;
  color: var(--muted);
}
.consent-category-table {
  font-size: 13px;
}

.consent-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.consent-toggle-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.consent-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: var(--hair);
  transition: background 0.15s ease;
}
.consent-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.15s ease;
}
.consent-toggle-input:checked + .consent-toggle-slider {
  background: var(--navy);
}
.consent-toggle-input:checked + .consent-toggle-slider::before {
  transform: translateX(18px);
}

/* Tables inside the consent modal's per-category cookie detail.
   Wrapped in .policy-table-wrap for horizontal scroll on narrow
   viewports, since these tables are too wide to reflow. */
.policy-table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
}
.policy-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 15px;
}
.policy-table th,
.policy-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--hair);
  line-height: 1.6;
  color: var(--gray);
}
.policy-table th {
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
}
