/**
 * Hey Acazen sheet — visual + animation refresh (Nov 2026)
 *
 * Styles for the "Hey Acazen" hold-Power bottom sheet built by openHeyAcazenSheet()
 * in assets/js/14-app-profile-recent-chats.js. Previously all-inline styles; moved to
 * a dedicated stylesheet so the sheet can use real keyframe animation instead of CSS
 * transitions only. Reuses the app's existing visual language: the orb/ring-pulse
 * motif from 09-viva-and-voice-animations.css, the cubic-bezier(.16,1,.3,1) entrance
 * easing and glow/shimmer treatment from 11-upgrade-plan-overlay.css, and the
 * 'Fraunces' + 'DM Sans' pairing + #1a73e8/#6db0ff blue palette used by both.
 *
 * New file — not extracted from index.html. See assets/README.md.
 */

:root {
  --ha-blue: #1a73e8;
  --ha-blue-soft: #6db0ff;
  --ha-ink: #12294a;
  --ha-muted: #5a7a9a;
}

@keyframes haScrimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes haSheetUp {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes haSheetOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(18px) scale(0.98); }
}

@keyframes haRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes haOrbGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,115,232,0.28), 0 6px 18px rgba(26,115,232,0.18); }
  50% { box-shadow: 0 0 0 10px rgba(26,115,232,0), 0 6px 22px rgba(26,115,232,0.26); }
}

@keyframes haOrbSpin {
  to { transform: rotate(360deg); }
}

@keyframes haShimmer {
  0% { background-position: -140% 0; }
  100% { background-position: 240% 0; }
}

@keyframes haKnobPop {
  0% { transform: scale(1); }
  40% { transform: scale(0.82); }
  100% { transform: scale(1); }
}

@keyframes haPing {
  0% { opacity: 0.55; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.1); }
}

.ha-scrim {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: radial-gradient(120% 100% at 50% 100%, rgba(13,40,74,0.55), rgba(5,14,28,0.62));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: haScrimIn 0.22s ease both;
}

.ha-scrim.ha-closing { animation: haScrimIn 0.18s ease both reverse; }

.ha-sheet {
  position: relative;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 22px 20px 36px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -16px 60px rgba(10,30,60,0.28), 0 -1px 0 rgba(255,255,255,0.6) inset;
  font-family: 'DM Sans', sans-serif;
  animation: haSheetUp 0.42s cubic-bezier(.16,1,.3,1) both;
  isolation: isolate;
}

.ha-scrim.ha-closing .ha-sheet { animation: haSheetOut 0.2s cubic-bezier(.4,0,1,1) both; }

/* soft ambient top glow, matches the upgrade-overlay's background-orb treatment */
.ha-sheet::before {
  content: '';
  position: absolute;
  top: -70px;
  left: 50%;
  width: 260px;
  height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(26,115,232,0.16), transparent);
  pointer-events: none;
  z-index: 0;
}

.ha-grabber {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 4px;
  background: #d4e0ee;
  border-radius: 2px;
  margin: 0 auto 18px;
}

.ha-icon {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #eaf2ff, #dce9fb);
  display: grid;
  place-items: center;
  animation: haOrbGlow 2.6s ease-in-out infinite, haRise 0.4s cubic-bezier(.16,1,.3,1) both;
}

.ha-icon svg { position: relative; z-index: 1; animation: haRise 0.4s cubic-bezier(.16,1,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  .ha-icon { animation: haRise 0.4s ease both; }
}

.ha-title {
  position: relative;
  z-index: 1;
  font-family: 'Fraunces', serif;
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--ha-ink);
  margin-bottom: 4px;
  text-align: center;
  animation: haRise 0.44s cubic-bezier(.16,1,.3,1) both;
  animation-delay: 0.03s;
}

.ha-body { position: relative; z-index: 1; }

