.dobroe-widget,
.dobroe-widget * {
  box-sizing: border-box;
}

.dobroe-widget {
  --dw-accent: #5e16ea;
  --dw-text: #17131f;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  font-family: Roboto, Arial, sans-serif;
}

.dobroe-widget__launcher {
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--dw-accent);
  box-shadow: 0 12px 34px rgba(49, 20, 94, .32);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.dobroe-widget__launcher::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(94, 22, 234, .3);
  border-radius: inherit;
  animation: dobroe-widget-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

.dobroe-widget__launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 38px rgba(49, 20, 94, .38);
}

.dobroe-widget__launcher:focus-visible,
.dobroe-widget__close:focus-visible,
.dobroe-widget__channel:focus-visible {
  outline: 3px solid rgba(94, 22, 234, .28);
  outline-offset: 3px;
}

.dobroe-widget__launcher svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.dobroe-widget__launcher .dobroe-widget__icon-close,
.dobroe-widget.is-open .dobroe-widget__launcher .dobroe-widget__icon-chat {
  display: none;
}

.dobroe-widget.is-open .dobroe-widget__launcher .dobroe-widget__icon-close {
  display: block;
}

.dobroe-widget__panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 340px;
  overflow: hidden;
  border: 1px solid rgba(29, 20, 45, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(31, 19, 52, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.97);
  transform-origin: right bottom;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.dobroe-widget.is-open .dobroe-widget__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dobroe-widget__head {
  position: relative;
  padding: 24px 54px 22px 22px;
  color: #fff;
  background: linear-gradient(135deg, #6f28f0, #4f0fc8);
}

.dobroe-widget__identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
}

.dobroe-widget__avatar {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 7px;
  border-radius: 15px;
  background: #fff;
}

.dobroe-widget__name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.dobroe-widget__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  opacity: .9;
}

.dobroe-widget__status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50e38b;
  box-shadow: 0 0 0 3px rgba(80, 227, 139, .2);
}

.dobroe-widget__message {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.dobroe-widget__close {
  position: absolute;
  top: 17px;
  right: 17px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font-size: 22px;
  line-height: 28px;
  cursor: pointer;
}

.dobroe-widget__channels {
  padding: 16px;
}

.dobroe-widget__hint {
  margin: 0 4px 11px;
  color: #7c7488;
  font-size: 13px;
}

.dobroe-widget__channel {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px;
  border-radius: 16px;
  color: var(--dw-text);
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.dobroe-widget__channel:hover {
  color: var(--dw-text);
  background: #f6f3fb;
  transform: translateX(2px);
}

.dobroe-widget__channel-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
}

.dobroe-widget__channel-icon--whatsapp { background: #25d366; }
.dobroe-widget__channel-icon--telegram { background: #229ed9; }

.dobroe-widget__channel-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.dobroe-widget__channel-copy {
  min-width: 0;
  flex: 1;
}

.dobroe-widget__channel-title,
.dobroe-widget__channel-note {
  display: block;
}

.dobroe-widget__channel-title {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 700;
}

.dobroe-widget__channel-note {
  color: #847d8d;
  font-size: 12px;
}

.dobroe-widget__arrow {
  color: #aaa3b2;
  font-size: 22px;
}

@keyframes dobroe-widget-pulse {
  0% { opacity: .9; transform: scale(1); }
  75%, 100% { opacity: 0; transform: scale(1.38); }
}

@media (max-width: 575px) {
  .dobroe-widget {
    right: 16px;
    bottom: 16px;
  }

  .dobroe-widget__launcher {
    width: 58px;
    height: 58px;
  }

  .dobroe-widget__panel {
    position: fixed;
    right: 12px;
    bottom: 86px;
    width: min(340px, calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .dobroe-widget__launcher::before { animation: none; }
  .dobroe-widget__launcher,
  .dobroe-widget__panel,
  .dobroe-widget__channel { transition: none; }
}

@media (max-width: 600px) {
  .dobroe-widget {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .dobroe-widget__launcher { width: 58px; height: 58px; }
  .dobroe-widget__panel {
    position: fixed;
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100dvh - 110px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
}
