.chat-photo-compose {
  display: inline-flex;
  width: 27px;
  min-width: 27px;
  height: 27px;
  flex: 0 0 27px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d6d6d6;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  opacity: 0.84;
}

.composer-field .emoji-toggle {
  margin-left: 0;
}

.composer-field #input {
  padding-right: 0;
}

.chat-photo-compose:hover,
.chat-photo-compose:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: 2px solid rgba(223, 0, 255, 0.35);
  opacity: 1;
}

.chat-photo-compose.is-uploading {
  cursor: wait;
  opacity: 0.72;
}

.chat-photo-open {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin: 1px 2px;
  padding: 2px 9px;
  border: 1px solid rgba(255, 210, 72, 0.55);
  border-radius: 6px;
  background: rgba(255, 210, 72, 0.1);
  color: #ffd85a;
  font: inherit;
  font-size: 0.9em;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.chat-photo-open:hover,
.chat-photo-open:focus-visible {
  border-color: #ffe17a;
  background: rgba(255, 210, 72, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.chat-photo-dialog {
  width: min(92vw, 620px);
  max-width: none;
  padding: 0;
  border: 1px solid rgba(223, 0, 255, 0.48);
  border-radius: 14px;
  background: #101014;
  color: #f4f1f6;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.7);
}

.chat-photo-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.chat-photo-dialog__window {
  padding: 16px;
}

.chat-photo-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.chat-photo-dialog__header h2 {
  margin: 0;
  color: #ffd85a;
  font-size: 18px;
}

.chat-photo-choice__file {
  margin: 6px 0;
  overflow: hidden;
  color: #ffffff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-photo-choice__hint {
  margin: 8px 0 15px;
  color: #aaa4ae;
  font-size: 13px;
  line-height: 1.4;
}

.chat-photo-choice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-photo-viewer {
  width: min(96vw, 1100px);
}

.chat-photo-viewer__window {
  display: flex;
  max-height: 94vh;
  flex-direction: column;
}

.chat-photo-viewer__content {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: auto;
  border-radius: 9px;
  background: #060606;
}

.chat-photo-viewer__content img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 78px);
  object-fit: contain;
}

.chat-photo-viewer__content img.hidden {
  display: none;
}

.chat-photo-viewer__status {
  margin: 0;
  padding: 32px;
  color: #c9c3cc;
  text-align: center;
}

.chat-photo-viewer__status.is-error {
  color: #ff8b96;
}

:root[data-theme="light"] .chat-photo-dialog {
  border-color: rgba(112, 25, 127, 0.35);
  background: #ffffff;
  color: #241c27;
}

:root[data-theme="light"] .chat-photo-open {
  border-color: #996109;
  background: #ffe8a8;
  color: #482a07;
}

:root[data-theme="light"] .chat-photo-open:hover,
:root[data-theme="light"] .chat-photo-open:focus-visible {
  border-color: #754600;
  background: #ffd274;
  color: #281600;
}

:root[data-theme="light"] .chat-photo-open:focus-visible {
  outline: 2px solid #6b3f00;
  outline-offset: 2px;
}

:root[data-theme="light"] .chat-photo-choice__file {
  color: #241c27;
}

:root[data-theme="light"] .chat-photo-choice__hint {
  color: #6f6573;
}

@media (max-width: 700px) {
  .chat-photo-compose {
    width: 29px;
    min-width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .chat-photo-choice__actions .btn {
    width: 100%;
  }

  .chat-photo-dialog__window {
    padding: 12px;
  }
}


/* Telegram sends ordinary animated emoji to bots as Unicode text. Mirror the
   large single-emoji presentation in the web chat even when the animation
   asset itself is not available through the Bot API. */
.msg-text.telegram-emoji-only {
  display: inline-block;
  margin: 4px 2px 6px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.msg-text.telegram-emoji-only--1 {
  font-size: 42px;
}

.msg-text.telegram-emoji-only--2 {
  font-size: 42px;
}

.msg-text.telegram-emoji-only--3 {
  font-size: 36px;
}

.telegram-sticker-inline {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: 58px;
  max-height: 58px;
  margin: 3px 4px 5px;
  object-fit: contain;
  vertical-align: middle;
}

.telegram-sticker-fallback {
  display: inline-block;
  margin: 3px 4px 5px;
  font-size: 48px;
  line-height: 1;
  vertical-align: middle;
}

@media (max-width: 700px) {
  .msg-text.telegram-emoji-only--1 {
    font-size: 40px;
  }

  .msg-text.telegram-emoji-only--2 {
    font-size: 38px;
  }

  .msg-text.telegram-emoji-only--3 {
    font-size: 34px;
  }

  .telegram-sticker-inline {
    max-width: 54px;
    max-height: 54px;
  }
}


.telegram-native-emoji {
  display: inline-block;
  width: 54px;
  height: 54px;
  margin: 2px 4px 6px;
  object-fit: contain;
  vertical-align: middle;
}

.telegram-native-emoji-fallback {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

.telegram-native-emoji-loaded {
  font-size: 0 !important;
  line-height: 1;
}

.telegram-native-emoji-loaded .telegram-native-emoji {
  font-size: initial;
}

@media (max-width: 700px) {
  .telegram-native-emoji {
    width: 50px;
    height: 50px;
  }
}

.telegram-inline-emoji {
  display: inline-flex;
  width: 1.6em;
  height: 1.6em;
  margin: 0 0.04em;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: -0.34em;
}

.telegram-inline-emoji__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.telegram-inline-emoji__fallback {
  display: inline-block;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1em;
  line-height: 1;
}


.telegram-inline-emoji__fallback[hidden],
.telegram-inline-emoji__image[hidden] {
  display: none !important;
}
