#amariastore-chatbot-root {
  --agc-primary: #e7c3cb;
  --agc-primary-strong: #c86d8b;
  --agc-primary-soft: #fdf4f7;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  font-family: inherit;
}

#amariastore-chatbot-root.agc-position-left {
  right: auto;
  left: 16px;
}

#amariastore-chatbot-root * {
  box-sizing: border-box;
}

.agc-toggle {
  position: relative;
  width: 94px;
  height: 94px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  cursor: pointer;
  overflow: visible;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.agc-toggle-avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none;
  transform-origin: center center;
}

.agc-toggle-badge {
  position: absolute;
  top: 4px;
  right: -6px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ea6f97 0%, #d95f87 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(217, 95, 135, 0.22);
  pointer-events: none;
}

.agc-toggle:hover {
  transform: translateY(-2px) scale(1.02);
}

.agc-toggle:focus-visible {
  outline: 3px solid rgba(223, 110, 146, 0.32);
  outline-offset: 4px;
  border-radius: 999px;
}

.agc-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(398px, calc(100vw - 32px));
  height: 372px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(233, 179, 195, 0.9);
  border-radius: 28px;
  background: #fbf8f8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.05);
  will-change: transform, opacity;
}

#amariastore-chatbot-root.agc-position-left .agc-panel {
  right: auto;
  left: 16px;
}

#amariastore-chatbot-root.agc-open .agc-toggle {
  opacity: 0;
  pointer-events: none;
}

#amariastore-chatbot-root.agc-open .agc-panel {
  animation: agc-panel-enter 0.25s ease;
}

#amariastore-chatbot-root.agc-open .agc-panel.agc-panel-closing {
  animation: agc-panel-leave 0.25s ease;
}

.agc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 68px;
  padding: 12px 16px;
  background: #f7a497;
  color: #ffffff;
  border-bottom: 1px solid rgba(216, 149, 170, 0.25);
}

.agc-header-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agc-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: #faeaea;
  overflow: hidden;
  display: block;
}

.agc-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transform: none;
  transform-origin: center center;
}

.agc-header-copy {
  min-width: 0;
}

.agc-header strong {
  display: block;
  margin-bottom: 1px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.12;
}

.agc-header p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  line-height: 1.15;
  color: #ffffff;
}

.agc-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #5ad65a;
  box-shadow: 0 0 0 3px rgba(90, 214, 90, 0.14);
  animation: agc-online-pulse 2.5s infinite ease-in-out;
}

#amariastore-chatbot-root .agc-close {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: #fff;
  cursor: pointer;
  font-size: 0 !important;
  line-height: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  opacity: 1;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

#amariastore-chatbot-root .agc-close svg {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
  pointer-events: none;
}

#amariastore-chatbot-root .agc-close:hover {
  opacity: 0.72;
}

#amariastore-chatbot-root .agc-close:focus-visible {
  outline: none;
  opacity: 0.78;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.agc-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  background: #fbf8f8;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #f1afc0 transparent;
}

.agc-messages::-webkit-scrollbar {
  width: 3px;
}

.agc-messages::-webkit-scrollbar-track {
  background: transparent;
}

.agc-messages::-webkit-scrollbar-thumb {
  background: #f1afc0;
  border-radius: 999px;
}

.agc-messages::-webkit-scrollbar-thumb:hover {
  background: #e88ca8;
}

.agc-message {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  animation: agc-message-enter 0.18s ease both;
}

.agc-message:last-child {
  margin-bottom: 0;
}

.agc-message-user {
  align-items: flex-end;
}

.agc-bubble {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 75%;
  padding: 11px 14px;
  border: 1px solid #f7ced6;
  border-radius: 18px;
  background: #fff;
  color: #2f2f2f;
  box-shadow: none;
}

.agc-message-assistant .agc-bubble::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-left: 1px solid #f7ced6;
  border-bottom: 1px solid #f7ced6;
  background: #fff;
  transform: rotate(45deg);
}

.agc-typing-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.agc-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d7a2b1;
  animation: agc-typing-bounce 1.2s infinite ease-in-out;
}

.agc-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.agc-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes agc-typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.agc-message-user .agc-bubble {
  background: #e46a92;
  color: #fffdfd;
  padding: 10px 14px;
}

.agc-bubble-greeting {
  display: inline-block;
  margin-bottom: 8px;
  color: #d7638a;
  font-size: 17px;
  font-weight: 700;
}

.agc-bubble p {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: #2f2f2f;
}

.agc-message-user .agc-bubble p {
  color: #fffdfd;
}

