/* 4P3X SafeSpark™ Guided Next Step Assist — additive UI guidance layer */
:root {
  --safespark-guide-gold: #f5c542;
  --safespark-guide-purple: #8a5cff;
  --safespark-guide-green: #4be28b;
  --safespark-guide-bg: rgba(10, 10, 14, 0.94);
}

.safespark-next-step-highlight {
  position: relative !important;
  z-index: 20 !important;
  outline: 3px solid var(--safespark-guide-gold) !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 6px rgba(245, 197, 66, 0.18), 0 0 28px rgba(138, 92, 255, 0.45), 0 0 38px rgba(75, 226, 139, 0.25) !important;
  border-color: var(--safespark-guide-gold) !important;
  transform: translateY(-1px);
  scroll-margin: 96px;
}

.safespark-next-step-highlight::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(245, 197, 66, 0.36);
  border-radius: inherit;
  pointer-events: none;
  animation: safesparkGuidePulse 1.8s ease-in-out infinite;
}

.safespark-next-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-left: 0.45rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245,197,66,0.98), rgba(138,92,255,0.88));
  color: #090909;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.35);
  pointer-events: none;
}

.safespark-guide-panel {
  position: fixed;
  right: clamp(12px, 2vw, 22px);
  bottom: clamp(12px, 2vw, 22px);
  width: min(360px, calc(100vw - 24px));
  z-index: 9999;
  color: #f7f3e8;
  background: var(--safespark-guide-bg);
  border: 1px solid rgba(245, 197, 66, 0.42);
  border-radius: 18px;
  padding: 0.85rem;
  box-shadow: 0 18px 42px rgba(0,0,0,0.38), 0 0 26px rgba(138,92,255,0.24);
  backdrop-filter: blur(12px);
}

.safespark-guide-panel[data-minimised="true"] {
  width: auto;
  padding: 0.55rem;
}

.safespark-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.safespark-guide-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff7da;
}

.safespark-guide-status {
  margin: 0.25rem 0 0;
  color: rgba(247, 243, 232, 0.86);
  font-size: 0.82rem;
  line-height: 1.35;
}

.safespark-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.safespark-guide-button {
  border: 1px solid rgba(245,197,66,0.55);
  background: rgba(255,255,255,0.08);
  color: #fff8df;
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.safespark-guide-button.primary {
  background: linear-gradient(135deg, rgba(245,197,66,0.95), rgba(138,92,255,0.9));
  color: #07070a;
}

.safespark-guide-button:hover,
.safespark-guide-button:focus-visible {
  outline: 2px solid var(--safespark-guide-green);
  outline-offset: 2px;
}

.safespark-guide-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.safespark-guide-chip {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.82);
  padding: 0.18rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
}

.safespark-guide-info-card,
.guidedNextStepLanding,
.guidedNextStepOverview {
  border: 1px solid rgba(245, 197, 66, 0.32) !important;
  box-shadow: 0 16px 34px rgba(0,0,0,0.20), inset 0 0 0 1px rgba(138,92,255,0.12) !important;
}

.guidedNextStepLanding .guidedNextStepGrid,
.guidedNextStepOverview .guidedNextStepGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.guidedNextStepLanding .guidedNextStepMiniCard,
.guidedNextStepOverview .guidedNextStepMiniCard {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 0.85rem;
  background: rgba(255,255,255,0.045);
}

.guidedNextStepMiniCard h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.guidedNextStepMiniCard p {
  margin: 0;
}

@keyframes safesparkGuidePulse {
  0%, 100% { opacity: 0.58; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.025); }
}

@media (max-width: 700px) {
  .safespark-guide-panel {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
  .safespark-guide-button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .safespark-next-step-highlight,
  .safespark-next-step-highlight::before {
    animation: none !important;
    transform: none !important;
  }
}

/* 2026-07-09 Core audit fix — compact non-blocking smart assistant dock.
   Keeps Guided Next Step Assist visible without covering About SafeSpark™ shortcut
   or VexSpark™ voice controls. */
.safespark-guide-panel {
  left: clamp(10px, 1.4vw, 16px) !important;
  right: auto !important;
  bottom: clamp(10px, 1.4vw, 16px) !important;
  top: auto !important;
  width: min(248px, calc(100vw - 24px)) !important;
  max-height: 36vh !important;
  overflow: auto !important;
  padding: 0.52rem !important;
  border-radius: 14px !important;
  z-index: 8200 !important;
}
.safespark-guide-title { font-size: 0.78rem !important; line-height: 1.12 !important; }
.safespark-guide-status { font-size: 0.69rem !important; line-height: 1.24 !important; margin-top: 0.12rem !important; }
.safespark-guide-chip-row { display: none !important; }
.safespark-guide-actions { gap: 0.28rem !important; margin-top: 0.38rem !important; }
.safespark-guide-button {
  padding: 0.34rem 0.48rem !important;
  font-size: 0.66rem !important;
  line-height: 1.12 !important;
}
.safespark-guide-panel[data-minimised="true"] {
  width: min(210px, calc(100vw - 24px)) !important;
  max-height: 92px !important;
  overflow: hidden !important;
}
.safespark-guide-panel[data-minimised="true"] .safespark-guide-status,
.safespark-guide-panel[data-minimised="true"] .safespark-guide-chip-row,
.safespark-guide-panel[data-minimised="true"] [data-guide-refresh],
.safespark-guide-panel[data-minimised="true"] [data-guide-toggle] {
  display: none !important;
}
.safespark-guide-panel[data-minimised="true"] .safespark-guide-actions {
  margin-top: 0.28rem !important;
}
.safespark-next-step-highlight {
  scroll-margin: 124px !important;
}
@media (max-width: 700px) {
  .safespark-guide-panel {
    top: 74px !important;
    left: 8px !important;
    right: auto !important;
    bottom: auto !important;
    width: min(220px, calc(100vw - 16px)) !important;
    max-height: 24vh !important;
    padding: 0.46rem !important;
  }
  .safespark-guide-panel:not([data-minimised="false"]) .safespark-guide-status,
  .safespark-guide-panel:not([data-minimised="false"]) [data-guide-refresh],
  .safespark-guide-panel:not([data-minimised="false"]) [data-guide-toggle] {
    display: none !important;
  }
  .safespark-guide-button { font-size: 0.62rem !important; padding: 0.32rem 0.42rem !important; }
}
@media print {
  .safespark-guide-panel,
  .safespark-next-step-badge { display: none !important; }
}

/* 2026-07-09 request update — remove floating next-step box, keep glow + arrows. */
.safespark-guide-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.safespark-next-step-arrow {
  position: fixed;
  z-index: 9000;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.78);
  border: 1px solid rgba(245, 197, 66, 0.58);
  color: var(--safespark-guide-gold);
  font-size: 1rem;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.28), 0 0 18px rgba(138, 92, 255, 0.16);
  pointer-events: none;
  transform-origin: center;
  animation: safesparkArrowNudge 1.6s ease-in-out infinite;
}

.safespark-next-step-arrow[data-position="top"] {
  transform: rotate(90deg);
}

.safespark-next-step-arrow[data-position="right"] {
  transform: rotate(180deg);
}

.safespark-next-step-arrow[data-multiple="true"] {
  opacity: 0.9;
}

@keyframes safesparkArrowNudge {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .safespark-next-step-arrow { animation: none !important; }
}

@media print {
  .safespark-next-step-arrow { display: none !important; }
}
