/* ==========================================================================
   leo-mascote.css — Estilos da Interface de Bate-Papo com o Mascote Leo
   O Mundo da Diana (5 Anos) — Paleta Safari Rosa Mágico & Mobile 9:19
   ========================================================================== */

:root {
  --safari-pink-deep: #4a044e;
  --safari-pink-dark: #701a75;
  --safari-pink-magenta: #be185d;
  --safari-pink-hot: #db2777;
  --safari-pink-bubble: #ec4899;
  --safari-pink-light: #f472b6;
  --safari-pink-soft: #fbcfe8;
  --safari-pink-pastel: #fdf2f8;

  --safari-gold: #fbbf24;
  --safari-gold-light: #fef08a;
  --safari-orange: #f97316;
  --safari-sand: #fef3c7;
}

/* ── Botão de Destaque do Leo na Home (Safari Rosa Mágico - 5 Anos Juicy) ── */
.leo-hero-card {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #f59e0b 100%);
  border: 3.5px solid var(--safari-gold-light);
  border-radius: var(--radius-card, 26px);
  padding: 14px 18px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 9px 0 #831843, 0 16px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.leo-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.leo-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 0 #831843, 0 20px 34px rgba(219, 39, 119, 0.5);
}

.leo-hero-card:active {
  transform: translateY(6px);
  box-shadow: 0 3px 0 #831843, 0 6px 12px rgba(0, 0, 0, 0.25);
}

.leo-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.leo-hero-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 3.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: leoHeroBounce 3s infinite ease-in-out;
}

@keyframes leoHeroBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}

.leo-hero-crown {
  position: absolute;
  top: -14px;
  right: -6px;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.leo-hero-info {
  flex: 1;
  min-width: 0;
}

.leo-hero-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.leo-hero-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.leo-hero-desc {
  display: none !important;
}

.leo-hero-cta {
  background: #fff;
  color: var(--safari-pink-deep);
  font-size: 0.95rem;
  font-weight: 900;
  padding: 10px 18px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Modal Bate-Papo em Tela Cheia (Safari Rosa Mágico 9:19) ── */
.leo-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 15%, #701a75 0%, #4a044e 55%, #2a0230 100%);
  display: flex;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.97);
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(14px, calc(env(safe-area-inset-top, 0px) + 8px)) 16px max(24px, calc(env(safe-area-inset-bottom, 20px) + 12px));
  box-sizing: border-box;
}

.leo-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* ── Header do Bate-Papo ── */
.leo-chat-header {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(254, 240, 138, 0.25);
}

.leo-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leo-chat-title h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--safari-gold-light);
}

.leo-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leo-circle-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(254, 240, 138, 0.4);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.leo-circle-btn:active {
  transform: scale(0.9);
  background: rgba(236, 72, 153, 0.35);
  border-color: var(--safari-gold);
}

/* ── Área Principal de Diálogo ── */
.leo-chat-content {
  flex: 1;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}

/* ── Mascote Animado e Balão ── */
.leo-mascot-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 10px;
}

.leo-avatar-stage {
  position: relative;
  cursor: pointer;
}

.leo-avatar-large {
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 4px solid var(--safari-gold-light);
  box-shadow: 0 10px 30px rgba(219, 39, 119, 0.45), 0 0 0 4px rgba(254, 240, 138, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.6rem;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: leoBreathe 3s infinite ease-in-out;
}

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

.leo-avatar-stage.speaking .leo-avatar-large {
  animation: leoSpeaking 0.4s infinite alternate ease-in-out;
  border-color: #34d399;
  box-shadow: 0 10px 30px rgba(52, 211, 153, 0.4), 0 0 0 6px rgba(52, 211, 153, 0.35);
}

@keyframes leoSpeaking {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.06) rotate(3deg); }
}

.leo-avatar-stage.listening .leo-avatar-large {
  animation: leoListening 0.8s infinite alternate ease-in-out;
  border-color: #f43f5e;
  box-shadow: 0 10px 30px rgba(244, 63, 94, 0.5), 0 0 0 6px rgba(244, 63, 94, 0.35);
}

@keyframes leoListening {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.08); }
}

.leo-crown-large {
  position: absolute;
  top: -16px;
  right: 14px;
  font-size: 2rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35));
  animation: crownBounce 2.5s infinite ease-in-out;
}

/* ── Balão de Fala do Leo (Safari Rosa Mágico) ── */
.leo-speech-bubble {
  background: #fdf2f8;
  color: var(--safari-pink-deep);
  border: 3px solid var(--safari-gold);
  border-radius: 24px;
  padding: 14px 18px;
  width: 100%;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.38;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: bubblePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leo-speech-bubble::after {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 11px 12px 11px;
  border-style: solid;
  border-color: transparent transparent var(--safari-gold) transparent;
}

@keyframes bubblePop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.leo-speech-sub {
  font-size: 0.88rem;
  color: var(--safari-pink-magenta);
  font-weight: 800;
  margin-top: 5px;
}

/* ── Opções Dinâmicas de Escolha Interativa (A/B) ── */
.leo-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.leo-choice-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid var(--safari-gold-light);
  border-radius: 20px;
  padding: 12px 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.leo-choice-btn:active {
  transform: scale(0.92);
  background: rgba(236, 72, 153, 0.35);
}

.leo-choice-btn .choice-icon {
  font-size: 2rem;
}

/* ── Botão de Microfone GIGANTE (Central) ── */
.leo-mic-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  position: relative;
}

.leo-mic-btn {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #db2777 60%, #f59e0b 100%);
  border: 4px solid #fff;
  color: #fff;
  font-size: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(219, 39, 119, 0.5), 0 0 0 6px rgba(251, 191, 36, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
}

.leo-mic-btn:active {
  transform: scale(0.92);
}

.leo-mic-btn.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.55), 0 0 0 8px rgba(239, 68, 68, 0.35);
  animation: micPulse 1s infinite alternate ease-in-out;
}

@keyframes micPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.leo-mic-hint {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--safari-gold-light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ── Pílulas de Ação Rápida por Toque ── */
.leo-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.leo-quick-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 2px solid rgba(254, 240, 138, 0.35);
  color: #fff;
  padding: 7px 12px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.15s ease;
}

.leo-quick-btn:active {
  transform: scale(0.92);
  background: rgba(236, 72, 153, 0.35);
}

/* ── Entrada de Texto Alternativa ── */
.leo-input-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 5px 8px;
  border-radius: 50px;
  border: 1.5px solid rgba(254, 240, 138, 0.3);
}

.leo-input-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  padding: 6px 10px;
}

.leo-input-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.leo-send-btn {
  background: var(--safari-gold);
  color: var(--safari-pink-deep);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Modal Diário dos Pais / Pepper ── */
.leo-parent-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(42, 2, 48, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.leo-parent-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.leo-parent-card {
  background: linear-gradient(145deg, #701a75, #4a044e);
  border: 3px solid var(--safari-gold);
  border-radius: 28px;
  padding: 22px;
  max-width: 500px;
  width: 100%;
  color: #fff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7);
  max-height: 90vh;
  overflow-y: auto;
}

.leo-parent-card h3 {
  font-size: 1.3rem;
  color: var(--safari-gold-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leo-parent-summary {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--safari-pink-soft);
}

.leo-parent-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.leo-parent-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 50px;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.leo-btn-primary {
  background: linear-gradient(135deg, var(--safari-gold), var(--safari-orange));
  color: var(--safari-pink-deep);
}

.leo-btn-secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
