*{
  box-sizing:border-box;
}

html,
body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  overflow:hidden;
  font-family:Arial, Helvetica, sans-serif;
  background:#eef4fb;
  color:#102033;
}

.sonnia-app{
  width:100%;
  height:100vh;
  height:100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#ffffff;
}

.sonnia-header{
  width:100%;
  background:#003f7d;
  color:white;
  text-align:center;
  padding:6px 12px 6px;
  flex:0 0 auto;
}

.sonnia-photo{
  width:95px;
  height:95px;
  object-fit:cover;
  border-radius:50%;
  border:4px solid #f58220;
  display:block;
  margin:0 auto 7px;
}

.sonnia-header h1{
  margin:0;
  font-size:26px;
  line-height:1;
}

.sonnia-header p{
  margin:6px 0 0;
  font-size:14px;
}

.sonnia-welcome{
  background:white;
  color:#102033;
  max-width:680px;
  margin:10px auto 0;
  padding:10px 14px;
  border-radius:16px;
}

.sonnia-welcome h2{
  margin:0;
  color:#003f7d;
  font-size:18px;
}

.sonnia-welcome p{
  margin:4px 0 0;
  font-size:14px;
  line-height:1.15;
}

.sonnia-chat{
  flex:1;
  overflow-y:auto;
  background:#eef4fb;
  padding:12px;
}

.message{
  max-width:92%;
  padding:11px 13px;
  margin-bottom:10px;
  border-radius:16px;
  font-size:15px;
  line-height:1 !important;
  white-space:normal;
}

.message.bot{
  background:white;
  color:#102033;
  border-bottom-left-radius:4px;
}

.message.user{
  background:#f58220;
  color:white;
  margin-left:auto;
  border-bottom-right-radius:4px;
}

.message strong{
  display:inline;
  line-height:1;
}

.message ul{
  margin:0;
  padding-left:18px;
}

.message li{
  margin:0;
  padding:0;
  line-height:1;
}

.message br{
  display:block;
  margin:0;
  padding:0;
  line-height:0;
}

.sonnia-input-area{
  width:100%;
  display:flex;
  gap:8px;
  padding:10px;
  background:white;
  border-top:1px solid #d9e3ef;
  flex:0 0 auto;
}

.sonnia-input-area input{
  flex:1;
  min-width:0;
  border:2px solid #d1d9e6;
  border-radius:14px;
  padding:12px;
  font-size:15px;
  outline:none;
}

.sound-btn{
  width:48px;
  min-width:48px;
  border:none;
  border-radius:14px;
  background:#003f7d;
  color:white;
  font-size:20px;
  cursor:pointer;
}

.sound-btn.muted{
  background:#777;
}

.send-btn{
  min-width:72px;
  border:none;
  border-radius:14px;
  background:#f58220;
  color:white;
  padding:0 14px;
  font-size:14px;
  font-weight:bold;
  cursor:pointer;
}

.option-buttons,
.career-buttons,
.mode-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
  padding:0 2px;
}

.option-btn,
.career-btn,
.mode-btn{
  appearance:none;
  background:#ffffff;
  color:#003f7d;
  border:2px solid #003f7d;
  border-radius:999px;
  padding:9px 13px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
}

.option-btn:hover,
.career-btn:hover,
.mode-btn:hover{
  background:#003f7d;
  color:#ffffff;
}

.option-btn:active,
.career-btn:active,
.mode-btn:active{
  background:#f58220;
  border-color:#f58220;
  color:#ffffff;
}

.map-link,
.whatsapp-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#003f7d;
  color:white;
  text-decoration:none;
  border-radius:999px;
  padding:11px 16px;
  font-size:14px;
  font-weight:800;
  margin:8px 0 14px;
  box-shadow:0 6px 14px rgba(0,0,0,.15);
}

.map-link:hover,
.whatsapp-link:hover{
  background:#f58220;
}

@media(min-width:900px){

  .sonnia-app{
    max-width:900px;
    margin:0 auto;
  }

  .sonnia-header{
    padding:18px 14px 14px;
  }

  .sonnia-photo{
    width:135px;
    height:135px;
  }

  .sonnia-header h1{
    font-size:42px;
  }

  .sonnia-header p{
    font-size:17px;
  }

  .sonnia-welcome h2{
    font-size:24px;
  }

  .sonnia-welcome p{
    font-size:17px;
  }

  .message{
    font-size:17px;
    max-width:86%;
  }

  .option-btn,
  .career-btn,
  .mode-btn{
    font-size:15px;
    padding:10px 15px;
  }

}



/* ========================= */
/* AVATAR SONNIA ANIMADO */
/* ========================= */

.sonnia-avatar{
  position:relative;
  width:135px;
  margin:0 auto 10px;
}

.sonnia-wave{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  border:3px solid rgba(245,130,32,.45);
  opacity:0;
  pointer-events:none;
}

.sonnia-wave-1{
  width:120px;
  height:120px;
}

.sonnia-wave-2{
  width:140px;
  height:140px;
}

.sonnia-wave-3{
  width:160px;
  height:160px;
}

.sonnia-speaking .sonnia-wave{
  animation:sonniaPulse 1.8s infinite;
}

.sonnia-speaking .sonnia-wave-2{
  animation-delay:.4s;
}

.sonnia-speaking .sonnia-wave-3{
  animation-delay:.8s;
}

.sonnia-speaking .sonnia-photo{
  box-shadow:
    0 0 15px rgba(245,130,32,.5),
    0 0 35px rgba(245,130,32,.4),
    0 0 60px rgba(245,130,32,.3);

  transform:scale(1.03);
}

@keyframes sonniaPulse{

  0%{
    opacity:.8;
    transform:translate(-50%,-50%) scale(.8);
  }

  100%{
    opacity:0;
    transform:translate(-50%,-50%) scale(1.35);
  }

}



/* ========================= */
/* SONNIA ESCRIBIENDO */
/* ========================= */

.typing-box{
  display:flex;
  align-items:center;
  gap:5px;
  background:white;
  width:70px;
  padding:12px 14px;
  border-radius:16px;
  margin-bottom:10px;
}

.typing-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#003f7d;
  animation:typingBounce 1.3s infinite;
}

.typing-dot:nth-child(2){
  animation-delay:.2s;
}

.typing-dot:nth-child(3){
  animation-delay:.4s;
}

@keyframes typingBounce{

  0%,60%,100%{
    transform:translateY(0);
    opacity:.4;
  }

  30%{
    transform:translateY(-6px);
    opacity:1;
  }

}


/* ========================= */
/* SONNIA HABLANDO CON ROSTRO */
/* ========================= */


  50%{
    transform: scale(1.035) translateY(-2px);
    filter: brightness(1.08);
  }

  100%{
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

