$primary-blue: rgb(0, 117, 255);
$primary-blue-60: rgba(0, 117, 255, 0.60);
$primary-blue-60-hex: #66ACFF;
$primary-blue-50: rgba(0, 117, 255, 0.50);
$primary-blue-20: rgba(0, 117, 255, 0.20);
$primary-blue-10: rgba(0, 117, 255, 0.10);
$primary-blue-7: rgba(0, 117, 255, 0.07);
$primary-blue-2: rgba(0, 117, 255, 0.02);
$primary-dark: rgb(16, 38, 64);
$primary-dark-50: rgba(16, 38, 64, 0.5);
$primary-dark-30: rgba(16, 38, 64, 0.3);
$primary-dark-15: rgba(16, 38, 64, 0.15);
$primary-dark-10: rgba(16, 38, 64, 0.10);
$primary-dark-5: rgba(16, 38, 64, 0.05);
$error-red: rgb(233, 31, 79);
$error-red-50: rgba(233, 31, 79, 0.5);
$error-red-10: rgba(233, 31, 79, 0.10);
$secondary-purple: rgb(108, 25, 173);
$alert-yellow: rgb(255, 238, 88);
$benchmark-orange: rgb(245, 129, 21);
$benchmark-orange-50: rgba(245, 129, 21, 0.50);
$action-green: rgb(158, 206, 56);
$action-green-50: rgba(158, 206, 56, 0.5);
$box-shadow: 5px 5px 30px 0 rgba(24, 45, 70, 0.05);

@mixin small-dashicons {
  --dashicon-size: 14px;

  span.dashicons {
    height: var(--dashicon-size);
    width: var(--dashicon-size);
    font-size: var(--dashicon-size);

    &::before {
      height: var(--dashicon-size);
      width: var(--dashicon-size);
      font-size: var(--dashicon-size);
    }
  }
}

@keyframes skeleton-loading {
  0% {
    background-color: $primary-dark-5;
  }
  100% {
    background-color: $primary-dark-30;
  }
}

.skeleton-loading {
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes flashing {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.flashing {
  animation: flashing 1s linear infinite alternate;
}


.template-full-width,
.template-full-width-contained {
  padding: 0 20px;

}

.template-boxed {

  margin: 0 20px;

  &.center {
    margin-left: auto;
    margin-right: auto;
    //padding: 0 20px;
  }
}

.template-framed {

  .template-logo {
    margin: 0 auto 30px auto;
    display: block;
    //width: 100%;
  }

  > .inner-content {
    margin: 0 auto;
    padding: 30px;
    box-shadow: $box-shadow;
    border-radius: 20px;
    background: #ffffff;
  }

  background: $primary-blue-7;
  padding: 60px 0;
}

.alignleft {
  margin-right: 10px;
}

.alignright {
  margin-left: 10px;
}

#email-controls {
  opacity: 0.8;
  cursor: pointer;

}

.block-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#email-html-editor {
  display: flex;

  .CodeMirror {
    flex-grow: 1;
  }
}

.insert-block-grid {
  .block-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 10px;

    .block-wrap {

      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      .block-name{
        text-align: center;
        font-weight: 300;
      }

      .block {
        height: 40px;
        width: 40px;
        padding: 10px;
        border-radius: 8px;
        background: #FFFFFF;
        cursor: pointer;
        margin-bottom: 5px;
        color: $primary-dark;
        border: 1px solid $primary-dark-10;

        :hover {
          border-color: $primary-dark-15;
          transition: 0.4s;
          transform: scale(1.05);
        }

        .icon {
          display: flex;
          align-items: center;
          justify-content: center;

          svg {
            height: 100%;
            width: 100%;
          }
        }
      }
    }


  }
}

