/* components/ai-sidekick/pix-walkthrough.css
 * Pix guided walkthrough UI.
 * Three elements: semi-transparent overlay, highlight ring, speech bubble.
 * All positioned absolutely so they work on any page without layout changes.
 */

/* ── Overlay — dims everything ──────────────────────────────────────────────── */
.pix-wt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1400;
  animation: pix-wt-fade-in 0.25s ease both;
  /* Pointer events on to catch dismiss-taps, but elements above will intercept */
  pointer-events: all;
}

@keyframes pix-wt-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Highlight ring — glowing border around target element ──────────────────── */
.pix-wt-highlight {
  position: absolute;
  z-index: 1500;
  border-radius: 10px;
  border: 2.5px solid #F5C547;
  box-shadow:
    0 0 0 4px rgba(245, 197, 71, 0.25),
    0 0 0 9999px rgba(0, 0, 0, 0.55); /* punch-through effect */
  pointer-events: none;
  animation: pix-wt-ring-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}

@keyframes pix-wt-ring-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Pulsing attention ring */
.pix-wt-highlight::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 1.5px solid rgba(245, 197, 71, 0.5);
  animation: pix-wt-pulse 1.6s ease-out infinite;
}

@keyframes pix-wt-pulse {
  0%   { opacity: 0.8; transform: scale(1);    }
  70%  { opacity: 0;   transform: scale(1.08); }
  100% { opacity: 0;   transform: scale(1.08); }
}

/* ── Speech bubble ──────────────────────────────────────────────────────────── */
.pix-wt-bubble {
  position: absolute;
  z-index: 1600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(300px, calc(100vw - 28px));
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-top: 3px solid #F5C547;
  border-radius: 12px;
  padding: 12px 14px 12px 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  animation: pix-wt-bubble-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  pointer-events: all;
}

@keyframes pix-wt-bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.pix-wt-bubble__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFF3CC;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.pix-wt-bubble__body {
  flex: 1;
  min-width: 0;
}

.pix-wt-bubble__step {
  margin: 0 0 3px;
  font-size: 10px;
  color: #aaa;
  font-style: italic;
  text-transform: lowercase;
  line-height: 1.3;
}

.pix-wt-bubble__tip {
  margin: 0 0 12px;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.5;
}

.pix-wt-bubble__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pix-wt-bubble__skip {
  background: none;
  border: none;
  font-size: 11px;
  color: #bbb;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  transition: color 0.15s;
}

.pix-wt-bubble__skip:hover {
  color: #888;
}

.pix-wt-bubble__next {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: #F5C547;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.pix-wt-bubble__next:hover {
  background: #edb83a;
}

.pix-wt-bubble__next:active {
  transform: scale(0.96);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .pix-wt-bubble {
    background: #1e1e1e;
    border-color: rgba(255,255,255,0.08);
    border-top-color: #F5C547;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  }
  .pix-wt-bubble__tip  { color: #e0e0e0; }
  .pix-wt-bubble__next { color: #1a1a1a; }
}
