@import 'assets/scss/colors.scss';
@import 'assets/scss/fonts.scss';
@import 'assets/scss/z-index.scss';

.container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-dark-elements-gray);
  border-radius: 8px;
  padding: 16px 16px;
  position: absolute;
  bottom: 78px;
  right: 72px;
  left: 14px;
  background-color: var(--color-template-highlight);
  z-index: $base;
}

.topLine {
  display: flex;
  flex-direction: row;
  margin-bottom: 16px;
}

.searchField {
  flex-grow: 1;
}

.templateList {
  max-height: 500px; // Old Firefox fallback
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  margin-left: -24px;
}

.templatePreviewWrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-left: 24px;
  margin-bottom: 16px;
  overflow: hidden;
  cursor: pointer;
}

.templatePreviewName {
  @include font-s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-contrast);
}

.emptyMessage {
  text-align: center;
  width: 100%;
}

.emptyImagePlaceholder {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 350px;
}

.emptyMessageText {
  text-align: left;
  margin: 0 3rem 1rem 3rem;
  h1 {
    @include font-l;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--color-airy-dark-blue);
  }
  p {
    @include font-base;
    color: var(--color-text-gray);
    margin-bottom: 16px;
  }
}

.emptySeparator {
  width: 40px;
  height: 4px;
  background-color: var(--color-accent-magenta);
  margin-bottom: 8px;
}

.notFoundMessage {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  max-height: 350px;
}

.notFoundImage {
  flex-grow: 1;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 200px;
}

.notFoundText {
  h2 {
    font-weight: 700;
  }

  p {
    color: var(--color-text-gray);
    margin-bottom: 32px;
  }
}

.errorMessage {
  @include font-base;
  color: var(--color-text-gray);
}
