/* ═══════════════════════════════════════════════════════════════════
   13 POPOVER BOOT
   Recipe picker popover + boot overlay
   Sourced from monolithic main.css lines 5454-5867.
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
 * Behavior Recipes — instance inspector cards + picker popover.
 * Recipes are pre-cabled patterns (NPC parlante, Pickup, Trigger...) shown
 * as expandable cards above the override modules.
 * ─────────────────────────────────────────────────────────────── */
.inspector-behaviors { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.recipe-card-list { display: flex; flex-direction: column; gap: 8px; }
.recipe-empty {
  padding: 12px;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(108,99,255,0.04);
}

.recipe-card {
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.recipe-card:hover {
  border-color: var(--glass-border-strong);
  box-shadow: var(--glass-shadow-sm);
  transform: translateY(-1px);
}
.recipe-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}
.recipe-card-chev {
  color: var(--text-dim); font-size: 11px;
  transition: transform 160ms ease;
}
.recipe-card.collapsed .recipe-card-chev { transform: rotate(-90deg); }
.recipe-card-icon {
  font-size: 18px; line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
.recipe-card-text { flex: 1; min-width: 0; }
.recipe-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recipe-card-summary {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recipe-card-menu-btn {
  background: transparent; border: 0;
  color: var(--text-dim);
  font-size: 16px;
  width: 24px; height: 24px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.recipe-card-menu-btn:hover { background: rgba(108,99,255,0.15); color: var(--text); }
.recipe-card-body {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border2);
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(0,0,0,0.18);
  max-height: 1000px;
  transition: max-height 200ms ease, padding 200ms ease, border-color 200ms ease;
  overflow: hidden;
}
.recipe-card.collapsed .recipe-card-body {
  max-height: 0;
  padding-top: 0; padding-bottom: 0;
  border-top-color: transparent;
}
.recipe-param-row { gap: 8px; }
.recipe-param-row > label {
  flex: 0 0 110px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.recipe-param-row textarea.inp {
  resize: vertical;
  font-family: inherit;
  min-height: 36px;
}

.recipe-add-btn {
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(108,99,255,0.06);
  border: 1px dashed rgba(108,99,255,0.5);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 120ms ease, border-color 120ms ease;
}
.recipe-add-btn:hover {
  background: rgba(108,99,255,0.12);
  border-color: var(--accent);
}

/* ── Recipe picker popover (Liquid Glass) ─────────────────────── */
.recipe-picker-popover {
  position: fixed;
  z-index: 9000;
  width: min(460px, 92vw);
  max-height: min(560px, 75vh);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), var(--glass-glow);
  display: flex; flex-direction: column;
  font-size: 12px;
  animation: rp-fadein 220ms var(--ease-spring);
}
@keyframes rp-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.recipe-picker-head {
  padding: 10px;
  border-bottom: 1px solid var(--border2);
  display: flex; flex-direction: column; gap: 8px;
}
.recipe-picker-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(0,0,0,0.32);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
  color: var(--text);
}
.recipe-picker-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,117,255,0.18);
}
.recipe-picker-tag-toggle {
  font-size: 11px;
  color: var(--text-dim);
}
.recipe-picker-tag-toggle label {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.recipe-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px 8px;
}
.recipe-picker-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}
.recipe-picker-group-head {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  text-transform: uppercase;
  position: sticky; top: 0;
  background: var(--bg2);
  z-index: 1;
}
.recipe-picker-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  margin: 2px 4px;
}
.recipe-picker-row:hover, .recipe-picker-row.active {
  background: rgba(108,99,255,0.14);
  border-color: rgba(108,99,255,0.4);
}
.recipe-picker-icon {
  font-size: 18px; line-height: 1;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
  border-radius: 6px;
}
.recipe-picker-text { flex: 1; min-width: 0; }
.recipe-picker-title { font-weight: 600; color: var(--text); font-size: 12.5px; }
.recipe-picker-desc {
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}
.recipe-picker-foot {
  padding: 8px 12px;
  border-top: 1px solid var(--border2);
  font-size: 10.5px;
  color: var(--text-dim);
  display: flex; justify-content: space-between;
}

