@use 'apps/dashboard/src/variables' as *;
@use '../edit-resource.tokens' as tokens;

.main-container {
  display: flex;
  gap: rhythm(5);

  pa-tabs {
    display: block;
    margin-bottom: rhythm(3);
  }

  .filters-container {
    margin-bottom: rhythm(4);
    .selected-filters,
    .filters {
      align-items: center;
      display: flex;
      flex-wrap: wrap;
      gap: rhythm(1.5);
    }
    .selected-filters {
      margin-top: rhythm(1.5);
    }
  }

  nsi-info-card {
    margin-bottom: rhythm(2);
  }

  .custom-processing {
    align-items: center;
    display: flex;
    gap: rhythm(1);
  }

  .resource-container {
    .title-m,
    .thumbnails-container {
      margin-bottom: rhythm(2);
    }
  }

  .paragraph-container {
    margin-bottom: rhythm(2.5);
    .image {
      border: 1px solid $color-neutral-light;
      border-radius: $border-radius-default;
      max-width: rhythm(28);
      max-height: rhythm(24);
    }
    p {
      margin: 0;
    }
    p.with-attachments {
      display: flex;
      gap: rhythm(2);
      justify-content: space-between;
    }
    p.with-type {
      display: flex;
      gap: rhythm(1);
      justify-content: space-between;
      &:hover {
        background-color: $color-neutral-lightest;
      }
      nsi-badge {
        margin: rhythm(0.5);
      }
    }
    .labels-container {
      align-items: center;
      display: flex;
      gap: rhythm(1);
      margin-top: rhythm(1);
    }
  }

  .question-answer {
    padding-bottom: rhythm(1);
    border-bottom: 1px solid $color-neutral-light;
    margin-bottom: rhythm(1.5);
  }
}

.buttons-container {
  position: relative;
  .buttons {
    display: flex;
    flex-direction: column;
    gap: rhythm(1.5);
    position: sticky;
    top: calc(#{tokens.$height-header} + var(--app-layout-padding-top));
  }
}

.error-container {
  background: $color-secondary-regular;

  p {
    align-items: center;
    display: flex;
    gap: rhythm(1);
    padding: rhythm(0.5);

    pa-icon {
      display: flex;
    }
  }
}

.backdrop {
  background: rgba(0, 0, 0, 0.5);
  bottom: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 100;
}
.extra-metadata-container {
  background: $color-neutral-lightest;
  max-height: rhythm(40);
  overflow: auto;
  transition:
    max-height $transition-response,
    width $transition-response;

  pre {
    padding: rhythm(2);
  }

  &.fullscreen {
    bottom: rhythm(4);
    left: 10vw;
    height: fit-content;
    max-height: calc(100vh - var(--app-topbar-height) - #{rhythm(8)});
    position: absolute;
    top: rhythm(4);
    width: 80vw;
    z-index: 100;

    .fullscreen-header {
      background: $color-neutral-lightest;
      position: sticky;
      height: rhythm(6);
      padding: rhythm(0.5);
      top: 0;

      pa-button {
        float: right;
      }
    }
  }
}

.title-with-button {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

pa-table ::ng-deep .pa-table-grid--row {
  font-size: font-size(s);
}
