@use "common/var" as *;

.m-editor-page-bar-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  user-select: none;
}

.m-editor-page-list-item {
  display: flex;
  width: 100%;
  height: $page-bar-height;
  line-height: $page-bar-height;
  color: $font-color;
  z-index: 2;
  overflow: hidden;
  &:hover {
    background-color: $hover-color;
  }
}

.m-editor-page-bar {
  display: flex;
  width: 100%;
  height: $page-bar-height;
  line-height: $page-bar-height;
  color: $font-color;
  background-color: #f3f3f3;
  border-top: 1px solid $border-color;
  z-index: 2;
  overflow: hidden;

  &-items {
    display: flex;
    transition: transform 0.3s;
  }

  &-item {
    padding: 0 10px;
    cursor: pointer;
    border-right: 1px solid $border-color;
    display: flex;
    justify-items: center;
    align-items: center;
    background-color: #f3f3f3;
    white-space: nowrap;

    &.active {
      background-color: #fff;
      cursor: text;

      .m-editor-page-bar-menu-icon {
        cursor: pointer;
      }
    }

    &-icon {
      position: relative;
      z-index: 1;

      .icon-active {
        font-weight: bold;
        color: $theme-color;
      }
    }

    &-title {
      max-width: 150px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
    }

    &-left-icon,
    &-right-icon {
      position: absolute;
      right: 0;
      top: 0;
      height: 100%;
    }

    &-left-icon {
      right: 34px;
    }
  }
}

.page-bar-popover {
  &.tmagic-design-popper {
    padding: 4px 0;
  }

  .page-bar-popover-wrapper {
    max-height: calc(100vh - $page-bar-height - 20px);
    overflow: auto;
  }

  .menu-item {
    cursor: pointer;
    transition: all 0.2s ease 0s;
    padding: 5px 14px;

    .tmagic-design-button {
      color: $font-color;
    }

    &:hover {
      background-color: $hover-color;
    }

    &.active {
      .tmagic-design-button {
        color: $theme-color;
      }
    }
  }
}

.m-editor-page-bar-search-panel {
  position: absolute;
  bottom: $page-bar-height;
  border: 1px solid $border-color;
  padding: 6px 10px;
  width: 100%;
  box-sizing: border-box;

  .tmagic-design-form-item {
    margin-bottom: 0;
  }
}
