/* Copyright (C) 2026, Richard S. Kaufmann. All rights reserved. CONFIDENTIAL. */
/* Web Show player — dark stage, kiosk-style nav. No frameworks, no build step. */

:root {
  --ws-bg: #10151c;
  --ws-panel: #1b232e;
  --ws-ink: #e8edf3;
  --ws-muted: #93a1b1;
  --ws-line: #2c3947;
  --ws-accent: #2f9e6f;
  --ws-goto: #e8973a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the [hidden]-vs-flex trap */
html, body { height: 100%; }
body {
  margin: 0; background: var(--ws-bg); color: var(--ws-ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex; flex-direction: column;
}

.ws-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 1px solid var(--ws-line); background: var(--ws-panel);
}
.ws-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ws-brand img { height: 28px; border-radius: 4px; }
.ws-show-title { color: var(--ws-muted); font-weight: 500; }
.ws-topbar-right { display: flex; align-items: center; gap: 10px; }
.ws-topbar-right a { color: var(--ws-muted); text-decoration: none; font-size: 13px; }
.ws-topbar-right a:hover { color: var(--ws-ink); }
.ws-ask-toggle {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: #2e60bc; color: #fff; font-weight: 800; font-size: 16px;
}

.ws-stage-wrap {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 14px; gap: 8px;
}
.ws-stage { position: relative; max-width: 100%; max-height: 100%; }
.ws-stage img#wsSlideImage {
  display: block; max-width: 100%; max-height: calc(100vh - 190px);
  border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.ws-menu-host { position: absolute; inset: 0; pointer-events: none; }
.ws-menu-box {
  position: absolute; pointer-events: auto; overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 2px 6px;
  /* sits over a MASKED (usually white) region of the slide image itself —
     dark player-chrome colors would be unreadable there. font-size here is
     only the pre-JS fallback — fitMenuFont (show.js) overrides it inline to
     match the box's own drawn size (Richard 2026-07-15: a bigger box should
     read as bigger text, not a fixed px value). */
  color: #1b1b1b; font-size: 15px; line-height: 1.4;
}
.ws-menu-row {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  border-radius: 6px; padding: 2px 4px;
}
.ws-menu-row:hover, .ws-menu-row:focus-visible { background: rgba(232, 151, 58, 0.14); outline: none; }
.ws-menu-hand {
  flex: 0 0 auto; width: 1.3em; font-size: 1.25em; line-height: 1.15; color: var(--ws-goto);
  /* Blue underline under the ☞ so it reads as a link (matches the row's label link). */
  text-decoration: underline; text-decoration-color: #1a5fb4;
  text-decoration-thickness: 2px; text-underline-offset: 2px;
}
.ws-menu-label { flex: 1 1 auto; text-align: justify; }
.ws-menu-label a { color: #1a5fb4; font-weight: 700; text-decoration: underline; }
.ws-menu-label a:hover { text-decoration: none; }
.ws-video-host { position: absolute; inset: 0; pointer-events: none; }
.ws-video-host video {
  position: absolute; pointer-events: none; background: #000; border-radius: 4px;
  /* The box itself is now computed to the video's real aspect ratio
     (fitVideoBox in show.js), so no cropping/letterboxing is needed —
     contain is a no-op in the common case and the safe fallback if a
     dimension rounds by a hair. */
  object-fit: contain;
}
/* Safari/WebKit backstop: the tour owns playback, and its videos are scenery,
   not miniature interactive media players. The controls attribute is also
   removed in show.js; these selectors prevent transient native chrome during
   load, hover, or a restored browser media session. */
.ws-video-host video::-webkit-media-controls,
.ws-video-host video::-webkit-media-controls-enclosure {
  display: none !important;
  -webkit-appearance: none;
}
.ws-cta-host {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 10px; pointer-events: none;
}
.ws-cta-host a {
  pointer-events: auto; background: var(--ws-accent); color: #fff;
  padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}
.ws-end-card {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 14, 19, 0.72); border-radius: 8px;
}
.ws-end-inner { text-align: center; display: grid; gap: 14px; }
.ws-end-title { font-size: 24px; font-weight: 800; }
.ws-end-copy { color: var(--ws-muted); font-size: 15px; }
.ws-end-actions { display: flex; justify-content: center; gap: 10px; }
.ws-end-inner button {
  font-size: 16px; padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--ws-line); background: #26313f;
  color: #fff; cursor: pointer; font-weight: 700;
}
.ws-end-inner button#wsDetails { background: var(--ws-accent); border-color: var(--ws-accent); }
.ws-caption {
  max-width: 900px; text-align: center; color: var(--ws-muted); font-size: 14.5px;
  white-space: pre-line;
}
.ws-caption a { color: var(--ws-accent); font-weight: 700; text-decoration: underline; }
.ws-caption a:hover { text-decoration: none; }

