/**
 * Bond Voice-Sealed Envelope overlay — Phase 8g (Add-On 4).
 * Ceremony voice prompt shown before wax cleavage proceeds.
 */

.bond-vw-overlay {
  position: absolute;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(env(safe-area-inset-top), 16px) 16px max(env(safe-area-inset-bottom), 16px);
  background: rgba(8, 6, 4, 0.72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  transition: opacity 420ms ease-out;
  pointer-events: none;
}

.bond-vw-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.bond-vw-card {
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(38, 28, 18, 0.94), rgba(18, 12, 8, 0.98));
  border: 1px solid rgba(245, 232, 210, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  text-align: center;
  color: rgba(245, 232, 210, 0.92);
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.bond-vw-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(212, 165, 116, 0.72);
  margin-bottom: 10px;
}

.bond-vw-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 4.5vw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.bond-vw-sub {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(245, 232, 210, 0.68);
}

.bond-vw-mic-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 68, 58, 0.12);
  border: 1px solid rgba(196, 68, 58, 0.35);
  color: rgba(245, 232, 210, 0.88);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.bond-vw-mic-ring svg {
  width: 32px;
  height: 32px;
}

.bond-vw-mic-ring.is-listening {
  transform: scale(1.06);
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.12), 0 0 28px rgba(196, 68, 58, 0.25);
  animation: bondVwMicPulse 1.2s ease-in-out infinite;
}

@keyframes bondVwMicPulse {
  0%, 100% { transform: scale(1.04); }
  50% { transform: scale(1.08); }
}

.bond-vw-status {
  margin: 0 0 6px;
  font-size: 14px;
  color: rgba(245, 232, 210, 0.82);
}

.bond-vw-hint {
  margin: 0 0 8px;
  font-size: 15px;
  font-style: italic;
  color: rgba(251, 191, 36, 0.88);
}

.bond-vw-attempts {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 232, 210, 0.45);
  min-height: 16px;
}

.bond-vw-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.bond-vw-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, transform 120ms ease, opacity 180ms ease;
}

.bond-vw-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bond-vw-btn--primary {
  background: rgba(196, 68, 58, 0.88);
  color: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bond-vw-btn--primary:hover:not(:disabled) {
  background: rgba(210, 78, 66, 0.95);
  transform: translateY(-1px);
}

.bond-vw-btn--ghost {
  background: transparent;
  color: rgba(245, 232, 210, 0.72);
  border: 1px solid rgba(245, 232, 210, 0.18);
}

.bond-vw-fallback-msg {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(251, 191, 36, 0.78);
}

/* Composer — seal sheet voice phrase block (injected by bond-stream.js) */
.bond-vw-como {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 232, 210, 0.1);
  text-align: left;
}
.bond-vw-como--inline {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.bond-vw-compose-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(245, 232, 210, 0.88);
  cursor: pointer;
  user-select: none;
}

.bond-vw-compose-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #c4443a;
}

.bond-vw-compose-fields {
  margin-top: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.bond-vw-compose-fields.is-open {
  display: flex;
}

.bond-vw-compose-fields input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(245, 232, 210, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(245, 232, 210, 0.92);
  font-family: inherit;
  font-size: 14px;
}

.bond-vw-compose-fields input::placeholder {
  color: rgba(245, 232, 210, 0.38);
}

.bond-vw-compose-note {
  font-size: 12px;
  color: rgba(245, 232, 210, 0.48);
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .bond-vw-overlay,
  .bond-vw-mic-ring.is-listening {
    animation: none;
    transition: opacity 200ms ease;
  }
}
