.chatbot-launcher {
  position: fixed;
  z-index: 9998;
  right: 18px;
  bottom: 18px;
  min-width: 58px;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, #26b9ed, #7c55f5);
  color: #fff;
  box-shadow: 0 14px 45px rgba(0, 0, 0, .35);
  font: 700 15px/1 system-ui, sans-serif;
  padding: 14px 18px;
  cursor: pointer;
}

.chatbot-panel {
  position: fixed;
  z-index: 9999;
  right: 18px;
  bottom: 82px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(390px, calc(100vw - 24px));
  height: min(660px, calc(100vh - 100px));
  overflow: hidden;
  border: 1px solid rgba(154, 177, 244, .35);
  border-radius: 18px;
  background: #0b1021;
  color: #edf1ff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
  font: 15px/1.45 system-ui, sans-serif;
}

.chatbot-panel[hidden] {
  display: none;
}

body.chatbot-ready {
  padding-bottom: 88px;
}

@media (min-width: 700px) {
  body.chatbot-open {
    padding-right: 426px;
  }

  body.chatbot-open .chatbot-launcher {
    display: none;
  }
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #11182d;
  border-bottom: 1px solid rgba(154, 177, 244, .22);
}

.chatbot-header > div {
  min-width: 0;
}

.chatbot-back {
  min-width: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #252e4b;
  color: #dbe4ff;
  font: 700 18px/1 system-ui, sans-serif;
  cursor: pointer;
}

.chatbot-back[hidden] {
  display: none;
}

.chatbot-body {
  display: grid;
  min-height: 0;
  overflow: hidden;
  background: #080d1b;
}

.chatbot-view {
  min-height: 0;
  overflow-y: auto;
}

.chatbot-view[hidden] {
  display: none;
}

.chatbot-view--chat {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.chatbot-hello {
  padding: 18px 16px 6px;
}

.chatbot-hello__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.chatbot-hello__lead {
  margin: 6px 0 0;
  color: #aab8d6;
  font-size: 13.5px;
  line-height: 1.45;
}

.chatbot-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 16px 4px;
}

.chatbot-topic {
  border: 1px solid rgba(154, 177, 244, .4);
  border-radius: 999px;
  background: transparent;
  color: #c8d4f2;
  font: 600 12.5px/1.15 system-ui, sans-serif;
  padding: 8px 13px;
  cursor: pointer;
}

.chatbot-topic.is-active {
  border-color: #7c9cff;
  background: #1d2748;
  color: #fff;
}

.chatbot-quick {
  display: grid;
  gap: 8px;
  padding: 12px 16px 18px;
}

.chatbot-quick__item {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(154, 177, 244, .26);
  border-radius: 14px;
  background: #101729;
  color: #edf1ff;
  font: inherit;
  padding: 12px 14px;
  text-decoration: none;
  cursor: pointer;
}

.chatbot-quick__item:hover,
.chatbot-quick__item:focus-visible {
  border-color: #7c9cff;
  background: #16203a;
}

