/* ---- Tour overlay ---- */
#tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

.tour-card {
  background: #fdfaf0;
  border: 2.5px solid #1a1a1a;
  border-radius: 18px;
  padding: 26px 26px 20px;
  box-shadow: 6px 6px 0 #1a1a1a;
  max-width: 400px;
  width: 100%;
  transform: rotate(-0.6deg);
}

.tour-step {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(26, 26, 26, 0.5);
  margin-bottom: 6px;
}

.tour-title {
  font-size: 22px;
  margin: 0 0 8px;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.tour-body {
  font-size: 15px;
  color: #1a1a1a;
  margin: 0 0 20px;
  line-height: 1.45;
}

.tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tour-btn-skip {
  background: transparent;
  border: none;
  color: rgba(26, 26, 26, 0.55);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  font-family: inherit;
}
.tour-btn-skip:hover { color: #1a1a1a; }

.tour-btn-next {
  background: #00ff00;
  border: 2px solid #1a1a1a;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #1a1a1a;
  font-family: inherit;
  transition: transform 0.1s, box-shadow 0.15s;
}
.tour-btn-next:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #1a1a1a;
}

/* Highlight on toured UI element */
.tour-highlight {
  position: relative;
  z-index: 999;
  box-shadow: 0 0 0 4px #00ff00, 0 0 32px rgba(0, 255, 0, 0.7);
  animation: tourPulse 1.4s ease-in-out infinite;
}
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 4px #00ff00, 0 0 24px rgba(0, 255, 0, 0.5); }
  50%      { box-shadow: 0 0 0 6px #00ff00, 0 0 40px rgba(0, 255, 0, 0.95); }
}

/* ---- Upsell modal ---- */
#upsell-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

.upsell-card {
  background: #fdfaf0;
  border: 2.5px solid #1a1a1a;
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: 8px 8px 0 #1a1a1a;
  max-width: 460px;
  width: 100%;
  position: relative;
  transform: rotate(-0.8deg);
}

.upsell-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(26, 26, 26, 0.4);
  padding: 6px 10px;
  font-family: inherit;
  line-height: 1;
}
.upsell-close:hover { color: #1a1a1a; }

.upsell-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff5b3a;
  margin-bottom: 6px;
}

.upsell-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  line-height: 1.05;
}
.upsell-title .hand {
  font-family: "Caveat", "Patrick Hand", cursive;
  font-weight: 700;
  color: #00cc00;
  font-size: 1.18em;
  display: inline-block;
  transform: rotate(-3deg);
}

.upsell-body {
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0 0 18px;
  color: #1a1a1a;
}

.upsell-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.upsell-features li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 14.5px;
  color: rgba(26, 26, 26, 0.88);
  line-height: 1.4;
}
.upsell-features li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 12px;
  height: 7px;
  border-left: 2.5px solid #00cc00;
  border-bottom: 2.5px solid #00cc00;
  transform: rotate(-45deg);
}

.upsell-cta {
  display: block;
  background: #00ff00;
  border: 2.5px solid #1a1a1a;
  border-radius: 999px;
  color: #1a1a1a;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  box-shadow: 4px 4px 0 #1a1a1a;
  margin-bottom: 14px;
  transition: transform 0.1s, box-shadow 0.15s;
}
.upsell-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #1a1a1a;
}
.upsell-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #1a1a1a;
}

.upsell-dismiss {
  display: block;
  background: transparent;
  border: none;
  color: rgba(26, 26, 26, 0.55);
  font-size: 14px;
  text-align: center;
  width: 100%;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
}
.upsell-dismiss:hover { color: #1a1a1a; }

/* ---- Persistent bubble ---- */
#upsell-bubble {
  position: fixed;
  bottom: 20px;
  width: 200px;
  background: #ff5b3a;
  border: 2.5px solid #1a1a1a;
  border-radius: 16px;
  padding: 11px 14px;
  box-shadow: 5px 5px 0 #1a1a1a;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  z-index: 50;
  transition: transform 0.1s, box-shadow 0.15s;
  animation: bubbleNudge 4s ease-in-out infinite;
  text-align: left;
  line-height: 1.2;
}
#upsell-bubble.side-right { right: 12px; }
#upsell-bubble.side-left  { left: 12px; }
/* Hide the bubble when toolbar is hidden so it doesn't show in recordings. */
#toolbar.hidden ~ #upsell-bubble { display: none !important; }
#upsell-bubble:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 #1a1a1a;
  animation: none;
}
#upsell-bubble:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #1a1a1a;
}

.bubble-emoji { font-size: 20px; line-height: 1; flex-shrink: 0; }
.bubble-text  { flex: 1; }
.bubble-sub   { font-weight: 600; font-size: 11.5px; opacity: 0.92; letter-spacing: 0.02em; }
.bubble-arrow { font-size: 16px; opacity: 0.9; flex-shrink: 0; }

@keyframes bubbleNudge {
  0%, 88%, 100% { transform: rotate(-1.5deg); }
  92%           { transform: rotate(2deg) translateY(-3px); }
  95%           { transform: rotate(-2deg); }
  98%           { transform: rotate(1deg); }
}
