.share-backdrop {
  z-index: 12;
  align-items: end;
}

.share-modal {
  width: min(100%, 520px);
  max-height: min(720px, calc(100vh - 28px));
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong, #40355c);
  border-radius: 24px 24px 14px 14px;
  background: var(--panel, #17131f);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.share-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin: 2px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-2);
}

.share-preview > div {
  min-width: 0;
}

.share-preview strong,
.share-preview p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-preview p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.share-external,
.share-chat {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  color: var(--text);
  text-align: left;
  touch-action: manipulation;
}

.share-external {
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(139, 92, 246, .5);
  border-radius: 15px;
  background: rgba(139, 92, 246, .14);
}

.share-external:hover,
.share-external:focus-visible,
.share-chat:hover,
.share-chat:focus-visible {
  background: var(--panel-2);
}

.share-external-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--accent, #8b5cf6);
  font-size: 20px;
}

.share-external > span:not(.share-external-icon),
.share-chat > span:not(.avatar) {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.share-external small,
.share-chat small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-external > b,
.share-chat > b {
  color: var(--muted);
  font-size: 21px;
}

.share-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.share-divider::before,
.share-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}

.share-chat-list {
  max-height: 300px;
  overflow: auto;
}

.share-chat {
  gap: 11px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.share-chat:last-child {
  border-bottom: 0;
}

.share-empty {
  padding: 18px 8px;
}

@media (min-width: 640px) {
  .share-backdrop {
    align-items: center;
  }

  .share-modal {
    border-radius: 24px;
  }
}
