/* ── Layout ────────────────────────────────────────────────────── */
.legal-page-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.legal-back {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--text-muted, #8a8f98); font-size: .875rem;
  text-decoration: none; margin-bottom: 1.5rem; transition: color .15s;
}
.legal-back:hover { color: var(--accent, #5e6ad2); }

/* ── iubenda wrapper — inherit dark theme ──────────────────────── */
#iub-legalDoc { color: inherit; }
#iub-legalDoc .container { padding: 0; }

/* ── Page header ───────────────────────────────────────────────── */
#iub-legalDoc .main-header h1 {
  font-size: 1.75rem; font-weight: 700; margin-bottom: .75rem;
  color: var(--text-primary, #e2e8f0);
}
#iub-legalDoc .main-header__meta {
  color: var(--text-muted, #8a8f98); font-size: .875rem; margin-bottom: 2rem;
}

/* ── Hide mobile-only controls (no iubenda JS present) ─────────── */
#iub-legalDoc .d-mobile,
#iub-legalDoc .open-dialog,
#iub-legalDoc .close-dialog { display: none !important; }

/* ── Two-column layout: TOC sidebar + content ──────────────────── */
#iub-legalDoc .aside-main-wrapper { display: flex; gap: 2.5rem; align-items: flex-start; }
#iub-legalDoc aside { flex: 0 0 200px; position: sticky; top: 1.5rem; font-size: .875rem; }
#iub-legalDoc main { flex: 1; min-width: 0; }

/* ── Table of contents ─────────────────────────────────────────── */
#iub-legalDoc #table-of-content-wrapper h2 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted, #8a8f98); margin-bottom: .5rem;
}
#iub-legalDoc .table-of-content-list { list-style: none; padding: 0; margin: 0; }
#iub-legalDoc .table-of-content-list li {
  border-left: 2px solid rgba(255,255,255,.08);
  padding: .3rem .5rem .3rem .75rem;
}
#iub-legalDoc .table-of-content-list a {
  color: var(--text-muted, #8a8f98); text-decoration: none; transition: color .15s;
}
#iub-legalDoc .table-of-content-list a:hover { color: var(--accent, #5e6ad2); }

/* ── H2 section titles ─────────────────────────────────────────── */
#iub-legalDoc .main__section { margin-bottom: 3rem; }
#iub-legalDoc h2 {
  font-size: 1.25rem; font-weight: 700; color: var(--accent, #5e6ad2);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: .5rem; margin-bottom: 1.25rem;
}

/* ── H3 category headings ("Analytics", "Handling payments" etc) ─ */
/* These are the most important hierarchy element — make them pop  */
#iub-legalDoc h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent, #5e6ad2);
  margin: 2.25rem 0 .5rem;
  line-height: 1.3;
}
/* First h3 in a section needs less top margin */
#iub-legalDoc .main__section > h3:first-child { margin-top: .25rem; }

/* Category description paragraph sits between h3 and the cards */
#iub-legalDoc h3 + p {
  font-size: .9rem;
  color: var(--text-muted, #8a8f98);
  margin-bottom: 1rem;
  line-height: 1.55;
}

/* ── Body text ─────────────────────────────────────────────────── */
#iub-legalDoc p { margin-bottom: .75rem; line-height: 1.65; }
#iub-legalDoc a { color: var(--accent, #5e6ad2); text-decoration: underline; }
#iub-legalDoc a:hover { opacity: .8; }

/* ── Accordion cards ───────────────────────────────────────────── */
#iub-legalDoc .legalDoc__accordion {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  margin-bottom: .5rem;
  overflow: hidden;
  transition: border-color .15s;
}
#iub-legalDoc .legalDoc__accordion:hover {
  border-color: rgba(94,106,210,.4);
}

/* summary row */
#iub-legalDoc .legalDoc__accordion > summary {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
#iub-legalDoc .legalDoc__accordion > summary::-webkit-details-marker { display: none; }
#iub-legalDoc .legalDoc__accordion > summary::marker { display: none; }

/* service logo — small, secondary visual; font-size:0 suppresses any broken alt text */
#iub-legalDoc .legalDoc__accordion > summary figure {
  order: 2;
  flex-shrink: 0; margin: 0;
  width: 28px; height: 28px;
  border-radius: 6px; overflow: hidden;
  opacity: .7; font-size: 0;
}
#iub-legalDoc .legalDoc__accordion > summary figure img {
  width: 100%; height: 100%; object-fit: contain;
}

/* text block: service name + meta — takes up all the space */
#iub-legalDoc .legalDoc__accordion > summary > div { flex: 1; min-width: 0; order: 1; }

