/* SPDX-License-Identifier: Apache-2.0 */
.themes {
  display: flex;
  flex-wrap: nowrap;
  width: 58rem;
  margin-top: 0;
  overflow-y: auto;
  max-height: 70vh;
  border: solid 1px #444;
  border-radius: 3px;
  padding: 1rem;
  background-color: var(--bkg-color);
  position: absolute;
  flex-direction: column;
}

#close-themes-menu {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: -1;
}

#active-themes {
  display: flex;
  justify-content: flex-start;
  flex: 1;
  flex-flow: row wrap;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: var(--app-standard-border);
  background-color: transparent;
  border-radius: 6px;
  padding: 0.25rem;
  margin: 0.25rem;
  height: 9rem;
  width: 7rem;

  &:hover {
    cursor: pointer;
    background-color: var(--bkg-color-grad2);
  }

  img.theme-favorite {
    width: 1.5rem;
    height: 1.5rem;
    align-self: flex-start;
    content: url('icons/favorite-no.svg');

    &:hover {
      content: url('icons/favorite-add.svg');
    }

    &.yes {
      content: url('icons/favorite-yes.svg');

      &:hover {
        content: url('icons/favorite-remove.svg');
      }
    }

    &.placeholder {
      content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);
    }
  }

  img.delete-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -1.5rem;
    align-self: flex-end;
    content: url('icons/close.svg');

    &.placeholder {
      content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=);
    }
  }

  img.theme-icon {
    max-width: 5rem;
    max-height: 2.5rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
  }

  &.selected {
    background-color: var(--bkg-color-grad1);
    border: solid 1px var(--text-color);
  }

  span.theme-name {
    text-align: center;
    overflow: hidden;
    max-width: 6rem;
    word-break: break-word;
    color: var(--text-color);
    line-height: 1.1rem;
    max-height: 2.2rem;
  }
}

.theme,
.custom-theme,
.new-theme {
  align-content: flex-end;
  position: relative;
  width: 8rem;
  border: none;
  background-color: transparent;
  cursor: pointer;
  margin: 0.5rem;
  padding: 0;
  border-radius: 0.5rem;
}

.themes > button > span,
.custom-theme > button > span,
.new-theme > button > span {
  display: inline-block;
  width: 95%;
  text-align: center;
  color: var(--text-color);
}

.themes > button > span,
.custom-theme > button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme > img,
.custom-theme > button > img,
.new-theme > img {
  max-width: 100%;
}

button.select {
  border: none;
  padding: 0;
  background-color: transparent;
  cursor: pointer;
  width: 100%;
}

button.select > img {
  height: 3rem;
  margin-bottom: 1rem;
}

button.delete {
  position: absolute;
  top: 0;
  right: 0;
}

.theme.selected,
.custom-theme.selected {
  background-color: var(--bkg-color-grad2);
}

.theme-icon {
  --svg-filter: none;
}

#themes-type-chooser {
  flex: 0;
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
}

.gg-tabs {
  margin: 0;
  flex-grow: 1;
}
