
body .admin-quickbar {
  position: fixed;
  top: 32px;
  right: 0;
  width: 0;
  bottom: 0;

  background-color: var(--aqb-secondary-bg);
  color: var(--aqb-main-color);

  font-size: 13px;
  font-weight: normal;
  line-height: 1.4em;
  font-family: Roboto, Arial, Helvetica, Verdana, sans-serif;

  z-index: 99999;

  .admin-quickbar-inner {
    position: absolute;
    display: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 49px;
    padding: 0 8px 15px;
    overflow: auto;

    > label {
      white-space: nowrap;
    }
  }

  &.toggle {
    width: 320px;
    display: block;

    .admin-quickbar-inner {
      display: block;
    }


    .toggle-quickbar-button {
      width: 13px;
    }

    .toggle-quickbar-button::before {
      content: "\f345";
    }
  }

  .admin-quickbar-postlist {
    &.hidden-posttype {
      display: none;
    }
  }

  .admin-quickbar-post-type {
    padding: 10px 15px 12px 0;
    font-weight: 400;
    letter-spacing: 0.095rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    cursor: pointer;

    &::before {
      content: "\f140";
      display: inline-block;
      position: relative;
      top: -1px;
      margin-right: 2px;
      font-family: Dashicons;
      font-size: 15px;
      line-height: 0;
      vertical-align: middle;
    }

    .add-new {
      position: relative;
      top: 2px;
      font-size: 12px;
      vertical-align: bottom;
      padding-top: 3px;
      box-sizing: border-box;
      z-index: 10;
    }
  }

  .admin-quickbar-post-options {
    float: right;
  }

  .admin-quickbar-post {
    //position: relative;
    padding: 12px 10px 12px 15px;
    background-color: var(--aqb-main-bg);
    margin-bottom: 3px;

    .label {
      cursor: default;
    }

    &.is-favorite .label::after {
      content: '\f155';
      display: inline-block;
      position: relative;
      top: 1px;
      margin-left: 5px;
      font-family: Dashicons;
      font-size: 12px;
      color: var(--aqb-accent);
    }

    &.is-active .label {
      font-weight: 600;
    }

    &.is-active {
      border-left: 2px solid var(--aqb-accent);
    }

    &.post-status-publish.has-password,
    &.post-status-draft,
    &.post-status-trash,
    &.post-status-private {
      .label::after {
        content: 'Private';
        position: relative;
        display: inline-block;
        vertical-align: top;
        font-size: 7px;
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-left: 10px;
        margin-top: -2px;
      }
    }

    &.post-status-draft .label::after {
      content: 'Draft';
    }

    &.post-status-trash .label::after {
      content: 'Trash';
    }

    &.post-status-publish.has-password .label::after {
      content: 'Password';
    }

    &.post-status-trash {
      display: none;

      .admin-quickbar-post-options {
        display: none;
      }
    }
  }

  .admin-quickbar-post::after {
    content: '';
    display: block;
    clear: both;
  }

  .admin-quickbar-postlist-inner {
    display: none;
  }

  .show-list .admin-quickbar-post-type::before {
    content: "\f142";
  }

  .show-list .admin-quickbar-postlist-inner {
    display: block;
  }

  .toggle-quickbar-button {
    position: absolute;
    right: 100%;
    top: 50%;
    width: 25px;
    height: 57px;
    color: var(--aqb-toggle-button-color);
    line-height: 59px;
    transform: translateY(-50%);
    background-color: var(--aqb-secondary-bg);
    font-size: 19px;
    box-shadow: -3px -1px 5px rgba(0, 0, 0, .1);
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    transition: width .3s ease 50ms;
    cursor: pointer;

    &::before {
      content: "\f341";
      font-family: dashicons;
      margin-left: 2px;
    }

    &::after {
      content: '';
      width: 16px;
      background: transparent;
      display: inline-block;
      height: 49px;
      position: absolute;
      right: 22px;
      top: 0;
    }
  }

  .wp-post-image {
    display: inline-block;
    height: calc(1em + 29px);
    margin-top: -12px;
    margin-bottom: -17px;
    margin-right: 7px;
    width: auto !important;
    z-index: 20;
  }

  .aqb-search-wrapper,
  .aqb-options label {
    padding-left: 2px;
    margin-bottom: 1em;
    display: block;
    position: relative;
    color: var(--aqb-transparent-color);

    &:first-child {
      margin-top: 0;
    }

    input {
      display: inline-block;
      position: relative;
      top: 2px;
    }

    input[type=checkbox] {
      top: -1px;
      vertical-align: middle;
      margin-right: 5px;
      -webkit-appearance: checkbox;
      margin-left: 7px;
      height: auto;
      width: auto;
    }

    input,
    select,
    textarea {
      border-radius: 3px;
      font-size: 12px;
      background: none;
      background-color: transparent;
      box-shadow: none;
      color: var(--aqb-main-color);
      border: 1px solid;
      padding: 5px;
      outline: none;
      border-color: var(--aqb-transparent-bg-alt) !important;

      &:focus {
        border-color: var(--aqb-transparent-bg-alt);
        box-shadow: none;
        outline: none;
      }
    }

    input[type=search] {
      line-height: 1;
      min-height: 1em;
    }

    &.admin-quickbar-theme {
      padding: 0 8px;

      select {
        height: 27px;
      }
    }

    select {
      width: 100%;
    }

    select option {
      padding: 3px;
    }

    .sublabel {
      font-size: 8px;
      background: var(--aqb-transparent-bg);
      padding: 3px;
      border-radius: 4px;
    }
  }

  .add-post-button {
    display: inline-block;
    width: 25px;
    padding: 0 0 7px;
    font-size: 18px;
    text-align: center;

    &::before {
      content: "\f132 ";
      display: inline-block;
      position: relative;
      top: 2px;
      margin-right: 2px;
      font-family: Dashicons;
      vertical-align: middle;
    }
  }

  .admin-quickbar-post-type::-moz-selection { /* Code for Firefox */
    color: inherit;
    background: inherit;
  }

  .admin-quickbar-post-type::selection {
    color: inherit;
    background: inherit;
  }

  .wp-post-image[src=""] {
    display: none;
  }

  .admin-quickbar-category {
    position: relative;
    margin-bottom: 0.75em;
    margin-top: 0.75em;
    margin-left: 12px;

    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.1rem;
    color: var(--aqb-transparent-color);
  }

  .admin-quickbar-category:first-child {
    margin-top: 0;
  }

  .admin-quickbar-hide-posttypes select {
    width: calc(100% - 43px);
    margin-left: 5px;
    padding: 2px 5px;
    border-color: var(--aqb-select-border-color) !important;
    border-radius: 3px;
    font-size: 12px;
    background: none;
    box-shadow: none;
    color: var(--aqb-main-color);
    border: 1px solid;
    outline: none;
  }


  .admin-quickbar-hide-posttypes {
    position: relative;
    margin-left: 8px;

    select {
      position: relative;
      margin-left: 0;
      margin-top: 0.25em;
      min-height: 15em;
      width: 100%;
      padding: 4px 5px;
      resize: vertical;
    }
  }

  h2.aqb-settings-headline:first-child {
    margin-top: 0;
  }

  h2.aqb-settings-headline {
    font-size: 12px;
    padding: 9px 0;
    margin-top: 30px;
    margin-bottom: 13px;
    text-align: center;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    background: var(--aqb-transparent-bg);
    color: var(--aqb-secondary-color);
    font-weight: 400;
  }

  .aqb-post-title {
    &.is-renaming {
      display: inline-block;
      padding: 3px 5px;
      background-color: rgba(255, 255, 255, 0.1);
      cursor: text;
    }
  }

  .aqb-category-count,
  .aqb-post-type-count {
    font-size: 0.8em;

    &::before {
      content: '(';
    }
    &::after {
      content: ')';
    }
  }
}


