/* Styling for the Privacy Policy, Cookie Policy, Terms & Conditions, and Imprint content
   fragments, shared across every site that embeds this repo (Vilarivo, Solev, ...).
   Replaces the styling that used to come from Iubenda's embed script/CSS -- this content
   is now static and self-contained.

   --legal-accent sets the link/accent color and defaults to Vilarivo's brand orange. A
   consuming site with a different brand color overrides it with a one-line rule, e.g.:
     :root { --legal-accent: #0057B8; }
   build_legal.js does this automatically based on the "app" argument it's given -- see
   that script for the per-app color table.
*/

:root {
  --legal-accent: #FF5A4A;
}

#iub-pp-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  font-family: -apple-system, "Segoe UI", "Roboto", Helvetica, Arial, sans-serif;
  color: #1c1c1c;
  line-height: 1.6;
}

#iub-legalDoc header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

#iub-legalDoc header p {
  color: #55504b;
  margin: 0.25rem 0;
}

/* Only the div that actually wraps the TOC + main content should get the two-column
   flex treatment -- some documents (e.g. Terms of Service) have other plain top-level
   divs (help/contact cards) as siblings that must stack normally instead. */
#iub-legalDoc > div:has(#table-of-content-wrapper) {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 32px;
}

#table-of-content-wrapper {
  flex: 0 0 240px;
  position: sticky;
  top: 24px;
}

#table-of-content-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin-bottom: 12px;
}

#table-of-content-wrapper ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#table-of-content-wrapper a {
  color: var(--legal-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

#table-of-content-wrapper a:hover {
  text-decoration: underline;
}

#iub-legalDoc main {
  flex: 1 1 auto;
  min-width: 0;
}

#iub-legalDoc main section {
  margin-bottom: 40px;
}

#iub-legalDoc main h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  scroll-margin-top: 24px;
}

#iub-legalDoc main h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

#iub-legalDoc main ul {
  padding-left: 20px;
}

#iub-legalDoc main a {
  color: var(--legal-accent);
}

/* Third-party service accordion entries */
#iub-legalDoc main details {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 8px;
}

#iub-legalDoc main details summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

#iub-legalDoc main details summary::-webkit-details-marker {
  display: none;
}

#iub-legalDoc main details summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.2rem;
  color: #888;
}

#iub-legalDoc main details[open] summary::after {
  content: "\2212";
}

#iub-legalDoc main details summary figure {
  margin: 0;
  flex-shrink: 0;
}

#iub-legalDoc main details summary img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

#iub-legalDoc main details summary h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

#iub-legalDoc main details summary p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: #666;
}

#iub-legalDoc main details > div {
  padding: 0 16px 16px 60px;
  font-size: 0.9rem;
  color: #444;
}

#iub-legalDoc main details h5 {
  font-size: 0.85rem;
  margin: 12px 0 4px;
}

.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;
}

#iub-legalDoc footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #e5e5e5;
  font-size: 0.9rem;
  color: #55504b;
}

@media (max-width: 768px) {
  #iub-legalDoc > div:has(#table-of-content-wrapper) {
    flex-direction: column;
    gap: 24px;
  }

  #table-of-content-wrapper {
    position: static;
    flex: none;
    width: 100%;
  }
}

/* Imprint page */
.imprintSection {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.imprintSection:last-child {
  margin-bottom: 0px;
}

.imprintSection a {
  color: var(--legal-accent);
  text-decoration: none;
}

.imprintSection a:hover {
  text-decoration: underline;
}

:root {
  --legal-accent: #3730A3;
}
