.am-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 54px;
  height: 54px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0a0a0a;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  font-size: 11px;
  font-weight: 900;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.am-chat-launcher svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.am-chat-launcher.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.am-chatbot {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 75;
  width: min(386px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 36px));
  display: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.98);
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.am-chatbot.is-open {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
}

.am-chatbot__header {
  min-height: 66px;
  padding: 14px 14px 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.am-chatbot__header strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.am-chatbot__header span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.am-chatbot__header button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.am-chatbot__body {
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.am-chat-msg {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.am-chat-msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
}

.am-chat-msg--user {
  align-self: flex-end;
  background: #fff;
  color: #0a0a0a;
}

.am-chat-products {
  display: grid;
  gap: 8px;
}

.am-chat-product {
  min-height: 66px;
  padding: 8px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.am-chat-product img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

.am-chat-product strong,
.am-chat-product small {
  display: block;
  min-width: 0;
}

.am-chat-product strong {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.am-chat-product small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  font-weight: 800;
}

.am-chatbot__prompts {
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.am-chatbot__prompts button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.05);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.am-chatbot__form {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.am-chatbot__form input {
  min-height: 42px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.am-chatbot__form input:focus {
  border-color: rgba(255, 255, 255, 0.34);
}

.am-chatbot__form button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .am-chat-launcher {
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }

  .am-chatbot {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: calc(100vh - 20px);
  }
}
