/* Legal pages (2026-10-14, mockups/build-legal-v1.py): Cancellation & Refund, Privacy, Terms, Cookie Policy.
   Text column `.m-legal` (Text Editor or the Complianz shortcode), "On this page" list `.m-toc` (sticky beside the text
   on desktop, a closed drop-down above it on phones/tablets). Rules: design-system.md. */

/* no photo hero, so the header is solid cream from the start (as on the product page, shop.css) */
body:has(.m-legal-page) .m-header { background-color: var(--m-header-bg); box-shadow: 0 1px 0 rgba(26, 44, 55, .08); }
body:has(.m-legal-page) .m-header .elementor-nav-menu--main .elementor-item,
body:has(.m-legal-page) .m-header .m-header-link .elementor-button,
body:has(.m-legal-page) .m-header .m-header-link .elementor-heading-title a { color: var(--m-header-ink) !important; }
body:has(.m-legal-page) .m-header .elementor-menu-toggle { color: var(--m-header-ink) !important; }
body:has(.m-legal-page) .m-header .elementor-menu-toggle svg { fill: var(--m-header-ink) !important; }

/* ---------- text ---------- */
.m-legal { max-width: 760px; color: #2A2F33; font-family: Montserrat, sans-serif; font-size: 18px; line-height: 1.6; }
.m-legal p, .m-legal ul, .m-legal ol { margin: 0 0 16px; }
.m-legal h2 { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 24px; line-height: 1.25; letter-spacing: -0.2px;
  color: #F3763A; margin: 56px 0 16px; text-transform: none; scroll-margin-top: 112px; }
.m-legal .elementor-widget-container > h2:first-child, .m-legal .cmplz-document > h2:first-of-type { margin-top: 40px; }
.m-legal h3 { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 18px; line-height: 1.3; color: #2A2F33; margin: 32px 0 8px; }
.m-legal h4, .m-legal h5 { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.4; color: #2A2F33; margin: 16px 0 4px; }
.m-legal ul, .m-legal ol { padding-left: 24px; }
.m-legal li { margin: 0 0 8px; }
.m-legal li::marker { color: #F3763A; }
.m-legal a { color: #F3763A; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.m-legal strong { font-weight: 700; }

/* Complianz's cookie document: its own stylesheet styles #cmplz-document (smaller, bolder text), so these rules
   name the id too and the document reads like the other legal pages */
.m-legal #cmplz-document { max-width: none; font-size: inherit; }
.m-legal #cmplz-document p, .m-legal #cmplz-document li, .m-legal #cmplz-document span { font-family: Montserrat, sans-serif;
  font-size: inherit; font-weight: 400; line-height: 1.6; color: #2A2F33; }
.m-legal #cmplz-document p { margin: 0 0 16px; }
.m-legal #cmplz-document h2 { font-size: 24px; font-weight: 700; line-height: 1.25; color: #F3763A; margin: 56px 0 16px; padding: 0; }
.m-legal #cmplz-document h3 { font-size: 18px; font-weight: 700; line-height: 1.3; color: #2A2F33; margin: 32px 0 8px; padding: 0; }
.m-legal #cmplz-document h4, .m-legal #cmplz-document h5 { font-size: 16px; font-weight: 700; color: #2A2F33; margin: 16px 0 4px; }
.m-legal #cmplz-document > p:first-child, .m-legal #cmplz-document > p:first-child i { font-size: 14px; color: #6B6560; font-weight: 500; font-style: normal; }
.m-legal #cmplz-document .cmplz-dropdown { background: #FFFFFF; border-radius: 24px; margin: 0 0 16px; overflow: hidden; border: 0; }
.m-legal #cmplz-document .cmplz-dropdown summary { padding: 20px 24px; cursor: pointer; background: transparent; }
.m-legal #cmplz-document .cmplz-dropdown summary h3 { margin: 0; display: inline; }
.m-legal #cmplz-document .cmplz-dropdown > div { padding: 0 24px; }
.m-legal #cmplz-document .cmplz-dropdown > :last-child { padding-bottom: 24px; }

@media (max-width: 767px) {
  .m-legal { font-size: 16px; }
  .m-legal h2, .m-legal #cmplz-document h2 { font-size: 20px; margin-top: 40px; scroll-margin-top: 88px; }
  .m-legal h3, .m-legal #cmplz-document h3 { font-size: 17px; }
  .m-legal ul, .m-legal ol { padding-left: 20px; }
}

/* ---------- "On this page" ---------- */
.m-toc ol { list-style: none; margin: 0; padding: 0; }
.m-toc a { display: block; color: #2A2F33; text-decoration: none; font-family: Montserrat, sans-serif; font-weight: 500; line-height: 1.35; }
.m-toc-label, .m-toc summary { font-family: Montserrat, sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 1.4px;
  text-transform: uppercase; color: #6B6560; }

/* desktop: white card beside the text, sticky (m-sticky, shop.css), the section in view marked orange by legal.js */
nav.m-toc { background: #FFFFFF; border-radius: 32px; padding: 32px; max-height: calc(100vh - 144px); overflow-y: auto; }
nav.m-toc .m-toc-label { margin: 0 0 16px; }
nav.m-toc a { font-size: 15px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; }
nav.m-toc a:hover, nav.m-toc a.is-on { color: #F3763A; border-left-color: #F3763A; }

/* phones/tablets: a closed drop-down, 44px rows */
details.m-toc { background: #FFFFFF; border-radius: 24px; }
details.m-toc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 56px;
  padding: 0 20px; cursor: pointer; }
details.m-toc summary::-webkit-details-marker { display: none; }
details.m-toc summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid #F3763A; border-bottom: 2px solid #F3763A;
  transform: translateY(-3px) rotate(45deg); transition: transform .2s ease; }
details.m-toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
details.m-toc ol { padding: 0 20px 12px; }
details.m-toc a { font-size: 16px; min-height: 44px; display: flex; align-items: center; border-top: 1px solid #F1E8DE; }
