@import '../../base/bootstrap5.3-dark-lite.scss';
/*! component's theme wise override tailwind-definitions and variables */

// Generic
$icon-zero: 0 !default;
$icon-border-radius: 50% !default;
$grid-layout-position: relative !default;
$panel-position: absolute !default;
$panel-box-sizing: border-box !default;

// Header styles

// Mouse
$panel-header-height: 38px !default;
$panel-header-padding: 8px 18px !default;
$panel-header-line-height: 22px !default;
$panel-header-border-radius: 4px !default;
$panel-header-color: $content-text-color !default;
$panel-header-font-size: $text-base !default;
$panel-header-bg-color: $content-bg-color !default;
$panel-header-font-weight: $font-weight-normal !default;
$panel-header-border-bottom: 1px solid $border-light !default;
$panel-header-font-family: $font-family !default;
$panel-header-white-space: nowrap !default;
$panel-header-overflow: hidden !default;
$panel-header-text-overflow: ellipsis !default;

// Touch
$panel-bigger-header-height: 44px !default;
$panel-bigger-header-padding: 8px 18px !default;
$panel-bigger-header-line-height: 24px !default;
$panel-bigger-header-color: $content-text-color !default;
$panel-bigger-header-font-size: $text-base !default;
$panel-bigger-header-font-weight: $font-weight-normal !default;

// Panel styles
$panel-border: 1px solid $border-light !default;
$panel-border-radius: 4px !default;
$panel-full-height: 100% !default;
$panel-full-width: 100% !default;
$panel-hover-border: 1px solid $border-dark !default;
$panel-active-border: 1px solid $primary-border-color !default;

// icons styles
$panel-resize-one-dimensional-icon-height: 8px !default;
$panel-resize-one-dimensional-icon-width: 8px !default;
$panel-resize-one-dimensional-icon-background: none !default;
$panel-resize-one-dimensional-icon-border: none !default;
$panel-resize-one-dimensional-icon-shadow: none !default;

$panel-resize-two-dimensional-icon-height: 8px !default;
$panel-resize-two-dimensional-icon-width: 8px !default;
$panel-resize-two-dimensional-inner-icon-height: 8px !default;
$panel-resize-two-dimensional-inner-icon-width: 8px !default;
$panel-resize-two-dimensional-icon-background: none !default;
$panel-resize-two-dimensional-icon-color: $icon-color-disabled !default;
$panel-resize-two-dimensional-icon-border: none !default;
$panel-resize-two-dimensional-icon-shadow: none !default;

// south-east-icon-styles
$panel-south-east-icon-right: 2px !default;
$panel-south-east-icon-bottom: 2px !default;

// south-west-icon-style
$panel-south-west-icon-left: 2px !default;
$panel-south-west-icon-bottom: 2px !default;

// north-east-icon-styles
$panel-north-east-icon-right: 2px !default;
$panel-north-east-icon-top: 2px !default;

// north-west-icon-styles
$panel-north-west-icon-left: 2px !default;
$panel-north-west-icon-top: 2px !default;

// droppable area border
$panel-drop-border-radius: 4px !default;

// dragging element style
$panel-dragging-cursor: move !default;
$panel-drag-prevent: none !default;

// Blazor ContentTemplate styles
$panel-content-template-height: inherit !default;
$panel-content-template-width: inherit !default;

/* stylelint-disable */
$panel-dragging-zindex: 1111 !important !default;
$panel-drag-prevent: none !default;

$element-width-complete: 100% !important !default;

// colors

// Panel styles
$panel-active-background: $flyout-bg-color !default;
$panel-hover-box-shadow: $shadow !default;
$panel-active-drag-box-shadow: $shadow !default;
$panel-background: $flyout-bg-color !default;
$panel-box-shadow: $shadow-sm;

// droppable area border
$panel-drop-background: $primary-lighter !default;
$panel-drop-border: 1px $primary-border-color dashed !default;

//gridlines
$gridline-background: $content-bg-color-alt1 !default;
$gridline-border: $border-dark !default;
$gridline-border-radius: 6px !default;

