@import "util/keyframes";
@import "util/mixin";
@import "component/chip";
@import "component/slider";
@import "component/switch";
@import "component/dialog";
@import "component/button";
@import "component/menu";
@import "component/snackbar";
@import "component/form";
@import "component/text-field";
@import "component/select";
@import "component/list";
@import "business/graph";
@import "business/layout";
@import "business/block";
@import "util/reset";
@import "util/function";
@import "business/history";
@import "business/color";
@import "protyle/protyle";
@import "component/typography";
@import "viewerjs/viewer";
@import "business/export";
@import "business/card";

.block__popover {
  width: 80vw;
}

.b3-list--mobile {

  & > .fn__flex-column {
    height: 100%;
  }

  .b3-list-item {
    font-size: 16px;
  }
}

.file-tree__sliderDown {
  height: 0;
  overflow: hidden;
  transition: var(--b3-transition);
}

.counter {
  margin-left: 4px;
  line-height: 22px;
  padding: 0 8px;
  color: var(--b3-theme-on-surface);
  border-radius: 2px;
  font-size: 12px;
  user-select: none;
  height: 22px;
  background-color: var(--b3-theme-background-light);
}

.toolbar {
  display: flex;
  align-items: center;
  background: var(--b3-theme-background);

  &--border {
    border-bottom: 1px solid var(--b3-theme-surface-lighter);
  }

  &--dark {
    background-color: var(--b3-theme-surface);
  }

  &__icon {
    height: 18px;
    width: 18px;
    padding: 4px;
    flex-shrink: 0;
    margin: 4px;
    color: var(--b3-theme-on-surface);

    &--small {
      height: 14px;
      width: 14px;
      padding: 11px 8px;
    }

    &[disabled] {
      opacity: 0.68;
      cursor: not-allowed;
    }

    &--active {
      background-color: var(--b3-theme-primary);
      border-radius: 4px;
      color: var(--b3-theme-on-primary);
    }
  }

  &__title {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid transparent;
    background-color: transparent;
  }

  &__search {
    margin: 8px;
  }

  &__text {
    @include text-clamp(1);
    flex: 1;
  }
}

.side-panel {
  top: 0;
  left: auto;
  right: -100vw;
  position: fixed;
  background-color: var(--b3-theme-surface);
  height: 100vh;
  width: 80vw;
  z-index: 220;
  transition: top .15s cubic-bezier(0, 0, .2, 1) 0ms, left .15s cubic-bezier(0, 0, .2, 1) 0ms, right .15s cubic-bezier(0, 0, .2, 1) 0ms;

  &--left {
    left: -100vw;
    right: auto;
  }

  &--all {
    width: 100vw;
    right: 0;
    top: -200vh;
  }
}

.scrim {
  background-color: rgba(0, 0, 0, 0.32);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  z-index: 4;
  transition: opacity 150ms linear;
  animation-duration: 1s;
  animation-fill-mode: both;
  animation-name: fadeIn;
}

#model {
  .config-about__logo {
    display: flex;
    align-items: center;

    img {
      width: 36px;
    }
  }

  .config-repos__sync {
    margin: 0 auto -16px;
    overflow: hidden;
    max-height: 180px;
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
  }

  .config-account {
    &__bg {
      position: relative;
      margin-bottom: 82px;
      width: 100%;
      flex: 1;
    }

    &__cover {
      position: absolute;
      top: 0;
      width: 100%;
      height: 100%;
      background-size: cover;
      background-position: center center;
    }

    &__avatar {
      position: absolute;
      bottom: 24px;
      width: 128px;
      height: 128px;
      left: 50%;
      margin-left: -64px;
      background-repeat: no-repeat;
      background-position: 50%;
      background-size: cover;
      border-radius: 90px;
      background-color: rgba(255, 255, 255, 0.8);
      box-shadow: var(--b3-point-shadow);
      border: 1px solid var(--b3-theme-surface-lighter);
    }

    &__info {
      width: 100%;
      box-sizing: border-box;
      padding: 16px;
    }

    &__name {
      bottom: -58px;
      position: absolute;
      width: 100%;
      text-align: center;
    }
  }
}

#menu img.b3-list-item__graphic {
  border-radius: 4px;
}

#keyboardToolbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  height: 32px;
  background: var(--b3-theme-background);
  z-index: 212;
  display: flex;
  border-top: 1px solid var(--b3-theme-surface-lighter);

  button {
    background: transparent;
    padding: 0;
    border: 0;

    svg {
      height: 18px;
      width: 18px;
      padding: 4px;
      margin: 4px;
      color: var(--b3-theme-on-surface);
    }
  }
}

#transactionTip {
  position: fixed;
  top: 73px;
  border-radius: 4px;
  box-sizing: border-box;
  background: var(--b3-theme-background);
  padding: 4px;
  box-shadow: var(--b3-point-shadow);
  border: 1px solid var(--b3-theme-surface-lighter);
  z-index: 1;
  line-height: 28px;
  left: 8px;
  right: 8px;
  text-align: center;
}

.svg {
  fill: currentColor;
  display: inline-block;
  stroke-width: 0;
  stroke: currentColor;
  width: 14px;
  height: 14px;

  &--mid {
    width: 16px;
    height: 16px;
  }

  &--small {
    width: 12px;
    height: 12px;
  }
}

#empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  .b3-list-item {
    width: 200px;
  }
}

.b3-menu__accelerator {
  display: none;
}

#historyContainer {
  & > div {
    flex-direction: column;

    & > ul {
      width: auto !important;
      flex: 1;
    }
  }
}

.status {
  position: fixed;
  bottom: -30px;
  transition: var(--b3-transition);
  font-size: 12px;
  color: var(--b3-theme-on-surface);
  padding: 4px;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
  background-color: var(--b3-theme-background);
  z-index: 221;
  @extend .fn__ellipsis;
}

@media (max-width: 620px) {
  .protyle-wysiwyg [data-node-id].sb[data-sb-layout="col"] {
    flex-direction: column;
    flex-wrap: initial;
  }
}

@import "util/responsive";