#email-block-editor {
  display: flex;
  //gap: 20px;
  //padding: 0 20px;
  height: calc(100vh - 92px);

  * {
    box-sizing: border-box;
  }

  #blocks-panel {
    padding: 10px;
    overflow-y: auto;
    flex-shrink: 0;

    .block-grid {
      display: grid;
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
      gap: 10px;
    }
  }

  #add-queryloop {
    .block-name{
      font-size: 11px;
    }
  }

  .block-wrap {
    .block-name {
      text-align: center;
      font-weight: 300;
    }

    &:not(:last-child) {
      //margin-bottom: 10px;
    }
  }

  .block {
    height: 60px;
    width: 60px;
    padding: 10px;
    border-radius: 5px;
    background: #FFFFFF;
    cursor: grab;
    margin-bottom: 5px;
    color: $primary-dark;

    &.dragging {
      cursor: grabbing;
    }

    .icon {
      display: flex;
      align-items: center;
      justify-content: center;

      svg {
        height: 100%;
        width: 100%;
      }
    }
  }

  #content {
    width: 100%;
    //background: #FFFFFF;
    overflow: auto;
    //padding-top: 20px;
    margin: 20px;
    position: relative;

    #block-editor-toolbar {
      position: sticky;
      top: 50%;
      width: 100%;
      height: 0;
      transform: translateY(-50%);
      z-index: 999;

      .buttons {
        position: absolute;
        right: 0;
        //left: 0;
        transform: translateY(-50%);
        box-shadow: $box-shadow;
        background-color: #FFF;
        padding: 3px;
        border-radius: 3px 0 0 3px;
      }
    }

    #block-editor-content-wrap {

      &.mobile {
        width: 390px;
        min-height: 667px;
        margin: auto;
        transition: 0.4s;
        outline: 5px solid $primary-dark;
        border-radius: 20px;
        margin-bottom: 20px;

        .hide-on-mobile {
          filter: grayscale(1);
          opacity: 0.5;
        }

        .template-full-width,
        .template-full-width-contained {
          padding: 0;
        }

        .block-inner-content,
        table.responsive.email-columns,
        table.responsive.email-columns > tbody,
        table.responsive.email-columns tr.email-columns-row,
        table.responsive.email-columns tr.email-columns-row > td.email-columns-cell {
          display: block !important;
          width: auto !important;
        }

        .alignright:not(.keep-float),
        .alignleft:not(.keep-float) {
          display: block !important;
          float: none !important;
          margin-left: auto !important;
          margin-right: auto !important;
          margin-bottom: 20px !important;
        }
      }

      &.desktop {
        transition: 0.4s;

        .hide-on-desktop {
          filter: grayscale(1);
          opacity: 0.5;
        }
      }
    }

    #builder-content {

      min-height: 40px;

      p:first-child {
        //margin-top: 0;
      }

      img {
        max-width: 100%;
      }

      .block-placeholder {
        background-color: $primary-blue-50;
        border-radius: 2px;
        width: 100%;
        height: 5px;
        margin: 15px 0;
        box-sizing: border-box;
      }

      .builder-block {
        position: relative;

        &:not(:hover) {
          overflow: hidden;
        }

        .block-inner-content {
          margin: auto;
        }

        div.block-labels {
          position: absolute;
          top: 0;
          right: 0;
          left: auto;
          display: flex;
          flex-direction: column;

          > div {
            height: 22px;
            width: 22px;
            padding: 2px;

            &:last-child {
              border-bottom-left-radius: 5px;
            }
          }
        }

        &:has( > div.block-labels > div.filters-enabled ) {
          outline: 1px solid $secondary-purple;
        }

        div.filters-enabled {
          background-color: $secondary-purple;
          color: #fff;
        }

        &:has( > div.block-labels > div.is-global-block-label ){
          outline: 1px solid $benchmark-orange;
        }

        div.is-global-block-label {
          background-color: $benchmark-orange;
          color: #fff;
        }

        &[data-type="global"] {
          > div {
            outline: 2px dashed $benchmark-orange;
            outline-offset: -2px;

            > .children {
              outline: none;
            }
          }
        }

        &[data-type="image"] .ui-wrapper {
          display: inline-block;
        }

        &[data-type="spacer"] {
          .spacer-block {
            background-color: $primary-dark-15;
          }
        }

        &[data-type="text"] {

          h1 {
            //line-height: 1.2;
          }

          h2, h4 {
            //line-height: 1.3;
          }

          button.edit-text-content {
            display: none;
          }

          &:hover button.edit-text-content {
            display: inline-block;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
          }

          > .maybe-edit-text,
          > .text-content-wrap {
            > *:last-child {
              margin-bottom: 0;
            }

            > *:first-child {
              margin-top: 0;
            }
          }

          &.is-editing {
            .mce-top-part {
              position: sticky;
              top: 0;
              left: 0;
            }

            .wp-editor-tabs {
              button {
                box-sizing: content-box !important;
              }
            }
          }
        }

        &[data-type="html"] {
          min-height: 30px;

          button.edit-html-content {
            display: none;
          }

          &:hover button.edit-html-content {
            display: inline-block;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
          }

          .maybe-edit-html {
            min-height: 30px;
          }
        }

        &:not(:has(.builder-block)) {
          > .block-toolbar {

            .move-block {
              right: 0;
              left: initial;
              transform: translate(50%, -50%);
              border-radius: 50%;
            }

            span.block-type {
              //right: 0;
              top: initial;
              bottom: 0;
              transform: translateY(100%);
              border-radius: 0 0 3px 3px;
            }
          }
        }

        .email-button {
          display: inline-block;
        }

        .email-columns {

          display: table;
          table-layout: fixed;
          width: 100%;

          &-row {
            display: table-row;
          }

          &-cell {
            display: table-cell;
            vertical-align: top;
          }

        }

        img {
          display: inline-block;
        }

        .children.empty,
        .column.empty {
          background-color: $primary-dark-5;
          border-radius: 5px;
          height: 40px;
          margin: 5px;
          min-width: 40px;
        }

        .children {
          outline: 2px dashed $primary-dark-15;
        }

        .block-toolbar {

          display: none;

          .block-buttons {
            display: none;
          }

          span.block-type {
            position: absolute;
            right: -2px;
            top: 0;
            border-radius: 3px 3px 0 0;
            transform: translateY(-100%);
            display: inline-block;
            font-size: 12px;
            padding: 2px 6px;
            background-color: $primary-blue-60-hex;
            color: #fff;
            z-index: 99;
            box-shadow: $box-shadow;
          }

          .insert-block {
            display: flex;
            justify-content: center;
            align-items: center;
            border: none;
            padding: 6px;
            line-height: 1;
            border-radius: 3px 3px 0 0;
            position: absolute;
            color: #FFF;
            background-color: $primary-blue-60-hex;
            z-index: 99;
            box-shadow: $box-shadow;

            @include small-dashicons;

            &.insert-before {
              left: 50%;
              top: 0;
              transform: translateY(-100%) translateX(-50%);
            }

            &.insert-after {
              left: 50%;
              bottom: 0;
              top: auto;
              border-radius:  0 0 3px 3px;
              transform: translateY(100%) translateX(-50%);
            }
          }

          .move-block {
            display: flex;
            border: none;
            padding: 6px;
            border-radius: 0 30px 30px 0;
            text-align: right;
            cursor: grab;
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            color: #FFF;
            background-color: $primary-blue-60-hex;
            z-index: 99;
            box-shadow: $box-shadow;

            svg {
              height: 20px;
              width: 20px;
            }
          }
        }

        &.inspector-hover,
        &:hover:not(:has(.builder-block:hover)) {
          //transition: 0.4s;
          //z-index: 10;
          outline: 2px solid $primary-blue-60-hex;

          > .block-toolbar {
            display: block;
            background-color: $primary-blue-60-hex;
          }
        }

        &.inspector-hover,
        &:has(.inspector-hover),
        &:has(.is-editing) {
          overflow: visible;
        }

        &.inspector-hover {
          > .block-toolbar {
            .move-block {
              display: none;
            }
          }
        }

        &.is-editing {
          //transition: 0.4s;
          outline: 2px solid $primary-blue !important;
          overflow: visible;
          z-index: 9;

          &:not(:has(.builder-block)) {
            > .block-toolbar .block-buttons {
              top: initial;
              bottom: -2px;
              right: -2px;
              transform: translateY(100%);
              z-index: 99;
              //border-radius: 0 0 3px 3px;

              button {
                &:last-child {
                  border-top-right-radius: 0;
                  border-bottom-right-radius: 4px;
                }

                &:first-child {
                  border-top-left-radius: 0;
                  border-bottom-left-radius: 4px;
                }
              }
            }
          }

          > .block-toolbar {
            display: block;

            .move-block {
              color: #FFF;
              background-color: $primary-blue;
            }

            .insert-block {
              color: #FFF;
              background-color: $primary-blue;
            }

            span.block-type {
              display: none;
            }

            .block-buttons {
              position: absolute;
              display: flex;
              top: -2px;
              right: -2px;
              transform: translateY(-100%);
              z-index: 99;
              //border-radius: 0 0 3px 3px;

              button {
                //height: 16px;
                //width: 16px;
                --dashicon-size: 14px;
                //padding: 4px;
                line-height: 1;
                border-radius: 0;

                &:last-child {
                  border-top-right-radius: 4px;
                }

                &:first-child {
                  border-top-left-radius: 4px;
                }

                span.dashicons {
                  width: var(--dashicon-size);
                  height:  var(--dashicon-size);
                  font-size:  var(--dashicon-size);

                  &::before {
                    width:  var(--dashicon-size);
                    height:  var(--dashicon-size);
                    font-size:  var(--dashicon-size);
                  }
                }
              }
            }
          }
        }

        .dynamic-content-loader {
          position: relative;

          &:empty {
            min-height: 50px;
          }

          &::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            animation: skeleton-loading 1s linear infinite alternate;
          }
        }
      }
    }
  }
}