.ha-body > * {
  animation: haRise 0.46s cubic-bezier(.16,1,.3,1) both;
}
.ha-body > *:nth-child(1) { animation-delay: 0.06s; }
.ha-body > *:nth-child(2) { animation-delay: 0.1s; }
.ha-body > *:nth-child(3) { animation-delay: 0.14s; }
.ha-body > *:nth-child(4) { animation-delay: 0.18s; }

.ha-lede {
  font-size: 0.86rem;
  color: var(--ha-muted);
  text-align: center;
  line-height: 1.6;
  margin: 0 0 18px;
}
.ha-lede strong { color: var(--ha-ink); }

/* status banners (not-in-app / not-supported / legacy) */
.ha-banner {
  font-size: 0.85rem;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
  font-weight: 600;
  border: 1.5px solid;
}
.ha-banner-warn { color: #8a6d1f; background: rgba(217,164,6,0.1); border-color: rgba(217,164,6,0.3); }
.ha-banner-error { color: #c0392b; background: rgba(220,53,69,0.08); border-color: rgba(220,53,69,0.25); }

.ha-note {
  font-size: 0.82rem;
  color: var(--ha-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.55;
}

/* hold-power toggle row */
.ha-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, #f3f8ff, #edf4fe);
  border: 1.5px solid rgba(26,115,232,0.16);
  border-radius: 18px;
  padding: 15px 16px;
  margin-bottom: 14px;
  overflow: hidden;
}

.ha-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.55) 45%, transparent 60%);
  background-size: 200% 100%;
  animation: haShimmer 3.6s ease-in-out infinite;
  pointer-events: none;
}

.ha-row.ha-row-on {
  border-color: rgba(26,115,232,0.32);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.08);
}

.ha-row-label { font-size: 0.9rem; font-weight: 700; color: var(--ha-ink); }
.ha-row-status {
  font-size: 0.75rem;
  color: var(--ha-muted);
  margin-top: 2px;
  transition: color 0.2s ease;
}
.ha-row-status.ha-status-on { color: var(--ha-blue); font-weight: 600; }

.ha-switch {
  width: 50px;
  height: 30px;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  background: #c7d6e8;
  transition: background 0.25s ease;
}
.ha-switch.ha-on { background: linear-gradient(135deg, var(--ha-blue), #3f8bf0); }
.ha-switch .ha-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: left 0.25s cubic-bezier(.34,1.56,.64,1);
}
.ha-switch.ha-on .ha-knob { left: 23px; }
.ha-switch.ha-knob-pop .ha-knob { animation: haKnobPop 0.32s ease; }

/* small listening-dot motif echoing the Viva orb, used inside the explainer */
.ha-pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ha-blue);
  margin-right: 6px;
  vertical-align: middle;
}
.ha-pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ha-blue);
  animation: haPing 1.6s cubic-bezier(0,0,.2,1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .ha-pulse-dot::after { animation: none; display: none; }
}

.ha-setup-btn {
  position: relative;
  width: 100%;
  padding: 13px;
  margin-bottom: 14px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--ha-blue), #2f84ef);
  border: none;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(26,115,232,0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ha-setup-btn:active { transform: scale(0.98); box-shadow: 0 3px 10px rgba(26,115,232,0.24); }
.ha-setup-btn svg { flex-shrink: 0; animation: haOrbSpin 6s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .ha-setup-btn svg { animation: none; }
}

.ha-close-btn {
  width: 100%;
  margin-top: 4px;
  padding: 13px;
  border-radius: 15px;
  background: none;
  border: 1.5px solid #c4d5ea;
  color: var(--ha-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ha-close-btn:hover { background: #f4f8fd; border-color: #b3c9e4; }

@media (prefers-reduced-motion: reduce) {
  .ha-scrim, .ha-sheet, .ha-icon, .ha-icon svg, .ha-title, .ha-body > * {
    animation-duration: 0.01ms !important;
  }
  .ha-row::after { animation: none; }
}
