/* =============================================================================
   ROXTatts — Consent Management Platform styles.
   Reuses the site's design tokens (:root --ink/--cream/--grey/--line/--ease/
   --display/--body from style.css). Everything is position:fixed so it never
   causes layout shift, and it scopes under .rox-cc to avoid clashing with the site.
   ============================================================================= */

.rox-cc,
.rox-cc *,
.rox-cc *::before,
.rox-cc *::after { box-sizing: border-box; }

.rox-cc {
  font-family: var(--body, system-ui, sans-serif);
  color: var(--ink, #111);
}

.rox-cc button { font-family: inherit; }

/* focus visibility for keyboard users (WCAG 2.4.7) */
.rox-cc :focus-visible {
  outline: 2px solid var(--ink, #111);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- Banner --- */
.rox-cc-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(0.8rem, 2vw, 1.6rem);
  transform: translate(-50%, 140%);
  width: min(100% - 1.6rem, 62rem);
  z-index: 2147483000;
  background: var(--cream, #F5F2EC);
  color: var(--ink, #111);
  border: 1px solid var(--line, rgba(17, 17, 17, 0.14));
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(17, 17, 17, 0.22);
  opacity: 0;
  transition: transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), opacity 0.4s var(--ease, ease);
}
.rox-cc-banner.is-visible { transform: translate(-50%, 0); opacity: 1; }

.rox-cc-banner__inner {
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  display: grid;
  gap: 1rem;
}
.rox-cc-banner__body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #1c1c1c;
  max-width: 52ch;
}

/* ----------------------------------------------------------------- Actions - */
.rox-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.rox-cc-btn {
  appearance: none;
  border: 1px solid var(--ink, #111);
  border-radius: 100px;
  padding: 0.7em 1.4em;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--ink, #111);
  transition: background 0.3s var(--ease, ease), color 0.3s var(--ease, ease), border-color 0.3s var(--ease, ease);
}
.rox-cc-btn--solid { background: var(--ink, #111); color: var(--cream, #F5F2EC); }
.rox-cc-btn--solid:hover { background: transparent; color: var(--ink, #111); }
.rox-cc-btn--ghost:hover { background: var(--ink, #111); color: var(--cream, #F5F2EC); }
.rox-cc-btn--link {
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.7em 0.4em;
}
.rox-cc-btn--link:hover { color: #000; }

/* ------------------------------------------------------------------- Links - */
.rox-cc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  font-size: 0.72rem;
}
.rox-cc-link {
  color: #444;
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 17, 17, 0.28);
  padding-bottom: 1px;
}
.rox-cc-link:hover { color: var(--ink, #111); border-bottom-color: var(--ink, #111); }

/* ------------------------------------------------------------------ Modal -- */
.rox-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
  visibility: hidden;
  pointer-events: none;
}
.rox-cc-modal.is-open { visibility: visible; pointer-events: auto; }

.rox-cc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  opacity: 0;
  transition: opacity 0.4s var(--ease, ease);
}
.rox-cc-modal.is-open .rox-cc-backdrop { opacity: 1; }

.rox-cc-modal__panel {
  position: relative;
  width: min(100%, 40rem);
  max-height: min(88vh, 46rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream, #F5F2EC);
  color: var(--ink, #111);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.35);
  padding: clamp(1.3rem, 3.2vw, 2.2rem);
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.5s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), opacity 0.4s var(--ease, ease);
}
.rox-cc-modal.is-open .rox-cc-modal__panel { transform: translateY(0) scale(1); opacity: 1; }

.rox-cc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}
.rox-cc-modal__title {
  font-family: var(--display, serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
  margin: 0;
}
.rox-cc-modal__intro {
  margin: 0 0 1.4rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #1c1c1c;
}
.rox-cc-close {
  flex: 0 0 auto;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  border: 1px solid rgba(17, 17, 17, 0.28);
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink, #111);
  transition: background 0.3s var(--ease, ease), color 0.3s var(--ease, ease);
}
.rox-cc-close:hover { background: var(--ink, #111); color: var(--cream, #F5F2EC); }

/* ------------------------------------------------------------- Categories -- */
.rox-cc-cats { display: grid; gap: 0.2rem; }
.rox-cc-cat {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line, rgba(17, 17, 17, 0.14));
}
.rox-cc-cat:first-child { border-top: none; }
.rox-cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.rox-cc-cat__title {
  font-family: var(--display, serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0;
}
.rox-cc-cat__desc { margin: 0 0 0.6rem; font-size: 0.85rem; line-height: 1.55; color: #1c1c1c; }
.rox-cc-cat__meta { margin: 0.2rem 0; font-size: 0.78rem; color: #3a3a3a; }
.rox-cc-cat__meta strong { color: var(--ink, #111); font-weight: 600; }
.rox-cc-cat__meta--ex { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; }
.rox-cc-chips { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.rox-cc-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  background: rgba(17, 17, 17, 0.06);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 5px;
  padding: 0.12em 0.5em;
  color: #333;
}
.rox-cc-badge {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 100px;
  padding: 0.35em 0.8em;
  white-space: nowrap;
}

/* --------------------------------------------------------------- Switches -- */
.rox-cc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.rox-cc-switch.is-locked { cursor: not-allowed; }
.rox-cc-switch__input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: inherit;
}
.rox-cc-switch__track {
  width: 46px; height: 26px;
  border-radius: 100px;
  background: rgba(17, 17, 17, 0.22);
  transition: background 0.3s var(--ease, ease);
  display: inline-block;
  position: relative;
}
.rox-cc-switch__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.rox-cc-switch__input:checked + .rox-cc-switch__track { background: var(--ink, #111); }
.rox-cc-switch__input:checked + .rox-cc-switch__track .rox-cc-switch__thumb { transform: translateX(20px); }
.rox-cc-switch__input:focus-visible + .rox-cc-switch__track { outline: 2px solid var(--ink, #111); outline-offset: 2px; }

.rox-cc-modal__foot {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line, rgba(17, 17, 17, 0.14));
  display: grid;
  gap: 1rem;
}

/* ------------------------------------------------- Footer link + floating -- */
.rox-cc-footer-link { cursor: pointer; }

.rox-cc-fab {
  position: fixed;
  left: clamp(0.8rem, 2vw, 1.4rem);
  bottom: clamp(0.8rem, 2vw, 1.4rem);
  z-index: 2147482999;
  width: 2.9rem; height: 2.9rem;
  border-radius: 50%;
  border: 1px solid var(--line, rgba(17, 17, 17, 0.16));
  background: var(--cream, #F5F2EC);
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease, ease), transform 0.3s var(--ease, ease);
}
.rox-cc-fab:hover { opacity: 1; transform: translateY(-2px); }
.rox-cc-fab__ico { font-size: 1.15rem; line-height: 1; }

/* -------------------------------------------------------------- Responsive - */
@media (max-width: 560px) {
  .rox-cc-actions { flex-direction: column; align-items: stretch; }
  .rox-cc-btn { width: 100%; text-align: center; }
  .rox-cc-btn--link { width: auto; align-self: center; }
}

/* --------------------------------------------------- Reduced motion (a11y) - */
@media (prefers-reduced-motion: reduce) {
  .rox-cc-banner,
  .rox-cc-modal__panel,
  .rox-cc-backdrop,
  .rox-cc-switch__thumb,
  .rox-cc-btn,
  .rox-cc-fab { transition: none !important; }
  .rox-cc-banner { transform: translate(-50%, 0); }
}

/* --------------------------------------------------- Dark scheme fallback -- */
@media (prefers-color-scheme: dark) {
  .rox-cc-chip { color: #333; }
}

/* =============================================================================
   Legal pages (privacy / cookie / terms) — readable long-form layout that
   reuses the site tokens. Fixed-position CMP above is unaffected.
   ============================================================================= */
.legal {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(7rem, 16vh, 11rem) var(--pad, 1.25rem) clamp(4rem, 10vh, 7rem);
  color: var(--ink, #111);
}
.legal__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--grey, #8A8A8A); font-weight: 500; margin: 0 0 1rem;
}
.legal__title {
  font-family: var(--display, serif); font-weight: 500; line-height: 1.04;
  letter-spacing: -0.01em; font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 0 0 0.6rem;
}
.legal__updated { font-size: 0.8rem; color: #555; margin: 0 0 2.4rem; }
.legal__note {
  background: rgba(17, 17, 17, 0.05);
  border: 1px solid var(--line, rgba(17, 17, 17, 0.14));
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: 0.82rem; line-height: 1.55; color: #333;
  margin: 0 0 2.4rem;
}
.legal h2 {
  font-family: var(--display, serif); font-weight: 500;
  font-size: clamp(1.3rem, 3.2vw, 1.7rem); line-height: 1.2;
  margin: 2.4rem 0 0.8rem;
}
.legal h3 { font-size: 1rem; margin: 1.6rem 0 0.5rem; font-weight: 600; }
.legal p, .legal li { font-size: 0.92rem; line-height: 1.7; color: #262626; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1.2rem; padding-left: 1.2rem; }
.legal li { margin: 0.3rem 0; }
.legal a { color: var(--ink, #111); border-bottom: 1px solid rgba(17, 17, 17, 0.3); }
.legal a:hover { border-bottom-color: var(--ink, #111); }
.legal__toc { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.82rem; margin: 0 0 2rem; }
.legal__tablewrap { overflow-x: auto; margin: 0 0 1.6rem; -webkit-overflow-scrolling: touch; }
.legal table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: 0.8rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border: 1px solid var(--line, rgba(17,17,17,0.14)); }
.legal th { background: rgba(17,17,17,0.05); font-weight: 600; }
.legal td code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.76rem; }
.legal__fill { background: #fff6d6; padding: 0.05em 0.3em; border-radius: 3px; font-style: italic; }
/* bilingual legal pages: show only the block matching <html lang> (set by i18n.js) */
[data-lang-content] { display: none; }
html[lang="ro"] [data-lang-content="ro"] { display: block; }
html[lang="en"] [data-lang-content="en"] { display: block; }
