/* ==============================================================
   Tutorial: Mascot Button + Overlay
   Phase 92. All styles reference design-system.css tokens only.
   ============================================================== */

/* ----- Mascot Button (FAB) ----- */
.mascot-btn {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 56px;
  height: 56px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 950;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 28px;
  line-height: 1;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.mascot-btn:hover { transform: scale(1.08); box-shadow: var(--shadow-lg); }
.mascot-btn:active { transform: scale(0.96); }
.mascot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Shopping-lists.html override — clears 3.5rem sticky footer */
.mascot-btn.mascot-btn--above-footer {
  bottom: calc(3.5rem + var(--space-5));
}

/* First-visit pulse ring */
@keyframes mascot-pulse {
  0%   { box-shadow: var(--shadow-glass), 0 0 0 0 rgba(217, 119, 87, 0.5); }
  70%  { box-shadow: var(--shadow-glass), 0 0 0 10px rgba(217, 119, 87, 0); }
  100% { box-shadow: var(--shadow-glass), 0 0 0 0 rgba(217, 119, 87, 0); }
}
.mascot-btn.mascot-pulse { animation: mascot-pulse 2s ease infinite; }

/* ----- Tutorial Overlay Backdrop ----- */
#tutorial-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(43, 42, 38, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  transition: opacity var(--t-base);
}
#tutorial-backdrop.active {
  display: flex;
  opacity: 1;
}

/* ----- Tutorial Panel ----- */
#tutorial-panel {
  width: 100%;
  max-width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  font-family: var(--font-sans);
  color: var(--ink-primary);
}
@media (min-width: 640px) {
  #tutorial-panel {
    max-width: 480px;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
  }
}
@media (min-width: 1024px) {
  #tutorial-panel { max-width: 520px; }
}

/* ----- Panel Header ----- */
.tutorial-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.tutorial-header-mascot {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.tutorial-header-title {
  flex: 1;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.2;
  margin: 0;
}
.tutorial-close-btn {
  background: transparent;
  border: none;
  padding: var(--space-1);
  font-size: var(--text-2xl);
  color: var(--ink-tertiary);
  cursor: pointer;
  line-height: 1;
  transition: color var(--t-fast);
}
.tutorial-close-btn:hover { color: var(--ink-primary); }

/* ----- Step Indicator Strip ----- */
.tutorial-step-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tutorial-step-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--paper-shadow);
  border: 1px solid var(--border-subtle);
  transition: background var(--t-fast);
}
.tutorial-step-dot.active { background: var(--accent); border-color: var(--accent); }

/* ----- Step Body ----- */
.tutorial-step-illustration {
  height: 120px;
  border-radius: var(--radius-lg);
  background: var(--paper-warm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  line-height: 1;
  margin-bottom: var(--space-4);
}
.tutorial-step-copy {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-5) 0;
}
.tutorial-step[hidden] { display: none; }

/* ----- Footer Row ----- */
.tutorial-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.tutorial-skip-link {
  background: transparent;
  border: none;
  color: var(--ink-tertiary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: var(--space-2);
  transition: color var(--t-fast);
}
.tutorial-skip-link:hover { color: var(--ink-primary); }
.tutorial-skip-link[hidden] { display: none; }

/* ----- Reduced Motion ----- */
@media (prefers-reduced-motion: reduce) {
  .mascot-btn { transition: none; }
  .mascot-btn:hover { transform: none; }
  .mascot-btn:active { transform: none; }
  .mascot-btn.mascot-pulse { animation: none; }
  #tutorial-backdrop { transition: none; }
  .tutorial-step-dot { transition: none; }
}
