/* MEETUS 0.6.25.2 COMMUNITY2-TG11-WORKSPACE20 */

/* WORKSPACE19 misunderstood the request and compressed emoji rows vertically.
   Restore the original row height and remove only the excessive horizontal gap. */
#messageArea > .message-row.workspace19-emoji-row {
  min-height: auto !important;
  margin: 2px 0 !important;
  padding: 0 !important;
  line-height: normal !important;
}

#messageArea > .message-row.workspace19-emoji-row > .message-bubble.emoji-only-bubble,
#messageArea > .message-row.mine.workspace19-emoji-row > .message-bubble.emoji-only-bubble {
  min-width: 0 !important;
  min-height: auto !important;
  width: fit-content !important;
  padding: 1px 0 16px 2px !important;
  margin: 0 !important;
  line-height: normal !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.workspace19-emoji-row .message-text.emoji-only-text {
  display: block !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 40px !important;
  line-height: 1.05 !important;
  letter-spacing: 1px !important;
}

.workspace19-emoji-row .message-meta {
  right: 0 !important;
  bottom: 0 !important;
  height: 13px !important;
  min-height: 13px !important;
  padding: 1px 4px !important;
  border-radius: 7px !important;
  background: rgba(18, 20, 24, .72) !important;
}

.workspace19-emoji-row .message-menu-trigger {
  top: 0 !important;
  right: 0 !important;
}

/* Universal preview for dropped images, videos, audio and documents. */
.workspace20-drop-preview {
  position: fixed;
  inset: 0;
  z-index: 8200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 6, 10, .78);
  backdrop-filter: blur(12px);
}

.workspace20-drop-preview.hidden { display: none !important; }

.workspace20-drop-card {
  width: min(720px, calc(100vw - 24px));
  max-height: min(780px, calc(100dvh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(147, 124, 244, .28);
  border-radius: 20px;
  background: #191d25;
  color: #f3f4f7;
  box-shadow: 0 26px 90px rgba(0, 0, 0, .58);
}

.workspace20-drop-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.workspace20-drop-header > div { min-width: 0; display: grid; gap: 2px; }
.workspace20-drop-header strong { font-size: 17px; }
.workspace20-drop-header span { color: #969daa; font-size: 12px; }
.workspace20-drop-header button,
.workspace20-drop-item > button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: #2b303a;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.workspace20-drop-list {
  min-height: 150px;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 9px;
}

.workspace20-drop-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: #222730;
}

.workspace20-drop-media {
  width: 104px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #11151b;
}

.workspace20-drop-media img,
.workspace20-drop-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.workspace20-drop-media audio { width: 96px; max-width: 100%; }
.workspace20-drop-item[data-kind="audio"] .workspace20-drop-media { grid-column: 1 / 3; width: 100%; height: 54px; }
.workspace20-drop-item[data-kind="audio"] .workspace20-drop-info { grid-column: 1 / 3; grid-row: 2; }
.workspace20-drop-item[data-kind="audio"] > button { grid-column: 3; grid-row: 1 / 3; }

.workspace20-file-icon {
  min-width: 54px;
  padding: 10px 7px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7259db, #4b3da6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.workspace20-drop-info { min-width: 0; display: grid; gap: 5px; }
.workspace20-drop-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace20-drop-info span { overflow: hidden; color: #9da4b0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace20-drop-item > button { font-size: 19px; }
.workspace20-drop-item > button:hover,
.workspace20-drop-header button:hover { background: #3a404c; }

.workspace20-drop-footer {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
}

#workspace20DropCaption {
  width: 100%;
  min-height: 48px;
  max-height: 132px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  padding: 11px 12px;
  outline: none;
  background: #10141b;
  color: #fff;
  font: inherit;
}

#workspace20DropCaption:focus { border-color: #8069e8; box-shadow: 0 0 0 3px rgba(128,105,232,.14); }
.workspace20-drop-actions { display: flex; justify-content: flex-end; gap: 9px; }
.workspace20-drop-actions button {
  min-width: 116px;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: #303641;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.workspace20-drop-actions button.primary { background: #8069e8; }
.workspace20-drop-actions button:disabled { opacity: .55; cursor: default; }
body.workspace20-preview-open { overflow: hidden !important; }

/* Clean Telegram-like footer under channel publications. */
.workspace20-channel-post > .message-meta {
  bottom: calc(var(--workspace20-comment-footer-height, 48px) + 6px) !important;
  right: 7px !important;
  z-index: 9 !important;
}

.workspace20-channel-post > .channel-comment-bar {
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-top: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 0 !important;
  background: rgba(65, 92, 120, .18) !important;
}

.workspace20-channel-post.visual-media-bubble > .channel-comment-bar {
  width: calc(100% + 8px) !important;
  margin: 9px -4px 0 !important;
}

.workspace20-channel-post:not(.visual-media-bubble) > .channel-comment-bar {
  width: calc(100% + 18px) !important;
  margin: 9px -9px 0 !important;
}

.workspace20-channel-post .channel-comment-button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  padding: 7px 10px !important;
  gap: 8px !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #62b9f5 !important;
  font-size: 13px !important;
  line-height: 1.15 !important;
}

.workspace20-channel-post .channel-comment-main {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.workspace20-channel-post .channel-comment-arrow {
  width: 24px !important;
  flex: 0 0 24px !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  font-size: 27px !important;
  line-height: 1 !important;
}

.workspace20-channel-post > .workspace-comment-toggle-chip {
  box-sizing: border-box !important;
  width: calc(100% + 8px) !important;
  min-height: 27px !important;
  margin: 0 -4px -4px !important;
  padding: 5px 8px !important;
  border-radius: 0 0 11px 11px !important;
  border-top: 1px solid rgba(255,255,255,.07) !important;
  background: rgba(128,105,232,.10) !important;
  text-align: center !important;
}

.workspace20-channel-post:not(.visual-media-bubble) > .workspace-comment-toggle-chip {
  width: calc(100% + 18px) !important;
  margin-left: -9px !important;
  margin-right: -9px !important;
}

/* Thread page: the regular chat pin must not cover the discussion page. */
body.workspace20-thread-open #workspacePinnedBanner { display: none !important; }

#community2Workspace .community2-thread-pinned {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  z-index: 2 !important;
  width: min(760px, 100%) !important;
  margin: 0 auto 12px !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  background: rgba(22,27,36,.98) !important;
  backdrop-filter: blur(14px) !important;
}

#community2Workspace .community2-workspace-body {
  scroll-padding-top: 14px !important;
}

#community2Workspace .community2-thread-form {
  min-height: 66px !important;
  padding: 9px 12px max(10px, env(safe-area-inset-bottom)) !important;
  gap: 6px !important;
}

#community2Workspace .community2-input-shell { min-height: 46px !important; border-radius: 24px !important; }
#community2Workspace .community2-thread-form textarea,
#community2Workspace .community2-thread-form textarea:focus {
  min-height: 44px !important;
  padding: 11px 14px !important;
  line-height: 22px !important;
}