.ws-nav {
  display: grid; grid-template-columns: 68px minmax(0, 1fr) auto auto auto 68px;
  align-items: center; gap: 12px; padding: 10px 14px;
  border-top: 1px solid var(--ws-line); background: var(--ws-panel);
}
.ws-nav button {
  min-width: 40px; height: 36px; border-radius: 8px; border: 1px solid var(--ws-line);
  background: #232e3b; color: var(--ws-ink); font-size: 16px; cursor: pointer;
}
.ws-nav button:hover:not(:disabled) { border-color: var(--ws-muted); }
.ws-nav button:disabled { opacity: 0.35; cursor: default; }
.ws-nav button.ws-nav-arrow {
  width: 68px; height: 46px; font-size: 30px; font-weight: 800;
  background: #263746; border-color: #536779;
}
#wsPrev { grid-column: 1; }
#wsCounter { grid-column: 2; }
#wsJumpBack { grid-column: 3; }
#wsFeedback { grid-column: 4; }
#wsPlay { grid-column: 5; min-width: 92px; }
#wsNext, #wsGoto { grid-column: 6; grid-row: 1; }
.ws-nav button.ws-goto {
  font-size: 26px; min-width: 56px; background: var(--ws-goto); color: #1b1b1b;
  border-color: var(--ws-goto); font-weight: 800;
}
.ws-nav button.is-playing { background: var(--ws-accent); border-color: var(--ws-accent); color: #fff; }
.ws-counter {
  color: var(--ws-muted); font-variant-numeric: tabular-nums; font-size: 14px;
  justify-self: center; font-weight: 700;
}
.ws-nav button.ws-feedback-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 174px; padding: 0 12px;
  border-color: #865446; background: #382923; color: #f2d6cc;
  font-size: 14px; font-weight: 750; white-space: nowrap;
}
.ws-nav button.ws-feedback-button:hover:not(:disabled) {
  background: #4a3028; border-color: #c47d65; color: #fff;
}
.ws-bug-glyph { width: 20px; height: 20px; flex: 0 0 20px; color: #df856c; }
.ws-nav button.ws-jump-back {
  min-width: 104px; padding: 0 12px;
  border-color: #5b7083; background: #293b4a; color: #f2f6f9;
  font-size: 14px; font-weight: 750; white-space: nowrap;
}
.ws-nav button.ws-jump-back:hover:not(:disabled) {
  background: #344e63; border-color: #7f9ab1;
}

.ws-feedback-modal {
  position: fixed; inset: 0; z-index: 220;
  display: grid; place-items: center; padding: 20px;
}
.ws-feedback-backdrop {
  position: absolute; inset: 0; background: rgba(8, 12, 20, 0.68);
}
.ws-feedback-card {
  position: relative; width: min(92vw, 500px);
  display: grid; gap: 10px; padding: 18px 20px;
  border: 1px solid #c9d0cb; border-radius: 14px;
  background: #f8f6f1; color: #20292b;
  box-shadow: 0 24px 60px rgba(0,0,0,0.48);
}
.ws-feedback-card h2 { margin: 0; padding-right: 28px; font-size: 22px; }
.ws-feedback-close {
  position: absolute; top: 7px; right: 10px;
  border: 0; background: transparent; color: #65716d; cursor: pointer;
  font-size: 26px; line-height: 1;
}
.ws-feedback-close:hover { color: #20292b; }
.ws-feedback-context { margin: 0; color: #63706d; font-size: 13px; }
.ws-feedback-kind {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
}
.ws-feedback-kind label {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: 14px; font-weight: 650;
}
.ws-feedback-kind input {
  width: 17px; height: 17px; margin: 0; accent-color: var(--ws-accent);
}
.ws-feedback-field { font-size: 13px; font-weight: 750; }
#wsFeedbackDescription {
  width: 100%; resize: vertical; min-height: 104px; max-height: 40vh;
  padding: 10px 11px; border: 1px solid #aeb8b2; border-radius: 9px;
  background: #fff; color: #20292b; font: inherit;
}
#wsFeedbackDescription:focus {
  outline: 3px solid rgba(47,158,111,0.2); border-color: var(--ws-accent);
}
.ws-feedback-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.ws-feedback-actions button {
  min-width: 82px; height: 36px; padding: 0 14px;
  border: 1px solid #aeb8b2; border-radius: 8px;
  background: #fff; color: #20292b; cursor: pointer; font-weight: 750;
}
.ws-feedback-actions button.is-primary {
  border-color: var(--ws-accent); background: var(--ws-accent); color: #fff;
}
.ws-feedback-actions button:disabled { opacity: 0.55; cursor: wait; }
.ws-feedback-status {
  min-height: 18px; margin: 0; color: #236a4d; font-size: 13px;
}
.ws-feedback-status.is-error { color: #a02f28; }

@media (max-width: 640px) {
  .ws-nav {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    grid-template-rows: auto auto; gap: 8px; padding: 8px 10px;
  }
  #wsPrev { grid-column: 1; grid-row: 1; }
  #wsCounter { grid-column: 2; grid-row: 1; }
  #wsNext, #wsGoto { grid-column: 3; grid-row: 1; }
  #wsJumpBack { grid-column: 1; grid-row: 2; }
  #wsFeedback { grid-column: 2; grid-row: 2; justify-self: center; }
  #wsPlay { grid-column: 3; grid-row: 2; min-width: 82px; }
  .ws-nav button.ws-nav-arrow { width: 56px; }
  .ws-nav button.ws-feedback-button { min-width: 170px; }
}

.ws-ask-panel {
  position: fixed; right: 14px; bottom: 64px; width: 360px; max-width: calc(100vw - 28px);
  background: var(--ws-panel); border: 1px solid var(--ws-line); border-radius: 12px;
  padding: 12px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); z-index: 40;
}
.ws-ask-head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.ws-ask-head button { border: none; background: none; color: var(--ws-muted); font-size: 18px; cursor: pointer; }
.ws-ask-row { display: flex; gap: 8px; }
.ws-ask-row input {
  flex: 1; background: #121922; color: var(--ws-ink); border: 1px solid var(--ws-line);
  border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
.ws-ask-row button {
  border: none; border-radius: 8px; background: var(--ws-accent); color: #fff;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
}
.ws-ask-row button:disabled { opacity: 0.5; }
.ws-cost { opacity: 0.8; }
.ws-ask-answer {
  margin-top: 10px; font-size: 14px; color: var(--ws-ink); max-height: 40vh; overflow-y: auto;
  white-space: pre-wrap;
}
.ws-ask-answer a { color: #6fc2ff; text-decoration: none; font-weight: 700; }
.ws-ask-answer a:hover { text-decoration: underline; }
.ws-ask-note { color: var(--ws-muted); font-size: 12px; margin-top: 6px; }

/* ---- Public "tour" teaser modal (build --public): product links + ? ask ---- */
.ws-teaser-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 12, 20, 0.62);
}
.ws-teaser-modal[hidden] { display: none; }
.ws-teaser-card {
  position: relative; box-sizing: border-box;
  width: min(92vw, 420px); padding: 26px 28px 30px;
  background: #fff; color: #14181f;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  text-align: center;
}
.ws-teaser-close {
  position: absolute; top: 8px; right: 12px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: #8a94a4;
}
.ws-teaser-close:hover { color: #14181f; }
.ws-teaser-logo { width: 176px; max-width: 60%; height: auto; margin: 4px auto 14px; display: block; }
.ws-teaser-msg { margin: 0 0 18px; font-size: 16px; line-height: 1.45; }
.ws-teaser-mail {
  display: inline-block; text-decoration: none;
  background: #2e7d32; color: #fff; font-weight: 700;
  padding: 10px 20px; border-radius: 999px; font-size: 15px;
}
.ws-teaser-mail:hover { background: #276b2b; }
/* a product link that now opens the modal still looks/acts like a link */
a.ws-product-link { cursor: pointer; }
@media (prefers-color-scheme: dark) {
  .ws-teaser-card { background: #1a1f27; color: #eef1f5; }
  .ws-teaser-close { color: #9aa3b2; }
  .ws-teaser-close:hover { color: #eef1f5; }
}
