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

.dhc-widget {
  --dhc-color: #ff0000;
  --dhc-edge-x: 24px;
  --dhc-edge-y: 24px;
  --dhc-mobile-edge-x: 14px;
  --dhc-mobile-edge-y: 110px;
  position: fixed !important;
  bottom: var(--dhc-edge-y) !important;
  z-index: 2147483000 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #2b1111;
  font-family: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

.dhc-widget.dhc-right {
  right: var(--dhc-edge-x) !important;
  left: auto !important;
}

.dhc-launcher {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 7px 20px 7px 8px;
  border: 1px solid rgba(255, 0, 0, .18);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(80, 0, 0, .2);
  color: #351515;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dhc-launcher svg {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  padding: 9px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--dhc-color), #c90000);
  color: #fff;
}

.dhc-launcher:hover,
.dhc-launcher:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 0, .42);
  box-shadow: 0 16px 38px rgba(80, 0, 0, .26);
  outline: none;
}

.dhc-panel {
  width: min(390px, calc(100vw - 28px));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #f3dada;
  border-radius: 28px 28px 10px 28px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(75, 0, 0, .22);
  transform-origin: bottom right;
  animation: dhc-arrive .24s cubic-bezier(.2, .8, .2, 1);
}

@keyframes dhc-arrive {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dhc-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 17px 18px;
  border-bottom: 1px solid #f2dddd;
  background: linear-gradient(135deg, #fffafa 0%, #ffe9e9 100%);
  color: #351515;
}

.dhc-avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--dhc-color), #c90000);
  box-shadow: 0 7px 18px rgba(255, 0, 0, .25);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.dhc-panel-header > div:nth-child(2) { min-width: 0; flex: 1; }
.dhc-panel-header strong { display: block; font-size: 16px; line-height: 1.3; }
.dhc-status { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: #786363; font-size: 12px; }
.dhc-status i { width: 8px; height: 8px; border-radius: 50%; background: #20a66a; box-shadow: 0 0 0 3px rgba(32, 166, 106, .12); }
.dhc-status.is-offline i { background: #a7a0aa; box-shadow: none; }

.dhc-close,
.dhc-prompt-close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dhc-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  color: #806565;
}

.dhc-close:hover,
.dhc-close:focus-visible { background: rgba(255, 0, 0, .08); outline: none; }
.dhc-panel-body { padding: 20px; background: #fff; }
.dhc-welcome { margin: 0 0 16px; color: #351616; font-size: 16px; font-weight: 800; line-height: 1.45; }
.dhc-intents { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.dhc-intent {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 12px 32px 12px 13px;
  border: 1px solid #f3dada;
  border-radius: 15px;
  background: #fffafa;
  color: #452525;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.dhc-intent::after {
  content: "→";
  position: absolute;
  right: 12px;
  bottom: 11px;
  color: var(--dhc-color);
  font-size: 17px;
}

.dhc-intent:hover,
.dhc-intent:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 0, 0, .5);
  background: #fff0f0;
  outline: none;
}

.dhc-panel-body small { display: block; margin-top: 15px; color: #817070; font-size: 11px; line-height: 1.4; }

.dhc-prompt {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: max-content;
  max-width: min(295px, calc(100vw - 40px));
  padding: 14px 40px 14px 16px;
  border: 0;
  border-radius: 18px 18px 4px 18px;
  background: #351515;
  box-shadow: 0 13px 34px rgba(75, 0, 0, .27);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  animation: dhc-arrive .24s ease-out;
}

.dhc-prompt-close { position: absolute; top: 9px; right: 8px; padding: 4px; color: rgba(255,255,255,.75); font-size: 18px; }
.dhc-prompt-text { display: block; }

@media (max-width: 767px) {
  .dhc-widget {
    right: var(--dhc-mobile-edge-x) !important;
    bottom: var(--dhc-mobile-edge-y) !important;
  }
  .dhc-launcher { width: 60px; height: 60px; min-height: 60px; padding: 8px; border-radius: 19px; justify-content: center; }
  .dhc-launcher svg { width: 44px; height: 44px; }
  .dhc-launcher span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .dhc-panel { border-radius: 24px 24px 8px 24px; }
  .dhc-intents { grid-template-columns: 1fr; }
  .dhc-intent { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .dhc-panel, .dhc-prompt { animation: none; }
  .dhc-launcher, .dhc-intent { transition: none; }
}
