/* Website examples on the website page (2026-10-28): thumbnails that open each example in a pop-up, and the
   viewer inside it, from the Total Talent Source example page. Loaded only by the website page. Colors come from
   the site tokens in template-ui.css so both themes follow without separate rules. */

/* The thumbnails. */
.tts-public .cb-examples__group { max-width: var(--tts-max); margin: 0 auto; }
.tts-public .cb-examples__group + .cb-examples__group { margin-top: 32px; }
.tts-public .cb-examples__title { margin: 0 0 4px; font-size: 22px; }
.tts-public .cb-examples__job { max-width: 68ch; margin: 0 0 16px; color: var(--tts-muted); font-size: 15px; }
.tts-public .cb-examples__title + .cb-examples__grid { margin-top: 12px; }
.tts-public .cb-examples__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tts-public .cb-thumb {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--tts-line);
  border-radius: var(--tts-radius-md);
  background: var(--tts-surface);
  color: var(--tts-text);
  text-decoration: none;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.tts-public .cb-thumb:hover { border-color: var(--tts-cyan-bright); transform: translateY(-2px); }
.tts-public .cb-thumb:focus-visible { outline: 3px solid var(--tts-cyan-bright); outline-offset: 2px; }
.tts-public .cb-thumb__shot { display: block; background: var(--tts-surface-2); }
.tts-public .cb-thumb__shot img { display: block; width: 100%; height: auto; }
.tts-public .cb-thumb__label { display: block; padding: 12px 14px 0; color: var(--tts-muted); font-size: 14px; }
.tts-public .cb-thumb__name { display: block; padding: 2px 14px 0; font-weight: 700; }
.tts-public .cb-thumb__open { display: block; margin-top: auto; padding: 8px 14px 14px; color: var(--tts-cyan-bright); font-size: 14px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .tts-public .cb-thumb { transition: none; }
  .tts-public .cb-thumb:hover { transform: none; }
}

/* The pop-up. Without the script, a thumbnail's link shows its example in place (:target). */
.tts-public .cb-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--tts-line);
  border-radius: var(--tts-radius-lg);
  background: var(--tts-bg);
  color: var(--tts-text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}
