/* Telegram-like message column. Scoped to the open conversation. */
.tg-stage .tg-stage-sub {
  margin-top: 1px;
  color: #5c6b78;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .tg-stage .tg-stage-sub { color: #8ea0ae; }
.tg-stage.tg-stage-ready .tg-stage-old-sub { display: none; }
.tg-stage-pin {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255, 255, 255, .88);
  color: #24313b;
  text-align: left;
  cursor: pointer;
}
.dark .tg-stage-pin {
  background: #17212b;
  border-bottom-color: rgba(255, 255, 255, .06);
  color: #e7eef3;
}
.tg-stage-pin-mark {
  width: 3px;
  align-self: stretch;
  border-radius: 99px;
  background: #3d8ec9;
}
.tg-stage-pin-copy { min-width: 0; }
.tg-stage-pin-kicker {
  display: block;
  color: #3d8ec9;
  font-size: 12px;
  font-weight: 600;
}
.tg-stage-pin-text {
  display: block;
  overflow: hidden;
  color: #5c6b78;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tg-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.tg-stage > header,
.tg-stage > .tg-stage-pin,
.tg-stage > footer { flex: 0 0 auto; }
.tg-stage > [data-tgsp-account] {
  flex: 1 1 auto;
  min-height: 0;
}
.tg-stage [data-tgsp-account] {
  padding: 10px 14px 16px !important;
}
.tg-stage [data-tgsp-account].space-y-2 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}
.tg-stage [data-tgsp-msg] {
  margin-top: 8px;
}
.tg-stage [data-tgsp-msg].tg-stage-continued { margin-top: 2px; }
.tg-stage [data-tgsp-msg] > button {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
}
.tg-stage [data-tgsp-msg].tg-stage-continued > button { visibility: hidden; }
.tg-stage [data-tgsp-msg] > article {
  border: 0 !important;
  box-shadow: 0 1px 1px rgba(16, 32, 48, .08) !important;
  border-radius: 15px 15px 15px 5px !important;
  background: #fff !important;
  max-width: min(78%, 36rem) !important;
  padding: 5px 9px 3px !important;
}
.tg-stage [data-tgsp-out="1"] > article {
  background: #eeffde !important;
  border-radius: 15px 15px 5px 15px !important;
}
.dark .tg-stage [data-tgsp-msg] > article {
  background: #182533 !important;
  color: #f2f6f8;
  box-shadow: none !important;
}
.dark .tg-stage [data-tgsp-out="1"] > article { background: #2b5278 !important; }
.tg-stage [data-tgsp-msg] article button[data-testid^="chat-private-button"] {
  margin-bottom: 1px;
  font-size: 13px !important;
  font-weight: 600;
  text-decoration: none !important;
}
.tg-stage [data-tgsp-msg] article button > span.rounded { display: none !important; }
.tg-stage [data-tgsp-msg].tg-stage-continued article button[data-testid^="chat-private-button"] {
  display: none !important;
}
.tg-stage [data-tgsp-msg].tg-stage-service {
  justify-content: center !important;
  margin-top: 10px;
}
.tg-stage [data-tgsp-msg].tg-stage-service > button { display: none !important; }
.tg-stage [data-tgsp-msg].tg-stage-service > article {
  max-width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #60707c;
  font-size: 13px;
  text-align: center;
}
.dark .tg-stage [data-tgsp-msg].tg-stage-service > article {
  background: transparent !important;
  color: #8b9bab;
}
.tg-stage [data-tgsp-msg].tg-stage-service article > button,
.tg-stage [data-tgsp-msg].tg-stage-service article > div:last-child { display: none !important; }
.tg-stage-day {
  display: flex;
  justify-content: center;
  margin: 12px 0 4px;
}
.tg-stage-day span {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #52616e;
  font-size: 12px;
  line-height: 1.4;
}
.dark .tg-stage-day span {
  background: rgba(23, 33, 43, .85);
  color: #9aafbf;
}
.tg-stage-reply {
  margin-bottom: 4px;
  padding: 3px 8px;
  border-left: 2px solid #3d8ec9;
  border-radius: 4px;
  background: rgba(61, 142, 201, .08);
  cursor: pointer;
}
.tg-stage-reply b {
  display: block;
  color: #3d8ec9;
  font-size: 12px;
  font-weight: 600;
}
.tg-stage-reply span {
  display: block;
  overflow: hidden;
  color: #5c6b78;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tg-stage-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tg-stage-reactions button {
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: inherit;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 3px 7px;
  cursor: pointer;
}
.tg-stage-reactions button.is-chosen { background: rgba(61, 142, 201, .18); }
.tg-stage article time { font-size: 11px; color: #7d8b99; }
.tg-stage > footer textarea {
  border-radius: 18px !important;
}
.tg-stage .tg-stage-older {
  display: block;
  margin: 0 auto 8px;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .8) !important;
  color: #3d8ec9 !important;
  box-shadow: none !important;
}

.tg-stage-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