@include export-module('dashboardlayout-layout') {
  .e-dashboardlayout.e-control {

    .e-dashboard-gridline-table {
      background: $gridline-background;
      border-collapse: collapse;
      height: $panel-full-height;
      width: $panel-full-width;

      td.e-dashboard-gridline {
        @if ($skin-name == 'tailwind' or $skin-name == 'tailwind3' or $skin-name == 'bootstrap5' or $skin-name == 'Material3') {
          border: 1px dashed $gridline-border;
        }
        @else {
          border: 1px dotted $gridline-border;
        }
  
        @if ($skin-name == 'bootstrap5' or $skin-name == 'fluent2') {
          border-radius: $gridline-border-radius;
        }
        position: absolute;
      }
    }

    &.e-responsive {
      width: $element-width-complete;
    }

    &.e-prevent {
      user-select: $panel-drag-prevent;
    }

    & .e-panel.e-ssr {
      position: relative;
    }

    & .e-panel {
      border: $panel-border;
      height: $panel-full-height;
      user-select: none;
      width: $panel-full-width;

      & .e-resize.e-dl-icon {
        @if ($skin-name == 'tailwind') {
          line-height: 9px;
        }
      }

      &:hover {
        @if ($skin-name != 'tailwind' and $skin-name != 'fluent2') {
          border: $panel-hover-border;
        }
        @if ($skin-name == 'tailwind' or $skin-name == 'bootstrap5' or $skin-name == 'FluentUI' or $skin-name == 'Material3' or $skin-name == 'fluent2') {
          box-shadow: $panel-hover-box-shadow;
        }
        @if $skin-name == 'fluent2' {
          background: $panel-hover-background;
        }

        & .e-panel-container {
          & .e-resize.e-dl-icon {
            display: block;
          }
        }
      }

      &:active {
        @if ($skin-name != 'tailwind' or $skin-name != 'tailwind3') {
          border: $panel-active-border;
        }
      }

      & .e-panel-container {
        height: $panel-full-height;
        width: $panel-full-width;

        & .e-panel-content{
          @if $skin-name == 'tailwind' {
            padding: $panel-content-padding;
          }

          .e-blazor-template {
            height: $panel-content-template-height;
            width: $panel-content-template-width;
          }
        }

        & .e-resize.e-dl-icon {
          display: none;
        }
      }

      @if $skin-name != 'highcontrast' {
        border-radius: $panel-border-radius;
      }

      &.e-panel-transition {
        transition: top .1s, left .1s;
      }

      & .e-panel-header {
        border-bottom: $panel-header-border-bottom;
        color: $panel-header-color;
        font-family: $panel-header-font-family;
        font-size: $panel-header-font-size;
        font-weight: $panel-header-font-weight;
        height: $panel-header-height;
        padding: $panel-header-padding;
        @if ($skin-name == 'tailwind' or $skin-name == 'tailwind3') {
          line-height: $panel-header-line-height;
        }

        @if ($skin-name == 'bootstrap5' or $skin-name == 'tailwind' or $skin-name == 'Material3') {
          border-top-left-radius: $panel-header-border-radius;
          border-top-right-radius: $panel-header-border-radius;
        }

        & div {
          overflow: $panel-header-overflow;
          text-overflow: $panel-header-text-overflow;
          white-space: $panel-header-white-space;
        }

        & .e-header-content {
          display: inline-block;
        }

        & .e-header-template {
          float: right;
        }
      }

      & .e-resize.e-single,
      & .e-resize.e-double {
        position: $panel-position;
        touch-action: none;

        &.e-east,
        &.e-west,
        &.e-north,
        &.e-south {
          border: $panel-resize-one-dimensional-icon-border;
        }

        &.e-east:hover {
          cursor: e-resize;
        }

        &.e-west:hover {
          cursor: w-resize;
        }

        &.e-north:hover {
          cursor: n-resize;
        }

        &.e-south:hover {
          cursor: s-resize;
        }

        &.e-north-west:hover {
          cursor: nw-resize;
        }

        &.e-north-east:hover {
          cursor: ne-resize;
        }

        &.e-south-west:hover {
          cursor: sw-resize;
        }

        &.e-south-east:hover {
          cursor: se-resize;
        }
      }

      & .e-resize.e-single::before,
      & .e-resize.e-double::before {
        font-family: 'e-icons';
        position: $panel-position;
      }

      &.e-dragging,
      &.e-item-moving {
        cursor: $panel-dragging-cursor;
        z-index: $panel-dragging-zindex;
        @if $skin-name == 'fluent2' {
          border: none;
        }
      }

      &.e-rtl {
        & .e-panel-header {
          & .e-header-template {
            float: left;
          }
        }
      }
    }

    & .e-drag:hover {
      cursor: $panel-dragging-cursor;
    }

    & .e-drag-restrict {
      &.e-drag:hover,
      .e-drag:hover {
        cursor: default;
      }
    }

    .e-holder {
      background: $panel-drop-background;
      border: $panel-drop-border;
      border-radius: $panel-drop-border-radius;
      position: $panel-position;

      &.e-holder-transition {
        transition: top .3s, left .3s;
      }

      @if $skin-name != 'highcontrast' {
        border-radius: $panel-border-radius;
      }
    }
  }

  .e-content-placeholder.e-dashboardlayout.e-placeholder-dashboardlayout {
    height: $panel-full-height;
    width: $panel-full-width;
  }
}