.tts-public .cb-dialog::backdrop { background: rgba(4, 8, 20, 0.72); }
html:not(.cb-dialogs-ready) .tts-public .cb-dialog:target { display: block; position: static; margin: 24px auto; }
.tts-public .cb-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.tts-public .cb-dialog__title { margin: 4px 0 6px; font-size: 22px; }
.tts-public .cb-dialog__note { max-width: 72ch; margin: 0; color: var(--tts-muted); font-size: 15px; line-height: 1.55; }
.tts-public .cb-dialog__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--tts-line);
  border-radius: 999px;
  color: var(--tts-text);
  font-weight: 700;
  text-decoration: none;
}
.tts-public .cb-dialog__close:hover { border-color: var(--tts-cyan-bright); }
.tts-public .cb-dialog__close:focus-visible { outline: 3px solid var(--tts-cyan-bright); outline-offset: 2px; }
.tts-public .cb-dialog__foot { display: flex; justify-content: center; padding-top: 8px; }
[data-theme='light'] .tts-public .cb-dialog { background: #ffffff; }
[data-theme='light'] .tts-public .cb-dialog::backdrop { background: rgba(11, 19, 48, 0.55); }

/* Browser-window dressing around every preview. */
.tts-public .wx-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 9px 12px;
  background: var(--tts-surface-2);
  border-bottom: 1px solid var(--tts-line);
}
.tts-public .wx-chrome i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tts-subtle);
  opacity: 0.55;
}
.tts-public .wx-chrome--bar { padding: 11px 14px; }
.tts-public .wx-chrome--bar span {
  margin-left: 10px;
  overflow: hidden;
  color: var(--tts-muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The viewer: view buttons, the web or mobile switch, then one view. */
.tts-public .wx-app { width: 100%; margin: 0; }
.tts-public .wx-bar { display: none; }
.tts-public .wx-app--ready .wx-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.tts-public .wx-tabs,
.tts-public .wx-devices { display: flex; flex-wrap: wrap; gap: 8px; }
.tts-public .wx-devices[hidden] { display: none; }
.tts-public .wx-tab {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--tts-line);
  border-radius: 999px;
  background: transparent;
  color: var(--tts-text);
  font: 600 14px/1.2 var(--font-family, inherit);
  white-space: nowrap;
  cursor: pointer;
}
.tts-public .wx-tab:hover { border-color: var(--tts-cyan-bright); }
.tts-public .wx-tab[aria-pressed='true'] {
  border-color: var(--tts-cyan);
  background: var(--tts-cyan);
  color: #04121d;
}
[data-theme='light'] .tts-public .wx-tab[aria-pressed='true'] { color: #fff; }
.tts-public .wx-tab:focus-visible { outline: 3px solid var(--tts-cyan-bright); outline-offset: 2px; }

.tts-public .wx-viewer { margin: 0 0 24px; }
.tts-public .wx-viewer[hidden] { display: none; }
.tts-public .wx-viewer__head { margin-bottom: 14px; }
.tts-public .wx-viewer__head h4 { margin: 0 0 4px; font-size: 17px; }
.tts-public .wx-viewer__head p { max-width: 76ch; margin: 0; color: var(--tts-muted); }
.tts-public .wx-frame {
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--tts-line);
  border-radius: var(--tts-radius-lg);
  background: var(--tts-surface);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}
.tts-public .wx-frame__scroll {
  max-height: 62vh;
  max-height: min(62svh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
}
.tts-public .wx-frame__scroll:focus-visible { outline: 3px solid var(--tts-cyan-bright); outline-offset: -3px; }
.tts-public .wx-frame img { width: 100%; height: auto; vertical-align: top; }
.tts-public .wx-video { width: 100%; height: auto; max-height: 80vh; vertical-align: top; background: #000; }

/* Web or mobile. Before the script runs, the screen width decides. These are
   the only rules that set display on the two versions of a picture or video. */
.tts-public .wx-app .wx-dev--desktop { display: inline-block; }
.tts-public .wx-app .wx-dev--phone { display: none; }
@media (max-width: 640px) {
  .tts-public .wx-app:not([data-device]) .wx-dev--desktop { display: none; }
  .tts-public .wx-app:not([data-device]) .wx-dev--phone { display: inline-block; }
}
.tts-public .wx-app[data-device='phone'] .wx-dev--desktop { display: none; }
.tts-public .wx-app[data-device='phone'] .wx-dev--phone { display: inline-block; }
.tts-public .wx-app[data-device='phone'] .wx-viewer--page .wx-frame,
.tts-public .wx-app[data-device='phone'] .wx-frame--video:not(.wx-frame--one-device) { max-width: 392px; }
/* A video that exists only in a tall, phone shape (the social video on the fitness example) is shown phone-width and centered
   on every screen, instead of a wide black box with the picture in the middle. */
.tts-public .wx-frame--video.wx-frame--portrait { max-width: 392px; margin-left: auto; margin-right: auto; }
/* A video made in one shape only stays visible on either setting. */
.tts-public .wx-app[data-device] .wx-frame--one-device .wx-dev--desktop,
.tts-public .wx-app:not([data-device]) .wx-frame--one-device .wx-dev--desktop { display: inline-block; }

.tts-public .wx-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }


@media (max-width: 1120px) {
  .tts-public .cb-examples__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tts-public .cb-examples__grid,
  .tts-public .wx-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tts-public .wx-compare { grid-template-columns: minmax(0, 1fr); }
  .tts-public .cb-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .tts-public .cb-dialog__head { flex-direction: column-reverse; gap: 8px; }
  .tts-public .cb-dialog__close { align-self: flex-end; }
  .tts-public .wx-frame__scroll { max-height: 60vh; max-height: 60svh; }
}
