/* Guest Live Chart — tour coachmarks, color legend, locked-feature teases */

.guest-chart-guide-veil {
  position: fixed;
  inset: 0;
  z-index: 11800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.guest-chart-guide-veil.is-open {
  opacity: 1;
  pointer-events: auto;
}
.guest-chart-guide-veil__hole {
  position: absolute;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.62),
    0 0 0 2px rgba(255, 215, 0, 0.55),
    0 0 24px rgba(255, 215, 0, 0.22);
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease, border-radius 0.22s ease;
  pointer-events: none;
}
.guest-chart-guide-veil__hole.is-vertical-rail {
  border-radius: 14px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.66),
    0 0 0 2px rgba(255, 215, 0, 0.62),
    0 0 28px rgba(255, 215, 0, 0.28);
}

.guest-chart-coach {
  position: fixed;
  z-index: 11810;
  width: min(92vw, 300px);
  padding: 14px 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.32);
  background: #0e0e0e;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: rgba(245, 245, 247, 0.94);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.guest-chart-coach.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.guest-chart-coach__step {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.72);
}
.guest-chart-coach__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffd700;
  line-height: 1.25;
}
.guest-chart-coach__body {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(230, 230, 230, 0.9);
}
.guest-chart-coach__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.guest-chart-coach__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.guest-chart-coach__btn--ghost {
  background: transparent;
  border-color: rgba(255, 215, 0, 0.28);
  color: rgba(255, 215, 0, 0.9);
}
.guest-chart-coach__btn--ghost:hover,
.guest-chart-coach__btn--ghost:focus-visible {
  background: rgba(255, 215, 0, 0.08);
  outline: none;
}
.guest-chart-coach__btn--primary {
  background: #ffc107;
  color: #212529;
  border-color: #ffc107;
}
.guest-chart-coach__btn--primary:hover,
.guest-chart-coach__btn--primary:focus-visible {
  background: #ffca2c;
  outline: none;
}

/* Header control — match TF rail height / radius */
.guest-chart-widget-head .guest-chart-legend-chip,
.guest-chart-legend-chip {
  position: relative;
  left: auto;
  top: auto;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  height: var(--chart-header-control-h, 32px);
  min-height: var(--chart-header-control-h, 32px);
  max-width: min(220px, 46vw);
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: #111;
  color: rgba(255, 215, 0, 0.92);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.guest-chart-legend-chip[hidden] {
  display: none !important;
}
.guest-chart-legend-chip:hover,
.guest-chart-legend-chip:focus-visible {
  border-color: rgba(255, 215, 0, 0.55);
  background: #1a1a1a;
  color: #ffd700;
  outline: none;
}
.guest-chart-legend-chip[aria-expanded="true"] {
  background: #1a1500;
  border-color: rgba(255, 215, 0, 0.65);
}
.guest-chart-legend-chip__swatches {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.guest-chart-legend-chip__swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.guest-chart-legend-chip__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-chart-legend-modal {
  position: fixed;
  inset: 0;
  z-index: 12040;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}
.guest-chart-legend-modal[hidden] {
  display: none !important;
}
.guest-chart-legend-card {
  width: min(420px, 100%);
  max-height: min(78vh, 640px);
  overflow: auto;
  padding: 16px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: #111;
  color: #f5e6a8;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
.guest-chart-legend-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.guest-chart-legend-card__head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #ffd700;
}
.guest-chart-legend-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 215, 0, 0.9);
  cursor: pointer;
}
.guest-chart-legend-close:hover,
.guest-chart-legend-close:focus-visible {
  background: rgba(255, 215, 0, 0.08);
  outline: none;
}
.guest-chart-legend-lead {
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255, 215, 0, 0.62);
}
.guest-chart-legend-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 215, 0, 0.12);
  font-size: 0.84rem;
}
.guest-chart-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-top: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.guest-chart-legend-condition {
  font-weight: 700;
  color: rgba(255, 230, 150, 0.95);
}
.guest-chart-legend-meaning {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: rgba(255, 215, 0, 0.62);
}

/* Locked TF chips inherit member-like rail styles from live_guest.php */

.hero-chart-display-gear-lock__list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.hero-chart-display-gear-lock__list li {
  position: relative;
  margin: 0.28rem 0;
  padding-left: 1.15rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(245, 245, 247, 0.82);
}
.hero-chart-display-gear-lock__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.7);
}
.hero-chart-display-gear-lock__list .bi-lock-fill {
  margin-right: 2px;
  font-size: 0.65rem;
  color: rgba(255, 215, 0, 0.75);
  vertical-align: 0.05em;
}

.guest-chart-preview-pane .chart-indicator-panel.is-tour-target {
  pointer-events: auto;
  z-index: 11805;
}
.guest-chart-widget-head.is-tour-target,
.guest-chart-tf-wrap.is-tour-target,
.hero-chart-display-wrap.is-tour-target,
.hero-chart-display-panel.is-tour-target {
  position: relative;
  z-index: 11805;
}
.hero-chart-display-panel.is-tour-open,
.hero-chart-display-panel.is-tour-target {
  z-index: 11806;
}

@media (max-width: 575.98px) {
  .guest-chart-coach {
    width: min(94vw, 280px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guest-chart-guide-veil,
  .guest-chart-guide-veil__hole,
  .guest-chart-coach {
    transition: none;
  }
}
