#attachments {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.attachment {
  position: relative;
  padding-top: 14px;
  & label {
    font-size: 0.875rem;
    line-height: 1.2;
    color: #555;
    display: block;
    margin-bottom: 8px;
  }

   & trix-editor {
    min-height: 15em;
    /* max-height: 320px;
    overflow: auto; */
  } 


  .handle {
    appearance: none;
    position: absolute;
    top: 4px;
    right: 40px;
    border: none;
    border-radius: 50%;
    display: flex;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
    font-family: var(--font-icons);
    background-color: transparent;
    font-size: 1.375rem;
    color: var(--clr-grey-400);

    &:hover {
      background-color: var(--clr-grey-200);
      color: var(--clr-grey-700);
    }
  }
}

.attachment__content:has(.attachment__asset) {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 20px;
  
  & .trix-button--icon-decrease-nesting-level,
  .trix-button--icon-increase-nesting-level,
  .trix-button--icon-bullet-list,
  .trix-button--icon-number-list  {
    display: none;
  }

  & trix-editor {
    min-height: 8em;
  }

  .attachment__content-two {
    grid-column-start: 2;
  }
  .attachment__content-three {
    grid-column-start: 2;
  }
  
}

.attachment-site:not(:has(.attachment__asset)) {
  & .attachment__content-three {
    &>*:nth-child(3),
    &>*:nth-child(4) {
      display: none;
    }
  }
}

.attachment-site:has(.attachment__asset) {
  & .attachment__content-three {
    &>*:nth-child(1),
    &>*:nth-child(2) {
      display: none;
    }
  }
}

.attachment-tile {
  & .attachment__content-three {
    &>*:nth-child(4) {
      display: none;
    }
  }
}

#newsletter-attachments .attachment__content .field:nth-child(2) {
  display: none;
}

#newsletter-attachments .attachment__content:has(.attachment__asset) {
  & .attachment__content-three {
    display: none;
  }
}

.attachment__content .field {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;

  &>div:nth-child(2) {
    flex-basis: 100%;
    flex-grow: 1;
    width: 100%;
  }
}

.attachment__content-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.attachment__content-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 20px;
}


.attachment__asset {
  margin-top: 3em;
  text-align: center;
}


.trix__field {
  width: 100%;
}