/* KITO AI shared prompt overlay */
.kt-ai-root {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 7, 18, .62);
  backdrop-filter: blur(14px);
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
}

.kt-ai-root.is-open {
  display: flex;
}

.kt-ai-shell {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  height: min(720px, calc(100vh - 44px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -8%, rgba(20,136,252,.42), transparent 0 32%, transparent 58%),
    radial-gradient(circle at 88% 15%, rgba(225,20,28,.22), transparent 0 24%, transparent 52%),
    #101114;
  box-shadow: 0 28px 80px rgba(0,0,0,.48);
  color: #fff;
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .34s cubic-bezier(.16,1,.3,1), opacity .28s ease;
}

.kt-ai-root.is-open .kt-ai-shell {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.kt-ai-rays {
  position: absolute;
  inset: -35% -20% auto;
  height: 430px;
  pointer-events: none;
  background: radial-gradient(circle at center bottom, rgba(20,136,252,.7), rgba(20,136,252,.22) 25%, transparent 56%);
  opacity: .42;
}

.kt-ai-head,
.kt-ai-body,
.kt-ai-compose {
  position: relative;
  z-index: 1;
}

.kt-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.kt-ai-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.kt-ai-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #1488fc, #e1141c);
  box-shadow: 0 12px 32px rgba(20,136,252,.25);
  font-weight: 800;
}

.kt-ai-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.kt-ai-subtitle {
  margin-top: 3px;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1.35;
}

.kt-ai-model {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.kt-ai-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.kt-ai-body {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.kt-ai-welcome {
  max-width: 780px;
  margin: 0 auto 22px;
  text-align: center;
}

.kt-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 600;
}

.kt-ai-welcome h2 {
  margin: 18px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 700;
}

.kt-ai-welcome h2 span {
  color: #58a9ff;
  font-style: italic;
}

.kt-ai-welcome p {
  max-width: 680px;
  margin: 0 auto;
  color: #9ca3af;
  font-size: 15px;
  line-height: 1.7;
}

.kt-ai-samples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.kt-ai-samples button {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  color: #d1d5db;
  cursor: pointer;
  font-size: 12px;
  transition: transform .2s, background .2s, color .2s;
}

.kt-ai-samples button:hover {
  transform: translateY(-2px);
  background: rgba(20,136,252,.18);
  color: #fff;
}

.kt-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kt-ai-msg {
  display: flex;
  gap: 10px;
  max-width: 86%;
}

.kt-ai-msg.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.kt-ai-msg.bot {
  align-self: flex-start;
}

.kt-ai-bubble {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,.07);
  color: #eef2f7;
  font-size: 14px;
  line-height: 1.65;
}

.kt-ai-msg.user .kt-ai-bubble {
  background: #1488fc;
  border-color: rgba(255,255,255,.16);
  color: #fff;
}

.kt-ai-bubble a {
  color: #7cc2ff;
  font-weight: 700;
}

.kt-ai-image {
  display: block;
  max-width: min(420px, 100%);
  max-height: 260px;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 9px;
  background: #fff;
}

.kt-ai-product-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-top: 10px;
}

.kt-ai-product-card {
  min-width: 178px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  color: #fff;
  text-decoration: none;
}

.kt-ai-product-card img {
  width: 100%;
  height: 86px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.kt-ai-product-card strong {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.kt-ai-compose {
  padding: 0 22px 22px;
}

.kt-ai-preview {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 auto 10px;
  width: min(760px, 100%);
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}

.kt-ai-preview.is-visible {
  display: flex;
}

.kt-ai-preview img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 9px;
}

.kt-ai-preview span {
  flex: 1;
  color: #cbd5e1;
  font-size: 12px;
}

.kt-ai-preview button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.kt-ai-input-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  background: #1e1e22;
  box-shadow: 0 18px 48px rgba(0,0,0,.34);
}

.kt-ai-textarea {
  width: 100%;
  min-height: 88px;
  max-height: 190px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 18px 18px 8px;
  font: 400 15px/1.55 "Open Sans", "Segoe UI", Arial, sans-serif;
}

.kt-ai-textarea::placeholder {
  color: #6b7280;
}

.kt-ai-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
}

.kt-ai-icon-btn,
.kt-ai-plan,
.kt-ai-send {
  border: 0;
  cursor: pointer;
  transition: transform .2s, background .2s, opacity .2s;
}

.kt-ai-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
}

.kt-ai-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  background: transparent;
  color: #8a8a8f;
  font-size: 12px;
  font-weight: 600;
}

.kt-ai-actions .spacer {
  flex: 1;
}

.kt-ai-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  background: #1488fc;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(20,136,252,.28);
}

.kt-ai-send:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.kt-ai-typing {
  display: inline-flex;
  gap: 4px;
}

.kt-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: ktAiTyping 1s infinite ease-in-out;
}

.kt-ai-typing span:nth-child(2) { animation-delay: .12s; }
.kt-ai-typing span:nth-child(3) { animation-delay: .24s; }

@keyframes ktAiTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 720px) {
  .kt-ai-root {
    padding: 10px;
    align-items: flex-end;
  }
  .kt-ai-shell {
    width: 100%;
    height: min(86vh, 760px);
    border-radius: 22px 22px 16px 16px;
  }
  .kt-ai-head {
    padding: 16px;
  }
  .kt-ai-model {
    display: none;
  }
  .kt-ai-body {
    padding: 16px;
  }
  .kt-ai-msg {
    max-width: 94%;
  }
  .kt-ai-compose {
    padding: 0 14px 14px;
  }
}
