.conversation-info-trigger { cursor: pointer; }
.conversation-info-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#telegramChatInfo { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; padding: 0; border: 0; background: transparent; text-align: start; border-radius: 8px; }
.conversation-info {
  --info-accent: #08765b;
  position: fixed;
  inset: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) auto auto;
  margin: 0;
  box-sizing: border-box;
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
  max-height: calc(100dvh - 20px);
  padding: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  color: CanvasText;
  background: Canvas;
  border: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  border-radius: 20px;
  box-shadow: 0 16px 48px #0b282b35;
}
.conversation-info[data-platform="telegram"] { --info-accent: #17679c; }
.conversation-info[data-tone="light"] { color-scheme: light; }
.conversation-info[data-tone="dark"] { color-scheme: dark; --info-accent: #5acb9b; }
.conversation-info[data-platform="telegram"][data-tone="dark"] { --info-accent: #62a9da; }
.conversation-info[data-tone="hiadmin"] { --info-accent: light-dark(#ab2632, #ff8790); }
.conversation-info::backdrop { background: #122c392b; }
.conversation-info > header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px; background: Canvas; }
.conversation-info h2 { font-size: 1rem; margin: 0; }
.conversation-info button { font: inherit; cursor: pointer; }
.conversation-info > header button { border: 0; background: transparent; color: inherit; font-size: 1.5rem; width: 36px; height: 36px; }
.conversation-info-identity { display: grid; justify-items: center; gap: 6px; padding: 20px; text-align: center; background: color-mix(in srgb, var(--info-accent) 12%, Canvas); }
.conversation-info-identity strong { font-size: 1.25rem; overflow-wrap: anywhere; }
.conversation-info-identity small:empty { display: none; }
.conversation-info-avatar { position: relative; display: grid; place-items: center; overflow: hidden; width: 88px; height: 88px; border-radius: 50%; color: white; background: var(--info-accent); font-size: 2rem; }
.conversation-info-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.conversation-info-tabs { position: sticky; top: 54px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; background: Canvas; }
.conversation-info-tabs button, .conversation-info-more { padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: inherit; }
.conversation-info-tabs button[aria-pressed="true"], .conversation-info-more { background: color-mix(in srgb, var(--info-accent) 15%, Canvas); font-weight: 600; }
.conversation-info-results { display: grid; gap: 8px; padding: 0 16px; }
.conversation-info-results > * { padding: 10px; border-radius: 8px; overflow-wrap: anywhere; background: color-mix(in srgb, var(--info-accent) 8%, Canvas); }
.conversation-info-results > button { border: 0; text-align: start; color: inherit; }
.conversation-info-results[data-kind="media"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.conversation-info-results[data-kind="media"] button { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 1; padding: 0; }
.conversation-info-results img { width: 100%; height: 100%; object-fit: cover; }
.conversation-info-audio { display: flex; gap: 8px; align-items: center; min-width: 0; }
.conversation-info-audio audio { width: 100%; min-width: 0; }
.conversation-info-audio-download { color: var(--info-accent); font-size: 1.3rem; line-height: 1; text-decoration: none; padding: 7px; }
.conversation-info-play { position: absolute; inset: auto 7px 7px auto; background: #111c; color: white; border-radius: 6px; padding: 3px 6px; }
.conversation-info-notice { margin: 12px 16px; }
.conversation-info-notice:empty { display: none; }
.conversation-info-more { margin: 12px 16px; }
.conversation-info-member { display: flex; align-items: center; gap: 10px; }
.conversation-info-member span { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--info-accent); color: white; }
.conversation-info-results form { display: grid; gap: 8px; }
.conversation-info-results input, .conversation-info-results select { min-width: 0; padding: 8px; font: inherit; }
.conversation-info-preview { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border: 0; border-radius: 16px; color: CanvasText; background: Canvas; }
.conversation-info-preview::backdrop { background: #0a171cc9; }
.conversation-info-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.conversation-info-preview > header button {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.8rem;
  line-height: 1;
}
.conversation-info-preview > header button:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.conversation-info-preview > div { display: grid; justify-items: start; gap: 10px; margin-top: 10px; }
.conversation-info-preview img, .conversation-info-preview video { display: block; max-width: min(78vw, 960px); max-height: 72dvh; object-fit: contain; }
.conversation-info-message { padding: 7px 14px; background: Canvas; border: 1px solid var(--info-accent); border-radius: 9px; color: CanvasText; }
.conversation-info-member button { background: transparent; border: 0; color: inherit; text-align: start; }
.conversation-info-avatar[role="button"], .group-sender-avatar[role="button"], .group-sender-name[role="button"] { cursor: pointer; }
.group-sender-name[role="button"]:hover { text-decoration: underline; }
.conversation-info-preview.profile-photo-preview {
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  background: #101011eb;
  color: #fff;
}
.conversation-info-preview.profile-photo-preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.profile-photo-preview > header { padding: max(10px, env(safe-area-inset-top)) clamp(14px, 3vw, 44px) 8px; }
.profile-photo-preview > header strong { overflow-wrap: anywhere; }
.profile-photo-preview > div { margin: 0; min-height: 0; min-width: 0; place-items: center; padding: 8px 18px max(18px, env(safe-area-inset-bottom)); }
.conversation-info-preview.profile-photo-preview img {
  width: var(--profile-photo-width, 144px);
  height: auto;
  max-width: 100%;
  max-height: min(64dvh, 480px, 100%);
  object-fit: contain;
}
@media (max-width: 540px) {
  .conversation-info { inset: 0 auto auto 0; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}