#controls-panel {
  width: 320px;
  //padding: 0 10px;
  overflow-y: auto;
  flex-shrink: 0;
  background: #fff;
  z-index: 1;

  h3 {
    padding-left: 10px;
  }

  a {
    text-decoration: none;
    &:hover {
      text-decoration: underline;
    }
  }

  border-left: 1px solid $primary-dark-15;

  .controls-nav {
    display: flex;
    background: #fff;
    align-items: center;
    padding: 10px 3px 0 10px;
    box-shadow: $box-shadow;
    gap: 3px;

    h2.breadcrumbs {
      margin: 0 auto 0 0;
      display: flex;
      gap: 3px;
      font-size: 13px;
      align-items: center;
      font-weight: 400;
      text-transform: uppercase;

      span.slash {
        color: $primary-dark-50;
        font-size: 12px;
      }
    }

    .gh-button-nav {
      display: flex;
      gap: 3px;

      button.tab {

        //border-radius: 0 0;
        border: 1px solid $primary-dark-15;
        border-bottom-width: 0;
        background: $primary-dark-5;
        font-size: 14px;
        padding: 6px 12px;
        border-radius: 2px 2px 0 0;

        &.active {
          font-weight: 500;
          background: #fff;
          box-shadow: 0 2px 0 -1px #fff;
          z-index: 1;
        }
      }

      .active .dashicons-admin-settings{
        outline: 2px solid $primary-dark-50;
        border-radius: 4px;
      }
    }
  }

  .control-group:not(.closed) {
    .controls {
      display: flex;
      flex-direction: column;
      gap: 10px;

      &.inside:has(.CodeMirror ) {
        padding-left: 0;
        padding-right: 0;
        padding-top: 0;

        p {
          padding: 0 20px;
        }
      }

      p {
        margin: 0;
      }

      hr {
        width: calc(100% + 40px);
        margin: 3px -20px;
      }

      .space-between {
        gap: 10px;
      }

      label {
        font-weight: 500;

        .gh-tooltip {
          max-width: 180px;
        }
      }

      .layouts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        grid-auto-rows: 1fr;
        gap: 20px;
        grid-auto-flow: row;
        grid-template-areas:
    ". ."
    ". .";

        .layout-choice {
          display: grid;
          gap: 7px;
          padding: 0;

          border: none;
          background: none;

          span.col {
            background-color: $primary-dark;
            border-radius: 3px;
            height: 33px;
            display: block;
          }

          &:hover {
            span {
              background-color: $primary-blue-50;
            }
          }

          &.selected {
            span {
              background-color: $primary-blue;
            }
          }

          &.three_columns {
            grid-template-columns: repeat(3, 1fr);
          }

          &.four_columns {
            grid-template-columns: repeat(4, 1fr);
          }

          &.three_columns_center {
            grid-template-columns: 1fr 2fr 1fr;
            grid-template-columns: 1fr 2fr 1fr;
          }

          &.three_columns_left {
            grid-template-columns: 2fr 1fr 1fr;
          }

          &.three_columns_right {
            grid-template-columns: 1fr 1fr 2fr;
          }

          &.two_columns {
            grid-template-columns: 1fr 1fr;
          }

          &.two_columns_right {
            grid-template-columns: 1fr 2fr;
          }

          &.two_columns_left {
            grid-template-columns: 2fr 1fr;
          }

          &.custom_columns {
            grid-template-columns: 2fr 1fr 3fr 1.5fr;
          }
        }
      }
    }

  }

  > .gh-panel {
    border-radius: 0;
    box-shadow: none;
    border: solid $primary-dark-15;
    border-width: 1px 0 0 0;

    &:last-of-type {
      border-bottom-width: 1px;
    }
  }

  .control-input {
    max-width: 75px;
  }

  .wp-picker-container.wp-picker-active {
    position: relative;

    .wp-picker-holder,
    .wp-picker-input-wrap {
      position: absolute;
      z-index: 99;
      right: 0;
      top: 30px;

      * {
        box-sizing: content-box;
      }
    }

    .wp-picker-input-wrap {
      display: flex;
      box-sizing: border-box;
      width: 202px;
      background-color: #FFFFFF;
      border: 1px solid #dcdcde;
      border-bottom: none;
      padding: 6px;
    }

    .wp-picker-holder {
      top: 65px;

      .iris-picker {
        border-top: none;
      }
    }


  }

}


