/* DemoTour — стили для интерактивного тура по демо-стендам */

.demo-tour-root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --dt-primary: #3b82f6;
  --dt-primary-dark: #2563eb;
  --dt-text: #111827;
  --dt-muted: #6b7280;
  --dt-overlay: rgba(0, 0, 0, 0.72);
}

/* Full-screen overlay with blur */
.demo-tour-overlay-full {
  position: fixed;
  inset: 0;
  z-index: 9995;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  pointer-events: none;
}


/* Pulse ring around target */
.demo-tour-pulse {
  position: fixed;
  z-index: 9997;
  border: 2px solid var(--dt-primary);
  border-radius: 10px;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  animation: demo-tour-pulse 2s infinite;
  pointer-events: none;
  display: none;
  transition: all 0.25s ease;
}

@keyframes demo-tour-pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Active target */
.demo-tour-active {
  z-index: 9997 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.55), 0 0 24px rgba(59, 130, 246, 0.25) !important;
  transition: box-shadow 0.25s ease;
}

.demo-tour-raised {
  z-index: 9996 !important;
}

/* Tooltip */
.demo-tour-tooltip {
  position: fixed;
  z-index: 10005;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  width: 320px;
  max-width: calc(100vw - 40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: none;
  transition: opacity 0.2s ease;
}

.demo-tour-tooltip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dt-text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.demo-tour-tooltip-text {
  font-size: 13px;
  color: var(--dt-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.demo-tour-step-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--dt-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.demo-tour-tooltip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Arrow */
.demo-tour-arrow {
  position: absolute;
  width: 0;
  height: 0;
  animation: demo-tour-arrow-pulse 1.2s infinite;
}

.demo-tour-placement-bottom .demo-tour-arrow {
  top: -8px;
  left: 50%;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid #fff;
}

.demo-tour-placement-top .demo-tour-arrow {
  bottom: -8px;
  left: 50%;
  margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #fff;
}

.demo-tour-placement-right .demo-tour-arrow {
  left: -8px;
  top: 50%;
  margin-top: -6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #fff;
}

.demo-tour-placement-left .demo-tour-arrow {
  right: -8px;
  top: 50%;
  margin-top: -6px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #fff;
}

.demo-tour-placement-center .demo-tour-arrow {
  display: none;
}

@keyframes demo-tour-arrow-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
}

/* Buttons */
.demo-tour-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.demo-tour-btn:hover { transform: translateY(-1px); }
.demo-tour-btn:active { transform: translateY(0); }

.demo-tour-btn-primary {
  background: var(--dt-primary);
  color: #fff;
}
.demo-tour-btn-primary:hover { background: var(--dt-primary-dark); }

.demo-tour-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}
.demo-tour-btn-secondary:hover { background: #e5e7eb; }

.demo-tour-btn-text {
  background: transparent;
  color: var(--dt-muted);
  padding: 8px 10px;
}
.demo-tour-btn-text:hover { color: var(--dt-text); background: #f3f4f6; }

.demo-tour-btn-sm { padding: 6px 12px; font-size: 12px; }

/* Welcome card */
.demo-tour-welcome {
  position: fixed;
  inset: 0;
  z-index: 10005;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.demo-tour-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.demo-tour-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dt-text);
  margin-bottom: 8px;
}

.demo-tour-card-text {
  font-size: 14px;
  color: var(--dt-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.demo-tour-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Floating panel */
.demo-tour-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10005;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  width: 260px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: none;
}

.demo-tour-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.demo-tour-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dt-text);
}

.demo-tour-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.demo-tour-panel-close:hover { background: #f3f4f6; color: #4b5563; }

.demo-tour-panel-status {
  font-size: 12px;
  color: var(--dt-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.demo-tour-panel-actions {
  display: flex;
  justify-content: flex-end;
}

/* Reopen button */
.demo-tour-reopen {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10005;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dt-primary);
  color: #fff;
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
}
.demo-tour-reopen:hover { background: var(--dt-primary-dark); }

/* Generic modal */
.demo-tour-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.demo-tour-modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  max-width: 860px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  position: relative;
}

.demo-tour-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.demo-tour-modal-close:hover { background: #f3f4f6; color: #4b5563; }

.demo-tour-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dt-text);
  margin-bottom: 12px;
  padding-right: 30px;
}

.demo-tour-modal-body {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}

.demo-tour-modal-body p { margin-bottom: 10px; }
.demo-tour-modal-body ul { margin: 8px 0; padding-left: 18px; }
.demo-tour-modal-body li { margin-bottom: 4px; }

.demo-tour-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* Toast */
.demo-tour-toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 10030;
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  display: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: 320px;
}

/* Mobile */
@media (max-width: 640px) {
  .demo-tour-tooltip {
    width: calc(100vw - 32px);
    left: 16px !important;
    right: 16px;
  }
  .demo-tour-panel {
    left: 16px;
    right: 16px;
    width: auto;
    bottom: 16px;
  }
  .demo-tour-card {
    padding: 18px;
  }
  .demo-tour-card-actions {
    flex-direction: column;
  }
  .demo-tour-card-actions .demo-tour-btn {
    width: 100%;
  }
}
