.attachments {
  margin: 18px 0;
  padding: 16px;
  border: 1px dashed var(--line, #ccc);
  border-radius: 12px;
  min-width: 0;
}
.attachment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.attachment-heading span {
  font-weight: 400;
  opacity: 0.65;
}
.attachment-picker {
  position: relative;
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--line, #aaa);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.attachment-picker:focus-within {
  outline: 2px solid #4385ff;
  outline-offset: 3px;
}
.attachment-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.attachment-hint,
.attachment-message {
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0 0;
  opacity: 0.8;
}
.attachment-message:empty {
  display: none;
}
.attachment-message.error {
  color: #b83326;
  opacity: 1;
}
.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.attachment-grid:empty {
  display: none;
}
.attachment-grid figure {
  position: relative;
  margin: 0;
  min-width: 0;
}
.attachment-grid img {
  display: block;
  width: 100%;
  height: 125px;
  object-fit: contain;
  background: #e9edf1;
  border: 1px solid #cbd3db;
  border-radius: 8px;
}
.attachment-grid figcaption {
  font-size: 12px;
  overflow-wrap: anywhere;
  padding: 6px 0;
}
.attachment-grid figure > button {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: #26333e;
}
.nb-share-photos {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line, #ccc);
  border-radius: 8px;
  min-width: 0;
}
.nb-share-photos label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.nb-share-photos input {
  width: auto;
  flex: none;
}
.nb-share-photos img {
  width: 72px;
  height: 50px;
  object-fit: contain;
}
@media (max-width: 480px) {
  .attachments {
    padding: 12px;
  }
  .attachment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attachment-grid img {
    height: 100px;
  }
}
