// Gutenberg imports
@import "~gutenberg/packages/components/build-style/style.css";
@import "~gutenberg/packages/block-editor/build-style/style.css";
@import "~gutenberg/packages/nux/build-style/style.css";
@import "~gutenberg/packages/editor/build-style/style.css";
@import "~gutenberg/packages/block-library/build-style/style.css";
@import "~gutenberg/packages/block-library/build-style/editor.css";
@import "~gutenberg/packages/block-library/build-style/theme.css";
@import "~gutenberg/packages/edit-post/build-style/style.css";
@import "~gutenberg/packages/format-library/build-style/style.css";
@import "~gutenberg/packages/list-reusable-blocks/build-style/style.css";

@import "./wordpress-overrides.scss";

.laraberg__editor {
  width: auto;
  border: 1px solid #e2e4e7;
  box-sizing: border-box;
  min-height: 400px;
  height: auto;
  position: relative;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;

  *:focus {
    outline: none;
  }

  .components-notice-list {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .edit-post-header {
    z-index: 100;
    box-sizing: border-box;
    position: sticky;
  }

  .edit-post-sidebar {
    .edit-post-sidebar__panel-tabs {
      top: 50px;
      ul {
        list-style: none;
        margin: 0;
        padding: 0;
      }
    }
    .components-panel{
      overflow: unset;
      top: 100px;
      margin: 0;
      display: block;
      position: sticky;
    }
  }

  .editor-media-placeholder__media-library-button {
    margin-bottom: 0.5rem;
  }
  .edit-post-fullscreen-mode-close.has-icon{
    display: none !important;
  }
  .components-placeholder {
    width: auto;
  }

  .components-popover.block-editor-block-list__block-popover{
    z-index: 30;
  }

  .screen-reader-text,
  .screen-reader-text span,
  .ui-helper-hidden-accessible {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
  }

  input[type="checkbox"],
  input[type="color"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="datetime"],
  input[type="email"],
  input[type="month"],
  input[type="number"],
  input[type="password"],
  input[type="radio"],
  input[type="search"],
  input[type="tel"],
  input[type="text"],
  input[type="time"],
  input[type="url"],
  input[type="week"],
  select,
  textarea {
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    background-color: #fff;
    color: #32373c;
    outline: 0;
    transition: 50ms border-color ease-in-out;
  }

  .editor-inserter__manage-reusable-blocks {
    display: none;
  }

  iframe {
    border: 0;
    max-width: 100%;
  }

  .laraberg-sidebar-content {
    padding: 15px;
    margin: unset;
  }
  .wp-block{
    max-width: 1000px;
  }
}

.gutenberg__content {
  .alignleft {
    float: left;
    margin-right: 1rem;
  }

  .alignright {
    float: right;
    margin-left: 1rem;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-bottom: 24px;
  }
}

.wp-embed-responsive .wp-block-embed.wp-embed-aspect-1-1 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-1-2 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper iframe,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-9-16 .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.wp-embed-responsive .wp-block-embed.wp-embed-aspect-1-1 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-1-2 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-18-9 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-21-9 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper::before,
.wp-embed-responsive .wp-block-embed.wp-embed-aspect-9-16 .wp-block-embed__wrapper::before {
  content: "";
  display: block;
  padding-top: 50%;
}

.laraberg-sidebar {
  display: none;
}

.wp-block-html .block-editor-plain-text {
  width: 100%;
}

.is-fullscreen-mode{
  .block-editor__container{
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 200;
    .block-editor-editor-skeleton__content {
      height: calc(100vh - 60px);
    }
  }

}