.attachment-section {
  margin-top: 34px;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.attachment-card {
  min-width: 0;
  padding: 18px;
}

.attachment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.attachment-heading > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.attachment-heading strong {
  overflow-wrap: anywhere;
}

.attachment-heading small {
  color: var(--muted);
  margin-top: 4px;
}

.button.compact {
  padding: 7px 10px;
  font-size: 12px;
}

.attachment-preview {
  height: 310px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #eef2ef;
  display: grid;
  place-items: center;
}

.attachment-preview img,
.attachment-preview video,
.attachment-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: white;
}

.attachment-preview audio {
  width: calc(100% - 28px);
}

.no-preview {
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
}

.no-preview strong {
  color: var(--ink);
}

.attachment-delete {
  margin-top: 12px;
  text-align: right;
}

.attachment-delete .link-button {
  color: var(--red);
  font-size: 12px;
}

.field input[type="file"] {
  padding: 9px;
  background: #f8faf8;
}

.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 7px;
  background: var(--sage);
  color: var(--green-dark);
  padding: 8px 10px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 850px) {
  .attachment-grid {
    grid-template-columns: 1fr;
  }

  .attachment-preview {
    height: 240px;
  }
}