$margin: 1rem;

@mixin panel() {
  background: #FFFFFF;
  border-radius: 5px;
  box-shadow: 5px 5px 30px rgba(24, 45, 70, 0.05);
  margin-bottom: $margin;
  padding: 20px;
}

body {
  background: $primary-blue-2;

  #wpcontent {
    padding: 0;
  }

  .test-email-address-wrap {
    display: flex;
    gap: 10px;

    #initiate-test {
      gap: 0;
      display: flex;
    }
  }

  iframe#preview {
    &.mobile {
      height: 600px;
      width: 350px;
    }

    &.desktop {
      height: 600px;
      width: 800px;
    }
  }
}

#wpfooter {
  display: none;
}

#email-editor {

  &:has(#email-html-editor) {
    display: flex;
    flex-direction: column;

    #email-html-editor {
      flex-grow: 1;
      align-items: stretch;
      height: calc(100vh - 32px - 60px);
    }
  }

  .gh-header {
    @include panel();
    padding: 0 10px 0 0;
    border-radius: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0;
    //position: relative;
    z-index: 100;

    > svg {
      height: 60px;
      padding: 10px;
      box-sizing: border-box;
      //border-right: 1px solid #ccd0d4;
      flex-shrink: 0;
      background-color: $primary-dark;
    }

    .show-preview {
      width: 35px;
    }

    #send-test {
      padding-left: 10px;
      padding-right: 10px;
    }

    .admin-title-wrap {
      font-size: 20px;
      line-height: 44px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      #admin-title {
        font-weight: 600;
      }

      #admin-title-edit {
        font-size: 20px;
        width: 100%;
      }

      width: 100%;
    }

    .actions {
      align-items: center;
      display: flex;
      gap: 10px;
      justify-content: space-between;
    }
  }

  input[type=text],
  select {
    max-width: 100%;
  }

  .email-editor-p {
    line-height: 1.5;
    margin: 1em 0;
  }

  &-main {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }

  &-sidebar {
    //@include panel();
    flex-basis: 300px;
    flex-shrink: 0;
  }

  &-content {
    @include panel();
    flex: 1;
  }

  &-controls {
    @include panel();
  }

  &-sidebar {

    label {
      display: block;
      padding-bottom: .382rem;
    }

    &-controls {
      //display: flex;
      //gap: 10px;

      button {

        &:first-child {
          flex-grow: 1;
        }

        flex-basis: 40px;
        justify-content: center;
        display: flex;
        align-items: center;
        padding: 6px;
      }
    }

    &-options {
      display: flex;
      gap: 20px;

    }

    &-message_type {
      flex-grow: 1;
    }
  }

  &-advanced {
    @include panel();
    margin-top: 20px;
  }

  .inline-label {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(16, 38, 64, 0.15);
    align-items: center;
    padding-bottom: 5px;
    margin-bottom: 10px;

    &:focus-within {
      border-color: $primary-blue;
    }

    label {
      font-weight: 500;
      font-size: 18px;
    }

    .input-wrap {

      width: 100%;

      button {
        background: none;
        border: none;
        opacity: 0.5;

        &:hover,
        &:focus {
          opacity: 1;
        }
      }

      input {
        width: 100%;
        box-shadow: none;
        border: none;
        font-size: 18px;
        outline: 0;
        padding: 0;
      }
    }
  }
}

