.composer {
  flex-wrap: wrap;
}

.attachment-preview {
  flex: 1 0 100%;
  min-width: 0;
  padding: 0 0 2px;
}

.attachment-preview-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.attachment-preview.sending .attachment-preview-card {
  opacity: 0.72;
}

.attachment-preview-image,
.attachment-preview-video {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 9px;
  background: #0d141b;
}

.attachment-preview-file-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.attachment-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.attachment-preview-copy strong,
.attachment-preview-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-copy strong {
  font-size: 13px;
}

.attachment-preview-copy small {
  color: #8fa1b3;
  font-size: 11px;
}

.composer button.attachment-button {
  flex: 0 0 auto;
  background: transparent;
  color: #9fb0c1;
}

.composer button.attachment-button:hover,
.composer button.attachment-button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  filter: none;
}

.composer button.attachment-button::after {
  content: none;
}

.attachment-button svg {
  width: 22px;
  height: 22px;
  display: block;
}

.composer button.attachment-preview-remove {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
}

.composer button.attachment-preview-remove::after {
  content: none;
}

.attachment-menu {
  position: fixed;
  z-index: 660;
  inset: 0;
}

.attachment-menu[hidden] {
  display: none;
}

.attachment-menu-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.46);
}

.attachment-menu-sheet {
  position: absolute;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  padding: 10px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #17212b;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.attachment-menu-sheet > button {
  min-height: 56px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.attachment-menu-sheet > button > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attachment-menu-sheet strong,
.attachment-menu-sheet small {
  display: block;
}

.attachment-menu-sheet small {
  color: #8fa1b3;
  font-size: 11px;
}

.attachment-menu-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(51, 144, 236, 0.15);
  color: #81c2fb;
  font-size: 10px;
  font-weight: 750;
}

.attachment-menu-sheet > button.attachment-menu-cancel {
  display: block;
  min-height: 46px;
  margin-top: 2px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

body.attachment-menu-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .attachment-preview {
    padding-bottom: 1px;
  }

  .attachment-preview-card {
    padding: 7px 8px;
  }

  .attachment-preview-image,
  .attachment-preview-video,
  .attachment-preview-file-icon {
    width: 46px;
    height: 46px;
  }
}
