@layer screens {
.progress-report-form-container {
  margin-top: var(--spacing-6);

  & .progress-report-form {
    max-width: 100%;

    @media (min-width: 48rem) {
      max-width: var(--container-md);
      margin-inline: auto;
    }
  }
}

/* Live file-upload markup rendered by shared/components/_simple_file_upload
   and shared/components/_attached_files_display (see progress_report_image_upload). */
.progress-report-form {
  .attached-files {
    margin-top: var(--spacing-4);

    h4 {
      margin: 0 0 var(--spacing-2) 0;
      font-size: var(--font-size-base);
      font-weight: var(--font-weight-medium);
      color: var(--text-muted);
      text-align: start;
    }
  }

  .file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-3);

    @media (min-width: 48rem) {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
  }

  .file-preview {
    position: relative;
    display: flex;
    flex-direction: column;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);

    img {
      width: 100%;
      height: 120px;
      object-fit: cover;
      display: block;
    }
  }

  .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    background-color: var(--surface-sunken);
    color: var(--text-muted);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
  }

  .file-name {
    padding: var(--spacing-1) var(--spacing-2);
    font-size: var(--font-size-sm);
    color: var(--text);
    background-color: var(--surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .delete-file {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-min);
    padding-block: var(--spacing-2);
    color: var(--status-rejected-fg);
    background-color: var(--status-rejected-bg);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border-block-start: var(--border-width) solid var(--status-rejected-border);
  }

  .delete-file:hover,
  .delete-file:focus {
    text-decoration: underline;
  }

  .delete-file:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
  }
}
}