.gh-modal-frame {
  #email-editor {
    background: #F6F9FB;
    border-radius: 5px;
    overflow: hidden;
    width: 90vw !important;
    height: 85vh !important;

    &:has(#email-block-editor),
    &:has(#email-html-editor) {
      position: relative;
      left: initial;
      right: initial;
      top: initial;
      bottom: initial;
    }

    &:has(#template-grid) {
      overflow: auto;

      .gh-header {
        top: 0
      }
    }

    #email-html-editor,
    #email-block-editor {
      height: calc(100% - 60px) !important;
    }
  }
}

.cards .post-card img {
  display: block;
  vertical-align: bottom;
}

.post-thumbnail {
  max-width: 100%;
}

#template-grid {

  padding: 20px;

  .gh-panel {
    overflow: hidden;
  }

  p {
    text-align: center;
    font-size: 16px;
  }

  .template {
    --scale-factor: 0.5;
    position: relative;
    cursor: pointer;

    .overlay {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      bottom: 0;
    }

    iframe.template-preview {
      //transform: scale(var(--scale-factor));
      //width: calc(1 / var(--scale-factor) * 100%);
      height: 500px;
      width: 100%;
      //zoom: 50%;
      //transform-origin: top left;
    }

    &:hover {

      z-index: 99;

      .gh-panel {
        position: absolute;
        left: 0;
        right: 0;
        box-shadow: 5px 5px 30px 0 rgba(24, 45, 70, 0.10);
        outline: 2px solid $primary-blue;
      }

      iframe {
        height: 496px;
      }

      p {
        font-weight: 500;
        color: $primary-blue;
      }
    }
  }
}

