/**
 * Copyright © 2016-2023 The Thingsboard Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/* You can add global styles to this file, and also import other style files */

@import '~typeface-roboto/index.css';
@import '~font-awesome/css/font-awesome.min.css';
@import 'theme.scss';
@import './scss/constants';
@import './scss/animations';
@import './scss/mixins';
@import './scss/fonts';

body, html {
  height: 100%;
  min-height: 100%;
  position: relative;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;

  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: #eee;
  overflow: hidden;
}

tb-root {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
}

/***************
 * TYPE DEFAULTS
 ***************/

body,
button,
html,
input,
select,
textarea,
td,
th {
  font-family: Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
}

body {
  line-height: normal;
}

a:not(.mat-mdc-button-base) {
  font-weight: 400;
  color: #106cc8;
  text-decoration: none;
  border-bottom: 1px solid rgba(64, 84, 178, .25);

  transition: border-bottom .35s;
}

a:hover,
a:focus {
  &:not(.mat-mdc-button-base) {
    border-bottom: 1px solid #4054b2;
  }
}

p {
  margin: .8em 0 1.6em;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.6em;
  letter-spacing: .01em;
}

strong {
  font-weight: 500;
}

blockquote {
  padding-left: 16px;
  margin-left: 0;
  font-style: italic;
  border-left: 3px solid rgba(0, 0, 0, .12);
}

fieldset {
  padding: 0;
  margin: 0;
  border: none;
}

.fields-group {
  display: grid;
}

section.tb-header-buttons {
  position: absolute;
  top: 86px;
  right: 0;
  z-index: 3;
  pointer-events: none;

  @media #{$mat-gt-sm} {
    top: 86px;
  }

  .tb-btn-header {
    margin: 6px 8px;
    position: relative !important;
    animation: tbMoveFromTopFade .3s ease both;

    &.tb-hide {
      animation: tbMoveToTopFade .3s ease both;
    }
  }
}

section.tb-footer-buttons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  pointer-events: none;

  .tb-btn-footer {
    margin: 6px 8px;
    position: relative !important;
    animation: tbMoveFromBottomFade .3s ease both;
    &.tb-hide {
      animation: tbMoveToBottomFade .3s ease both;
    }
  }
}


.tb-details-buttons {
  button {
    margin: 6px 8px;
  }
}

label {
  &.tb-title {
    padding-bottom: 15px;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    pointer-events: none;

    &.no-padding {
      padding-bottom: 0;
    }

    &.tb-required::after {
      font-size: 13px;
      color: rgba(0, 0, 0, .54);
      vertical-align: top;
      content: " *";
    }

    &.tb-error {
      color: rgb(221, 44, 0);

      &.tb-required::after {
        color: rgb(221, 44, 0);
      }
    }
  }
  &.tb-small {
    font-size: 12px;
    color: rgba(0, 0, 0, .54);
    pointer-events: none;
  }
}

.tb-noselect {
  user-select: none;
}

.tb-readonly-label {
  color: rgba(0, 0, 0, .54);
}

.tb-disabled-label {
  color: rgba(0, 0, 0, .44);
}

div {
  &.tb-small {
    font-size: 14px;
    color: rgba(0, 0, 0, .54);
  }
}

.tb-hint {
  padding: 0 16px 16px;
  font-size: var(--mdc-typography-caption-font-size, 12px);
  line-height: var(--mdc-typography-caption-line-height, 20px);
  font-weight: var(--mdc-typography-caption-font-weight, 400);
  letter-spacing: var(--mdc-typography-caption-letter-spacing, 0.0333333333em);
  color: rgba(0, 0, 0, 0.6);
  white-space: normal;
}

.mat-caption {
  &.tb-required::after {
    font-size: 10px;
    color: rgba(0, 0, 0, .54);
    vertical-align: top;
    content: " *";
  }
}

pre.tb-highlight {
  display: block;
  padding: 15px;
  margin: 20px 0;
  overflow-x: auto;
  background-color: #f7f7f7;

  code {
    box-sizing: border-box;
    display: inline-block;
    padding: 0;
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: #303030;
    vertical-align: bottom;
  }
}

.tb-notice {
  padding: 15px;
  font-size: 16px;
  background-color: #f7f7f7;
  border: 1px solid #ccc;
}

.ace_editor {
  font-size: 16px !important;
  letter-spacing: normal;
}

