.dehonbot-widget {
  position: fixed;
  right: clamp(16px, 2.4vw, 32px);
  bottom: 24px;
  z-index: 2600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  color: #17283b;
  font-family: Manrope, Arial, sans-serif;
}

.dehonbot-launcher {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 9px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: linear-gradient(135deg, #b51f32, #d74a40);
  color: #fff;
  box-shadow: 0 12px 30px rgba(23, 40, 59, .28);
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.dehonbot-launcher:hover {
  filter: saturate(1.1);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(23, 40, 59, .34);
}

.dehonbot-launcher:focus-visible,
.dehonbot-close:focus-visible,
.dehonbot-suggestions button:focus-visible,
.dehonbot-form input:focus-visible,
.dehonbot-form button:focus-visible {
  outline: 3px solid #dfb55d;
  outline-offset: 3px;
}

.dehonbot-launcher-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #b51f32;
}

.dehonbot-launcher-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dehonbot-panel {
  display: flex;
  width: min(370px, calc(100vw - 48px));
  height: min(550px, calc(100vh - 120px));
  max-height: calc(100vh - 120px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(23, 40, 59, .12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(23, 40, 59, .25);
}

.dehonbot-panel[hidden] {
  display: none;
}

.dehonbot-widget.dehonbot-open .dehonbot-panel {
  display: flex;
}

.dehonbot-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 16px;
  border-top: 4px solid #dfb55d;
  background: #17283b;
  color: #fff;
}

.dehonbot-header-copy {
  min-width: 0;
}

.dehonbot-kicker {
  display: block;
  margin-bottom: 4px;
  color: #ffe1a1;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dehonbot-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.dehonbot-header p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: .72rem;
}

.dehonbot-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.dehonbot-close::before {
  content: "\00d7";
  font-size: 1.45rem;
  line-height: 1;
}

.dehonbot-messages {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  background: #fff;
}

.dehonbot-message {
  max-width: 92%;
  padding: 12px 14px;
  border: 1px solid rgba(23, 40, 59, .08);
  border-radius: 16px 16px 16px 5px;
  background: #f7f5f0;
  color: #17283b;
  font-size: .86rem;
  line-height: 1.55;
}

.dehonbot-message p {
  margin: 0;
}

.dehonbot-message p a {
  color: #a51d2e;
  font-weight: 800;
  text-underline-offset: 2px;
}

.dehonbot-message.is-user {
  align-self: flex-end;
  border-color: #b51f32;
  border-radius: 16px 16px 5px 16px;
  background: #b51f32;
  color: #fff;
}

.dehonbot-answer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.dehonbot-answer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(181, 31, 50, .22);
  border-radius: 999px;
  background: #fff;
  color: #a51d2e;
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
}

.dehonbot-answer-links a:hover {
  background: rgba(181, 31, 50, .07);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dehonbot-message.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #526170;
}

.dehonbot-message.is-loading::after {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid rgba(181, 31, 50, .2);
  border-top-color: #b51f32;
  border-radius: 50%;
  animation: dehonbot-spin .8s linear infinite;
  content: "";
}

@keyframes dehonbot-spin {
  to {
    transform: rotate(360deg);
  }
}

.dehonbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dehonbot-suggestions button {
  padding: 7px 10px;
  border: 1px solid rgba(23, 40, 59, .16);
  border-radius: 999px;
  background: #fff;
  color: #17283b;
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
}

.dehonbot-suggestions button:hover {
  border-color: #b51f32;
  color: #b51f32;
}

.dehonbot-form {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(23, 40, 59, .1);
  background: #fff;
}

.dehonbot-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.dehonbot-form input {
  min-width: 0;
  min-height: 44px;
  flex: 1 1 auto;
  padding: 0 13px;
  border: 1px solid rgba(23, 40, 59, .18);
  border-radius: 999px;
  background: #fff;
  color: #17283b;
  font: inherit;
  font-size: .84rem;
}

.dehonbot-form input::placeholder {
  color: #657384;
}

.dehonbot-form button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #b51f32;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
}

.dehonbot-form button:disabled,
.dehonbot-form input:disabled,
.dehonbot-suggestions button:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 600px) {
  .dehonbot-widget {
    right: 16px;
  }

  .dehonbot-launcher {
    min-height: 54px;
    padding-right: 15px;
    font-size: .82rem;
  }

  .dehonbot-launcher-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .dehonbot-panel {
    height: min(550px, calc(100vh - 104px));
    max-height: calc(100vh - 104px);
    border-radius: 18px;
  }

  .dehonbot-header {
    padding: 15px 15px 13px;
  }

  .dehonbot-messages {
    padding: 14px;
  }
}

@media (max-width: 1100px) {
  .dehonbot-widget.dehonbot-cookie-visible {
    bottom: calc(var(--dehonbot-cookie-height, 180px) + 40px);
  }

  .dehonbot-widget.dehonbot-cookie-visible .dehonbot-panel {
    height: min(550px, calc(100vh - var(--dehonbot-cookie-height, 180px) - 240px));
    max-height: calc(100vh - var(--dehonbot-cookie-height, 180px) - 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dehonbot-launcher,
  .dehonbot-message.is-loading::after {
    transition: none;
    animation: none;
  }
}