@media only screen and (min-width: 2000px) {
  #email-editor .display-grid {
    grid-template-columns: repeat( 24, 1fr );
  }
}

@media only screen and (max-width: 2000px) {
  #email-editor .display-grid {
    grid-template-columns: repeat( 20, 1fr );
  }
}

@media only screen and (max-width: 1600px) {
  #email-editor .display-grid {
    grid-template-columns: repeat( 16, 1fr );
  }
}

@media only screen and (max-width: 1200px) {
  #email-editor .display-grid {
    grid-template-columns: repeat( 12, 1fr );
  }
}

//@media only screen and (max-width: 1200px) {
//  .display-grid {
//    grid-template-columns: repeat( 12, 1fr );
//  }
//}

.font-controls {

  width: 250px;

  .control-label {
    font-weight: 500;
  }

  .font-control {
    max-width: 100px;
  }
}

#email-editor-global-fonts {
  .font {
    span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .danger {
      display: none;
    }

    &:hover {
      .danger {
        display: inline-block;
      }
    }
  }
}

.global-font-select {
  overflow-y: auto;
  width: 240px;

  .select-font {
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
    padding: 6px 12px;
    white-space: nowrap;

    &.selected {
      color: $primary-blue;
    }

    &:hover {
      background: $primary-dark-15;
    }
  }
}


