/**
 * CMS / WYSIWYG extras on top of prose-content.css.
 *
 * Always load AFTER prose-content.css:
 *   <link rel="stylesheet" href="…/prose-content.css">
 *   <link rel="stylesheet" href="…/cms-content.css">
 *
 * TinyMCE uses the same pair via content_css (see admin/_wysiwyg.php).
 * Design tokens: README-DESIGN.md
 */

/* --- Inline media from the editor --- */

.dwc-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.1);
}

.dwc-prose p img,
.dwc-prose figure img {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.dwc-prose figure {
  margin: 1.5rem 0;
  padding: 0;
}

.dwc-prose figcaption {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #666;
}

.dwc-prose .dwc-embed,
.dwc-prose .dwc-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 14px 32px rgba(0, 0, 0, 0.1);
}

.dwc-prose .dwc-embed iframe,
.dwc-prose .dwc-video iframe,
.dwc-prose .dwc-video video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.dwc-prose video {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 16px;
  background: #111;
}

/* Ordered lists — match unordered rhythm */
.dwc-prose ol {
  margin: 0 0 1.5em;
  padding: 0 0 0 1.35rem;
}

.dwc-prose ol li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #222;
}

.dwc-prose ol li:last-child {
  border-bottom: 0;
}

.dwc-prose blockquote {
  margin: 1.5rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid #b22222;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #222;
}

.dwc-prose hr {
  border: 0;
  border-top: 1px solid #ececec;
  margin: 2.5rem 0;
}

/* Plain editor tables (class added on import; TinyMCE may omit class) */
.dwc-prose table:not(.dwc-table) {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
  margin: 1.25rem 0 1.5rem;
}

.dwc-prose table:not(.dwc-table) th {
  background: #b22222;
  color: #fff;
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 700;
  vertical-align: top;
}

.dwc-prose table:not(.dwc-table) td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  line-height: 1.55;
  color: #222;
}

.dwc-prose table:not(.dwc-table) tr:nth-child(even) td {
  background: #fafafa;
}

.dwc-prose strong {
  font-weight: 700;
  color: #111;
}

@media (max-width: 600px) {
  .dwc-prose img,
  .dwc-prose .dwc-embed,
  .dwc-prose .dwc-video,
  .dwc-prose video {
    border-radius: 14px;
  }
}
