.telegramwin{
  --tg-sidebar-start: #00107a;
  --tg-sidebar-end: #0a96c7;
  --tg-messages-bg: #d1c9bf;
  --tg-bubble-in: #fefefe;
  --tg-bubble-out: #cde8b9;
  position: fixed;
  left: 148px;
  top: 72px;
  width: min(1180px, calc(100vw - 132px));
  min-width: 780px;
  height: min(760px, calc(100vh - 112px));
  min-height: 560px;
  z-index: 48;
}

.telegramwinInner{
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #c0c0c0;
}

.telegramwin .wa-titlebar{
  cursor: move;
  user-select: none;
  display: flex;
  align-items: center;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
  background: linear-gradient(90deg, #00005d 0%, #001e88 38%, #0071c5 100%);
  border: 1px solid rgba(0,0,0,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  border-radius: 0;
  margin: 0;
}

.telegramwin .wa-titleleft--spacer{
  width: 18px;
  flex: 0 0 18px;
}

.telegramwin .wa-titlecenter{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 6px;
  min-width: 0;
}

.telegramwin .wa-titletext,
.telegramAuthModal__window .wa-modal__title{
  color: #fff;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.telegramwin .wa-winbtns{
  display: flex;
  gap: 3px;
}

.telegramwin .wa-winbtns .wa-btn,
.telegramAuthModal__window .wa-modal__close{
  width: 16px;
  height: 14px;
  padding: 0;
  line-height: 12px;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #000;
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.55);
}

.telegramwin .wa-winbtns .wa-btn:active,
.telegramAuthModal__window .wa-modal__close:active{
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset -1px -1px 0 rgba(255,255,255,.45);
  transform: translateY(1px);
}

.telegramwinBody{
  flex: 1;
  min-height: 0;
  padding: 8px;
  background: #c0c0c0;
}

.telegramResizeHandle{
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 48%, #808080 48% 54%, transparent 54% 62%, #fff 62% 68%, transparent 68% 76%, #808080 76% 82%, transparent 82%);
  pointer-events: auto;
}

.telegramLayout{
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.telegramSidebar,
.telegramMain{
  min-height: 0;
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
}

.telegramSidebar{
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.telegramSidebar__header{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0)),
    linear-gradient(90deg, var(--tg-sidebar-start) 0%, var(--tg-sidebar-end) 100%);
  color: #fff;
}

.telegramSidebar__badge{
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #7fdcff 0%, #0d79bf 100%);
  color: #fff;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.6), 1px 1px 0 rgba(0,0,0,.25);
  font: 700 12px/1 Tahoma, Arial, sans-serif;
}

.telegramSidebar__headcopy{
  min-width: 0;
  flex: 1 1 auto;
}

.telegramSidebar__settingsBtn{
  width: 24px;
  height: 24px;
  padding: 0;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0;
  color: transparent;
  background: #c0c0c0;
  background-image: url("../icons/tg_setting.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.55);
  font-size: 0;
}

.telegramSidebar__settingsBtn:active{
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset -1px -1px 0 rgba(255,255,255,.45);
  transform: translateY(1px);
}

.telegramSettingsMenu{
  position: absolute;
  top: 52px;
  right: 10px;
  z-index: 4;
  width: 240px;
  padding: 10px;
  box-sizing: border-box;
}

.telegramSettingsMenu__section + .telegramSettingsMenu__section{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #999;
}

.telegramSettingsMenu__heading{
  margin-bottom: 8px;
  color: #222;
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramSettingsMenu__check,
.telegramSettingsMenu__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #222;
  font: 12px/1.2 Tahoma, Arial, sans-serif;
}

.telegramSettingsMenu__row + .telegramSettingsMenu__row{
  margin-top: 6px;
}

.telegramSettingsMenu__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.telegramSettingsMenu input[type="color"]{
  width: 32px;
  height: 22px;
  padding: 0;
  border: 1px solid #808080;
  background: transparent;
}

.telegramSidebar__title{
  font: 700 12px/1 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.telegramSidebar__subtitle{
  margin-top: 4px;
  color: rgba(255,255,255,.82);
  font: 12px/1.1 Tahoma, Arial, sans-serif;
}

.telegramSidebar__searchWrap{
  padding: 8px 8px 6px;
  background: #c0c0c0;
}

.telegramSidebar__authBtn{
  display: block;
  width: 100%;
  margin: 0 0 8px !important;
  padding: 5px 8px !important;
  box-sizing: border-box;
  background: linear-gradient(180deg, #fff7bf 0%, #eadf8f 100%);
  color: #000;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  box-shadow: 1px 1px 0 rgba(0,0,0,.18);
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.telegramSidebar__authBtn:active{
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.telegramSidebar__search{
  width: 100%;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  background: #fff;
  color: #111;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  font: 12px/1 Tahoma, Arial, sans-serif;
}

.telegramSidebar__list{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0)),
    #d4d0c8;
}

.telegramChatItem{
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px;
  text-align: left;
  background: linear-gradient(180deg, #f7f7f7 0%, #ececec 100%);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  box-shadow: 1px 1px 0 rgba(0,0,0,.22);
  font: inherit;
  cursor: pointer;
}

.telegramChatItem:active{
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.telegramChatItem.is-active,
.telegramChatItem:hover{
  background: linear-gradient(180deg, #dceafe 0%, #c5d9f1 100%);
}

.telegramChatItem__avatarWrap{
  position: relative;
  width: 42px;
  height: 42px;
}

.telegramChatItem__avatar,
.telegramTopbar__avatar,
.telegramMsg__avatar{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #8ca9ff;
  border: 1px solid rgba(0,0,0,.28);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.55);
}

.telegramChatItem__presenceDot{
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  display: none;
  border-radius: 50%;
  background: #28c44d;
  border: 1px solid #fff;
  box-shadow: 1px 1px 0 rgba(0,0,0,.3);
}

.telegramChatItem__avatar--fallback,
.telegramTopbar__avatarFallback,
.telegramMsg__avatarFallback{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 17px/1 Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #79b2ff 0%, #4978e8 100%);
}

.telegramChatItem__main,
.telegramChatItem__top,
.telegramChatItem__bottom{
  display: flex;
  min-width: 0;
}

.telegramChatItem__main{
  flex-direction: column;
  gap: 6px;
}

.telegramChatItem__top,
.telegramChatItem__bottom{
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.telegramChatItem__title{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramChatItem__time,
.telegramChatItem__unread{
  flex: 0 0 auto;
  font: 700 10px/1 Tahoma, Arial, sans-serif;
}

.telegramChatItem__time{
  color: #5a5a5a;
}

.telegramPager{
  display: flex;
  justify-content: center;
  margin: 4px 0 8px;
}

.telegramPager--bottom{
  gap: 8px;
  margin: 10px 0 4px;
}

.telegramPager__btn{
  width: auto !important;
  min-width: 0;
  padding: 2px 10px !important;
  font: 11px/1.2 Tahoma, Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.telegramChatItem__preview{
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #515151;
  font: 12px/1.25 Tahoma, Arial, sans-serif;
}

.telegramChatItem--archive{
  background: linear-gradient(180deg, #e7edf5 0%, #d6dde8 100%);
}

.telegramChatItem__avatar--archive{
  background: linear-gradient(180deg, #8ea1b8 0%, #687b94 100%);
}

.telegramChatItem__unread{
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d66b7;
  color: #fff;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.2);
}

.telegramMain{
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0)),
    #c0c0c0;
}

.wa-panel{
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}

.telegramTopbar{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 16px;
}

.telegramTopbar__main{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.telegramMobileBack{
  display: none;
  flex: 0 0 auto;
  align-self: center;
  width: 38px;
  height: 42px;
  padding: 0;
  border: 1px solid #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background: #c0c0c0;
  color: #000;
  font: 700 16px/1 Tahoma, Arial, sans-serif;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 0 rgba(0,0,0,.18);
}

.telegramTopbar__avatarWrap{
  flex: 0 0 auto;
}

.telegramTopbar__avatar,
.telegramTopbar__avatarFallback{
  width: 44px;
  height: 44px;
}

.telegramTopbar__copy{
  min-width: 0;
}

.telegramTopbar__title{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
  font: 700 12px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramTopbar__status{
  margin-top: 4px;
  color: #444;
  font: 12px/1.2 Tahoma, Arial, sans-serif;
}

.telegramTopbar__actions{
  display: flex;
  align-items: center;
  gap: 6px;
}

.telegramTopbar__actions--bottom{
  align-self: flex-end;
  padding-bottom: 2px;
}

.telegramMuteToggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #222;
  font: 12px/1 Tahoma, Arial, sans-serif;
  transform: translateY(12px);
}

.telegramConversation{
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.telegramMessagesWrap{
  position: relative;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(14,48,87,.22) 0%, rgba(51,0,88,.12) 100%),
    var(--tg-messages-bg);
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.telegramDayBadge{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 3px 10px;
  background: rgba(68,95,43,.9);
  color: #f5ffe9;
  border-radius: 999px;
  font: 700 11px/1 Tahoma, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(0,0,0,.3);
}

.telegramDivider{
  display: flex;
  justify-content: center;
  margin: 4px 0 14px;
}

.telegramDivider__label{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 12px;
  background: rgba(68,95,43,.9);
  color: #f5ffe9;
  border-radius: 999px;
  font: 700 11px/1 Tahoma, Arial, sans-serif;
  box-shadow: 0 1px 0 rgba(0,0,0,.28);
}

.telegramDivider--unread .telegramDivider__label{
  background: linear-gradient(180deg, #0069c7 0%, #0053aa 100%);
  color: #fff;
}

.telegramMessages{
  height: 100%;
  overflow: auto;
  padding: 18px 18px 14px;
  box-sizing: border-box;
}

.telegramMsg{
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  max-width: min(78%, 640px);
  margin: 0 0 26px;
}

.telegramMsg--out{
  margin-left: auto;
  grid-template-columns: minmax(0, 1fr);
}

.telegramMsg--system{
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.telegramMsg__stack{
  min-width: 0;
}

.telegramMsg__meta{
  margin-bottom: 4px;
  color: #494949;
  font: 700 10px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramMsg__bubble{
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 7px;
  background: linear-gradient(180deg, var(--tg-bubble-in) 0%, #f0f0f0 100%);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  color: #111;
  box-shadow: 1px 1px 0 rgba(0,0,0,.18);
}

.telegramMsg__forwarded{
  margin-bottom: 8px;
  color: #2d5a93;
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
}

.telegramMsg__reply{
  margin-bottom: 8px;
  padding: 6px 8px;
  background: rgba(70,108,170,.12);
  border-left: 3px solid #4d76b8;
}

.telegramMsg__replyAuthor{
  color: #294e87;
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
}

.telegramMsg__replyText{
  margin-top: 3px;
  color: #444;
  font: 11px/1.25 Tahoma, Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telegramMsg--out .telegramMsg__bubble{
  background: linear-gradient(180deg, #dbf2c8 0%, var(--tg-bubble-out) 100%);
}

.telegramMsg--system .telegramMsg__bubble{
  background: linear-gradient(180deg, #fff7c5 0%, #f0e8a0 100%);
}

.telegramMsg__body{
  color: #111;
  font: 13px/1.45 Tahoma, Arial, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.telegramMsg__link{
  display: inline-block;
  max-width: 100%;
  color: #0b4f94;
  text-decoration: underline;
  word-break: break-all;
}

.telegramMsg__link:hover{
  color: #003c7a;
}

.telegramMsg__body:empty{
  display: none;
}

.telegramMsg__media{
  margin-bottom: 8px;
}

.telegramMsg__media:last-child{
  margin-bottom: 0;
}

.telegramMsg__gallery{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  max-width: min(100%, 560px);
}

.telegramMsg__media--galleryItem{
  margin-bottom: 0;
}

.telegramMsg__gallery .telegramMsg__photo,
.telegramMsg__gallery .telegramMsg__video,
.telegramMsg__gallery .telegramMsg__videoStub{
  max-width: min(100%, 260px);
}

.telegramMsg__photo,
.telegramMsg__video{
  display: block;
  max-width: min(100%, 420px);
  max-height: 420px;
  width: auto;
  height: auto;
  background: #000;
  border: 1px solid rgba(0,0,0,.22);
}

.telegramMsg__photo{
  cursor: zoom-in;
}

.telegramMsg__videoStub{
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  margin: 0 !important;
  padding: 10px 12px !important;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  background: linear-gradient(180deg, #111 0%, #2f2f2f 100%);
  color: #fff;
  box-shadow: 1px 1px 0 rgba(0,0,0,.2);
  text-align: left;
}

.telegramMsg__videoStub:active{
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.telegramMsg__videoStubIcon{
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font: 700 14px/1 Tahoma, Arial, sans-serif;
}

.telegramMsg__videoStubMain{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.telegramMsg__videoStubTitle{
  color: #fff;
  font: 700 12px/1.2 Tahoma, Arial, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegramMsg__videoStubMeta{
  margin-top: 3px;
  color: #d7d7d7;
  font: 11px/1.2 Tahoma, Arial, sans-serif;
}

.telegramMsg__sticker{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 120px;
  max-width: 180px;
  max-height: 180px;
  background: rgba(255,255,255,.35);
}

img.telegramMsg__sticker,
video.telegramMsg__sticker{
  width: auto;
  height: auto;
  object-fit: contain;
  border: 0;
  background: transparent;
}

.telegramMsg__stickerFallback{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,.25);
  background: rgba(255,255,255,.45);
  color: #333;
  text-align: center;
}

.telegramMsg__stickerEmoji{
  font-size: 48px;
  line-height: 1;
}

.telegramMsg__stickerLabel{
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramMsg__document{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(255,255,255,.6);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #909090;
  border-bottom: 1px solid #909090;
  text-decoration: none;
  color: #111;
}

.telegramMsg__documentIcon{
  width: 32px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #7aa7ff 0%, #4e73c8 100%);
  color: #fff;
  font: 700 10px/1 Tahoma, Arial, sans-serif;
}

.telegramMsg__documentName{
  display: block;
  font: 700 12px/1.2 Tahoma, Arial, sans-serif;
}

.telegramMsg__documentMeta{
  display: block;
  margin-top: 3px;
  color: #555;
  font: 12px/1.2 Tahoma, Arial, sans-serif;
}

.telegramMsg__bottom{
  position: relative;
  margin-top: 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
}

.telegramMsg__footer{
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  white-space: nowrap;
  color: #46533f;
  font: 700 11px/1 Tahoma, Arial, sans-serif;
  text-shadow: 0 1px 0 rgba(255,255,255,.32);
}

.telegramMsg__reactions{
  margin-top: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  width: fit-content;
  max-width: min(100%, 560px);
}

.telegramMsg__quickAction{
  position: absolute;
  bottom: 6px;
  right: -9px;
  transform: none;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.82);
  color: #444;
  font: 700 12px/1 Tahoma, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.telegramMsg__bubble:hover .telegramMsg__quickAction,
.telegramMsg__quickAction:focus-visible{
  opacity: 1;
  pointer-events: auto;
}

.telegramMsg__ticks{
  display: inline-block;
  margin-right: 4px;
  letter-spacing: -1px;
  color: #3e4b39;
}

.telegramMsg__reaction{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  padding: 0 8px;
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(0,0,0,.14);
  color: #1f1f1f;
  font: 700 10px/1 Tahoma, Arial, sans-serif;
  cursor: pointer;
  appearance: none;
  box-sizing: border-box;
}

.telegramMsg__reaction.is-mine{
  background: #e6f0ff;
  border-color: #5d7fb5;
}

.telegramMsg__reactionEmoji,
.telegramMsg__reactionCount{
  display: inline-block;
}
.telegramMsg__reaction:active,
.telegramMsg__quickAction:active{
  border: 1px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.telegramMessageMenu{
  position: fixed;
  z-index: 99999;
  min-width: 176px;
  width: auto;
  padding: 1px;
  box-sizing: border-box;
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  box-shadow: none;
  border-radius: 0;
}

.telegramMessageMenu__reactions{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 8px 0;
  overflow: hidden;
}

.telegramMessageMenu__emoji{
  appearance: none;
  -webkit-appearance: none;
  min-width: 22px;
  width: 22px;
  height: 18px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: #111;
  box-shadow: none !important;
  text-shadow: none !important;
  font: 12px/1 Tahoma, Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  border-radius: 0;
}

.telegramMessageMenu__emoji:hover{
  background: #000080;
  color: #fff;
}

.telegramMessageMenu__actions{
  display: flex;
  flex-direction: column;
  padding: 3px 0 2px;
  gap: 0;
  position: relative;
}

.telegramMessageMenu__actions::before{
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 0;
  border-top: 1px solid #808080;
}

.telegramMessageMenu__action{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 0;
  height: 22px;
  margin: 0 !important;
  padding: 0 8px !important;
  border: 0;
  background: transparent;
  color: #111;
  text-align: left;
  box-shadow: none !important;
  text-shadow: none !important;
  font: 12px/1 Tahoma, Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
  border-radius: 0;
  line-height: 22px !important;
}

.telegramMessageMenu__action:hover{
  background: #000080;
  color: #fff;
}

.telegramMessageMenu__action--danger{
  color: #800000;
  margin-top: 22px;
  padding-top: 0;
  position: relative;
}

.telegramMessageMenu__action--danger::before{
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 0px;
  border-top: 1px solid #808080;
}

.telegramMessageMenu__action--danger:hover{
  color: #fff;
}

.telegramChatListMenu{
  min-width: 140px;
}

.telegramChatListMenu__actions{
  padding-top: 0;
}

.telegramChatListMenu__actions::before{
  display: none;
}

.telegramInlineSmile{
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -3px;
}

.telegramInlineCustomEmoji{
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: -5px;
  display: inline-block;
}

.telegramLightbox{
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.telegramLightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
}

.telegramLightbox__window{
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.telegramLightbox__image{
  display: block;
  max-width: min(96vw, 1200px);
  max-height: min(92vh, 900px);
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background: #000;
}

.telegramLightbox__close{
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background: #c0c0c0;
  color: #000;
  box-shadow: none;
  text-shadow: none;
  font: 700 14px/1 Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.telegramComposer{
  padding: 8px;
  background: #c0c0c0;
}

.telegramComposer__toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.telegramComposer__hint,
.telegramComposer__meta{
  color: #4e4e4e;
  font: 11px/1.2 Tahoma, Arial, sans-serif;
}

.telegramComposer__meta{
  text-align: right;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegramComposer__row{
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.telegramAttachBtn,
.telegramEmojiTrigger{
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #d4d0c8;
  background: #c0c0c0;
  color: #111;
  font: 700 16px/1 Tahoma, Arial, sans-serif;
  cursor: pointer;
}

.telegramAttachBtn:active,
.telegramEmojiTrigger:active{
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #808080;
}

.telegramInput{
  display: block;
  width: 100%;
  min-height: 30px;
  height: 30px;
  max-height: 132px;
  resize: none;
  overflow-y: auto;
  padding: 5px 10px;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  font: 13px/1.4 Tahoma, Arial, sans-serif;
}

.telegramInput::placeholder{
  color: #666;
  opacity: 1;
}

.telegramActions{
  position: relative;
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.telegramBtn{
  min-width: 90px;
  height: 30px;
  padding: 0 12px;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #d4d0c8;
  background: #c0c0c0;
  color: #111;
  font: 700 11px/1 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
}

.telegramBtn:active{
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  box-shadow: inset 1px 1px 0 #808080;
}

.telegramBtn--send{
  min-width: 102px;
}

.telegramBtn--ghost{
  min-width: 86px;
}

.telegramPicker{
  position: absolute;
  right: 108px;
  bottom: 38px;
  width: 300px;
  padding: 6px;
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.35);
  z-index: 4;
}

.telegramPicker__tabs{
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.telegramPicker__tab{
  min-width: 82px;
  height: 24px;
  padding: 0 8px;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  background: #c0c0c0;
  color: #000;
  font: 12px Tahoma, Arial, sans-serif;
  cursor: pointer;
}

.telegramPicker__tab.is-active{
  font-weight: 700;
}

.telegramPicker__tab:active{
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.telegramPicker__panel{
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-height: 196px;
  overflow: auto;
  padding: 4px;
  background: #fff;
  border: 2px solid #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.telegramPicker__divider{
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #444;
  font: 700 11px/1.2 Tahoma, Arial, sans-serif;
  text-transform: uppercase;
}

.telegramPicker__item{
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #c0c0c0;
  border: 1px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  font: 15px/1 Tahoma, Arial, sans-serif;
  cursor: pointer;
}

.telegramPicker__item:active{
  border: 1px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.telegramPicker__item--smile{
  padding: 4px;
}

.telegramPicker__item--sticker{
  padding: 4px;
  min-height: 56px;
}

.telegramPicker__smile{
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.telegramPicker__sticker{
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.telegramAuthModal__window{
  width: 380px;
  max-width: calc(100vw - 24px);
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.75),
    inset -1px -1px 0 rgba(0,0,0,.35),
    2px 2px 0 rgba(0,0,0,.35);
}

.telegramForwardModal__window{
  width: 320px;
  max-width: calc(100vw - 24px);
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,.75),
    inset -1px -1px 0 rgba(0,0,0,.35),
    2px 2px 0 rgba(0,0,0,.35);
}

.telegramForwardModal__window .wa-modal__titlebar{
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(90deg, #000060 0%, #000080 45%, #0056b8 100%);
  border-bottom: 1px solid #404040;
  color: #fff;
}

.telegramForwardModal__window .wa-modal__body{
  padding: 10px;
  background: #c0c0c0;
}

.telegramForwardModal__window .wa-modal__hint,
.telegramForwardModal__window .wa-modal__status{
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  color: #111;
}

.telegramForwardModal__window .wa-modal__input{
  background: #fff;
  color: #000;
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: none;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
}

.telegramForwardModal__window .wa-modal__input:focus{
  outline: none;
  box-shadow: none;
}

.telegramForwardModal__window .wa-modal__actions{
  justify-content: flex-end;
}

.telegramForwardModal__window .plbtn{
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: none;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
  text-shadow: none;
  width: auto;
  padding: 2px 10px;
  height: 22px;
  text-transform: none;
}

.telegramForwardModal__window .plbtn:active{
  transform: translateY(1px);
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

.telegramForwardList{
  margin-top: 8px;
  max-height: 190px;
  overflow: auto;
  background: #fff;
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  padding: 2px;
}

.telegramForwardItem{
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 3px 6px !important;
  border: 0;
  background: transparent;
  color: #111;
  text-align: left;
  box-shadow: none !important;
  text-shadow: none !important;
  font: 12px/1.2 Tahoma, Arial, sans-serif !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  cursor: pointer;
}

.telegramForwardItem.is-selected{
  background: #000080;
  color: #fff;
}

.telegramForwardItem:hover,
.telegramForwardItem:focus{
  background: #000080;
  color: #fff;
  outline: none;
}

.telegramForwardItem__title{
  display: block;
  font-weight: 700;
}

.telegramForwardItem__meta{
  display: block;
  margin-top: 2px;
  color: #555;
  font-size: 11px;
}

.telegramForwardItem:hover .telegramForwardItem__meta,
.telegramForwardItem:focus .telegramForwardItem__meta{
  color: #dfe8ff;
}

.telegramForwardComment{
  display: block;
  width: 100%;
  min-height: 64px;
  margin-top: 8px;
  resize: none;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
}

.telegramAuthModal__window .wa-modal__titlebar{
  height: 20px;
  padding: 0 6px;
  background: linear-gradient(90deg, #000060 0%, #000080 45%, #0056b8 100%);
  border-bottom: 1px solid #404040;
  color: #fff;
}

.telegramAuthModal__window .wa-modal__body{
  padding: 10px;
  background: #c0c0c0;
}

.telegramAuthModal__window .wa-modal__hint,
.telegramAuthModal__window .wa-modal__status{
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
  color: #111;
}

.telegramAuthModal__window .wa-modal__input{
  background: #fff;
  color: #000;
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: none;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
}

.telegramAuthModal__window .wa-modal__input:focus{
  outline: none;
  box-shadow: none;
}

.telegramAuthModal__window .wa-modal__actions{
  justify-content: flex-end;
}

.telegramAuthModal__window .plbtn{
  background: #c0c0c0;
  border: 2px solid #ffffff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: none;
  font-family: Tahoma, "MS Sans Serif", Verdana, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
  text-shadow: none;
  width: auto;
  padding: 2px 10px;
  height: 22px;
  text-transform: none;
}

.telegramAuthModal__window .plbtn:active{
  transform: translateY(1px);
  border: 2px solid #404040;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}

@media (max-width: 1180px){
  .telegramwin{
    left: 112px;
    width: calc(100vw - 150px);
  }

  .telegramLayout{
    grid-template-columns: 280px minmax(0, 1fr);
  }
}
