.donny-chat {
  position: fixed;
  right: 24px;
  bottom: 104px;
  z-index: 9998;
  font-family: inherit;
}

.donny-chat * {
  box-sizing: border-box;
}

.donny-chat__button {
  width: 224px;
  min-width: 224px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  color: #fff;
  border: 1px solid rgba(249, 115, 22, 0.28);
  box-shadow: 0 14px 35px rgba(249, 115, 22, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px 9px 9px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.donny-chat__button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.45);
}

.donny-chat__button img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.16);
}

.donny-chat__button span {
  color: #111827;
  font-size: 16px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

.donny-chat__panel {
  position: absolute;
  right: 0;
  bottom: 88px;
  width: min(520px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 132px));
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
  overflow: hidden;
  display: none;
  color: #111827;
}

.donny-chat.is-open .donny-chat__panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.donny-chat__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #ff6b35, #ffa500);
  color: #fff;
}

.donny-chat__avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(124, 45, 18, 0.22);
}

.donny-chat__title {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.donny-chat__title strong {
  font-size: 22px;
  line-height: 1.2;
}

.donny-chat__title span {
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.25;
}

.donny-chat__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  flex: 0 0 auto;
}

.donny-chat__messages {
  overflow-y: auto;
  min-height: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.donny-chat__message {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.donny-chat__message--assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.donny-chat__message--user {
  align-self: flex-end;
  background: #ff6b35;
  color: #fff;
}

.donny-chat__typing {
  color: #6b7280;
  font-size: 14px;
  padding: 0 22px 10px;
  background: #f8fafc;
}

.donny-chat__form {
  display: flex;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.donny-chat__input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 15px 18px;
  font: inherit;
  font-size: 16px;
  color: #111827;
}

.donny-chat__send {
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 800;
  padding: 0 22px;
  cursor: pointer;
  font-size: 16px;
}

.donny-chat__send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

:root.dark .donny-chat__button {
  background: linear-gradient(135deg, #111827, #1f2937);
  border-color: rgba(255, 107, 53, 0.42);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

:root.dark .donny-chat__button:hover {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

:root.dark .donny-chat__button img,
:root.dark .donny-chat__avatar {
  background: rgba(255, 255, 255, 0.94);
}

:root.dark .donny-chat__button span {
  color: #f9fafb;
}

:root.dark .donny-chat__panel {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f9fafb;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.56);
}

:root.dark .donny-chat__messages,
:root.dark .donny-chat__typing {
  background: #0b1120;
}

:root.dark .donny-chat__message--assistant {
  background: #172033;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f9fafb;
}

:root.dark .donny-chat__message--user {
  background: linear-gradient(135deg, #ff6b35, #f59e0b);
  color: #fff;
}

:root.dark .donny-chat__typing {
  color: #cbd5e1;
}

:root.dark .donny-chat__form {
  background: #111827;
  border-top-color: rgba(255, 255, 255, 0.1);
}

:root.dark .donny-chat__input {
  background: #0b1120;
  border-color: rgba(255, 255, 255, 0.22);
  color: #f9fafb;
}

:root.dark .donny-chat__input::placeholder {
  color: #94a3b8;
}

:root.dark .donny-chat__send {
  background: #f9fafb;
  color: #111827;
}

@media (max-width: 640px) {
  .donny-chat {
    inset: 0;
    right: auto;
    bottom: auto;
    width: 100vw;
    height: 100dvh;
    pointer-events: none;
  }

  .donny-chat__button {
    position: fixed;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    width: 72px;
    min-width: 72px;
    height: 72px;
    padding: 7px;
    justify-content: center;
    pointer-events: auto;
  }

  .donny-chat__button span {
    display: none;
  }

  .donny-chat__button img {
    width: 58px;
    height: 58px;
  }

  .donny-chat.is-open .donny-chat__button {
    display: none;
  }

  .donny-chat__panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    pointer-events: auto;
  }

  .donny-chat__header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 38px;
    padding: 12px;
    gap: 10px;
  }

  .donny-chat__avatar {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .donny-chat__title strong {
    font-size: 18px;
  }

  .donny-chat__title span {
    font-size: 12px;
    line-height: 1.25;
  }

  .donny-chat__close {
    width: 38px;
    height: 38px;
  }

  .donny-chat__messages {
    padding: 16px;
    gap: 12px;
  }

  .donny-chat__message {
    max-width: 92%;
    font-size: 15px;
    line-height: 1.48;
    padding: 12px 14px;
  }

  .donny-chat__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    align-items: stretch;
    padding: 12px;
    gap: 9px;
    width: 100%;
    max-width: 100vw;
  }

  .donny-chat__input {
    width: 100%;
    min-width: 0;
    padding: 14px 15px;
    font-size: 15px;
  }

  .donny-chat__send {
    width: 82px;
    min-width: 0;
    padding: 0;
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .donny-chat__panel {
    inset: 0;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .donny-chat__title span {
    display: none;
  }

  .donny-chat__form {
    grid-template-columns: minmax(0, 1fr) 74px;
    padding: 10px;
  }

  .donny-chat__send {
    width: 74px;
    font-size: 14px;
  }
}
