@import "variables";
@import "mixins";
@import "grid.scss";
@import "@assets/css/molecules/keen-slider";

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  :where(.wp-block) {
    max-width: 100%;
  }

  form.mb-block-edit {
    // fix for 62.5 rems in block editor
    .rwmb-input input[type="checkbox"],
    .rwmb-input input[type="radio"] {
      width: 1em;
      height: 1em;
    }
    h4 {
      font-size: 1.2rem;
    }
  }

  .edit-post-layout:not(.is-sidebar-opened) {
    .interface-interface-skeleton__sidebar {
      display: none;
    }
  }
}

// toto je potrebne aby fungovala nasa grida v gutenbergu pri tablet preview
.is-tablet-preview {
  width: 767px !important;
}

// potrebne na resizovanie sidebaru v block editore
// pozri assets > js > admin.ts > AdminModule >initBlockSidebarResizing()
.interface-interface-skeleton__sidebar {
  position: relative;
  display: flex;
  flex-flow: row-reverse nowrap;
  left: 0 !important;
  .interface-complementary-area {
    width: 100%;
  }
  @media (min-width: 782px) {
    width: 400px;
  }
  @media (min-width: 1800px) {
    width: 500px;
  }
  // zmena velkosti obrazkov v sidebare
  .rwmb-image_advanced-wrapper .rwmb-image-item .rwmb-file-icon {
    width: 70px;
    height: 70px;
  }
  .ui-resizable-handle {
    order: 100;
    background: rgba($color: #007cba, $alpha: 0);
    width: 10px;
    position: sticky;
    cursor: w-resize;
    font-size: 0.1px;
    display: block;
    touch-action: none;
    margin-left: -5px;
    top: 0;
    height: 100%;
    &:hover {
      transform: scaleX(1.5);
      background: rgba($color: #007cba, $alpha: 0.1);
      transition: all ease 0.3s;
    }
  }
}

.mb-block-preview {
  font-family: $font-family;

  @import "./theme.scss";
  @import "./molecules/checkbox.scss";
  @import "./molecules/keen-arrows.scss";
  @import "./molecules/keen-slider.scss";
  @import "./molecules/radio-button.scss";

  section a {
    pointer-events: none;
  }
}
