.dulac-chat {
  --chat-blue: #254796;
  --chat-ink: #15233c;
  --chat-muted: #667086;
  --chat-cream: #f7f4ed;
  --chat-line: rgb(21 35 60 / 11%);
  position: fixed;
  z-index: 10002;
  right: 18px;
  bottom: 16px;
  color: var(--chat-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dulac-chat,
.dulac-chat * {
  box-sizing: border-box;
}

.dulac-chat button,
.dulac-chat textarea {
  appearance: none;
  font: inherit;
}

.dulac-chat button {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.dulac-chat svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.dulac-chat__launcher {
  position: relative;
  width: 60px;
  min-width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--chat-blue);
  box-shadow: 0 12px 30px rgb(21 35 60 / 24%);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.dulac-chat__launcher:hover,
.dulac-chat__launcher:focus-visible {
  background: #1d3b82;
  box-shadow: 0 16px 38px rgb(21 35 60 / 24%);
  outline: none;
  transform: translateY(-2px);
}

.dulac-chat__launcher-icon {
  display: grid;
  place-items: center;
}

.dulac-chat__launcher-icon svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
  stroke: none;
}

.dulac-chat__launcher-status {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #28b56f;
}

.dulac-chat--open .dulac-chat__launcher {
  display: none;
}

.dulac-chat__panel {
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100dvh - 32px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 26px 74px rgb(13 29 28 / 28%);
}

.dulac-chat__panel[hidden] {
  display: none;
}

.dulac-chat__top {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 14px 14px 11px;
  color: #fff;
  background: linear-gradient(135deg, #15233c, #254796);
}

.dulac-chat__top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dulac-chat__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dulac-chat__title-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.dulac-chat__title-logo img {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.dulac-chat__title span,
.dulac-chat__title strong,
.dulac-chat__title small {
  display: block;
}

.dulac-chat__title strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.1;
}

.dulac-chat__title small {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgb(255 255 255 / 68%);
  font-size: 11px;
}

.dulac-chat__title small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fe098;
}

.dulac-chat__icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  cursor: pointer;
}

.dulac-chat__icon-button:hover,
.dulac-chat__icon-button:focus-visible {
  background: rgb(255 255 255 / 18%);
  outline: none;
}

.dulac-chat__weather {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgb(255 255 255 / 72%);
  font-size: 12px;
}

.dulac-chat__weather > span:last-child {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.dulac-chat__weather strong {
  color: #fff;
  font-size: 13px;
}

.dulac-chat__weather small {
  color: rgb(255 255 255 / 62%);
  font-size: 11px;
}

.dulac-chat__weather-icon,
.dulac-chat__weather-icon svg {
  width: 18px;
  height: 18px;
}

.dulac-chat__screen {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 12px;
  background: #fff;
}

.dulac-chat__intro-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 14px;
  padding: 11px 14px;
  color: #26334b;
  border-radius: 15px 15px 15px 4px;
  background: #f0f3f8;
  font-size: 13px;
  line-height: 1.45;
}

.dulac-chat__quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.dulac-chat__quick-pill {
  min-height: 36px;
  padding: 0 13px;
  color: var(--chat-blue);
  border: 1px solid rgb(37 71 150 / 22%);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dulac-chat__quick-pill:hover,
.dulac-chat__quick-pill:focus-visible {
  color: #fff;
  border-color: var(--chat-blue);
  background: var(--chat-blue);
  outline: none;
}

.dulac-chat__messages:empty {
  display: none;
}

.dulac-chat__messages:not(:empty) {
  padding-top: 2px;
}

.dulac-chat__message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 9px;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.dulac-chat__message--bot {
  color: #26334b;
  border: 1px solid var(--chat-line);
  border-bottom-left-radius: 4px;
  background: #fff;
}

.dulac-chat__message--user {
  margin-left: auto;
  color: #fff;
  border-bottom-right-radius: 4px;
  background: var(--chat-blue);
}

.dulac-chat__message--error {
  color: #6c3029;
  border-color: #efd0ca;
  background: #fff3f0;
}

.dulac-chat__message--bot a {
  color: var(--chat-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dulac-chat__message--loading {
  min-width: 58px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.dulac-chat__typing {
  display: inline-flex;
  gap: 4px;
}

.dulac-chat__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7c8799;
  animation: dulac-chat-typing 1.2s infinite ease-in-out;
}

.dulac-chat__typing span:nth-child(2) { animation-delay: .16s; }
.dulac-chat__typing span:nth-child(3) { animation-delay: .32s; }

@keyframes dulac-chat-typing {
  0%, 60%, 100% { opacity: .4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.dulac-chat__form {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--chat-line);
  background: #fff;
}

.dulac-chat__field {
  min-width: 0;
  flex: 1;
}

.dulac-chat textarea {
  width: 100%;
  min-height: 46px;
  max-height: 116px;
  display: block;
  resize: none;
  padding: 12px 13px;
  color: var(--chat-ink);
  border: 1px solid rgb(21 35 60 / 16%);
  border-radius: 13px;
  background: #fff;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
}

.dulac-chat textarea:focus {
  border-color: rgb(37 71 150 / 58%);
  box-shadow: 0 0 0 3px rgb(37 71 150 / 10%);
}

.dulac-chat textarea::placeholder {
  color: #8891a1;
}

.dulac-chat__send {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 13px;
  background: var(--chat-blue);
  cursor: pointer;
}

.dulac-chat__send:hover,
.dulac-chat__send:focus-visible {
  background: #1d3b82;
  outline: none;
}

.dulac-chat__send:disabled {
  cursor: wait;
  opacity: .55;
}

.dulac-chat__limit {
  min-height: 0;
  margin: 0;
  padding: 0 16px 7px;
  color: var(--chat-muted);
  background: #fff;
  font-size: 11px;
  text-align: right;
}

.dulac-chat__direct-help {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 14px 9px;
  color: var(--chat-muted);
  background: #fff;
  font-size: 11px;
}

.dulac-chat__direct-help a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: var(--chat-blue);
  border-radius: 999px;
  background: rgb(37 71 150 / 8%);
  font-weight: 750;
  text-decoration: none;
}

.dulac-chat__direct-help svg {
  width: 15px;
  height: 15px;
}

.dulac-chat__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dulac-chat--inline {
  position: static;
  width: 100%;
  height: 100%;
}

.dulac-chat--inline .dulac-chat__panel {
  width: 100%;
  height: 100%;
  border-color: rgb(21 35 60 / 10%);
  box-shadow: 0 24px 70px rgb(21 35 60 / 14%);
}

.dulac-chat--inline .dulac-chat__top {
  padding: 18px 22px 15px;
}

.dulac-chat--inline .dulac-chat__top-bar {
  min-height: 44px;
}

.dulac-chat--inline .dulac-chat__screen {
  padding: clamp(22px, 4vw, 38px) clamp(16px, 4vw, 42px) 16px;
}

.dulac-chat--inline .dulac-chat__intro-message,
.dulac-chat--inline .dulac-chat__quick-list,
.dulac-chat--inline .dulac-chat__messages,
.dulac-chat--inline .dulac-chat__form,
.dulac-chat--inline .dulac-chat__limit,
.dulac-chat--inline .dulac-chat__direct-help {
  width: min(720px, 100%);
  margin-inline: auto;
}

.dulac-chat--inline .dulac-chat__intro-message {
  margin-bottom: 20px;
  font-size: 14px;
}

.dulac-chat--inline .dulac-chat__quick-list {
  gap: 10px;
  margin-bottom: 20px;
}

.dulac-chat--inline .dulac-chat__quick-pill {
  min-height: 40px;
  padding-inline: 15px;
  font-size: 13px;
}

.dulac-chat--inline .dulac-chat__messages:not(:empty) {
  padding-top: 20px;
}

.dulac-chat--inline .dulac-chat__form {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgb(21 35 60 / 13%);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgb(21 35 60 / 8%);
}

.dulac-chat--inline .dulac-chat__limit {
  padding-top: 5px;
}

.dulac-chat--inline .dulac-chat__direct-help {
  padding: 7px 2px 10px;
}

@media (prefers-reduced-motion: reduce) {
  .dulac-chat__typing span {
    animation: none;
  }
}

@media (max-width: 560px) {
  .dulac-chat {
    right: 10px;
    bottom: 10px;
  }

  .dulac-chat__launcher {
    width: 58px;
    min-width: 58px;
    padding: 0;
  }

  .dulac-chat__panel {
    width: calc(100vw - 20px);
    height: min(680px, calc(100dvh - 20px));
    border-radius: 18px;
  }

  .dulac-chat__direct-help {
    display: none;
  }

  .dulac-chat--inline .dulac-chat__panel {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .dulac-chat--inline .dulac-chat__top {
    padding: 12px 14px 10px;
  }

  .dulac-chat--inline .dulac-chat__title-logo {
    width: 36px;
    height: 36px;
  }

  .dulac-chat--inline .dulac-chat__screen {
    padding: 18px 14px 8px;
  }

  .dulac-chat--inline .dulac-chat__intro-message {
    margin-bottom: 14px;
  }

  .dulac-chat--inline .dulac-chat__quick-list {
    gap: 8px;
    margin-bottom: 14px;
  }

  .dulac-chat--inline .dulac-chat__quick-pill {
    min-height: 38px;
    padding-inline: 9px;
    font-size: 12px;
  }

  .dulac-chat--inline .dulac-chat__form {
    width: calc(100% - 24px);
    margin: 6px auto 0;
  }

  .dulac-chat--inline .dulac-chat__limit,
  .dulac-chat--inline .dulac-chat__direct-help {
    width: calc(100% - 24px);
  }

  .dulac-chat__screen {
    padding: 16px 14px 10px;
  }

}
