/* The pages this project adds to the site: search, the site map, the 404 and
   the editor's bar. The imported Elementor stylesheets carry the design of
   every page that came from WordPress, and nothing here touches those - these
   rules are all under .mm- names and the palette below is the site's own kit
   (primary #EA2330, Poppins), so an added page looks like it belongs. */

:root {
  --mm-primary: #ea2330;
  --mm-primary-dark: #d20021;
  --mm-ink: #232323;
  --mm-text: #7a7a7a;
  --mm-line: #e4e4e4;
  --mm-panel: #fbfbfb;
  --mm-radius: 3px;
}

.mm-shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  color: var(--mm-text);
  line-height: 1.7;
}

.mm-head { margin-bottom: 32px; }

.mm-head h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--mm-ink);
  line-height: 1.25;
}

.mm-code {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mm-primary);
}

.mm-meta { margin: 0 0 16px; font-size: 0.95rem; }
.mm-meta code { background: var(--mm-panel); padding: 2px 6px; border-radius: var(--mm-radius); }

.mm-section-head {
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mm-line);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mm-ink);
}

/* -- search box ---------------------------------------------------------- */

.mm-search { display: flex; gap: 8px; max-width: 540px; margin: 16px 0 0; }

.mm-search input {
  flex: 1 1 auto;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--mm-line);
  border-radius: var(--mm-radius);
  background: #f7f7f7;
  font: inherit;
  color: var(--mm-ink);
}

.mm-search input:focus-visible { outline: 2px solid var(--mm-primary); outline-offset: 1px; }

.mm-search button {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--mm-radius);
  background: var(--mm-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.mm-search button:hover { background: var(--mm-primary-dark); }

/* -- lists --------------------------------------------------------------- */

.mm-list, .mm-doc-list { margin: 0; padding: 0; list-style: none; }

.mm-list > li { padding: 10px 0; border-bottom: 1px solid var(--mm-line); }

.mm-list a { text-decoration: none; color: var(--mm-ink); }
.mm-list a:hover .mm-list-title { color: var(--mm-primary); text-decoration: underline; }

.mm-list-title { font-weight: 600; }

.mm-list-meta { display: block; font-size: 0.875rem; color: var(--mm-text); }

.mm-columns { columns: 2; column-gap: 40px; }
.mm-columns > li { break-inside: avoid; }

.mm-badge {
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--mm-panel);
  border: 1px solid var(--mm-line);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mm-text);
}

/* -- documents ----------------------------------------------------------- */

.mm-doc-list > li { padding: 6px 0; }

.mm-doc {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--mm-line);
  border-radius: var(--mm-radius);
  background: #fff;
  text-decoration: none;
  color: var(--mm-ink);
}

.mm-doc:hover { border-color: var(--mm-primary); }

