/* ==========================================================================
   Sole Command Games — WordPress / Elementor bridge
   design-system.css and pages.css are the prototype's files, unchanged.
   This file only adapts WordPress and Elementor wrappers so the same
   classes lay out exactly as in the prototype.
   ========================================================================== */

/* ---------- 1. WordPress basics ----------------------------------------- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto; width: auto; height: auto; margin: 0; z-index: 1000;
  background: var(--c-accent); color: var(--c-bg); padding: 10px 16px; white-space: normal;
}
/* Sticky header below the admin bar for signed-in editors */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--fs-label); color: var(--c-text-dim); margin-top: 6px; }

/* Prototype inline styles turned into helpers (used by seeds and templates) */
.section--pt40 { padding-top: 40px; }                 /* style="padding-top:40px" */
.page-hero--tall { padding-block: 120px 100px; }       /* 404 hero */
.btn-row--mt28 { margin-top: 28px; }
.btn-row--mt20 { margin-top: 20px; }
.btn--mt14 { margin-top: 14px; }
.meta--mt16 { margin-top: 16px; }
.section-head--mt20 { margin-top: 20px; }
.section-head--flush { margin: 0; }

/* ---------- 2. Elementor token clash -------------------------------------
   Elementor declares `--gap: initial` on every .elementor-element (and a
   per-container --gap), which overwrites the design system's --gap token
   (20px) for everything inside a page. Restore it. */
.elementor .elementor-element { --gap: 20px; }

/* Elementor resets `.elementor img { height:auto; box-shadow:none; border:none }`.
   The prototype's shaded photos keep their shadow; their height comes from the
   image's own height (set inline by the widgets, as the width/height attributes
   do in the prototype). */
.elementor img.about-split__img,
.elementor img.modules__img { box-shadow: var(--shadow-card); }

/* ---------- 3. Elementor containers as prototype layout blocks ----------
   Seeded containers carry the marker class "scg" plus the prototype class
   (section, container, split, sidebar-layout, about-split, stack, grid).
   Elementor's container CSS (flex, 10px padding, 20px gap, auto margins)
   is neutralised for them, then the prototype layout is restated at a
   specificity above Elementor's per-element CSS. Containers without "scg"
   keep normal Elementor behaviour for anything Leslie builds herself. */
.elementor .elementor-element.e-con.scg {
  display: block;
  padding: 0;
  margin: 0;
  gap: 0;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  height: auto;
  flex: none;
  text-align: inherit;
  overflow: visible;
  border-radius: 0;
  transition: none;
}
.elementor .elementor-element.e-con.scg.section { padding-block: var(--section-y); position: relative; }
.elementor .elementor-element.e-con.scg.section.section--pt40 { padding-top: 40px; }
.elementor .elementor-element.e-con.scg.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.elementor .elementor-element.e-con.scg.container.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }
.elementor .elementor-element.e-con.scg.split { display: grid; gap: var(--gap); align-items: start; }
.elementor .elementor-element.e-con.scg.split.split--center { align-items: center; }
.elementor .elementor-element.e-con.scg.sidebar-layout { display: grid; gap: 40px; align-items: start; }
.elementor .elementor-element.e-con.scg.sidebar-layout > .e-con.scg.scg-aside {
  position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: var(--gap);
}
.elementor .elementor-element.e-con.scg.about-split { display: grid; gap: var(--gap) 40px; align-items: center; }
.elementor .elementor-element.e-con.scg.grid { display: grid; gap: var(--gap); }
.elementor .elementor-element.e-con.scg.stack > .elementor-element + .elementor-element { margin-top: var(--gap); }
@media (max-width: 1024px) {
  .elementor .elementor-element.e-con.scg.sidebar-layout > .e-con.scg.scg-aside { position: static; }
}

/* A widget that spans every column of a grid container (e.g. the wide diagram) */
.elementor .e-con.scg > .elementor-widget.scg-span-all { grid-column: 1 / -1; }

/* Widgets inside seeded containers: no Elementor spacing, full-width blocks */
.elementor .e-con.scg > .elementor-widget { margin-block-end: 0; width: auto; max-width: 100%; }

/* The aside in .sidebar-layout is sticky in the prototype; Elementor's widget
   wrappers inside it must not stretch the grid rows. */
.scg-aside > .elementor-widget { min-width: 0; }

/* ---------- 3. Elementor editor only ------------------------------------ */
/* Keep empty seeded containers selectable while editing */
.elementor-editor-active .e-con.scg:empty { min-height: 40px; outline: 1px dashed var(--c-border); }

/* ---------- 4. Theme templates ------------------------------------------ */
.entry-content > * + * { margin-top: 1em; }
.search-form-inline { display: flex; gap: 10px; flex-wrap: wrap; max-width: 640px; }
.search-form-inline .search-field { flex: 1 1 260px; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text-strong); }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { border-color: var(--c-accent); color: var(--c-accent); }