.tb-timewindow-panel, .tb-legend-config-panel, .tb-filter-panel, .tb-panel-container {
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
  box-shadow:
    0 7px 8px -4px rgba(0, 0, 0, .2),
    0 13px 19px 2px rgba(0, 0, 0, .14),
    0 5px 24px 4px rgba(0, 0, 0, .12);
}

.tb-panel-actions {
  margin-bottom: 0;
  padding: 8px 8px 8px 16px;
  .mat-button-base+.mat-button-base,
  .mat-mdc-button-base+.mat-mdc-button-base {
    margin-left: 8px;
  }
}

.tb-container {
  position: relative;
  padding: 10px 0;
  margin-top: 32px;
}

.tb-prompt {
  display: flex;
  font-size: 18px;
  font-weight: 400;
  line-height: 18px;
  color: rgba(0, 0, 0, .38);
  &.required {
    color: rgb(221, 44, 0);
  }
}

.tb-fullscreen {
  position: fixed !important;
  inset: 0 !important;
}

.tb-fullscreen-parent {
  background: #eee;
  z-index: 0;
}

mat-label {
  &.tb-title {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    pointer-events: none;

    &.no-padding {
      padding-bottom: 0;
    }

    &.tb-required::after {
      font-size: 13px;
      color: rgba(0, 0, 0, .54);
      vertical-align: top;
      content: " *";
    }

    &.tb-error {
      color: rgb(221, 44, 0);

      &.tb-required::after {
        color: rgb(221, 44, 0);
      }
    }
  }
}

mat-icon {
  &.tb-error {
    color: rgb(221, 44, 0);
  }
}

.tb-error-messages {
  height: 24px; //30px
  margin-top: -6px;
}

.tb-error-message {
  transition: all .3s cubic-bezier(.55, 0, .55, .2);
  padding: 10px 0 0 10px;
  overflow: hidden;
  font-size: 12px;
  line-height: 14px;
  color: rgb(221, 44, 0);
}

.mat-mdc-tooltip.tb-error-tooltip {
  .mdc-tooltip__surface {
    background-color: rgba(209, 39, 48, 0.12);
    color: rgba(209, 39, 48, 1);
  }
}