/* The desktop plus-menu is anchored to the actual plus button by JS. */
#attachmentMenu { z-index: 2600 !important; }

/* Chat menu always stays above a mobile pinned banner. */
@media (max-width: 700px) {
  .workspace19-emoji-row .message-text.emoji-only-text {
    font-size: 38px !important;
    line-height: 1.05 !important;
  }

  .workspace20-drop-preview { padding: 0; }
  .workspace20-drop-card {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .workspace20-drop-list { padding: 9px; }
  .workspace20-drop-item { grid-template-columns: 82px minmax(0, 1fr) 34px; gap: 9px; padding: 7px; }
  .workspace20-drop-media { width: 82px; height: 66px; }
  .workspace20-drop-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .workspace20-drop-actions button { min-width: 0; }

  .chat-header-menu:not(.hidden) {
    position: fixed !important;
    z-index: 2800 !important;
    top: calc(58px + env(safe-area-inset-top)) !important;
    right: 6px !important;
    bottom: auto !important;
    max-height: calc(100dvh - 70px - env(safe-area-inset-top)) !important;
    overflow-y: auto !important;
  }

  .workspace20-channel-post > .message-meta {
    right: 6px !important;
    bottom: calc(var(--workspace20-comment-footer-height, 46px) + 5px) !important;
  }

  .workspace20-channel-post .channel-comment-button {
    min-height: 44px !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
  }

  .workspace20-channel-post .channel-comment-arrow {
    width: 21px !important;
    flex-basis: 21px !important;
    font-size: 25px !important;
  }

  #community2Workspace .community2-workspace-body { padding: 10px 9px 18px !important; }
  #community2Workspace .community2-thread-pinned { margin-bottom: 10px !important; }
  #community2Workspace .community2-thread-form {
    padding: 8px 9px max(10px, env(safe-area-inset-bottom)) !important;
    gap: 4px !important;
  }
  #community2Workspace .community2-input-shell { min-height: 46px !important; }
  #community2Workspace .community2-thread-form textarea,
  #community2Workspace .community2-thread-form textarea:focus {
    min-height: 44px !important;
    padding: 11px 13px !important;
  }
}
