/* The pieces every copy shares. The colour comes from the site's own --main. */

/* The notice: the line that stands where a form or a payment is on today's site. */
.notice {
  max-width: 760px;
  margin: 8px auto 24px;
  padding: 16px 20px;
  border: 1px solid #c9c9c9;
  border-left: 8px solid var(--main, #555);
  background: #fff;
  color: #222;
  font: 400 17px/1.5 Arial, Helvetica, sans-serif;
  text-align: left;
}
.notice > p { margin: 0 !important; padding: 0 !important; font: inherit !important; }

/* A video: a still picture that loads the player only when pressed. */
.video { position: relative; max-width: 900px; margin: 0 auto 1em; aspect-ratio: 16 / 9; background: #000; }
.video .video-play, .video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video video, .theatre-screen video { background: #000; object-fit: contain; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-mark { position: absolute; left: 50%; top: 50%; width: 84px; height: 60px; margin: -30px 0 0 -42px; border-radius: 14px; background: rgba(0, 0, 0, .72); }
.video-mark::after { content: ''; position: absolute; left: 33px; top: 17px; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; }
.video-play:hover .video-mark, .video-play:focus-visible .video-mark { background: #c00; }

/* A map: a link that opens it, where an embedded map is on today's site. */
.map-link { margin: 0 !important; padding: 24px 16px !important; text-align: center; }
.map-link a { display: inline-block; padding: 12px 22px; border: 2px solid var(--main, #555); color: inherit; text-decoration: none; font-weight: 700; }
.map-link a:hover, .map-link a:focus-visible { background: var(--main, #555); color: #fff; }

/* The style switcher, on a site shown in its new styles (its site.json lists "looks"; lib/looks.mjs).
   One small dark pill in a corner, in the system's own type, so it sits the same on every style. */
.look-switch {
  position: fixed;
  z-index: 2147483000;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 26, 32, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  font: 500 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
.look-switch-label {
  padding: 0 8px 0 12px;
  color: #b4bec7;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.look-switch a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}
.look-switch a:hover { background: rgba(255, 255, 255, 0.14); color: #ffffff; }
.look-switch a[aria-current] { background: #ffffff; color: #141a20; }
.look-switch a:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
@media (max-width: 600px) {
  .look-switch {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 24px);
    overflow-x: auto;
  }
  .look-switch-label { display: none; }
  .look-switch a { padding: 9px 11px; font-size: 13px; }
}
/* More than five styles (lib/looks.mjs): the row folds into one button that names the style showing;
   pressed, the list opens above it. */
details.look-switch-menu { display: block; padding: 0; }
.look-switch-menu > summary {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
}
.look-switch-menu > summary::-webkit-details-marker { display: none; }
.look-switch-menu > summary:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.look-switch-now {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #ffffff;
  color: #141a20;
  white-space: nowrap;
}
.look-switch-now::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  transform: translateY(2px) rotate(-45deg);
}
.look-switch-menu[open] .look-switch-now::after { transform: translateY(-2px) rotate(135deg); }
.look-switch-menu > nav {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100%;
  padding: 6px;
  border-radius: 18px;
  background: rgba(20, 26, 32, 0.96);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
.look-switch-menu > nav a { padding: 11px 14px; border-radius: 12px; }
@media (max-width: 600px) {
  /* On a phone the folded switcher is its label and its arrow alone, in the corner: the less of a
     first screen under it, the better. The list it opens names the style showing. */
  details.look-switch-menu {
    right: max(12px, env(safe-area-inset-right, 0px));
    left: auto;
    transform: none;
    max-width: none;
    overflow: visible;
  }
  .look-switch-menu .look-switch-label { display: inline; padding: 0 0 0 12px; color: #ffffff; }
  .look-switch-menu .look-switch-now { gap: 0; padding: 15px 13px 15px 8px; background: none; color: #ffffff; font-size: 0; }
  .look-switch-menu > nav { min-width: 190px; }
  .look-switch-menu > nav a { padding: 12px 14px; font-size: 14px; }
}
@media print { .look-switch { display: none; } }

/* News on every site (sites/news.md; README, "5. News on every site"): a quiet bar first on every page,
   or where the layout puts {{news}}. Dark ink with the site's colour as one small mark, so it reads on any
   style; a style may restyle it. */
.news {
  position: relative;
  z-index: 60;
  background: #142029;
  color: #ffffff;
  font: 500 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
}
.news-inner {
  margin: 0 auto !important;
  max-width: 1200px;
  padding: 10px 20px !important;
  color: inherit;
  font: inherit;
}
.news-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 10px 2px 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--main, #6cb4d8) 55%, #ffffff);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
  vertical-align: middle;
}
.news a.news-link { color: #ffffff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.news a.news-link:hover { text-decoration-thickness: 2px; }
.news a:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
@media print { .news { background: none; color: #000; border-bottom: 1px solid #999; } .news a { color: #000; } }

/* The video theatre (lib/shared/copy.js), for a style that puts data-theatre on <html>. */
dialog.theatre {
  width: min(1200px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
dialog.theatre::backdrop { background: rgba(6, 10, 14, 0.86); }
.theatre-screen { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6); }
.theatre-screen iframe, .theatre-screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.theatre-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font: 400 30px/44px system-ui, sans-serif;
  cursor: pointer;
}
.theatre-close:hover, .theatre-close:focus-visible { background: rgba(255, 255, 255, 0.3); outline: none; }
