@import "variables.scss";

app-sync {
  main {
    .btn {
      margin-bottom: 10px;
    }
  }
}

app-generator .generated-block {
  font-size: $font-size-large;
  font-family: $font-family-monospace;
  margin: 8px;
  padding: 8px 10px 8px 0;
  display: flex;
  border-radius: $border-radius;
  border: 1px solid;

  @include themify($themes) {
    background-color: transparent;
    border-color: themed("borderColorAlt");
  }

  .generated-wrapper {
    text-align: left;
    width: 100%;
    min-width: 0;
    white-space: pre-wrap;
    word-break: break-all;
    padding: 15px;
    border-radius: $border-radius;

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

  .action-buttons {
    display: flex;
    align-self: center;
    height: 100%;
    margin-left: 10px;

    button {
      padding: 6px;
      margin: 2px;
      border-radius: $border-radius;

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

app-home {
  position: fixed;
  height: 100%;
  width: 100%;

  .center-content {
    margin-top: -50px;
    height: calc(100% + 50px);
  }

  img {
    width: 284px;
    margin: 0 auto;
  }

  p.lead {
    margin: 30px 0;
  }

  .btn + .btn {
    margin-top: 10px;
  }

  button.settings-icon {
    position: absolute;
    top: 10px;
    left: 10px;

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

    &:not(:hover):not(:focus) {
      span {
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        height: 1px;
        overflow: hidden;
        position: absolute;
        white-space: nowrap;
        width: 1px;
      }
    }

    &:hover,
    &:focus {
      text-decoration: none;

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

.app-private-mode-warning {
  display: block;
  padding-top: 1rem;
}

body.body-sm,
body.body-xs {
  app-home {
    .center-content {
      margin-top: 0;
      height: 100%;
    }

    p.lead {
      margin: 15px 0;
    }
  }
}

body.body-full {
  app-home {
    .center-content {
      margin-top: -80px;
      height: calc(100% + 80px);
    }
  }
}

.createAccountLink {
  padding: 30px 10px 0 10px;
}

.remember-email-check {
  padding-top: 18px;
  padding-left: 10px;
  padding-bottom: 18px;
}

.login-buttons > button {
  margin: 15px 0 15px 0;
}

app-options {
  .box {
    margin: 10px 0;

    & + .box {
      margin-top: 10px;
    }
  }
}

app-vault-view,
app-vault-add-edit,
app-generator,
app-vault-attachments {
  .box {
    margin: 15px 0 25px 0;

    & + .box {
      margin-top: 25px;
    }
  }
}

.useBrowserlink {
  margin-left: 5px;
  margin-top: 20px;

  span {
    font-weight: 700;
    font-size: $font-size-small;
  }
}

.fido2-browser-selector-dropdown {
  @include themify($themes) {
    background-color: themed("boxBackgroundColor");
  }
  padding: 8px;
  width: 100%;
  box-shadow:
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.12),
    0 1px 5px 0 rgba(0, 0, 0, 0.2);
  border-radius: $border-radius;
}

.fido2-browser-selector-dropdown-item {
  @include themify($themes) {
    color: themed("textColor") !important;
  }
  width: 100%;
  text-align: left;
  padding: 0px 15px 0px 5px;
  margin-bottom: 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;

  &:hover {
    @include themify($themes) {
      background-color: themed("listItemBackgroundHoverColor") !important;
    }
  }

  &:last-child {
    margin-bottom: 0;
  }
}

app-fido2 {
  .auth-wrapper {
    display: flex;
    flex-direction: column;
    padding: 12px 24px 12px 24px;

    .auth-header {
      display: flex;
      justify-content: space-between;
      align-items: center;

      .left {
        padding-right: 10px;

        .logo {
          display: inline-flex;
          align-items: center;

          i.bwi {
            font-size: 35px;
            margin-right: 3px;
            @include themify($themes) {
              color: themed("primaryColor");
            }
          }

          span {
            font-size: 45px;
            font-weight: 300;
            margin-top: -3px;
            @include themify($themes) {
              color: themed("primaryColor");
            }
          }
        }
      }

      .search {
        padding: 7px 10px;
        width: 100%;
        text-align: left;
        position: relative;
        display: flex;

        .bwi {
          position: absolute;
          top: 15px;
          left: 20px;

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

        input {
          width: 100%;
          margin: 0;
          border: none;
          padding: 5px 10px 5px 30px;
          border-radius: $border-radius;

          &:focus {
            border-radius: $border-radius;
            outline: none;
          }

          &[type="search"]::-webkit-search-cancel-button {
            -webkit-appearance: none;
            appearance: none;
            background-repeat: no-repeat;
            mask-image: none;
            -webkit-mask-image: none;
          }
        }
      }
    }

    .auth-flow {
      display: flex;
      align-items: flex-start;
      flex-direction: column;
      margin-top: 32px;

      .subtitle {
        font-family: Open Sans;
        font-size: 24px;
        font-style: normal;
        font-weight: 600;
        line-height: 32px;
      }

      .box.list {
        overflow-y: auto;
      }

      .box-content {
        max-height: 140px;
      }

      @media screen and (min-height: 501px) and (max-height: 600px) {
        .box-content {
          max-height: 200px;
        }
      }

      @media screen and (min-height: 601px) {
        .box-content {
          max-height: 260px;
        }
      }

      .box-content-row {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0px;
        padding: 0px;
        margin-bottom: 12px;

        button {
          min-height: 44px;
        }

        .row-main {
          border-radius: 6px;
          padding: 5px 0px 5px 12px;

          &:focus {
            @include themify($themes) {
              padding: 3px 0px 3px 10px;
              border: 2px solid themed("headerInputBackgroundFocusColor");
            }
          }

          &.row-selected {
            @include themify($themes) {
              outline: none;
              padding-left: 7px;
              border-left: 5px solid themed("primaryColor");
              background-color: themed("headerBackgroundHoverColor");
              color: themed("headerColor");
            }
          }
        }

        .row-main-content {
          display: flex;
          flex-direction: column;
          justify-content: center;

          .detail {
            min-height: 15px;
            display: block;
          }
        }
      }

      .btn {
        width: 100%;
        font-size: 16px;
        font-weight: 600;
      }
    }
  }
}
