.brevo-chat,
.brevo-chat-dialog {
  --brevo-chat-ink: #101a2a;
  --brevo-chat-blue: #1947c5;
  --brevo-chat-line: #d5deeb;
  --brevo-chat-paper: #fbfcfe;
}

.brevo-chat {
  position: fixed;
  z-index: 1990;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + var(--brevo-chat-offset, 0px));
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.brevo-chat.is-loaded {
  left: max(1rem, env(safe-area-inset-left));
  right: auto;
}

.brevo-chat__launcher,
.brevo-chat__settings {
  min-height: 46px;
  border: 1px solid var(--brevo-chat-blue);
  border-radius: 3px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.015em;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(16, 26, 42, 0.14);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.brevo-chat__launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--brevo-chat-blue);
}

.brevo-chat__launcher:hover {
  color: #fff;
  background: #173ca5;
  transform: translateY(-2px);
}

.brevo-chat__settings {
  padding: 0.65rem 0.8rem;
  color: var(--brevo-chat-ink);
  background: var(--brevo-chat-paper);
}

.brevo-chat__settings:hover {
  color: var(--brevo-chat-blue);
  background: #eef3fb;
}

.brevo-chat__launcher:focus-visible,
.brevo-chat__settings:focus-visible,
.brevo-chat-dialog button:focus-visible,
.brevo-chat-dialog a:focus-visible {
  outline: 3px solid #ff9b45;
  outline-offset: 3px;
}

.brevo-chat__settings[hidden],
.brevo-chat-dialog [hidden] {
  display: none !important;
}

.brevo-chat-dialog {
  width: min(31rem, calc(100vw - 2rem));
  max-width: 31rem;
  max-height: min(90dvh, 42rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--brevo-chat-ink);
  background: var(--brevo-chat-paper);
  border: 1px solid var(--brevo-chat-line);
  border-radius: 5px;
  box-shadow: 0 24px 80px rgba(16, 26, 42, 0.28);
  font-family: var(--font-primary, "Montserrat", sans-serif);
}

.brevo-chat-dialog::backdrop {
  background: rgba(10, 20, 34, 0.62);
  backdrop-filter: blur(2px);
}

.brevo-chat-dialog__content {
  padding: clamp(1.25rem, 5vw, 2rem);
}

.brevo-chat-dialog__eyebrow {
  margin: 0 0 0.7rem;
  color: var(--brevo-chat-blue);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brevo-chat-dialog h2 {
  margin: 0 0 0.9rem;
  color: var(--brevo-chat-ink);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 650;
  line-height: 1.2;
}

.brevo-chat-dialog p {
  margin: 0 0 0.8rem;
  font-size: 0.91rem;
  line-height: 1.65;
}

.brevo-chat-dialog a {
  color: var(--brevo-chat-blue);
  text-underline-offset: 0.18em;
}

.brevo-chat-dialog__notice {
  margin-top: 1.1rem !important;
  padding: 0.8rem 0.9rem;
  background: #edf2fa;
  border-left: 3px solid var(--brevo-chat-blue);
  font-size: 0.84rem !important;
}

.brevo-chat-dialog__status {
  margin: 0.9rem 0 0 !important;
  color: #9b2d22;
  font-size: 0.82rem !important;
}

.brevo-chat-dialog__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.45rem;
}

.brevo-chat-dialog__actions button {
  min-height: 46px;
  padding: 0.65rem 1rem;
  border: 1px solid #8492a5;
  border-radius: 3px;
  color: var(--brevo-chat-ink);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.brevo-chat-dialog__actions .brevo-chat-dialog__primary {
  color: #fff;
  background: var(--brevo-chat-blue);
  border-color: var(--brevo-chat-blue);
}

.brevo-chat-dialog__actions .brevo-chat-dialog__primary:hover {
  background: #173ca5;
}

@media (max-width: 680px) {
  .brevo-chat {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + var(--brevo-chat-offset, 0px));
  }

  .brevo-chat__launcher {
    min-height: 48px;
    padding-inline: 0.9rem;
  }

  .brevo-chat__settings {
    min-height: 48px;
    padding-inline: 0.7rem;
  }

  .brevo-chat-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .brevo-chat-dialog__actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brevo-chat__launcher,
  .brevo-chat__settings {
    transition: none;
  }
}