.gh-modal.mini .gh-modal-dialog:has(.block-inspector),
.gh-modal.mini .gh-modal-dialog:has(.global-font-select) {
  padding: 0;
}


.block-inspector {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-left: 1px solid $primary-dark-15;
  overflow-y: auto;
  flex-shrink: 0;

  .inspector-block {
    display: flex;
    gap: 5px;
    border-width: 0 0 1px 0;
    border-radius: 0;
    padding: 6px 12px;
    border-color: $primary-dark-15;
    background-color: $primary-dark-5;
    width: 100%;
    color: $primary-dark;
    align-items: center;

    &:hover {
      background-color: $primary-dark-15;
    }

    svg {
      height: 14px;
      width: 14px;
    }

    &.active {
      background-color: $primary-blue;
      color: #fff;
    }
  }

  .inspector-columns:has( > .inspector-block.active ),
  .inspector-parent:has( > .inspector-block.active )
  {
    border: 1px solid $primary-blue;
  }

  .inspector-column {
    //padding-left: 16px;4
    > div.column-header {
      padding: 3px 8px;
      border-bottom: 1px solid $primary-dark-15;
      //padding-left: calc( 12px * ( 12px * var(--depth) ));
    }

    > .inspector-block {
      //padding-left: calc( 24px + ( 12px * var(--depth) ));
    }
  }
}

.social-icon-themes-grid {

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  grid-auto-rows: 1fr;

  .social-icon-theme {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px !important;

    &:not(.primary)#select-white-icons,
    &:not(.primary)#select-white-circle,
    &:not(.primary)#select-white-boxed {
      background-color: $primary-dark-15;
    }
  }
}

.social-icon-picker {
  &.white-icons,
  &.white-circle,
  &.white-boxed {
    background-color: $primary-dark-10;
  }
}

.number-control {
  input[type=number] {
    padding-right: 0;
    width: 50px;
    text-align: center;
  }

  .unit {
    background: $primary-dark-5;
    color: $primary-dark;
    border: 1px solid $primary-dark-50;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gh-button {
    display: flex;
    align-items: center;

    .dashicons {
      font-size: 13px;
      width: 13px;
      height: 13px;
    }
  }
}

.preview {

  display: flex;
  flex-direction: column;
  align-items: stretch;

  &.mobile,
  &.desktop {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
  }

  iframe {
    height: 100%;
    width: 100%;
  }

  .from-preview {
    padding: 20px;
    position: relative;

    h2 {
      margin: 0 0 10px 0;
    }

    .from-email {
      opacity: 0.7;
    }
  }
}

#test-type-explanation {
  p {
    font-size: 14px;
  }
}