/* ════════════════════════════ BOOT OVERLAY ════════════════════════════
 * Premium liquid-glass loading screen shown before the editor is ready.
 * Critical baseline lives inline in <head>; this file adds the polish. */
.boot-card {
  position: relative;
  z-index: 2;
  width: min(440px, 88vw);
  padding: 36px 36px 28px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28,30,56,0.78), rgba(18,20,40,0.82));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 32px 80px -20px rgba(0,0,0,0.85),
    0 8px 24px -8px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 0 1px rgba(124,117,255,0.18),
    0 0 64px -8px rgba(124,117,255,0.18);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  text-align: center;
  animation: bootCardIn 700ms cubic-bezier(.22,1,.36,1) both;
}
.boot-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 55%);
  pointer-events: none;
}

.boot-logo {
  position: relative;
  width: 110px; height: 110px;
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
}
.boot-logo-glyph {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(124,117,255,0.65));
  animation: bootGlyphPulse 2200ms ease-in-out infinite;
  z-index: 2;
}
.boot-logo-ring,
.boot-logo-ring-2 {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #9b95ff;
  border-right-color: rgba(155,149,255,0.35);
  animation: bootSpin 1400ms linear infinite;
}
.boot-logo-ring-2 {
  inset: 8px;
  border-top-color: rgba(255,124,200,0.7);
  border-right-color: rgba(255,124,200,0.18);
  animation: bootSpin 2100ms linear infinite reverse;
  opacity: 0.7;
}

.boot-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, #c8c2ff 60%, #9b95ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.boot-stage {
  font-size: 13px;
  color: rgba(232,232,255,0.72);
  letter-spacing: 0.3px;
  margin-bottom: 22px;
  min-height: 18px;
  display: inline-flex; align-items: center; gap: 4px;
  transition: opacity 200ms ease;
}
.boot-dots {
  display: inline-flex; gap: 3px; margin-left: 4px;
}
.boot-dots span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(232,232,255,0.7);
  animation: bootDot 1200ms ease-in-out infinite;
}
.boot-dots span:nth-child(2) { animation-delay: 200ms; }
.boot-dots span:nth-child(3) { animation-delay: 400ms; }

.boot-progress {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 18px;
}
.boot-progress-bar {
  position: absolute; inset: 0 auto 0 0;
  width: 8%;
  border-radius: 4px;
  background: linear-gradient(90deg, #5e57e6, #9b95ff 50%, #ff7cc8);
  box-shadow: 0 0 14px rgba(155,149,255,0.6);
  transition: width 380ms cubic-bezier(.22,1,.36,1);
}
.boot-progress-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: bootShine 1600ms linear infinite;
}

.boot-tip {
  font-size: 11.5px;
  color: rgba(232,232,255,0.45);
  letter-spacing: 0.2px;
  min-height: 16px;
  transition: opacity 320ms ease;
}
.boot-tip kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  font-family: inherit;
  font-size: 10.5px;
  color: rgba(232,232,255,0.85);
}

.boot-corner-glow {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 1;
}
.boot-corner-glow-tl {
  top: -120px; left: -120px;
  background: radial-gradient(circle, #7c75ff 0%, transparent 60%);
  animation: bootDriftTL 8s ease-in-out infinite alternate;
}
.boot-corner-glow-br {
  bottom: -120px; right: -120px;
  background: radial-gradient(circle, #ff7cc8 0%, transparent 60%);
  animation: bootDriftBR 9s ease-in-out infinite alternate;
}

@keyframes bootCardIn {
  from { transform: translateY(14px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes bootSpin    { to { transform: rotate(360deg); } }
@keyframes bootGlyphPulse {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 18px rgba(124,117,255,0.65)); }
  50%      { transform: scale(1.06); filter: drop-shadow(0 0 28px rgba(155,149,255,0.95)); }
}
@keyframes bootDot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40%           { opacity: 1;    transform: translateY(-2px); }
}
@keyframes bootShine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@keyframes bootDriftTL {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes bootDriftBR {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-50px, -30px) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  #boot-overlay,
  .boot-card,
  .boot-logo-glyph,
  .boot-logo-ring,
  .boot-progress-bar::after,
  .boot-corner-glow-tl,
  .boot-corner-glow-br,
  .boot-dots span {
    animation: none !important;
  }
}

