.av-chat-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: #f3f1ea;
}
.av-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.2rem, 6.5vw, 8rem);
}
.av-chat-copy { min-width: 0; }
.av-chat-copy .section-title { max-width: 11ch; }
.av-chat-copy p:not(.product-label) {
  margin: 1.1rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.04rem, .87rem + .65vw, 1.36rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.av-chat-copy p.av-chat-note {
  color: var(--muted);
  font-size: 1rem;
  max-width: 38ch;
}
.av-chat-window {
  width: min(100%, 33rem);
  justify-self: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cacac0;
  border-radius: 1.6rem;
  background: #fbfaf6;
  box-shadow: 0 18px 42px -28px #37372e66;
}
.av-chat-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid #d8d7cd;
}
.av-avatar { flex: none; width: 44px; height: 44px; }
.av-contact-info { min-width: 0; }
.av-contact-info p { margin: 0; }
.av-contact { display: flex; align-items: center; flex-wrap: wrap; gap: .35em; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; }
.av-contact .brand-word { display: block; width: 6em; max-width: 100%; height: auto; }
.av-online { display: flex; align-items: center; gap: .28em; color: #4a6350; font-size: .78rem; }
.av-online i { width: .52em; height: .52em; background: #59774e; border-radius: 50%; }
.av-pause, #av-chat-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  border: none;
  color: #3b483e;
  background: transparent;
  font: 600 .8rem/1.2 var(--body);
}
.av-pause { margin-inline-start: auto; padding: .4rem .45rem; border-radius: 8px; }
.av-play-icon, .av-pause[aria-pressed="true"] .av-pause-icon { display: none; }
.av-pause[aria-pressed="true"] .av-play-icon { display: initial; }
.av-chat-log {
  position: relative;
  height: clamp(18rem, 48svh, 30rem);
  overflow: auto;
  padding: 1.05rem clamp(.7rem, 2vw, 1.4rem);
  scrollbar-width: thin;
  scrollbar-color: #a6a79c #f1f0e8;
  background: #f1f0e8;
  overflow-anchor: none;
}
.av-chat-log:focus-visible { outline-offset: -4px; }
.av-chat-date { margin: .05rem 0 .95rem; text-align: center; color: #65645c; font-size: .76rem; }
.av-messages { display: grid; grid-template-columns: minmax(0,1fr); gap: .58rem; padding: 0; margin: 0; list-style: none; }
.av-bubble, .av-typing {
  width: fit-content;
  max-width: 87%;
  min-width: 0;
  padding: .66em .87em;
  color: #272a23;
  background: #fffefa;
  border: 1px solid #dcdbd2;
  border-radius: 1.05em 1.05em 1.05em .28em;
  font-size: clamp(.9rem, .84rem + .2vw, 1rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
  transform-origin: bottom left;
}
.av-bubble[data-side="user"] {
  justify-self: end;
  background: #263f34;
  color: #fff;
  border-color: #263f34;
  border-radius: 1.05em 1.05em .28em 1.05em;
  transform-origin: bottom right;
}
.av-with-card { padding: .38rem; }
.av-with-card p { margin: .27rem .53rem .65rem; }
.av-recipe-card {
  display: grid;
  align-items: stretch;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1fr);
  overflow: hidden;
  background: #f0efe6;
  border-radius: .65rem;
}
.av-recipe-card img { width: 100%; height: 100%; min-height: 100px; object-fit: cover; }
.av-card-info { display: grid; align-content: center; justify-items: start; padding: .6rem .65rem; min-width: 0; }
.av-card-info strong { font: 650 1rem/1.15 var(--body); letter-spacing: -.035em; }
.av-card-price { margin-top: .22rem; font-size: .83rem; color: #52564b; }
.av-add {
  min-height: 44px;
  margin-top: .55rem;
  padding: .42em .8em;
  border: 1px solid #3d5141;
  border-radius: 2em;
  color: #293f31;
  background: #fcfcf5;
  font: 600 .78rem/1.15 var(--body);
}
.av-add[aria-disabled="true"] { background: transparent; border-color: #b9beaf; }
.av-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 2.25rem;
  margin-top: .58rem;
  padding-inline: .84rem;
}
.av-typing i { width: 5px; height: 5px; background: #677261; border-radius: 50%; }
.av-chat-compose { display: flex; align-items: center; padding: .4rem .52rem .4rem .88rem; margin: .75rem .85rem 0; border-radius: 1.5rem; border: 1px solid #d1d2c8; }
.av-chat-compose input { width: 100%; min-width: 0; padding: 0; border: none; background: transparent; font: inherit; font-size: .9rem; }
.av-chat-compose input::placeholder { color: #686b61; opacity: 1; }
.av-chat-compose > span { flex: none; display: grid; place-content: center; height: 1.9rem; width: 1.9rem; border-radius: 100%; background: #e3e6d9; color: #56644f; }
.av-chat-controls { display: flex; justify-content: space-between; align-items: center; gap: .45em; padding: 0 .9rem .22rem; min-height: 44px; }
.av-chat-controls small { color: var(--muted); font-size: .73rem; }
#av-chat-replay { text-decoration: underline; text-underline-offset: .2em; }
@media (prefers-reduced-motion: no-preference) {
  .av-arrive { animation: av-bubble-arrive 300ms cubic-bezier(.34, 1.56, .64, 1) both; }
  .av-typing i { animation: av-typing 650ms ease-in-out infinite alternate; }
  .av-typing i:nth-child(2) { animation-delay: 100ms; }
  .av-typing i:nth-child(3) { animation-delay: 200ms; }
  #assistant-chat[data-chat-playing="false"] .av-typing i { animation-play-state: paused; }
  @keyframes av-bubble-arrive {
    from { opacity: 0; transform: translateY(26px) scale(.85); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes av-typing { 0%, 40% { transform: none; } 80%, 100% { transform: translateY(-3px); } }
}
@media (max-width: 760px) {
  .av-chat-layout { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .av-chat-copy .section-title { max-width: 15ch; }
  .av-chat-head { gap: .55rem; padding: .65rem .8rem; }
  .av-chat-window { border-radius: 1.1rem; }
  .av-chat-log { height: clamp(17rem, 42svh, 23rem); }
}
@container (max-width: 18em) {
  .av-pause span { position: absolute; clip-path: inset(50%); }
  .av-pause { min-width: 44px; }
  .av-chat-controls { flex-wrap: wrap; justify-content: flex-start; padding-block: .4rem; gap: .1rem .7rem; }
  .av-chat-controls small, #av-chat-replay { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
  .av-recipe-card { grid-template-columns: minmax(0, 1fr); }
  .av-recipe-card img { height: 5rem; min-height: 0; }
}
.av-chat-window { container-type: inline-size; }
@media print {
  .av-chat-log { height: auto; overflow: visible; }
  .av-bubble[hidden] { display: block !important; }
  .av-chat-compose, .av-chat-controls, .av-pause { display: none; }
}
