/* ═══════════════════════════════════════════════════
   MySQL Advisor — Shepherd.js tour theme (dark / light)
   Tour popup: fixed dark panel (not tied to app light/dark mode)
   ═══════════════════════════════════════════════════ */

:root {
  --tour-popup-bg: #0a0a0a;
  --tour-popup-surface: #141414;
  --tour-popup-text: #f5f5f5;
  --tour-popup-text-muted: rgba(245, 245, 245, 0.72);
  --tour-popup-border: rgba(255, 255, 255, 0.12);
  --tour-popup-title: #c2410c;
  --tour-popup-progress: #ea580c;
}

.shepherd-modal-overlay-container {
  z-index: 10050 !important;
}

.shepherd-modal-overlay-container.shepherd-modal-is-visible path {
  fill: rgba(10, 14, 26, 0.78);
}

body.light-mode .shepherd-modal-overlay-container.shepherd-modal-is-visible path {
  fill: rgba(15, 23, 42, 0.5);
}

.shepherd-element.shepherd-mysql-advisor,
.shepherd-mysql-advisor.shepherd-element {
  z-index: 10060 !important;
  max-width: min(22rem, calc(100vw - 2rem));
  border-radius: var(--radius);
  border: 1px solid var(--tour-popup-border);
  background: var(--tour-popup-bg) !important;
  color: var(--tour-popup-text);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(194, 65, 12, 0.25);
  font-family: var(--font);
  animation: mysqlAdvisorTourIn 0.28s ease-out;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .shepherd-element.shepherd-mysql-advisor,
  .shepherd-mysql-advisor.shepherd-element {
    animation: none;
  }
}

@keyframes mysqlAdvisorTourIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shepherd-mysql-advisor .shepherd-header {
  padding: 1rem 1rem 0.35rem;
  background: var(--tour-popup-bg) !important;
  border-bottom: none;
}

.shepherd-mysql-advisor .shepherd-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tour-popup-title) !important;
  line-height: 1.35;
}

.shepherd-mysql-advisor .shepherd-text {
  padding: 0 1rem 0.75rem;
  background: var(--tour-popup-bg) !important;
  color: var(--tour-popup-text-muted);
}

.shepherd-mysql-advisor .shepherd-content {
  padding: 0;
  background: var(--tour-popup-bg) !important;
}

.shepherd-mysql-advisor .shepherd-footer {
  padding: 0.65rem 1rem 1rem;
  border-top: 1px solid var(--tour-popup-border);
  background: var(--tour-popup-bg) !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
}

.shepherd-mysql-advisor .shepherd-button {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--tour-popup-border);
  background: var(--tour-popup-surface);
  color: var(--tour-popup-text);
}

.shepherd-mysql-advisor .shepherd-button:hover {
  border-color: var(--tour-popup-title);
  background: #1c1c1c;
  color: var(--tour-popup-text);
}

.shepherd-mysql-advisor .shepherd-button-secondary {
  background: transparent;
  color: var(--tour-popup-text-muted);
}

.shepherd-mysql-advisor .mysql-advisor-tour__btn-primary {
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.35), rgba(234, 88, 12, 0.2));
  border-color: rgba(194, 65, 12, 0.55);
  color: #fff;
}

.shepherd-mysql-advisor .mysql-advisor-tour__btn-primary:hover {
  border-color: var(--tour-popup-progress);
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.5), rgba(234, 88, 12, 0.3));
  color: #fff;
}

.shepherd-mysql-advisor .mysql-advisor-tour__btn-skip {
  margin-right: auto;
  border-color: transparent;
  background: transparent;
  color: var(--tour-popup-text-muted);
  font-weight: 500;
}

.shepherd-mysql-advisor .mysql-advisor-tour__btn-skip:hover {
  color: var(--tour-popup-text);
  border-color: var(--tour-popup-border);
}

.shepherd-mysql-advisor .mysql-advisor-tour__progress {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tour-popup-progress);
}

.shepherd-mysql-advisor .mysql-advisor-tour__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--tour-popup-text);
}

/* Highlight ring (Shepherd applies class to target) */
.shepherd-target.shepherd-enabled {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── Header: How this works ─────────────────────── */
.hero-links {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.hero-links .help-btn,
.tour-restart-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-links .help-btn:hover,
.tour-restart-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.tour-restart-btn {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
}

@media (max-width: 520px) {
  .hero-links {
    left: 1rem;
    right: 4.5rem;
    max-width: calc(100% - 5rem);
  }
}
