.edc-chat {
  --edc-accent: #2b5b91;
  --edc-navy: #071321;
  --edc-blue: var(--edc-accent);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: Inter, Arial, sans-serif;
  color: #0d1828;
}
.edc-chat * {
  box-sizing: border-box;
}
.edc-chat__launcher {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  min-width: 58px;
  max-width: 58px;
  min-height: 58px;
  max-height: 58px;
  padding: 0;
  margin: 0;
  line-height: 1;
  aspect-ratio: 1 / 1;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--edc-blue);
  color: #fff;
  appearance: none;
  -webkit-appearance: none;
  box-shadow:
    0 10px 32px rgba(7, 19, 33, 0.32),
    0 0 0 1px rgba(7, 19, 33, 0.12);
  cursor: pointer;
  transition:
    transform 0.2s,
    background 0.2s;
}
.edc-chat__launcher:hover {
  transform: translateY(-2px);
  background: #3972ad;
}
.edc-chat__launcher svg {
  display: block;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.edc-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 115px));
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 4px;
  box-shadow: 0 22px 65px rgba(7, 19, 33, 0.26);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  contain: layout paint;
  animation: edc-open 0.2s ease-out;
}
.edc-chat__panel[hidden] {
  display: none;
}
@keyframes edc-open {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.edc-chat__header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--edc-navy);
  color: #fff;
  border-bottom: 3px solid var(--edc-blue);
}
.edc-chat__header strong,
.edc-chat__header small {
  display: block;
}
.edc-chat__header strong {
  font-size: 15px;
  letter-spacing: -0.15px;
}
.edc-chat__header small {
  margin-top: 3px;
  color: #aebdd0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.edc-chat__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.edc-chat__messages {
  flex: 1 1 0;
  height: 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 18px;
  background: #f3f6f9;
}
.edc-chat__message {
  width: fit-content;
  max-width: 86%;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 3px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.48;
  font-size: 14px;
}
.edc-chat__message--assistant {
  background: #fff;
  border: 1px solid #dce3ea;
}
.edc-chat__message--user {
  margin-left: auto;
  background: var(--edc-navy);
  color: #fff;
}
.edc-chat__message.is-pending {
  color: #64748b;
}
.edc-chat__actions {
  flex: 0 0 auto;
  padding: 10px 14px 4px;
  background: #fff;
}
.edc-chat__actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 9px 17px;
  border: 1px solid #214f82;
  border-bottom-width: 3px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--edc-blue), #3972ad);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(43, 91, 145, 0.25);
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.edc-chat__actions button:hover {
  background: linear-gradient(135deg, #3972ad, #4a83bd);
  border-color: #214f82;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(43, 91, 145, 0.32);
}
.edc-chat__actions button:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
  box-shadow: 0 2px 7px rgba(43, 91, 145, 0.22);
}
.edc-chat__actions button:focus-visible {
  outline: 3px solid #adc8e5;
  outline-offset: 2px;
}
.edc-chat__composer {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
}
.edc-chat__composer[hidden],
.edc-chat__actions[hidden] {
  display: none;
}
.edc-chat__composer textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 100px;
  padding: 10px 11px;
  border: 1px solid #cdd6e0;
  border-radius: 3px;
  font: inherit;
}
.edc-chat__composer textarea:focus,
.edc-chat__lead input:focus,
.edc-chat__lead textarea:focus {
  outline: 2px solid #adc8e5;
  outline-offset: 1px;
}
.edc-chat__composer button {
  width: 42px;
  border: 0;
  border-radius: 3px;
  background: var(--edc-navy);
  color: #fff;
  cursor: pointer;
}
.edc-chat__lead {
  flex: 1;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  gap: 9px;
  background: #fff;
}
.edc-chat__lead[hidden] {
  display: none;
}
.edc-chat__panel.is-lead-open .edc-chat__messages {
  display: none;
}
.edc-chat__lead input,
.edc-chat__lead textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cdd6e0;
  border-radius: 3px;
  font: inherit;
}
.edc-chat__lead > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.edc-chat__lead button {
  padding: 9px 14px;
  border: 1px solid var(--edc-navy);
  border-radius: 3px;
  background: #fff;
  color: var(--edc-navy);
  cursor: pointer;
}
.edc-chat__lead button[type="submit"] {
  background: var(--edc-navy);
  color: #fff;
}
.edc-chat__consent {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 12px;
}
.edc-chat__consent input {
  width: auto;
  margin-top: 3px;
}
.edc-chat__consent a {
  color: var(--edc-blue);
}
.edc-chat__notice {
  flex: 0 0 auto;
  padding: 4px 14px 10px;
  background: #fff;
  color: #748094;
  font-size: 10px;
  text-align: center;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.edc-chat--left {
  right: auto;
  left: 24px;
}
.edc-chat--left .edc-chat__panel {
  right: auto;
  left: 0;
}
@media (max-width: 480px) {
  .edc-chat {
    right: 14px;
    bottom: 14px;
  }
  .edc-chat__panel {
    position: fixed;
    inset: 12px;
    width: auto;
    height: auto;
  }
  .edc-chat__launcher {
    width: 56px;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    min-height: 56px;
    max-height: 56px;
  }
  .edc-chat--right {
    right: 14px;
    left: auto;
  }
  .edc-chat--left {
    right: auto;
    left: 14px;
  }
}
