#asis-launcher,
#asis-chat-box { --asis-primary: #e91e63; }

#asis-launcher {
  position: fixed; left: 24px; bottom: 116px; right: auto; top: auto; z-index: 99998;
  max-width: 300px;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  animation: asis-launcher-in .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
#asis-launcher:hover { transform: translateY(-3px); }
#asis-launcher:active { transform: translateY(-1px) scale(.99); }
#asis-launcher.asis-gizli { animation: asis-launcher-out .3s cubic-bezier(.4, 0, 1, 1) forwards; }
@keyframes asis-launcher-out { to { opacity: 0; transform: translateX(-30px) scale(.9); } }
#asis-chat-btn {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 30px 11px 11px;
  background: #fff; border: 1.5px solid rgba(0, 0, 0, .07); border-radius: 18px;
  cursor: pointer; text-align: left; color: inherit; font-family: inherit;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .14), 0 1px 4px rgba(0, 0, 0, .05);
  transition: box-shadow .3s ease;
}
#asis-launcher:hover #asis-chat-btn { box-shadow: 0 12px 34px rgba(0, 0, 0, .2), 0 2px 8px rgba(0, 0, 0, .08); }
#asis-launcher-kapat {
  position: absolute; top: 5px; right: 7px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .05); border: none; color: #2f353d;
  font-size: 19px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
#asis-launcher-kapat:hover { background: rgba(0, 0, 0, .12); color: #11151a; }
@keyframes asis-launcher-in { 0% { opacity: 0; transform: translateX(-26px) scale(.92); } 60% { opacity: 1; transform: translateX(5px) scale(1.02); } 100% { opacity: 1; transform: translateX(0) scale(1); } }

.asis-ai-ikon {
  position: relative; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--asis-primary);
  background: linear-gradient(135deg, var(--asis-primary), color-mix(in srgb, var(--asis-primary) 62%, #14142b));
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  animation: asis-ai-float 3s ease-in-out infinite;
}
@keyframes asis-ai-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.asis-ai-ikon svg { display: block; width: 26px; height: 26px; }
.asis-ai-goz { transform-box: fill-box; transform-origin: center; animation: asis-ai-goz 3.4s infinite; }
@keyframes asis-ai-goz { 0%, 42%, 48%, 100% { transform: scaleY(1); } 45% { transform: scaleY(.12); } }
.asis-ai-durum {
  position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff; animation: asis-ai-durum 1.8s ease-in-out infinite;
}
@keyframes asis-ai-durum { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); } }

.asis-launcher-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.asis-launcher-baslik { font-size: 10.5px; font-weight: 800; color: var(--asis-primary); letter-spacing: .8px; text-transform: uppercase; line-height: 1.15; }
#asis-chat-bubble {
  position: static; display: block; max-width: 210px; min-height: 2.4em;
  font-size: 12.5px; color: #1f2937; font-weight: 600; line-height: 1.3;
  white-space: normal; overflow: visible; text-overflow: clip;
  opacity: 1; transform: none; pointer-events: none;
  background: none; box-shadow: none; padding: 0; border-radius: 0;
}
#asis-chat-bubble.asis-acik { opacity: 1; transform: none; }

#asis-chat-box {
  position: fixed; left: 24px; bottom: 116px; right: auto; top: auto; transform: none; z-index: 99999;
  width: 370px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  font-family: inherit;
}
#asis-chat-box[hidden] { display: none; }

#asis-chat-head {
  background: var(--asis-primary); color: #fff; padding: 12px 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
#asis-chat-head .asis-title { font-weight: 700; font-size: 15px; }
#asis-chat-head .asis-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; letter-spacing: .2px; opacity: .95; margin-left: 2px;
}
#asis-chat-head .asis-status .asis-dot {
  width: 8px; height: 8px; flex-shrink: 0; font-size: 0; line-height: 0; color: transparent;
  border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  animation: asis-status-pulse 2.2s ease-in-out infinite;
}
@keyframes asis-status-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); } }
#asis-chat-close {
  margin-left: auto; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  transition: background .15s ease, transform .2s ease;
}
#asis-chat-close svg { display: block; }
#asis-chat-close:hover { background: rgba(255, 255, 255, .32); transform: rotate(90deg); }

