.aics-chatbot {
  --aics-chat-main-bg: #111827;
  --aics-chat-main-icon: #ffffff;
  --aics-chat-secondary-bg: #1f2937;
  --aics-chat-secondary-icon: #ffffff;
  position: relative;
  z-index: 99999;
}

.aics-chatbot--floating {
  position: fixed;
  right: 24px;
  bottom: 24px;
}

.aics-chatbot__toggle {
  height: 60px;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  background: var(--aics-chat-main-bg)!important;
  color: var(--aics-chat-main-icon)!important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.aics-chatbot__toggle:hover,
.aics-chatbot__toggle:focus-visible {
  background: var(--aics-chat-secondary-bg)!important;
  color: var(--aics-chat-secondary-icon)!important;
}

.aics-chatbot__toggle:focus-visible {
  outline: 2px solid var(--aics-chat-secondary-bg)!important;
  outline-offset: 3px;
}

.aics-chatbot__window {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

.aics-chatbot__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--aics-chat-main-bg);
  color: var(--aics-chat-main-icon);
}

.aics-chatbot__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.aics-chatbot__status {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.aics-chatbot__close {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 26px!important;
  line-height: 28px!important;
  cursor: pointer;
  padding: 2px 8px 6px!important;
}

.aics-chatbot__messages {
  flex: 1 1 auto;
  padding: 16px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aics-chatbot__message {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
}

.aics-chatbot__message--bot {
  background: #e5e7eb;
  color: #111827;
  align-self: flex-start;
}

.aics-chatbot__welcome-title,
.aics-chatbot__welcome-copy {
  margin: 0;
}

.aics-chatbot__welcome-copy {
  margin-top: 8px;
}

.aics-chatbot__welcome a {
  color: var(--aics-chat-secondary-bg);
  text-decoration: underline;
}

.aics-chatbot__welcome a:hover,
.aics-chatbot__welcome a:focus-visible {
  color: var(--aics-chat-main-bg);
}

.aics-chatbot__message--user {
  background: var(--aics-chat-main-bg);
  color: var(--aics-chat-main-icon);
  align-self: flex-end;
  padding-right: 20px;
  text-align: right;
}

.aics-chatbot__suggested {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 12px;
  max-width: 100%;
}

.aics-chatbot__suggested-button {
  border: 1px solid var(--aics-chat-secondary-bg)!important;
  background: var(--aics-chat-main-icon)!important;
  color: var(--aics-chat-secondary-bg)!important;
  font-size: 14px!important;
  line-height: 1.3!important;
  font-weight: 400 !important;
  max-width: 100%;
  white-space: normal!important;
  text-align: right!important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-transform: none!important;
}

.aics-chatbot__suggested-button:hover,
.aics-chatbot__suggested-button:focus-visible {
  background: var(--aics-chat-secondary-bg)!important;
  border-color: var(--aics-chat-secondary-bg)!important;
  color: var(--aics-chat-main-icon)!important;
}

.aics-chatbot__suggested-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.aics-chatbot__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.aics-chatbot__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

.aics-chatbot__input:focus {
  border-color: #111827;
}

.aics-chatbot__send {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--aics-chat-secondary-bg)!important;
  color: var(--aics-chat-main-icon)!important;
  font-size: 14px;
  font-weight: 600;
}

.aics-chatbot__send:hover {
  background-color: var(--aics-chat-main-bg)!important;
}

.aics-chatbot__send:disabled {
  opacity: 0.65;
  cursor: wait;
}

.aics-chatbot__typing {
  font-style: italic;
  opacity: 0.75;
}

.aics-chatbot__toggle-icon {
  font-size: 26px!important;
}

@media (max-width: 640px) {
  .aics-chatbot--floating {
    right: 16px;
    bottom: 16px;
  }

  .aics-chatbot__window {
    width: min(360px, calc(100vw - 16px));
    right: 0;
    bottom: 72px;
    height: 70vh;
  }

  .aics-chatbot__toggle {
    width: 56px;
    height: 56px;
  }
}