.agc-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#amariastore-chatbot-root .agc-suggestion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(247, 206, 214, 1);
  border-radius: 999px;
  background: #fff7f9;
  color: #6d5460;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#amariastore-chatbot-root .agc-suggestion:hover {
  background: #fff1f5;
  border-color: rgba(223, 110, 146, 0.34);
  color: #d7638a;
}

#amariastore-chatbot-root .agc-suggestion:active {
  transform: scale(0.98);
}

#amariastore-chatbot-root .agc-suggestion:disabled {
  opacity: 0.6;
  cursor: default;
}

.agc-products {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.agc-product-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(200, 109, 139, 0.12);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 18px rgba(68, 31, 44, 0.04);
}

.agc-product-media img,
.agc-product-placeholder {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3eaed;
}

.agc-product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
}

.agc-product-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agc-product-title {
  color: #111;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.agc-product-price {
  color: #444;
  font-size: 12px;
}

.agc-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agc-product-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff3f6;
  color: #c86d8b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.agc-product-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

#amariastore-chatbot-root .agc-buy,
#amariastore-chatbot-root .agc-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#amariastore-chatbot-root .agc-buy {
  border: 1px solid var(--agc-primary-strong);
  background: var(--agc-primary-soft);
  color: var(--agc-primary-strong);
  cursor: pointer;
}

#amariastore-chatbot-root .agc-buy:hover {
  background: #f9e9ee;
  filter: none;
}

#amariastore-chatbot-root .agc-source {
  border: 1px solid rgba(200, 109, 139, 0.16);
  background: #fff;
  color: #5c4b52;
}

#amariastore-chatbot-root .agc-source:hover {
  background: #fff4f7;
}

#amariastore-chatbot-root .agc-buy:active,
#amariastore-chatbot-root .agc-source:active {
  transform: scale(0.98);
}

#amariastore-chatbot-root .agc-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  flex: 0 0 48px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #ea6f97 0%, #d95f87 100%) !important;
  color: #fff;
  font-size: 0 !important;
  line-height: 0;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

#amariastore-chatbot-root .agc-send:hover {
  filter: brightness(0.95);
}

#amariastore-chatbot-root .agc-send svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

#amariastore-chatbot-root .agc-send.is-loading {
  opacity: 0.65;
}

#amariastore-chatbot-root .agc-send:active {
  transform: scale(0.97);
}

#amariastore-chatbot-root .agc-send:focus-visible {
  outline: 2px solid rgba(217, 95, 135, 0.28);
  outline-offset: 2px;
}

.agc-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 12px;
  border-top: 1px solid rgba(233, 179, 195, 0.8);
  background: #fff;
}

#amariastore-chatbot-root .agc-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  resize: none;
  border: 1.5px solid #f7ced6 !important;
  border-radius: 20px !important;
  padding: 0 16px !important;
  font: inherit;
  font-size: 15px !important;
  line-height: 48px !important;
  color: #3a3a3a !important;
  background: #fff !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

#amariastore-chatbot-root .agc-input::placeholder {
  font-size: 15px;
  color: #777;
}

#amariastore-chatbot-root .agc-input:focus {
  outline: none;
  border-color: #ec8aaa !important;
  box-shadow: none !important;
}

@keyframes agc-panel-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes agc-panel-leave {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes agc-message-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes agc-online-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }
}

@media (max-width: 1024px) and (min-width: 641px) {
  .agc-panel {
    width: min(380px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  #amariastore-chatbot-root {
    right: 16px;
    bottom: 16px;
  }

  #amariastore-chatbot-root.agc-position-left {
    right: auto;
    left: 16px;
  }

  .agc-toggle {
    width: 82px;
    height: 82px;
  }

  .agc-toggle-badge {
    top: 2px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .agc-panel {
    right: 16px;
    bottom: 16px;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    height: min(58vh, 400px);
    border-radius: 24px;
  }

  #amariastore-chatbot-root.agc-position-left .agc-panel {
    right: auto;
    left: 16px;
  }

  .agc-header {
    min-height: 64px;
    padding: 12px 14px;
  }

  .agc-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .agc-form {
    gap: 8px;
    padding: 12px;
  }

  #amariastore-chatbot-root .agc-input {
    min-height: 48px !important;
    height: 48px !important;
    max-height: 48px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    line-height: 48px !important;
    border-radius: 20px !important;
  }

  #amariastore-chatbot-root .agc-send {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    flex-basis: 48px;
    border-radius: 16px !important;
  }

  #amariastore-chatbot-root .agc-send svg {
    width: 24px;
    height: 24px;
  }
}
