@import "../../../../../../../libs/angular/src/scss/webfonts.css";
@import "../../../../../../../libs/angular/src/scss/bwicons/styles/style";
@import "../../../shared/styles/variables";
@import "../../../../../../../libs/angular/src/scss/icons";

* {
  box-sizing: border-box;
}

html {
  font-size: 10px;
}

body {
  width: 100%;
  padding: 0;
  margin: 0;

  @include themify($themes) {
    color: themed("textColor");
    background-color: themed("backgroundColor");
  }
}

.overlay-list-message {
  font-family: $font-family-sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.5;
  width: 100%;
  padding: 0.8rem;

  @include themify($themes) {
    color: themed("textColor");
  }

  &.no-items {
    font-size: 1.6rem;
  }
}

.overlay-list-button-container {
  width: 100%;
  padding: 0.2rem;
  background: transparent;
  transition: background-color 0.2s ease-in-out;
  border-top-width: 0.1rem;
  border-top-style: solid;

  @include themify($themes) {
    border-top-color: themed("borderColor");
  }

  &:hover {
    @include themify($themes) {
      background: themed("backgroundOffsetColor");
    }
  }
}

.overlay-list-button {
  display: flex;
  align-content: center;
  justify-content: flex-start;
  width: 100%;
  font-family: $font-family-sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.7rem;
  margin: 0;
  cursor: pointer;
  border-radius: 0.4rem;

  @include themify($themes) {
    color: themed("primaryColor");
  }

  &:focus:focus-visible {
    outline-width: 0.2rem;
    outline-style: solid;

    @include themify($themes) {
      outline-color: themed("focusOutlineColor");
    }
  }

  svg {
    position: relative;
    margin-left: 0.4rem;
    margin-right: 0.8rem;

    path {
      @include themify($themes) {
        fill: themed("primaryColor") !important;
      }
    }
  }
}

.unlock-button {
  svg {
    top: 0.2rem;
    width: 1.6rem;
    height: 1.7rem;
  }
}

.add-new-item-button {
  svg {
    top: 0.2rem;
    width: 1.7rem;
    height: 1.7rem;
  }
}

.overlay-actions-list {
  padding: 0;
  margin: 0;
}

.overlay-actions-list-item {
  transition: background-color 0.2s ease-in-out;
  list-style: none;
  padding: 0.2rem;

  &:not(:last-child) {
    border-bottom-width: 0.1rem;
    border-bottom-style: solid;

    @include themify($themes) {
      border-bottom-color: themed("borderColor");
    }
  }

  &:hover {
    @include themify($themes) {
      background: themed("backgroundOffsetColor");
    }
  }

  .cipher-container {
    display: flex;
    align-content: flex-start;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 0.3rem 0.7rem 0.7rem;
    border-radius: 0.4rem;

    &:focus-within:not(.remove-outline) {
      outline-width: 0.2rem;
      outline-style: solid;

      @include themify($themes) {
        outline-color: themed("focusOutlineColor");
      }
    }
  }

  .fill-cipher-button,
  .view-cipher-button {
    padding: 0;
    margin: 0;
    line-height: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
  }

  .fill-cipher-button {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    width: calc(100% - 4rem);
    outline: none;
  }

  .view-cipher-button {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;

    &:focus:focus-visible {
      outline-width: 0.2rem;
      outline-style: solid;

      @include themify($themes) {
        outline-color: themed("focusOutlineColor");
      }
    }

    svg {
      path {
        @include themify($themes) {
          fill: themed("primaryColor") !important;
        }
      }
    }
  }

  .cipher-icon {
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 1rem 0 0;
    line-height: 0;
    background-size: 2.6rem;
    background-position: center;
    background-repeat: no-repeat;

    @include themify($themes) {
      color: themed("mutedTextColor");
    }

    svg {
      width: 100%;
      height: auto;
      flex-shrink: 0;

      path {
        @include themify($themes) {
          fill: themed("primaryColor") !important;
        }
      }
    }

    &.bwi {
      font-size: 2.6rem;

      &:not(.cipher-icon) {
        @include themify($themes) {
          color: themed("primaryColor");
        }

        svg {
          path {
            @include themify($themes) {
              fill: themed("primaryColor") !important;
            }
          }
        }
      }
    }
  }

  .cipher-details {
    display: block;
    width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: left;
  }

  .cipher-name,
  .cipher-user-login {
    display: block;
    width: 100%;
    line-height: 1.5;
    font-family: $font-family-sans-serif;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
  }

  .cipher-name {
    font-size: 1.6rem;

    @include themify($themes) {
      color: themed("textColor");
    }
  }

  .cipher-user-login {
    font-size: 1.4rem;

    @include themify($themes) {
      color: themed("mutedTextColor");
    }
  }
}
