/* tutorial-overlay.css */
/* Uses existing variables where possible: var(--primary), var(--surface), var(--backdrop), var(--radius), etc. */

.te-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: auto;
  /* subtle animated dark backdrop */
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.3s ease;
}

.te-overlay.te-hidden {
  opacity: 0;
  pointer-events: none;
}

.te-overlay--passthrough {
  pointer-events: none;
}

/* Spot hole-punch effect achieved via box-shadow or mask, here we use box-shadow approach around a transparent spot */
.te-spot {
  position: fixed;
  z-index: 99991;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); /* adds to the overlay backdrop */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  background: transparent;
  border: 2px solid var(--primary, #007bff);
}

.te-spot.te-spot--circle {
  border-radius: 50%;
}

.te-spot.te-hidden {
  opacity: 0;
  pointer-events: none;
}

/* The pulse animation on the spot */
.te-spot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid var(--primary, #007bff);
  opacity: 0;
  animation: te-pulse 2s infinite cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes te-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* Assistant Card / Bubble */
.te-bubble {
  position: fixed;
  z-index: 99992;
  background: var(--surface, #ffffff);
  color: var(--text, #333333);
  border-radius: var(--radius, 12px);
  padding: 16px;
  width: 320px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  border: 1px solid var(--line, #e2e8f0);
}

/* Glass effect if supported in env */
@supports (backdrop-filter: blur(10px)) {
  .te-bubble {
    background: var(--surface-faded, rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.te-bubble.te-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.95);
}

.te-bubble h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.te-bubble .te-text {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-muted, #64748b);
}

.te-bubble .te-hint {
  font-size: 12px;
  font-style: italic;
  color: var(--primary, #007bff);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.te-bubble .te-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line, #e2e8f0);
  padding-top: 12px;
  margin-top: 4px;
}

.te-bubble .te-count {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-muted, #64748b);
}

/* Buttons inside tutorial */
.te-btn {
  background: var(--surface-alt, #f1f5f9);
  color: var(--text, #333333);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.te-btn:hover {
  background: var(--line, #e2e8f0);
}

.te-btn.primary {
  background: var(--primary, #007bff);
  color: #fff;
}

.te-btn.primary:hover {
  filter: brightness(1.1);
}

.te-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  line-height: 1;
  padding: 4px;
}

.te-close:hover {
  color: var(--text, #333);
}