@include export-module('dashboardlayout-theme') {
  .e-dashboardlayout.e-control {
    display: block;
    position: $grid-layout-position;

    & .e-panel {
      background: $panel-background;
      box-shadow: $panel-box-shadow;
      box-sizing: $panel-box-sizing;
      position: $panel-position;

      & .e-panel-container {
        & .e-panel-header {
          color: $panel-header-color;
          @if ($skin-name == 'tailwind' or $skin-name == 'bootstrap5' or $skin-name == 'Material3' or $skin-name == 'Material3-dark') {
            background: $panel-header-bg-color;
            box-sizing: $panel-box-sizing;
          }
        }

        & .e-resize.e-single {
          background: none;
        }

        & .e-resize.e-double {
          color: $panel-resize-two-dimensional-icon-color;
          font-size: $panel-resize-two-dimensional-inner-icon-height;
          height: $panel-resize-two-dimensional-icon-height;
          width: $panel-resize-two-dimensional-icon-width;

          &.e-south-east-double {
            bottom: $panel-south-east-icon-bottom;
            right: $panel-south-east-icon-right;
          }

          &.e-south-west-double {
            bottom: $panel-south-west-icon-bottom;
            left: $panel-south-west-icon-left;
          }

          &.e-north-west-double {
            left: $panel-north-west-icon-left;
            top: $panel-north-west-icon-top;
          }

          &.e-north-east-double {
            right: $panel-north-east-icon-right;
            top: $panel-north-east-icon-top;
          }

          &.e-north-east-shrink {
            right: $panel-north-east-icon-right;
            top: $panel-north-east-icon-top;
          }

          &.e-north-west-shrink {
            left: $panel-north-west-icon-left;
            top: $panel-north-west-icon-top;
          }

          &.e-south-west-shrink {
            bottom: $panel-south-west-icon-bottom;
            left: $panel-south-west-icon-left;
          }

          &.e-south-east-shrink {
            bottom: $panel-south-east-icon-bottom;
            right: $panel-south-east-icon-right;
          }

          &.e-north-east-expand {
            right: $panel-north-east-icon-right;
            top: $panel-north-east-icon-top;
          }

          &.e-north-west-expand {
            left: $panel-north-west-icon-left;
            top: $panel-north-west-icon-top;
          }

          &.e-south-west-expand {
            bottom: $panel-south-west-icon-bottom;
            left: $panel-south-west-icon-left;
          }

          &.e-south-east-expand {
            bottom: $panel-south-east-icon-bottom;
            right: $panel-south-east-icon-right;
          }
        }
      }

      &:active {
        @if ($skin-name == 'tailwind' or $skin-name == 'tailwind3' or $skin-name == 'bootstrap5' or $skin-name == 'FluentUI' or $skin-name == 'fluent2') {
          background: $panel-active-background;
          @if ($skin-name == 'tailwind3') {
            box-shadow: $shadow-md;
          }
        }
      }

      &.e-dragging {
        &:active {
          @if ($skin-name == 'tailwind') {
            background: $content-bg-color;
            box-shadow: $panel-active-drag-box-shadow;
          }
          @else if ($skin-name == 'tailwind3') {
            background: $panel-active-background;
            box-shadow: $shadow-md;
          }
        }
      }
    }
  }
}


@include export-module('dashboardlayout-bootstrap5-icons') {
  .e-dashboardlayout.e-control {
    & .e-panel {

      & .e-resize.e-single,
      & .e-resize.e-double {
        &.e-east {
          height: 100%;
          padding: 20px 0;
          right: 1px;
          top: 0;
          width: 12px;
        }

        &.e-west {
          height: 100%;
          left: 0;
          padding: 20px 0;
          top: 0;
          width: 12px;
        }

        &.e-north {
          height: 12px;
          padding: 0 20px;
          top: 1px;
          width: 100%;
        }

        &.e-south {
          bottom: 1px;
          height: 12px;
          padding: 0 20px;
          width: 100%;
        }

        &.e-south-east {
          bottom: 0;
          right: 1px;
          z-index: 10;
        }

        &.e-north-west {
          left: 2px;
          top: 2px;
          z-index: 10;
        }

        &.e-north-east {
          right: 2px;
          top: 2px;
          z-index: 10;
        }

        &.e-south-west {
          bottom: 1px;
          left: 1px;
          z-index: 10;
        }

        &.e-south-east::before {
          bottom: 4px;
          content: '\e761';
          font-size: 12px;
          position: absolute;
          right: 4px;
        }

        &.e-south-west::before {
          bottom: 4px;
          content: '\e761';
          font-size: 12px;
          left: 4px;
          position: absolute;
          transform: rotateY(180deg);
        }
      }
    }
  }
}

