/* Keep the support panel beside, never on top of, the floating buttons. */
.telegram-widget__positioner {
  z-index: 70 !important;
}

.telegram-widget__panel {
  width: 330px !important;
  max-height: calc(100dvh - 48px);
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.telegram-widget__header {
  display: flex;
  flex-direction: column;
}

/* Inset corner brackets so they do not create a 1px scrollable overflow. */
.telegram-widget__panel::before {
  top: 0;
  left: 0;
}

.telegram-widget__panel::after {
  bottom: 0;
  right: 0;
}

.telegram-widget__header,
.telegram-widget__actions {
  flex-shrink: 0;
}

.telegram-widget__action span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.telegram-widget__action svg {
  flex-shrink: 0;
}

/* The standalone Features page shares the same left/end placement. */
.features-telegram-widget__panel {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  z-index: 70;
}

@media (max-width: 720px) {
  .telegram-widget__panel {
    /* Edges + 52px button + 12px gap + room for a classic scrollbar. */
    width: min(330px, calc(100vw - 108px)) !important;
    max-height: calc(100dvh - 28px);
  }
}