.tb-autocomplete {
  .mat-mdc-option {
    border-bottom: 1px solid #eee;
    .mdc-list-item__primary-text {
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  .mat-mdc-option.tb-not-found {
    padding: 0;
    border-bottom: none;
    .mdc-list-item__primary-text {
      display: block;
      .tb-not-found-content {
        padding: 8px 16px 7px;
        border-bottom: 1px solid #eee;
      }
    }
  }
}

.tb-ace-doc-tooltip {
  code {
    color: #444;
    &.title {
      font-size: 14px;
    }
  }
  div.tb-function-info {
    font-size: 14px;
  }
  div.tb-function-return {
    font-size: 1rem;
    letter-spacing: 0.03rem;
    color: #444;
    code {
      font-size: 14px;
      letter-spacing: normal;
    }
  }
  div.tb-api-title {
    font-weight: bold;
    font-size: 16px;
    color: #6e6e6e;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  table.tb-api-table {
    width: 100%;
    border-collapse: collapse;
    tr {
      border-bottom: 1px solid #a8a8a8;
      &:last-child {
        border-bottom: none;
      }
      td {
        font-size: 14px;
        line-height: 1.6rem;
        &:first-child {
          font-weight: 600;
          padding-left: 16px;
          width: 20%;
        }
        &.arg-description {
          font-size: 1rem;
          letter-spacing: .03rem;
          color: #444;
        }
      }
    }
  }
}

// Tooltipster

.tooltipster-sidetip.tooltipster-tb {
  .tooltipster-box {
    background: rgba(3, 8, 40, 0.64);
    border: none;
    border-radius: 4px;
    .tooltipster-content {
      padding: 4px 8px;
      font-size: 12px;
      line-height: 16px;
      font-weight: 500;
      color: #ffffff;
    }
  }
}

.tb-default, .tb-dark {

  /*********************************
   * MATERIAL DESIGN CUSTOMIZATIONS
   ********************************/

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    &, &.mat-headline-5 {
      margin-top: 1rem;
      margin-bottom: 1rem;
    }
  }

  h1 {
    font-size: 3.4rem;
    font-weight: 400;
    line-height: 4rem;
  }

  h2 {
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 3.2rem;
  }

  h3 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: .005em;
  }

  h4 {
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 2.4rem;
    letter-spacing: .01em;
  }

  h5 {
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 2rem;
    letter-spacing: .01em;
  }

  h6 {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6rem;
    letter-spacing: .01em;
  }

  .mat-mdc-tooltip {
    white-space: pre-line;
  }

  .tb-select-overlay {
    min-width: fit-content;
  }

  button {
    pointer-events: all;
  }

  button.mat-mdc-menu-item {
    font-size: 15px;
  }

  button.mat-mdc-fab.mat-fab-bottom-right {
    top: auto;
    right: 20px;
    bottom: 20px;
    left: auto;
    position: absolute;
  }

  .layout-padding, .layout-padding > * {
    @media #{$mat-lt-sm} {
      padding: 4px;
    }
    @media #{$mat-gt-xs} {
      padding: 8px;
    }
  }

  .mat-padding {
    padding: 8px;
    @media #{$mat-gt-sm} {
      padding: 16px;
    }
  }

  .mat-content {
    position: relative;
    overflow: auto;
  }

  .layout-wrap {
    flex-wrap: wrap;
  }

  mat-form-field.mat-block {
    display: block;
  }

  button.mat-mdc-menu-item {
    overflow: hidden;
    .mdc-list-item__primary-text {
      flex: 1;
      .tb-alt-text {
        float: right;
      }
    }
  }

  .mat-mdc-form-field-icon-prefix, .mat-mdc-form-field-icon-suffix {
    z-index: 1;
  }

  .mat-toolbar.mat-mdc-table-toolbar .mat-mdc-form-field.mat-form-field-appearance-fill,
  .mat-mdc-form-field.mat-form-field-appearance-fill.tb-appearance-transparent {
    .mdc-text-field--filled {
      &:before {
        content: none;
      }
      background-color: transparent;
      padding: 0;
    }
    .mat-mdc-form-field-focus-overlay {
      &:before {
        content: none;
      }
      background-color: transparent;
    }
    .mat-mdc-select-arrow-wrapper {
      transform: none;
    }
    .mdc-text-field {
      .mdc-floating-label:not(.mdc-floating-label--float-above) {
        transform: translateY(-10%);
      }
    }
    .mat-mdc-form-field-icon-prefix, .mat-mdc-form-field-icon-suffix {
      align-self: end;
      > .mat-icon {
        padding-bottom: 4px;
      }
      .mat-mdc-icon-button.mat-mdc-button-base {
        width: 36px;
        height: 36px;
        padding: 6px;
      }
    }
    .mat-mdc-text-field-wrapper {
      .mat-mdc-form-field-flex {
        .mat-mdc-floating-label {
          top: 32px;
        }
      }
      .mat-mdc-form-field-infix {
        padding-top: 28px;
        padding-bottom: 4px;
      }
    }
  }

  // Material table

  .mat-toolbar.mat-primary {
    button.mat-mdc-icon-button {
      .mat-icon {
        color: white;
      }
    }
    .mat-mdc-select-value, .mat-mdc-select-arrow, .mat-mdc-select-arrow:after {
      color: white;
    }
    .mat-mdc-text-field-wrapper {
      &.mdc-text-field--outlined {
        &:not(.mdc-text-field--focused):not(.mdc-text-field--disabled):not(.mdc-text-field--invalid) {
          &:not(:hover) {
            .mdc-notched-outline {
              .mdc-notched-outline__leading, .mdc-notched-outline__trailing {
                border-color: white;
              }
            }
          }
          &:hover {
            .mdc-notched-outline {
              .mdc-notched-outline__leading, .mdc-notched-outline__trailing {
                border-color: rgba(255, 255, 255, 0.87);
              }
            }
          }
        }
        &:not(.mdc-text-field--disabled).mdc-text-field--focused {
          .mdc-notched-outline {
            .mdc-notched-outline__leading, .mdc-notched-outline__trailing {
              border-color: rgba(255, 255, 255, 0.67);
            }
          }
        }
      }
    }
  }

  .mat-toolbar.mat-mdc-table-toolbar {
    padding: 0 24px;
    &:not(.mat-primary) {
      background: #fff;
    }
    .mat-toolbar-tools {
      padding: 0;
      & > button.mat-mdc-icon-button:last-child {
        margin-right: -12px;
      }
    }
  }

  mat-toolbar.mat-mdc-table-toolbar:not(.mat-primary), .mat-mdc-cell, .mat-expansion-panel-header {
    button.mat-mdc-icon-button {
      .mat-icon {
        color: rgba(0, 0, 0, .54);
      }
      &[disabled][disabled] {
        .mat-icon {
          color: rgba(0, 0, 0, .26);
        }
      }
    }
  }

  .mat-mdc-table {
    width: 100%;
    max-width: 100%;
    display: table;
    table-layout: auto;
    border-collapse: separate;
    margin: 0;
  }

  .tb-table-widget {
    .mat-mdc-table {
      .mat-mdc-row {
        font-size: 13px;
      }

      .mat-mdc-cell {
        background-color: transparent;
        color: inherit;
        font-size: inherit;
        font-family: inherit;
        font-weight: inherit;
        line-height: inherit;
        letter-spacing: inherit;
        text-transform: inherit;
      }
    }
  }

  .mat-mdc-footer-row::after, .mat-mdc-header-row::after, .mat-mdc-row::after {
    content: none;
  }

  .mat-mdc-header-row {
    height: 60px;
  }

  .mat-mdc-footer-row, .mat-mdc-row {
    height: 52px;
  }

  .mat-mdc-header-row, .mat-mdc-footer-row, .mat-mdc-row {
    min-height: auto;
  }

  .mat-mdc-row,
  .mat-mdc-header-row {
    display: table-row;
  }

  .mat-mdc-header-cell, .mat-mdc-cell {
    &.mat-mdc-table-sticky {
      background-clip: padding-box;
    }
  }

  .mat-mdc-table {
    .mat-mdc-row {
      transition: background-color .2s;

      &:hover:not(.tb-current-entity) {
        background-color: #f4f4f4;
      }

      &.tb-current-entity {
        background-color: #e9e9e9;
      }

      &.tb-pointer {
        cursor: pointer;
      }
    }
  }

  .mat-mdc-row:not(.mat-row-select), .mat-mdc-header-row:not(.mat-row-select) {
    .mat-mdc-cell:first-child, .mat-mdc-footer-cell:first-child, .mat-mdc-header-cell:first-child {
      padding: 0 12px;
    }
    .mat-mdc-cell:nth-child(n+2):nth-last-child(n+2), .mat-mdc-footer-cell:nth-child(n+2):nth-last-child(n+2), .mat-mdc-header-cell:nth-child(n+2):nth-last-child(n+2) {
      padding: 0 28px 0 0;
    }
  }

  .mat-mdc-row.mat-row-select, .mat-mdc-header-row.mat-row-select {
    .mat-mdc-cell:first-child, .mat-mdc-footer-cell:first-child, .mat-mdc-header-cell:first-child {
      width: 30px;
      padding: 0 0 0 12px;
    }
    .mat-mdc-cell:nth-child(2), .mat-mdc-footer-cell:nth-child(2), .mat-mdc-header-cell:nth-child(2) {
      padding: 0 12px;
    }
    .mat-mdc-cell:nth-child(n+3):nth-last-child(n+2), .mat-mdc-footer-cell:nth-child(n+3):nth-last-child(n+2), .mat-mdc-header-cell:nth-child(n+3):nth-last-child(n+2) {
      padding: 0 28px 0 0;
    }
    &.mat-mdc-selected:not(.tb-current-entity) {
      background-color: #ededed;
    }
  }

  .mdc-text-field--disabled {
    a {
      pointer-events: all;
    }
  }

  .mat-mdc-cell,
  .mat-mdc-header-cell {
    min-width: 40px;
    word-wrap: initial;
    display: table-cell;
    box-sizing: content-box;
    line-break: unset;
    width: 0;
    overflow: hidden;
    vertical-align: middle;
    border-width: 0;
    border-bottom-width: 1px;
    border-bottom-color: rgba(0, 0, 0, 0.12);
    border-style: solid;
    text-overflow: ellipsis;
    touch-action: auto !important;
    letter-spacing: normal;
    &:last-child {
      padding: 0 12px 0 0;
    }
    &.mat-column-select {
      min-width: 40px;
      max-width: 40px;
      width: 40px;
      padding: 0 0 0 12px;
    }
    &.mat-column-actions {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  .mat-mdc-header-cell {
    white-space: nowrap;
    button.mat-sort-header-button {
      display: block;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
    }
    &.mat-number-cell {
      .mat-sort-header-container {
        justify-content: flex-end;
      }
    }
  }

  .mat-mdc-cell {
    &.mat-number-cell {
      text-align: end;
    }
    .mat-icon {
      color: rgba(0, 0, 0, .54);
    }
  }

  .mdc-data-table__row:last-child .mdc-data-table__cell {
    border-bottom: 1px solid rgba(0,0,0,0.12);
  }

  .mat-mdc-cell, .mat-mdc-footer-cell {
    font-size: 13px;
  }

  .mat-mdc-cell, .mat-mdc-footer-cell, .mat-mdc-header-cell {
    height: 20px;
  }

  .mat-sort-header-sorted .mat-sort-header-arrow {
    opacity: 1 !important;
  }

  .mat-toolbar-tools {
    //font-size: 20px;
    letter-spacing: .005em;
    //box-sizing: border-box;
    font-weight: 400;
    display: flex;
    align-items: center;
    flex-direction: row;
    width: 100%;
    height: 64px;
    //max-height: 64px;
    padding: 0 16px;
    //margin: 0;
  }

  .mat-icon {
    svg {
      vertical-align: inherit;
    }
    &.tb-mat-12 {
      @include tb-mat-icon-size(12);
    }
    &.tb-mat-16 {
      @include tb-mat-icon-size(16);
    }
    &.tb-mat-18 {
      @include tb-mat-icon-size(18);
    }
    &.tb-mat-20 {
      @include tb-mat-icon-size(20);
    }
    &.tb-mat-28 {
      @include tb-mat-icon-size(28);
    }
    &.tb-mat-32 {
      @include tb-mat-icon-size(32);
    }
    &.tb-mat-96 {
      @include tb-mat-icon-size(96);
    }
  }

  .mat-mdc-icon-button {
    &.tb-mat-20 {
      @include tb-mat-icon-button-size(20);
      .mat-icon {
        @include tb-mat-icon-size(20);
      }
    }
    &.tb-mat-24 {
      @include tb-mat-icon-button-size(24);
    }
    &.tb-mat-28 {
      @include tb-mat-icon-button-size(28);
    }
    &.tb-mat-32 {
      @include tb-mat-icon-button-size(32);
    }
    &.tb-mat-40 {
      @include tb-mat-icon-button-size(40);
    }
    &.tb-mat-96 {
      @include tb-mat-icon-button-size(96);
    }
  }

  .mat-mdc-snack-bar-container {
    position: absolute;
    background: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: inherit;
    max-width: inherit;
    min-width: inherit;
    pointer-events: none;
    display: flex;
    .mdc-snackbar__surface {
      padding: 0;
      border: none;
      background: none;
      box-shadow: none;
    }
    .mdc-snackbar__label {
      padding: 0;
    }
  }

  .mat-drawer-side {
    border: none;
  }

  .mat-drawer-inner-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  mat-drawer.tb-details-drawer {
    z-index: 59 !important;
    width: 100% !important;
    max-width: 100% !important;
    @media #{$mat-gt-sm} {
      width: 80% !important;
    }
    @media #{$mat-gt-md} {
      width: 65% !important;
    }
  }

  .mat-mdc-card-subtitle, .mat-mdc-card-content {
    font-size: 16px;
  }

  .mat-toolbar > button:first-child {
    margin-left: -8px;
  }

  .mat-toolbar > button:last-child {
    margin-right: -8px;
  }

  .mat-toolbar {
    line-height: normal;

    h1, h2, h3, h4, h5, h6 {
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

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

  .mat-mdc-button, .mat-mdc-unelevated-button, .mat-mdc-outlined-button, .mat-mdc-raised-button {
    &:not(.mat-mdc-icon-button) {
      @media #{$mat-lt-md} {
        padding: 0 6px;
        min-width: 88px;
      }
      .mat-icon {
        margin-right: 5px;
      }
    }
  }

  .tb-dialog {
    .mat-mdc-dialog-container {
      padding: 0;
      > *:first-child, form {
        max-width: 100%;
        min-width: 100%;
        display: flex;
        flex-direction: column;
      }
      .mat-mdc-dialog-content {
        margin: 0;
        padding: 24px;
      }
      .mat-mdc-dialog-actions {
        margin-bottom: 0;
        padding: 8px;
      }
    }
  }

  .tb-fullscreen-dialog-gt-xs {
    @media #{$mat-gt-xs} {
      min-height: 100%;
      min-width: 100%;
      max-width: none !important;
      position: absolute !important;
      inset: 0;
      .mat-mdc-dialog-container {
        > *:first-child, form {
          min-width: 100% !important;
        }
        .mat-mdc-dialog-content {
          max-height: 100%;
        }
      }
    }
  }

  .tb-fullscreen-dialog {
    @media #{$mat-lt-sm} {
      min-height: 100%;
      min-width: 100%;
      max-width: none !important;
      position: absolute !important;
      inset: 0;
      .mat-mdc-dialog-container {
        > *:first-child, form {
          min-width: 100% !important;
          height: 100%;
        }
        .mat-mdc-dialog-content {
          max-height: 100%;
        }
      }
    }
  }

  .tb-absolute-fill {
    position: absolute;
    inset: 0;
  }

  .tb-layout-fill {
    margin: 0;
    width: 100%;
    min-height: 100%;
    height: 100%;
  }

  .tb-progress-cover {
    position: absolute;
    inset: 0;
    z-index: 6;
    background-color: #eee;
    opacity: 1;
  }

  .mat-mdc-button.tb-fullscreen-button-style,
  .tb-fullscreen-button-style {
    background: #ccc;
    opacity: .85;

    .mat-icon {
      color: #666;
    }
  }

  span.no-data-found {
    position: relative;
    display: flex;
    height: calc(100% - 60px);
    text-align: center;
  }

  .mat-mdc-tab-group {
    &.tb-headless {
      margin-top: -50px;
    }
    .mat-mdc-tab-header {
      border-bottom: 1px solid #0000001f;
    }
  }

  .tb-primary-background {
    background-color: $primary;
  }

  .tb-color-preview {
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    width: 24px;
    min-width: 24px;
    height: 24px;
    overflow: hidden;
    content: "";
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .14), 0 2px 2px 0 rgba(0, 0, 0, .098), 0 1px 5px 0 rgba(0, 0, 0, .084);

    &.box {
      border: none;
      box-shadow: none;
      border-radius: 4px;
      .tb-color-result {
        position: relative;
        &:after {
          content: '';
          position: absolute;
          top: 0;
          bottom: 0;
          left: 0;
          right: 0;
          border-radius: 4px;
          border: 1px solid rgba(0, 0, 0, 0.12);
        }
      }
      &.disabled {
        cursor: initial;
        .tb-color-result {
          background: rgba(0, 0, 0, 0.38);
        }
      }
    }

    &.small {
      width: 18px;
      min-width: 18px;
      height: 18px;
    }

    @include tb-checkered-bg();

    .tb-color-result {
      width: 100%;
      height: 100%;
    }
  }

  .tb-tooltip-multiline {
    max-width: 400px;
    height: auto !important;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.5;
    white-space: pre-line;
  }

  // TinyMCE

  .tox-tinymce {
    button:not(.mat-mdc-menu-item):not(.mat-sort-header-button) {
      text-transform: none;
    }
  }

  .tb-toast-panel {
    pointer-events: none !important;
  }

  .tb-draggable {
    &.cdk-drag-animating {
      transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
    }
  }

  .tb-drop-list {
    &.cdk-drop-list-dragging {
      .tb-draggable {
        transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
      }
    }
  }

  .tb-drag-handle {
    cursor: move;
    .mat-icon {
      pointer-events: none;
    }
  }

  .tb-chip-list {
    &.mat-mdc-form-field {
      .mdc-text-field {
        .mat-mdc-form-field-infix {
          padding-top: 8px;
          padding-bottom: 8px;
          .mat-mdc-chip-grid, .mat-mdc-chip-set {
            min-height: 40px;
          }
        }
      }
    }
  }

  @media #{$mat-lt-md} {
    .mat-mdc-form-field {
      .mat-mdc-form-field-infix {
        width: auto;
      }
    }
  }

  .mat-expansion-panel {
    color: inherit;
  }

  .cursor-pointer {
    cursor: pointer;
  }
}
