/*
 * Noticed Blocks – Highlight paragraph
 *
 * Theme (2-molecules/_highlight-paragraph.scss): all text bold (@extend .p--bold),
 * tight padding, max-width 90rem (narrower than Quote and other .wrapper blocks)
 * and centred in .content-section.
 *
 * Here: same outer width as .wrapper blocks (126.5rem, like Quote),
 * normal body text, more padding, text limited to 90rem for readability.
 */

/* Editor: the block wrapper also has .highlight-paragraph (edit.jsx);
   neutralise it so only the server-side preview inside gets the box. */
.highlight-paragraph.content-edit {
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  border-radius: 0 !important;
  font-weight: inherit !important;
}

.highlight-paragraph.content-edit::before {
  display: none !important;
}

/* The block itself (front-end and the preview in the editor) */
div.highlight-paragraph:not(.content-edit),
.content-section div.highlight-paragraph:not(.content-edit) {
  /* Body text like .p, not bold */
  font-size: 2rem;
  line-height: 2.4rem;
  font-weight: normal;
  letter-spacing: 0.05rem;

  /* Same outer width and alignment as .wrapper blocks (e.g. Quote) */
  width: 100%;
  max-width: 126.5rem;
  margin: var(--contentSpacing) auto;
  box-sizing: border-box;

  /* Spacing inside */
  display: flex;
  flex-direction: column;
  gap: var(--contentSpacing);
  padding: 4.8rem 8rem;
  border-radius: 2rem;
}

/* Readable line length */
div.highlight-paragraph:not(.content-edit) > * {
  max-width: 90rem;
}

div.highlight-paragraph:not(.content-edit) p {
  margin: 0;
}

/* Bold chosen in the editor still works */
div.highlight-paragraph strong,
div.highlight-paragraph b {
  font-weight: 600;
}

/* Lists: bullets in the text colour (background is accent yellow) */
div.highlight-paragraph ul,
div.highlight-paragraph ol {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0;
}
div.highlight-paragraph ul {
  list-style: none;
  padding: 0;
}
div.highlight-paragraph ul > li {
  position: relative;
  padding-left: 3.1rem;
}
div.highlight-paragraph ul > li::before {
  content: '';
  position: absolute;
  top: calc(0.75em - 0.5rem);
  left: 0.2rem;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  transform: rotate(45deg);
}
div.highlight-paragraph ol {
  list-style: decimal;
  padding-left: 2.4rem;
}
div.highlight-paragraph ol > li {
  padding-left: 1.2rem;
}
div.highlight-paragraph ol > li::marker {
  font-weight: 700;
}

@media only screen and (max-width: 1024px) {
  div.highlight-paragraph:not(.content-edit),
  .content-section div.highlight-paragraph:not(.content-edit) {
    padding: 4rem;
  }
}

@media only screen and (max-width: 600px) {
  /* Theme: full-bleed yellow (::before) without rounded corners on mobile */
  div.highlight-paragraph:not(.content-edit),
  .content-section div.highlight-paragraph:not(.content-edit) {
    padding: 2.4rem 0;
    border-radius: 0;
  }
}

@media only screen and (max-width: 500px) {
  div.highlight-paragraph:not(.content-edit),
  .content-section div.highlight-paragraph:not(.content-edit) {
    font-size: 1.6rem;
    line-height: 2rem;
  }
}
