/* ============================================================
   AURARIA V3 — CANONICAL BEACON STACK (PORTED 2026-04-29)
   Source: www_features_tabs_v1_LOCKED_GOOD.html (HCP locked good)
   This file is the playing-state overlay (bubble + nested pill +
   carrot tail + scene image + heartbeat-pulse + experience mode).
   The base Beacon/Pill/Shelf styling lives inside lp-beacon-bootstrap.js.
   ------------------------------------------------------------ */

:root{
  --lp-purple:#8B67F6;
  --lp-green:#00E676;
  --hcp-green:#1F3A2E;
  --hcp-gold:#C8A96A;
  --paper:#f7f5f0;
}

/* HEARTBEAT — beacon pulses harder while audio plays */
@keyframes lpHeartbeat{
  0%,100%{transform:scale(1);box-shadow:0 12px 36px rgba(139,103,246,0.55)}
  50%{transform:scale(1.06);box-shadow:0 16px 48px rgba(0,230,118,0.55)}
}
.lp-beacon.playing{
  background:var(--hcp-green) !important;
  animation:lpHeartbeat 1.4s ease-in-out infinite !important;
}
.lp-beacon.playing svg{color:var(--lp-green)}

/* PILL — playing-state coloration when NOT nested in bubble */
.lp-pill.playing{
  background:rgba(31,58,46,0.92) !important;
  border-color:rgba(0,230,118,0.45) !important;
}

/* THE CHAT BUBBLE — appears ABOVE the brand pill ONLY during playback. */
.lp-bubble{
  position:fixed;
  bottom:120px;
  left:16px;
  display:none;
  align-items:flex-start;
  gap:8px;
  background:rgba(244,244,241,0.97);
  border:1px solid rgba(0,0,0,0.06);
  padding:12px 20px;
  border-radius:14px;
  z-index:9990;
  font-size:13px;
  font-weight:700;
  color:#1a1a1c;
  max-width:420px;
  white-space:normal;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,0.28));
  opacity:0;
  transform:translateY(6px);
  transition:opacity 0.25s ease, transform 0.25s ease;
  pointer-events:none;
  font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;
}
.lp-bubble.visible{
  display:inline-flex;
  flex-direction:column;
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
  min-width:280px;
  padding-right:4px;
}

/* Bubble body = flex row. Caption column + 1:1 scene image column. */
.lp-bubble-body{display:flex;align-items:stretch;gap:8px;width:100%;padding-right:0}
.lp-bubble-caption{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;padding-bottom:18px}
.lp-bubble-text{display:inline-flex;flex-direction:column;gap:2px;align-items:flex-start;min-width:0}
.lp-bubble-text .lp-caption-eyebrow{
  color:rgba(31,58,46,0.85);
  font-size:9px;
  letter-spacing:2px;
  font-weight:800;
  text-transform:uppercase;
}
.lp-bubble-text .lp-caption-main{
  color:var(--hcp-green);
  font-size:13px;
  font-weight:700;
  line-height:1.45;
}

/* WDS word-sync animation */
@keyframes wordSyncIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
.lp-bubble[data-caption-style="wordsync"] .lp-caption-main .word{
  opacity:0;
  animation:wordSyncIn 0.25s ease forwards;
  display:inline-block;
  margin-right:4px;
}

/* Bubble scene: 88px on desktop, 64px on tablet, hidden <380px */
.lp-bubble-scene{
  flex-shrink:0;
  width:88px;
  height:88px;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
  background:#0a1a14;
  align-self:center;
  position:relative;
  cursor:zoom-in;
}
.lp-bubble-scene img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:10px;
  border:1px solid rgba(31,58,46,0.12);
  box-sizing:border-box;
  transition:opacity 0.4s ease;
}

/* Bubble transport controls */
.lp-bubble-controls{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 8px 2px 4px;
  margin-top:6px;
  border-top:1px solid rgba(0,0,0,0.06);
}
.lp-bubble-ctrl{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  background:rgba(31,58,46,0.08);
  color:var(--hcp-green);
  border:none;
  border-radius:50%;
  cursor:pointer;
  padding:0;
  transition:background 0.18s,transform 0.12s;
  font-family:inherit;
}
.lp-bubble-ctrl:hover{background:rgba(31,58,46,0.18);transform:scale(1.06)}
.lp-bubble-ctrl:active{transform:scale(0.96)}
.lp-bubble-ctrl svg{width:16px;height:16px}
.lp-bubble-progress{flex:1;height:3px;background:rgba(31,58,46,0.1);border-radius:2px;overflow:hidden;position:relative}
.lp-bubble-progress span{display:block;height:100%;width:0%;background:var(--hcp-gold);border-radius:2px;transition:width 0.18s linear}

/* CARROT TAIL — triangle pointing DOWN from bubble bottom toward beacon */
.lp-bubble::after{
  content:"";
  position:absolute;
  bottom:-9px;
  left:22px;
  width:0;
  height:0;
  border-left:10px solid transparent;
  border-right:10px solid transparent;
  border-top:10px solid rgba(244,244,241,0.97);
  pointer-events:none;
}

/* PILL NESTED INSIDE BUBBLE — playing-state brand overlay bottom-right. */
.lp-bubble .lp-pill,
.lp-bubble .lp-pill.lp-pill--in-bubble,
.lp-bubble .lp-pill.playing{
  position:absolute !important;
  bottom:4px !important;
  right:4px !important;
  left:auto !important;
  top:auto !important;
  transform:scale(0.82) !important;
  transform-origin:right bottom;
  z-index:2;
  margin:0 !important;
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
}
.lp-bubble .lp-pill .lp-pill-text .lp-living,
.lp-bubble .lp-pill.playing .lp-pill-text .lp-living{color:var(--lp-green) !important;font-weight:900}
.lp-bubble .lp-pill .lp-pill-text .lp-pages,
.lp-bubble .lp-pill.playing .lp-pill-text .lp-pages{color:var(--hcp-green) !important;font-weight:800}
.lp-bubble .lp-pill .lp-pill-arrows,
.lp-bubble .lp-pill.playing .lp-pill-arrows{transform:rotate(180deg) !important}
.lp-bubble .lp-pill .lp-pill-arrows .arr-outer,
.lp-bubble .lp-pill.playing .lp-pill-arrows .arr-outer{color:var(--lp-green) !important;opacity:1 !important}
.lp-bubble .lp-pill .lp-pill-arrows .arr-inner,
.lp-bubble .lp-pill.playing .lp-pill-arrows .arr-inner{color:var(--lp-purple) !important;opacity:1 !important}

/* EXPERIENCE MODE — body class added when audio plays */
body.lp-experience-active .aur-hero{
  transition:all 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* MOBILE — 64px scene, hidden <380px */
@media(max-width:768px){
  .lp-bubble{
    bottom:90px;
    left:16px;
    right:16px;
    max-width:none;
    padding:10px 14px;
  }
  .lp-bubble.visible{min-width:0}
  .lp-bubble-scene{width:64px;height:64px;border-radius:8px}
  .lp-bubble-text .lp-caption-main{font-size:12px}
}
@media(max-width:380px){
  .lp-bubble-scene{display:none}
}
