/*
 * Base typography for the text an editor writes in a page block.
 *
 * Tailwind's reset flattens headings, paragraphs and lists into plain text, so without this an h1
 * looks like a p — on the site and in the page editor alike. Everything but the element sits in
 * :where(), so each rule weighs the same as a bare `h1`: it beats the reset loaded before it, while
 * a theme stylesheet or the site's custom CSS — loaded later, or more specific — still wins.
 *
 * Blocks are matched as direct children of a row (site, block preview) or of their turbo-frame
 * (page editor), so the editor's own controls around a block are left alone. The booking portal
 * brings its own styles and is skipped.
 */

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) :is(h1, h2, h3, h4, h5, h6) {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h1 {
  font-size: 2.25rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h2 {
  font-size: 1.875rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h3 {
  font-size: 1.5rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h4 {
  font-size: 1.25rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h5 {
  font-size: 1.125rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) h6 {
  font-size: 1rem;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) p {
  margin: 0 0 1em;
  line-height: 1.6;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) :is(ul, ol) {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) ul {
  list-style: disc;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) ol {
  list-style: decimal;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) a:where(:not(.btn)) {
  text-decoration: underline;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) blockquote {
  margin: 0 0 1em;
  padding-left: 1em;
  border-left: 3px solid currentColor;
}

:where(.page_row, turbo-frame) > :where([data-block-id]:not(:has(.bukazu-app))) :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6):where(:last-child) {
  margin-bottom: 0;
}
