/* Tezgâh asistanı: sağ alt düğme grubu ve sohbet paneli */

.assist-launch {
  position: fixed; right: 16px; bottom: 16px; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  transition: bottom var(--duration-drawer) var(--ease);
}
.has-buybar .assist-launch { bottom: 92px; }
.assist-launch__pill {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 50px; padding: 0 1.2rem 0 1rem;
  border: 0; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: var(--step--1); box-shadow: 0 8px 22px rgb(0 0 0 / 0.22);
}
.assist-launch__pill:hover { background: var(--brand); }
.assist-launch__dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--tag);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tag) 35%, transparent);
}
.assist-launch__wa {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: #1F9D55; color: #FFFFFF; box-shadow: 0 8px 22px rgb(0 0 0 / 0.22);
}
.assist-launch__wa .icon { width: 27px; height: 27px; }
@media (min-width: 990px) { .assist-launch { right: 24px; bottom: 24px; } }
/* Mobil ürün sayfasında kendi WhatsApp düğmesi, soru kartı ve sabit satın alma çubuğu var */
@media (max-width: 989px) { .assist-launch--product { display: none; } }

/* Panel */
.assistant { width: min(460px, 100vw); }
.assistant__head { align-items: flex-start; padding-block: var(--space-m); }
.assistant__heading { display: flex; gap: var(--space-s); align-items: center; }
.assistant__avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.assistant__avatar .icon { width: 22px; height: 22px; }
.assistant__sub { margin: 2px 0 0; font-size: var(--step--1); color: var(--muted); }
.assistant__body { position: relative; display: grid; align-content: start; gap: var(--space-m); background: var(--surface); }
.assistant__log { display: grid; gap: var(--space-s); }
.assistant__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.assistant__chips .chip { min-height: 36px; font-size: var(--step--2); background: var(--bg); }

.assist-msg { max-width: 92%; padding: 0.7rem 0.9rem; border-radius: var(--radius); font-size: var(--step--1); line-height: 1.5; }
.assist-msg p { margin: 0; }
.assist-msg--bot { justify-self: start; background: var(--bg); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.assist-msg--user { justify-self: end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; }
.assist-msg.is-thinking { color: var(--muted); }
.assist-msg.is-thinking p::after { content: ''; display: inline-block; width: 1em; animation: assist-dots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes assist-dots { 0% { width: 0; } 100% { width: 1em; } }

.assist-cards { display: grid; gap: 6px; margin-top: var(--space-s); }
.assist-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--space-s); align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); }
.assist-card__media { width: 48px; aspect-ratio: 4 / 5; border-radius: 6px; }
.assist-card__info { display: grid; gap: 1px; min-width: 0; }
.assist-card__title { font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assist-card__title:hover { color: var(--brand); }
.assist-card__meta { margin: 0; display: flex; gap: 0.4rem; font-size: var(--step--2); color: var(--muted); }
.assist-card__meta strong { color: var(--brand); }
.assist-card__note { font-size: var(--step--2); color: var(--muted); }
.assist-card__badge { justify-self: start; font-size: 0.66rem; padding: 0.1rem 0.45rem; }
.assist-card__add {
  min-width: 40px; height: 40px; padding: 0 0.6rem; border-radius: var(--radius-pill); border: 1.5px solid var(--brand);
  background: var(--bg); color: var(--brand); font-size: 1.2rem; font-weight: 600; line-height: 1;
}
.assist-card__add:hover:not([disabled]) { background: var(--brand); color: var(--on-brand); }
.assist-card__add.is-added { font-size: var(--step--2); border-color: var(--ok); color: var(--ok); }
.assist-card__add[aria-busy='true'] { opacity: 0.5; }

.assist-basket { display: grid; gap: var(--space-xs); margin-top: var(--space-s); padding-top: var(--space-s); border-top: 1px solid var(--line); }
.assist-basket__sum { display: flex; justify-content: space-between; margin: 0; font-weight: 600; }
.assist-basket__sum strong { color: var(--brand); font-size: var(--step-0); }
.assist-basket__add { min-height: 44px; }

.assistant__foot { display: grid; gap: var(--space-xs); padding-block: var(--space-s) var(--space-m); }
.assistant__form { position: relative; display: flex; }
.assistant__input {
  width: 100%; min-height: 48px; padding: 0 3.2rem 0 1.1rem; border: 1.5px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
}
.assistant__input:focus-visible { outline: none; border-color: var(--brand); background: var(--bg); }
.assistant__send {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--brand); color: var(--on-brand);
}
.assistant__send .icon { width: 18px; height: 18px; }
.assistant__fine { margin: 0; font-size: var(--step--2); color: var(--muted); }

/* Ürün sayfası ve arama girişleri */
.ask-card {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-s);
  margin: calc(var(--space-s) * -1) 0 var(--space-l); padding: var(--space-s) var(--space-m);
  border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: var(--radius);
}
.ask-card__title { margin: 0; font-weight: 700; font-size: var(--step--1); }
.ask-card__text { margin: 0; font-size: var(--step--2); color: var(--muted); }
.predictive__ask {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 44px; padding: 0 0.6rem; border: 0; border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font-weight: 600; text-align: left;
}
.predictive__ask:hover, .predictive__ask:focus-visible { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.predictive__ask .assist-launch__dot { flex: none; }
.assist-msg--bot:has(.assist-cards) { max-width: 100%; }