/* service name — primary visual anchor */
#iub-legalDoc .legalDoc__accordion > summary h4 {
  font-size: 1rem; font-weight: 600; margin: 0 0 .3rem;
  color: var(--text-primary, #e2e8f0);
}

/* meta row — company · location · personal data */
#iub-legalDoc .accordion__meta {
  display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: center;
}
#iub-legalDoc .accordion__meta p {
  margin: 0; font-size: .8rem; color: var(--text-muted, #8a8f98);
  display: flex; align-items: center; gap: .3rem; line-height: 1.3;
}

/* small icon before each meta field */
#iub-legalDoc .meta__company::before  { content: '🏢'; font-size: .75rem; }
#iub-legalDoc .meta__location::before { content: '📍'; font-size: .75rem; }
#iub-legalDoc .meta__keys::before     { content: '🔑'; font-size: .75rem; }

/* circle + expand button on the right */
#iub-legalDoc .legalDoc__accordion > summary::after {
  content: '+';
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(94,106,210,.5);
  color: var(--accent, #5e6ad2);
  font-size: 1.1rem; font-weight: 300; line-height: 24px;
  text-align: center;
  transition: background .15s, border-color .15s;
}
#iub-legalDoc .legalDoc__accordion:hover > summary::after {
  background: rgba(94,106,210,.15);
  border-color: var(--accent, #5e6ad2);
}
#iub-legalDoc details[open].legalDoc__accordion > summary::after {
  content: '−';
  background: rgba(94,106,210,.15);
  border-color: var(--accent, #5e6ad2);
}

/* sr-only */
#iub-legalDoc .sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Accordion expanded body ───────────────────────────────────── */
#iub-legalDoc .accordion__body {
  padding: .75rem 1rem 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .875rem; line-height: 1.6;
}
#iub-legalDoc .accordion__body > p {
  color: var(--text-muted, #8a8f98); margin-bottom: .5rem;
}
#iub-legalDoc .body__details-box {
  background: rgba(255,255,255,.03);
  border-radius: 8px; padding: .75rem 1rem; margin-top: .5rem;
}
#iub-legalDoc .body__details-box h5 {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted, #8a8f98);
  margin: .75rem 0 .3rem;
}
#iub-legalDoc .body__details-box h5:first-child { margin-top: 0; }
#iub-legalDoc .body__details-box ul {
  list-style: disc; padding-left: 1.25rem; margin: 0 0 .25rem;
}
#iub-legalDoc .body__details-box li { margin-bottom: .2rem; }

/* ── Summary cards (top overview section) ──────────────────────── */
#iub-legalDoc .summary__cards-wrapper { display: flex; gap: 1rem; flex-wrap: wrap; }
#iub-legalDoc .summary__card {
  background: var(--surface, rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.08); border-radius: 10px;
  padding: 1.25rem; flex: 1 1 280px;
}
#iub-legalDoc .summary__card header { margin-bottom: .75rem; }
#iub-legalDoc .summary__card h3 {
  font-size: 1rem; font-weight: 700; margin: 0 0 .25rem;
  color: var(--text-primary, #e2e8f0);
}

/* ── Pills ─────────────────────────────────────────────────────── */
#iub-legalDoc .pills-list {
  display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0;
}
#iub-legalDoc .pill {
  background: rgba(94,106,210,.15); color: var(--accent, #5e6ad2);
  border: 1px solid rgba(94,106,210,.3); border-radius: 20px;
  padding: .2rem .7rem; font-size: .78rem; font-weight: 500;
}
#iub-legalDoc .pill a { color: inherit; text-decoration: none; }

/* ── Check list ────────────────────────────────────────────────── */
#iub-legalDoc .check-style-list { list-style: none; padding: 0; }
#iub-legalDoc .check-style-list li {
  padding: .25rem 0 .25rem 1.5rem; position: relative; font-size: .875rem;
}
#iub-legalDoc .check-style-list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--accent, #5e6ad2); font-weight: 700;
}

/* ── Third-party logos ─────────────────────────────────────────── */
#iub-legalDoc .unstyled-list {
  list-style: none; padding: 0; display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0;
}
#iub-legalDoc .third-parties-item img { width: 24px; height: 24px; border-radius: 4px; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 700px) {
  #iub-legalDoc .aside-main-wrapper { flex-direction: column; }
  #iub-legalDoc aside { position: static; flex: none; width: 100%; }
  #iub-legalDoc .summary__card { flex: 1 1 100%; }
  #iub-legalDoc .accordion__meta { flex-direction: column; gap: .15rem; }
}
