.attachments-box {
  font-size: 0.9rem;

  .drop-zone {
    background: $brand-100;
    border-radius: 0.5rem;
    outline: 3px dashed $border-color;
    color: $text-muted;
    padding: 2.5rem;
    text-align: center;
    margin: 1rem 0;
    cursor: default;
  }

  .fileinput-button {
    color: $text-link;
    float: none;
    margin: 0;

    &:hover {
      color: $text-link-hover;
    }

    label[for='file-upload'] {
      cursor: pointer;
    }

    input[type='file'] {
      border: none;
      height: 1.25rem;
      transform: none;
      width: 1.25rem;

      &::-webkit-file-upload-button {
        display: none;
      }
    }
  }

  .files {
    .cancel,
    .copy-link,
    .delete {
      width: 1.5rem;
      text-align: right;
    }

    .error {
      width: 120px;
    }

    .filename {
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      display: -webkit-box;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .progress {
      width: 100%;
      height: 0.3rem;
      margin: 0.5rem 0 1rem 0;
    }

    .size {
      font-size: 80%;
      padding-bottom: 0.3rem;
    }

    .template-download {
      border-bottom: 1px solid $border-color;

      &:first-child {
        .file {
          margin-top: 0;
        }
      }

      &:last-child {
        border-bottom: none;
      }

      .file {
        margin: calc(var(--margin) / 2) 0;
      }
    }
  }

  #fileupload {
    display: inline-block;
  }

  .header {
    margin-top: var(--margin);
  }

  table {
    margin-bottom: 0;
    color: $white;
    table-layout: fixed;
    width: 100%;
    border-spacing: 0 3px;

    tr:hover {
      .btn {
        opacity: 1;
      }
    }

    td {
      border: none;
      padding: 0;

      .btn {
        color: $text-link;
        padding: 4px 6px;
        opacity: 0.25;
        transition: opacity 0.15s ease-in-out;

        &.btn-copy {
          &:focus-visible,
          &:hover {
            color: $text-link-hover;
          }
        }

        &.btn-trash {
          &:focus-visible,
          &:hover {
            color: $red;
          }
        }
      }
    }
  }
}
