/* ELDA BEAUTY: shared assistant appearance across all website pages. */
.ai-panel {
  display: flex;
  flex-direction: column;
  width: min(358px, calc(100vw - 28px));
  height: min(482px, calc(100dvh - 170px));
  max-height: calc(100dvh - 170px);
  border-radius: 18px 18px 8px 8px;
  overflow: hidden;
}
.ai-panel[hidden] { display: none !important; }
.ai-top { flex-shrink: 0; }
.ai-top small { letter-spacing: .03em; font-size: 11px; }
.ai-conversation {
  min-height: 140px;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 13px;
}
.ai-conversation .bubble { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message-link {
  display: block;
  width: fit-content;
  margin-top: 9px;
  color: #63382a;
  text-decoration: underline;
  font-weight: 700;
}
.ai-options {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 6px;
  padding: 9px 12px 8px;
  border-top: 1px solid #e9d9cb;
}
.ai-options button {
  flex: 1 1 auto;
  min-height: 33px;
  border-radius: 20px;
  padding: 6px 8px;
}
.ai-chat-form {
  display: flex;
  gap: 7px;
  padding: 9px 12px;
  background: #fff9f5;
  border-top: 1px solid #e6d7ce;
}
.ai-chat-form input {
  background: #fff;
  color: #2e2420;
  border: 1px solid #cdb7ab;
  border-radius: 22px;
  min-width: 0;
  min-height: 42px;
  padding: 10px 13px;
  flex: 1;
  font-size: 15px;
}
.ai-chat-form button {
  display: grid;
  place-items: center;
  border: 0;
  width: 43px;
  min-width: 43px;
  border-radius: 50%;
  background: #462c27;
  color: #fff;
}
.ai-chat-form button:disabled { opacity: .55; }
.ai-chat-form button svg { width: 19px; height: 19px; }
.ai-panel .ai-notice { padding: 9px 14px; font-size: 10px; line-height: 1.5; }
.radio-cards span { min-height: 44px; display: grid; place-items: center; }
.modal-card .btn-full { min-height: 48px; }
.ai-typing {
  width: 65px;
  display: flex;
  justify-content: center;
  gap: 5px;
  align-items: center;
  min-height: 43px;
}
.ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #916d5e;
  animation: elda-typing 1.1s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: .16s; }
.ai-typing span:nth-child(3) { animation-delay: .32s; }
@keyframes elda-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
@media (max-width: 580px) {
  .ai-panel {
    right: 18px;
    bottom: calc(105px + env(safe-area-inset-bottom));
    width: min(330px, calc(100vw - 38px));
    height: min(390px, calc(100dvh - 158px));
    max-height: calc(100dvh - 158px);
  }
  .ai-conversation { min-height: 125px; }
  .ai-top { padding: 10px 12px; }
  .ai-chat-form input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-typing span { animation: none; }
}