.chatbot-quick__item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.chatbot-quick__item span {
  color: #9fadcd;
  font-size: 12.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chatbot-wallet {
  display: grid;
  gap: 10px;
  padding: 16px 16px 4px;
}

.chatbot-wallet__box {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(154, 177, 244, .3);
  border-radius: 14px;
  background: #101729;
  padding: 12px 14px;
}

.chatbot-wallet__box span,
.chatbot-wallet__events li,
.chatbot-orders small {
  color: #9fadcd;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chatbot-wallet__events {
  margin: 0;
  padding-left: 18px;
}

.chatbot-orders {
  display: grid;
  gap: 8px;
}

.chatbot-orders__row {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(154, 177, 244, .18);
  padding-top: 8px;
  overflow-wrap: anywhere;
}

.chatbot-catalog {
  display: grid;
  gap: 10px;
  padding: 10px 16px 18px;
}

.chatbot-note {
  margin: 0;
  color: #9fadcd;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chatbot-service {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(154, 177, 244, .26);
  border-radius: 14px;
  background: #101729;
  padding: 13px 14px;
}

.chatbot-service strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.chatbot-service p {
  margin: 0;
  color: #b9c5e4;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chatbot-service__price {
  justify-self: start;
  border-radius: 999px;
  background: #252e4b;
  color: #f0d9a3;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.chatbot-service__deliverable {
  color: #8fe3bc !important;
}

.chatbot-service__limit {
  color: #f0c98b !important;
}

.chatbot-service__start {
  justify-self: start;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: #6d54e8;
  color: #fff;
  font: 700 13px/1 system-ui, sans-serif;
  padding: 0 14px;
  cursor: pointer;
}

.chatbot-service__start:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.chatbot-service__connection {
  display: grid;
  gap: 6px;
  justify-items: start;
  max-width: 100%;
}

.chatbot-service__connect {
  justify-self: start;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  background: transparent;
  color: #e9e6ff;
  font: 600 12px/1.3 system-ui, sans-serif;
  padding: 6px 12px;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chatbot-service__connect:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.chatbot-quote {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(154, 177, 244, .2);
  padding-top: 10px;
}

.chatbot-quote label {
  display: grid;
  gap: 5px;
  color: #c8d4f2;
  font-size: 12.5px;
}

.chatbot-quote__input {
  min-height: 40px;
  border: 1px solid #455076;
  border-radius: 10px;
  background: #080d1b;
  color: #fff;
  font: inherit;
  padding: 8px 10px;
}

.chatbot-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px;
  background: #11182d;
  border-top: 1px solid rgba(154, 177, 244, .22);
}

.chatbot-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aab8d6;
  font: 600 12.5px/1.2 system-ui, sans-serif;
  padding: 6px 4px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.chatbot-tabs button.is-active {
  background: #1d2748;
  color: #fff;
}

.chatbot-header strong,
.chatbot-header small {
  display: block;
  overflow-wrap: anywhere;
}

.chatbot-header small {
  margin-top: 2px;
  color: #aab8d6;
  font-size: 12px;
  line-height: 1.35;
}

.chatbot-mode {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #252e4b;
  color: #c8d4f2;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chatbot-mode[data-mode="waiting"] {
  background: #4a3c14;
  color: #f7d98b;
}

.chatbot-mode[data-mode="human"] {
  background: #12402f;
  color: #8fe3bc;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 12px;
  background: #0b1021;
  border-top: 1px solid rgba(154, 177, 244, .18);
}

.chatbot-suggestions:empty {
  display: none;
}

.chatbot-chip {
  flex: 0 1 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid rgba(154, 177, 244, .45);
  border-radius: 999px;
  background: #141c33;
  color: #dbe4ff;
  font: 600 12.5px/1.15 system-ui, sans-serif;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
}

.chatbot-chip:hover,
.chatbot-chip:focus-visible {
  border-color: #7c9cff;
  background: #1d2748;
}

.chatbot-close {
  min-width: 42px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #252e4b;
  color: #fff;
  font: 700 20px/1 system-ui, sans-serif;
  cursor: pointer;
}

.chatbot-messages {
  overflow-y: auto;
  padding: 14px;
  background: #080d1b;
}

.chatbot-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chatbot-message--visitor {
  margin-left: auto;
  background: #315fcf;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-message--bot,
.chatbot-message--human {
  background: #1a233c;
  color: #edf1ff;
  border-bottom-left-radius: 4px;
}

.chatbot-action {
  align-self: flex-start;
  display: inline-block;
  margin: 2px 0 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #315fcf;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.chatbot-action:hover,
.chatbot-action:focus-visible {
  background: #4374ea;
}

.chatbot-message--human::before {
  display: block;
  margin-bottom: 3px;
  color: #8fe3bc;
  content: "Équipe AI-DEVHUB";
  font-size: 12px;
  font-weight: 700;
}

.chatbot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  background: #11182d;
  border-top: 1px solid rgba(154, 177, 244, .22);
}

.chatbot-input {
  min-width: 0;
  min-height: 44px;
  max-height: 96px;
  resize: vertical;
  border: 1px solid #455076;
  border-radius: 10px;
  background: #080d1b;
  color: #fff;
  font: inherit;
  padding: 10px;
}

.chatbot-send {
  align-self: end;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #6d54e8;
  color: #fff;
  font: 700 14px/1 system-ui, sans-serif;
  padding: 0 15px;
  cursor: pointer;
}

.chatbot-send:disabled {
  cursor: wait;
  opacity: .6;
}

.chatbot-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: #aab8d6;
  font-size: 12px;
}

@media (max-width: 520px) {
  .chatbot-launcher {
    right: 12px;
    bottom: 12px;
    min-width: 52px;
    min-height: 46px;
    padding: 12px 15px;
    font-size: 14px;
  }

  .chatbot-panel {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  body.chatbot-open {
    overflow: hidden;
  }

  .chatbot-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  .chatbot-back {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .chatbot-identity {
    grid-column: 2;
    grid-row: 1;
  }

  .chatbot-mode {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin: 3px 0 0;
    max-width: 100%;
    min-height: 25px;
    padding: 4px 9px;
    white-space: normal;
  }

  .chatbot-close {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
