.reply-composer-preview {
  position: absolute;
  right: 8px;
  bottom: calc(100% + 4px);
  left: 8px;
  z-index: 2;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--chat-accent, #72bcff);
  border-radius: 13px;
  background: rgba(17, 27, 36, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  backdrop-filter: blur(18px) saturate(118%);
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.22);
}

.reply-composer-preview[hidden] {
  display: none;
}

.reply-composer-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.reply-composer-copy strong,
.reply-composer-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-composer-copy strong {
  color: var(--chat-accent, #72bcff);
  font-size: 0.76rem;
  font-weight: 780;
}

.reply-composer-copy span {
  color: rgba(234, 241, 247, 0.78);
  font-size: 0.75rem;
}

.composer .reply-composer-close {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: rgba(238, 244, 249, 0.72) !important;
  font-size: 1.35rem !important;
  font-weight: 400;
  line-height: 1;
  box-shadow: none !important;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.composer .reply-composer-close::after {
  content: none !important;
  display: none !important;
}

.composer .reply-composer-close:hover,
.composer .reply-composer-close:focus-visible {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.94) !important;
  filter: none;
}

body.reply-active .chat {
  --composer-overlay-height: 116px;
}

body.reply-active #attachment-button {
  opacity: 0.35;
  pointer-events: none;
}

.message-reply-quote {
  width: 100%;
  min-width: 0;
  margin: 0 0 6px;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
  border: 0;
  border-left: 3px solid rgba(255, 255, 255, 0.48);
  border-radius: 7px;
  background: rgba(4, 10, 16, 0.18);
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.message-reply-quote:hover,
.message-reply-quote:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  filter: none;
}

.chat[data-platform="telegram"] .message-reply-quote {
  border-left-color: #9bd5ff;
}

.chat[data-platform="whatsapp"] .message-reply-quote {
  border-left-color: #9be6bd;
}

.message-reply-quote strong,
.message-reply-quote span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-reply-quote strong {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.69rem;
  font-weight: 780;
}

.message-reply-quote span {
  color: rgba(239, 245, 250, 0.74);
  font-size: 0.72rem;
}

.message.has-attachment > .message-reply-quote {
  width: calc(100% - 10px);
  margin: 2px 5px 6px;
}

.message.reply-source-hit {
  outline: 2px solid var(--chat-accent, #72bcff);
  outline-offset: 2px;
  animation: reply-source-pulse 1.5s ease-out;
}

@keyframes reply-source-pulse {
  0% { filter: brightness(1.35); }
  100% { filter: brightness(1); }
}

@media (max-width: 760px) {
  .reply-composer-preview {
    right: 6px;
    left: 6px;
    bottom: calc(100% + 3px);
  }

  body.reply-active .chat {
    --composer-overlay-height: 114px;
  }
}
