.mp-chat-head h1 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-chat-icon {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ui-text);
}

.mp-chat-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mp-chat-add {
  background: var(--ui-yellow);
  color: var(--ui-on-yellow);
}

.mp-chat-head-actions {
  display: flex;
  flex: none;
  gap: 2px;
}

.mp-chat-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-inline: 16px;
  border-bottom: 1px solid var(--ui-line);
}

.mp-chat-tab {
  min-height: 46px;
  padding: 6px 3px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ui-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.mp-chat-tab[aria-selected="true"] {
  border-bottom-color: var(--ui-yellow);
  color: var(--ui-strong);
  font-weight: 650;
}

.mp-chat-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 20px 6px;
}

.mp-chat-filter {
  min-height: 44px;
  padding: 4px;
  border-radius: 8px;
  background: transparent;
  color: var(--ui-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.mp-chat-filter[aria-pressed="true"] {
  background: var(--ui-control-bg);
  color: var(--ui-strong);
  font-weight: 650;
}

.mp-chat-row {
  grid-template-columns: 40px minmax(0, 1fr) max-content;
}

.mp-chat-row-anonymous {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.mp-chat-unread {
  display: grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  padding-inline: 4px;
  border-radius: 11px;
  background: var(--ui-yellow);
  color: var(--ui-on-yellow);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mp-chat-meetings,
.mp-chat-settings {
  padding: 16px 20px 20px;
}

.mp-chat-meetings h2 {
  margin: 0;
  color: var(--ui-strong);
  font-size: 16px;
}

.mp-chat-meeting-intro {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
}

.mp-chat-meeting-intro p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
}

.mp-chat-meeting-intro .primary {
  justify-self: start;
  min-height: 44px;
}

.mp-chat-meetings > .secondary {
  min-height: 44px;
  margin-top: 10px;
}

.mp-chat-setting {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-line);
}

.mp-chat-setting-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  overflow-wrap: anywhere;
}

.mp-chat-setting-copy strong {
  color: var(--ui-strong);
  font-size: 14px;
}

.mp-chat-setting-copy > span {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.5;
}

.mp-chat-switch {
  display: grid;
  flex: none;
  width: 46px;
  height: 28px;
  align-items: center;
  margin: 0;
  padding: 0 4px;
  appearance: none;
  border: 1px solid var(--ui-control-line);
  border-radius: 14px;
  background: var(--ui-control-bg);
  color: var(--ui-muted);
  cursor: pointer;
}

.mp-chat-switch::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.mp-chat-switch:checked {
  justify-items: end;
  border-color: var(--ui-yellow);
  background: var(--ui-yellow);
  color: var(--ui-on-yellow);
}

.mp-chat-sheet {
  width: min(calc(100% - 32px), 352px);
  max-height: min(76vh, 570px);
  padding: 12px 16px 16px;
  border-radius: 14px;
}

.mp-chat-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.mp-chat-sheet-head h2 {
  margin: 0;
  color: var(--ui-strong);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.mp-chat-sheet .mp-chat-search {
  width: 100%;
  margin: 6px 0 8px;
}

.mp-chat-sheet .mp-chat-sheet-note {
  margin: 6px 0 10px;
  color: var(--ui-muted);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mp-chat-sheet-note:empty,
.mp-chat-sheet .mp-chat-error:empty {
  display: none;
}

.mp-chat-sheet-action {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ui-line);
  background: transparent;
  color: var(--ui-text);
  font-size: 14px;
  text-align: start;
  overflow-wrap: anywhere;
}

.mp-chat-sheet-action:disabled {
  color: var(--ui-muted);
  cursor: default;
}

.mp-chat-danger,
.mp-chat-sheet .mp-chat-error {
  color: var(--ui-negative);
}

.mp-chat-sheet-primary {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
}

.mp-chat-sheet .mp-chat-choice {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin: 0;
  border-bottom: 1px solid var(--ui-line);
  overflow-wrap: anywhere;
}

.mp-chat-choice input {
  width: 17px;
  height: 17px;
  accent-color: var(--ui-yellow);
}

.mp-chat-member-list {
  margin: 0;
  padding-inline-start: 22px;
  color: var(--ui-text);
  font-size: 14px;
  line-height: 2.2;
  overflow-wrap: anywhere;
}

.mp-chat-transcript-empty {
  text-align: center;
}

.mp-chat-source {
  display: block;
  min-height: 44px;
  margin-bottom: -8px;
  padding: 4px 0;
  background: transparent;
  color: var(--ui-accent);
  font-size: 12px;
  text-align: start;
}

.mp-chat-demo-reply {
  display: block;
  color: var(--ui-muted);
  font-size: 11px;
}

.mp-chat-payment {
  display: grid;
  max-width: 90%;
  min-width: min(165px, 100%);
  min-height: 60px;
  gap: 5px;
  margin-bottom: 10px;
  padding: 11px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
  color: var(--ui-text);
  text-align: start;
  overflow-wrap: anywhere;
}

.mp-chat-payment.mine {
  margin-inline-start: auto;
}

.mp-chat-payment span,
.mp-chat-payment small {
  color: var(--ui-muted);
  font-size: 12px;
}

.mp-chat-composer .mp-chat-compose-tools {
  width: 44px;
  border: 1px solid var(--ui-line);
  background: var(--ui-surface);
  color: var(--ui-text);
}

.mp-chat button:focus-visible,
.mp-chat input:focus-visible,
.mp-chat textarea:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}