body:not(.admin-quickbar-is-overlap).admin-quickbar-visible {
  #wpcontent {
    margin-right: 330px;
  }

  /** elementor **/
  &.elementor-navigator-docked #elementor-navigator {
    right: 325px !important;
  }

  #elementor-preview {
    margin-right: 325px;
  }

  /** gutenberg **/
  .edit-post-sidebar,
  .edit-post-header,
  .edit-post-layout__content {
    right: 320px;
  }

  /* gutenberg wp >=5.4 */
  &.auto-fold .block-editor-editor-skeleton {
    right: 325px !important;
  }

  #elementor-try-safe-mode {
    right: 325px;
  }

  #query-monitor-main {
    width: calc(100% - 322px) !important;
  }

  .interface-interface-skeleton {
    right: 320px;
  }

  .edit-post-layout .editor-post-publish-panel {
    right: 320px;
  }

  #elementor-editor-wrapper-v2 .MuiBox-root .MuiGrid-root:last-child {
    padding-right: 322px;
  }
}

.elementor-editor-active:not(.wp-admin) .admin-quickbar {
  top: 0;
}

body.admin-quickbar-show-trash .admin-quickbar .admin-quickbar-post.post-status-trash {
  display: block;
}

.admin-quickbar-keepopen {
  padding-left: 0;
}

body {
  .add-post-button,
  .admin-quickbar-post-type .add-new,
  .admin-quickbar-post-options a {
    color: var(--aqb-accent);

    &:hover {
      color: var(--aqb-accent-alt);
    }

    &:focus {
      box-shadow: none;
    }
  }
}

.wp-block {
  max-width: 1200px;
}

body.aqb-hide-on-website:not(.wp-admin):not(.elementor-editor-active) {
  .admin-quickbar {
    display: none;
  }
}

body.aqb-show-postids .aqb-post-title:not(.is-renaming) {
  &::after {
    content: ' (' attr(data-postid) ')';
    font-size: 0.8em;
    color: var(--aqb-transparent-color);
  }
}