#asis-chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px; background: #f6f7f9;
  display: flex; flex-direction: column; gap: 8px;
}

.asis-msg {
  max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4;
  word-wrap: break-word; animation: asis-in .18s ease;
}
@keyframes asis-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.asis-bot { align-self: flex-start; background: #fff; color: #222; border: 1px solid #eceef1; border-bottom-left-radius: 4px; }
.asis-user { align-self: flex-end; background: var(--asis-primary); color: #fff; border-bottom-right-radius: 4px; }

.asis-typing { display: inline-flex; gap: 4px; align-items: center; }
.asis-typing span { width: 7px; height: 7px; border-radius: 50%; background: #bcc2cc; display: inline-block; animation: asis-blink 1.2s infinite; }
.asis-typing span:nth-child(2) { animation-delay: .2s; }
.asis-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes asis-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.asis-btns { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 100%; }
.asis-btns > button, .asis-btns .asis-grid2 button {
  background: #fff; color: var(--asis-primary); border: 1.5px solid var(--asis-primary);
  padding: 8px 12px; border-radius: 18px; font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s;
}
.asis-btns > button:hover:not(:disabled) { background: var(--asis-primary); color: #fff; }
.asis-btns button:disabled { opacity: .5; cursor: default; }
.asis-btns button.asis-alt { border-color: #b9bfc9; color: #56606e; }
.asis-btns button.asis-alt:hover:not(:disabled) { background: #56606e; color: #fff; }

.asis-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.asis-grid2 button { width: 100%; text-align: center; }
.asis-scrollgrid { max-height: 220px; overflow-y: auto; padding-right: 4px; }

.asis-products { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.asis-product {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; padding: 6px; cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.asis-product:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.asis-product img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; background: #f0f1f3; }
.asis-product .asis-p-ad { font-size: 12px; color: #222; line-height: 1.25; max-height: 2.5em; overflow: hidden; }
.asis-product .asis-p-fiyat { font-size: 13px; font-weight: 700; color: var(--asis-primary); }

.asis-datewrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.asis-datewrap input[type="date"] { flex: 1; min-width: 150px; padding: 8px; border: 1.5px solid #d6dae0; border-radius: 10px; font-size: 14px; }
.asis-datewrap button { background: var(--asis-primary); color: #fff; border: none; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.asis-date-msg { width: 100%; font-size: 12px; color: #c0392b; }

#asis-chat-footer { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #eceef1; background: #fff; }
#asis-footer-input {
  flex: 1; resize: none; border: 1.5px solid #d6dae0; border-radius: 20px; padding: 9px 14px;
  font-size: 14px; font-family: inherit; max-height: 90px; outline: none;
}
#asis-footer-input:focus { border-color: var(--asis-primary); }
#asis-footer-input:disabled { background: #f2f3f5; }
#asis-footer-send {
  width: 42px; border: none; border-radius: 50%; background: var(--asis-primary); color: #fff;
  font-size: 18px; cursor: pointer; flex-shrink: 0;
}
#asis-footer-send:hover { filter: brightness(1.08); }

.asis-error { border-color: #e74c3c !important; animation: asis-shake .4s; }
@keyframes asis-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 768px) {
  #asis-launcher { left: 12px; right: 12px; bottom: 170px; max-width: none; }
  #asis-chat-box {
    left: 12px; right: 12px; bottom: 170px; top: auto; transform: none;
    width: auto; max-width: calc(100vw - 24px); max-height: calc(100vh - 190px);
  }
}
@media (max-width: 480px) {
  #asis-chat-box {
    left: 0; right: 0; top: 0; bottom: 0; transform: none;
    width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #asis-launcher, #asis-chat-btn, .asis-ai-ikon, .asis-ai-goz, .asis-ai-durum, .asis-msg, .asis-typing span,
  #asis-chat-head .asis-status .asis-dot { animation: none !important; }
  #asis-launcher, #asis-chat-btn { transition: none; }
  #asis-chat-close { transition: background .15s ease; }
  #asis-chat-close:hover { transform: none; }
}
