/* Template explainers: the builder canvas from the real-canvas kit (`rc-`),
   with callouts beside it. Canvas children are placed in app px:
   style="--x:236;--y:100". */

.tv-head {
  position: absolute;
  left: 120px;
  top: 96px;
  width: 1680px;
}

.tv-head .h1 {
  font-size: 68px;
}

.tv-cv {
  position: absolute;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.tv-cv.main {
  left: 120px;
  top: 220px;
  width: 1680px;
  height: 820px;
}

.tv-cv.mini {
  left: 1010px;
  width: 790px;
}

.tv-cv .at {
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
}

.tv-svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}

.tv-svg .rc-edge,
.tv-svg .rc-port {
  stroke-width: 1.5;
}

.tv-cv .rc-trigger {
  position: absolute;
}

.tv-cv .rc-event-box .icon {
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
}

.tv-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(28 * var(--u));
  display: flex;
  justify-content: center;
  z-index: 2;
}

.tv-bar .rc-runbar {
  position: relative;
}

.tv-bar .rc-runbar > [class*='when-'] {
  align-items: center;
  gap: calc(4 * var(--u));
}

.tv-bar .rc-runbar.is-running,
.tv-bar .rc-runbar.is-done {
  padding: calc(4 * var(--u)) calc(8 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u));
}

.tv-bar .rc-runbar .when-done .rc-orb {
  animation: none;
  background-image: url(../assets/icons/orb-still.svg);
}


.tv-cv .rc-zoom {
  right: calc(15 * var(--u));
  bottom: calc(15 * var(--u));
}

/* Editor top bar: workflow state and Go live, as in the builder header. */
.tv-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--u));
  height: calc(46 * var(--u));
  border-bottom: 1px solid var(--border);
  background: var(--white);
  font-size: calc(12 * var(--u));
  font-weight: 500;
}

.tv-topbar .tab {
  position: absolute;
  left: calc(24 * var(--u));
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  font-size: calc(13 * var(--u));
  box-shadow: inset 0 calc(-2 * var(--u)) 0 var(--ink);
}

.tv-state {
  display: inline-flex;
  align-items: center;
  height: calc(22 * var(--u));
  padding: 0 calc(10 * var(--u));
  border-radius: 999px;
  background: var(--secondary);
  color: var(--muted);
  transition:
    background 300ms var(--ease-move),
    color 300ms var(--ease-move);
}

.tv-state.live {
  background: var(--green-1);
  color: var(--green-5);
}

.tv-state .is-live,
.tv-state.live .is-off {
  display: none;
}

.tv-state.live .is-live {
  display: inline;
}

.tv-golive {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  height: calc(28 * var(--u));
  padding: 0 calc(12 * var(--u));
  border-radius: calc(6 * var(--u));
  background: var(--zinc-5);
  color: var(--zinc-1);
}

.tv-golive.pressed {
  animation: press 420ms var(--ease-move);
}

/* Callout beside the canvas: what the narration is talking about, readable at
   embed size. */
.tv-callout {
  position: absolute;
  left: 1180px;
  top: 270px;
  z-index: 3;
  width: 580px;
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tv-callout.low {
  top: auto;
  bottom: 120px;
}

.tv-callout .label {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.tv-callout .h3 {
  font-size: 32px;
}

.tv-callout .body {
  font-size: 25px;
  line-height: 1.42;
  color: var(--ink);
}

.tv-list {
  display: grid;
  gap: 12px;
  font-size: 24px;
  line-height: 1.35;
  color: var(--ink);
}

.tv-list > div {
  display: flex;
  gap: 14px;
  align-items: baseline;
}

.tv-list > div::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--zinc-3);
  transform: translateY(-3px);
}

.tv-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  background: #000;
  color: var(--white);
  font-size: 24px;
  font-weight: 500;
}

.tv-pill img,
.tv-pill .icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: contain;
}

.tv-pill .icon {
  stroke: var(--white);
}

.tv-pill img {
  padding: 2px;
  background: var(--white);
}

.tv-doc {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--amber-1);
  box-shadow: inset 0 0 0 1.5px var(--amber-2);
  font-size: 24px;
  font-weight: 600;
  color: var(--amber-5);
}

.tv-doc .icon {
  flex: none;
  font-size: 28px;
}

/* An output the workflow sends: logo, destination and the message text the
   template's job writes. */
.tv-msg {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 22px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
}

.tv-msg + .tv-msg {
  margin-top: 4px;
}

.tv-msg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 600;
  color: var(--muted);
}

.tv-msg-head img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tv-msg-body {
  margin: 0;
  font-size: 23px;
  line-height: 1.42;
  color: var(--ink);
  white-space: pre-line;
}

.tv-msg-body b {
  font-weight: 600;
}

/* Title scene. */
.tv-title {
  position: absolute;
  left: 120px;
  top: 250px;
  width: 820px;
}

.tv-title .h1 {
  font-size: 80px;
}

.tv-title .lead {
  font-size: 34px;
}

.tv-logos {
  display: flex;
  gap: 14px;
}

.tv-logos span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  font-size: 30px;
  color: var(--muted);
}

.tv-logos img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* Setup scene: what to change before going live. */
.tv-setup {
  position: absolute;
  left: 120px;
  top: 270px;
  width: 1000px;
}

.tv-setup .list-row {
  gap: 24px;
  padding: 30px 32px;
  font-size: 32px;
}

.tv-setup .list-row img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.tv-setup .list-row > .icon,
.tv-setup .list-row > i[data-icon] {
  width: 40px;
  font-size: 34px;
  color: var(--muted);
}

.tv-setup .list-row.knowledge > i[data-icon] {
  color: var(--amber-4);
}

.tv-check {
  display: grid;
  place-items: center;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--zinc-3);
  color: transparent;
  font-size: 24px;
  transition:
    background 300ms var(--ease-move),
    border-color 300ms var(--ease-move),
    color 300ms var(--ease-move);
}

.list-row.done .tv-check {
  border-color: var(--green-4);
  background: var(--green-4);
  color: var(--white);
}

.tv-launch {
  position: absolute;
  left: 1220px;
  top: 270px;
  width: 580px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.tv-launch .row {
  gap: 16px;
}

.tv-launch .btn {
  height: 64px;
  font-size: 25px;
}

.tv-launch .tv-state {
  height: 44px;
  padding: 0 18px;
  font-size: 22px;
  font-weight: 600;
}
