/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fonts */
@font-face {
  font-family: BTCurve;
  src: url("BTCurve/BTCurve_Rg.ttf");
}
body {
  font-family: "Poppins", BTCurve, sans-serif;
  color: #333;
  background: #f0f0f0;
  overflow: hidden;
}

/* Design tokens */
:root {
  --primary: #625de4;
  --secondary: #fe81f8;
  --accent: #5514bb;
  --gray: #454545;
  --white: #fff;
}

/* Standard Dialog - All dialogs use this base */
.dialog-standard {
  position: absolute;
  left: 652px;
  top: 32px;
  height: 639px;
  width: 559px;
  padding: 31px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 0 17px rgba(82, 79, 159, 0.1);
  border: 2px solid #fff;
  backdrop-filter: blur(16px);
  z-index: 1000;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.dialog-standard.active {
  opacity: 1;
  visibility: visible;
}

/* Full-width variant for problem/solution dialogs */
.dialog-fullwidth {
  left: 24px;
  right: 24px;
  width: auto;
  max-width: 1193px;
  padding-top: 160px;
}

/* Content panel video uses standard padding */
.dialog-fullwidth:not(.dialog-problem-solution):not(.dialog-problem-solution-video) {
  padding-top: 31px;
}

.dialog-fullwidth:not(.dialog-problem-solution):not(.dialog-problem-solution-video) .message-container p {
  float: left;
  width: 27%;
  margin-right: 20px;
}

.dialog-fullwidth:not(.dialog-problem-solution):not(.dialog-problem-solution-video) .message-container video {
  float: right;
  width: 60%;
}

/* Standard Dialog Typography - Simplified Structure */
/* Breadcrumb - use class="breadcrumb" on first heading */
.breadcrumb {
  font-size: 0.9em;
  font-weight: 400;
  color: var(--secondary);
  padding-top: 9px;
  padding-bottom: 25px;
  margin-bottom: 0;
}

/* All H4s = Headings/Subheadings */
.dialog-standard h4 {
  color: var(--accent);
  font-size: 1.5em;
  font-weight: 600;
  padding-top: 0;
  margin-bottom: 12px;
}

/* H5 = Smaller headings (used in feature cards) */
.dialog-standard h5 {
  color: var(--accent);
  font-size: 1.2em;
  font-weight: 600;
  padding-top: 0;
  margin-bottom: 12px;
}

/* Subtitle - use class="subtitle" on paragraph after heading */
.subtitle {
  color: var(--gray);
  font-size: 0.95em;
  margin-bottom: 16px;
  opacity: 0.9;
}

.dialog-standard p {
  color: var(--gray);
  margin-bottom: 12px;
}

/* Circle video - positioned absolutely on page */
.circle-video {
  position: absolute;
  height: 250px;
  width: 250px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: -6px 0px 17px rgba(82, 79, 159, 0.5);
  backdrop-filter: blur(16px);
  border: 10px solid #81e5a6;
  z-index: 999;
  top: 82px;
  left: 351px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

/* Shipping and delivery circle videos - original size and position */
#shipping-circle,
#delivering-circle {
  height: 400px;
  width: 400px;
  top: 126px;
  left: 163px;
}

.circle-video.active {
  opacity: 1;
  visibility: visible;
}

.circle-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  aspect-ratio: 1/1;
}

/* Marks container - positioned absolutely on page for circular-demo */
.marks-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}

.marks-container.active {
  opacity: 1;
  visibility: visible;
}

.mark {
  position: absolute;
  width: 80px;
  height: 80px;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 10;
}

.mark.active {
  opacity: 1;
}

/* Mark positioning for specific dialogs */
#dialog4-three-images-marks {
  --mark1-top: 431px;
  --mark1-left: 384px;
  --mark2-top: 374px;
  --mark2-left: 493px;
  --mark3-top: 228px;
  --mark3-left: 259px;
}

#dialog4-single-image-marks {
  --mark1-top: 32%;
  --mark1-left: 4%;
  --mark2-bottom: 5%;
  --mark2-right: 5%;
  --mark3-top: 50%;
  --mark3-left: 15%;
}

#dialog4-no-images-marks {
  --mark1-top: 395px;
  --mark1-left: 448px;
}

#dialog4-three-images-marks .mark1,
#dialog4-single-image-marks .mark1,
#dialog4-no-images-marks .mark1 {
  top: var(--mark1-top);
  left: var(--mark1-left);
}

#dialog4-three-images-marks .mark2,
#dialog4-single-image-marks .mark2,
#dialog4-no-images-marks .mark2 {
  top: var(--mark2-top);
  left: var(--mark2-left);
}

#dialog4-three-images-marks .mark3,
#dialog4-single-image-marks .mark3,
#dialog4-no-images-marks .mark3 {
  top: var(--mark3-top);
  left: var(--mark3-left);
}

.dialog-standard video {
  width: 100%;
  border-radius: 5px;
  object-fit: cover;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-secondary {
  background: var(--secondary);
  color: #fff;
}
.btn-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(98, 93, 228, 0.9);
  padding: 0;
  color: white;
  height: 100px;
  width: 150px;
  text-align: center;
  border-radius: 30px;
  font-size: 55px;
  z-index: 1002;
}
.btn-play.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Canvas / video */
#canvas {
  width: 1493px;
  height: 702px;
  margin: auto;
  border: 1px solid var(--secondary);
  border-radius: 0;
}
.canvas {
  width: 1241px;
  height: 700px;
  margin: auto;
  overflow: visible;
  display: flex;
  transition: margin-left 0.3s ease, width 0.3s ease;
}
#mainVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  display: none;
}

/* Info overlay */
#info-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(40, 48, 121, 0.795);
  z-index: 1006;
  opacity: 0;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(4px);
}
#info-overlay.active {
  display: block;
  opacity: 1;
}

/* Continue button */
#canvas-continue-button {
  position: fixed;
  bottom: 42px;
  right: 42px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  z-index: 1003;
  display: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* lock on buttons when quiz is open */
body.is-quiz-open #video-container,
body.is-quiz-open #sidebar,
body.is-quiz-open .dialog:not(.quiz),
body.is-quiz-open #overlay,
body.is-quiz-open #info-overlay {
  pointer-events: none !important;
}

/* Continue button needs to be clickable during quiz */
body.is-quiz-open #canvas-continue-button {
  pointer-events: auto !important;
}

/* Global color theme integrations */
.dialog-problem-solution .message-container .h5,
.sidebar-timeframe-button.active,
#map .h5,
#map .h6 {
  background-color: var(--secondary);
}
.dialog-image-demo .circle-video,
.dialog-circular-demo .circle-video {
  border-color: var(--secondary);
}

/* Paragraph default */
p {
  color: var(--gray);
}

/* Version Indicator - Top Left */
#version-indicator {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  z-index: 9999;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#version-indicator .version-number {
  font-weight: bold;
  font-size: 13px;
  color: #4ade80;
  margin-bottom: 2px;
}

#version-indicator .version-updated {
  color: #d1d5db;
  font-size: 10px;
}

#version-indicator .version-updated span {
  color: #fff;
}