.mm-doc-type {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 2px 8px;
  border-radius: var(--mm-radius);
  background: var(--mm-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.mm-doc-label { flex: 1 1 auto; font-size: 0.95rem; }
.mm-doc-size { flex: 0 0 auto; font-size: 0.8rem; color: var(--mm-text); }

/* A document whose file is not on disk is shown, but not as a link to a 404. */
.mm-doc.is-missing { background: var(--mm-panel); color: var(--mm-text); cursor: not-allowed; }
.mm-doc.is-missing .mm-doc-type { background: #b9b9b9; }

.mm-empty { padding: 24px 0; color: var(--mm-text); }

/* -- editor's notes ------------------------------------------------------ */

.mm-draft-note {
  margin: 0;
  padding: 10px 20px;
  background: #fff8e1;
  border-bottom: 1px solid #f0e0a8;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.875rem;
  color: #6b5600;
  text-align: center;
}

.mm-editbar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: flex;
  gap: 2px;
  border-radius: var(--mm-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  font-family: "Montserrat", system-ui, sans-serif;
}

.mm-editbar a {
  padding: 8px 14px;
  background: var(--mm-ink);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.mm-editbar a:hover { background: var(--mm-primary); }

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .mm-shell { padding: 32px 16px 48px; }
  .mm-head h1 { font-size: 1.5rem; }
  .mm-columns { columns: 1; }
  .mm-search { flex-wrap: wrap; }
}

/* ===================================================================== *
 * Behaviour the design's own runtime used to provide.
 *
 * The imported stylesheets style the menu, the slides and the animations,
 * but they were written expecting javascript to open a submenu, to build a
 * slideshow and to reveal what starts hidden. That javascript is gone
 * (view/static/assets/js/site.js replaces the parts these pages use), so
 * these rules supply what css can do on its own.
 * ===================================================================== */

/* -- submenus ------------------------------------------------------------ */

.mm-nav-menu .sub-menu {
  position: absolute;
  z-index: 100;
  display: block;
  min-width: 230px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.mm-nav-menu--main .menu-item { position: relative; }

/* A pointer opens it on hover or keyboard focus; a touch screen opens it on
   the tap that site.js turns into .mm-open. */
@media (hover: hover) {
  .mm-nav-menu--main .menu-item:hover > .sub-menu,
  .mm-nav-menu--main .menu-item:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.mm-nav-menu .menu-item.mm-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* The design gives mm-nav-menu--dropdown to two different things: the burger
   panel, which is a <nav> and also carries mm-nav-menu__container, and every
   submenu <ul> in the bar, which does not. Rules meant for the panel say
   mm-nav-menu__container as well, so they leave the bar's submenus alone.

   The widget's own stylesheet loads after this file, and from 1025px up it
   hides .mm-nav-menu--dropdown inside a .mm-nav-menu--dropdown-tablet widget.
   That is aimed at the panel, but it matches the bar's submenus too, and under
   WordPress what brought them back was SmartMenus writing an inline display as
   it opened each one. Nothing writes inline styles here, so the rule below
   names the element and both of its classes: that outranks the widget's own
   selector whatever order the two stylesheets arrive in. Without it every
   dropdown in the bar stays display:none and the menu looks like a bare row of
   links with carets that do nothing. */
.mm-nav-menu--main ul.sub-menu.mm-nav-menu--dropdown { display: block; }

/* Inside the burger panel the submenu is part of the list, not a layer. */
.mm-nav-menu--dropdown.mm-nav-menu__container .sub-menu {
  position: static;
  min-width: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
  display: none;
}

.mm-nav-menu--dropdown.mm-nav-menu__container .menu-item.mm-open > .sub-menu {
  display: block;
}

/* -- the burger panel ---------------------------------------------------- */

.mm-nav-menu--dropdown.mm-nav-menu__container { display: none; }
.mm-nav-menu--dropdown.mm-nav-menu__container.mm-nav-menu--open { display: block; }
.mm-menu-toggle { cursor: pointer; }

/* -- section background slideshows --------------------------------------- */

.mm-has-slideshow { position: relative; }
.mm-has-slideshow > :not(.mm-bg-slideshow) { position: relative; z-index: 1; }

.mm-bg-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.mm-bg-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .9s ease-in-out;
}

.mm-bg-slide.is-on { opacity: 1; }

/* Elementor called this Ken Burns: the image drifts closer while it shows. */
.mm-bg-kenburns.is-on { animation: mm-kenburns 18s ease-out forwards; }

@keyframes mm-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.14); }
}

/* -- the slides widget --------------------------------------------------- */

.mm-swiper-initialized .mm-swiper-wrapper { display: block; position: relative; }

.mm-swiper-initialized .mm-swiper-slide {
  display: none;
  width: 100% !important;
  transform: none !important;
}

.mm-swiper-initialized .mm-swiper-slide-active { display: block; }

/* -- elements that start hidden ------------------------------------------ */

/* If the js never runs, nothing should stay invisible. */
@media (scripting: none) {
  .mm-invisible { visibility: visible !important; opacity: 1 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-bg-slide, .mm-bg-kenburns.is-on { transition: none; animation: none; }
}
