@use 'mixins/amixin' as *;
@use 'variable/breakpoint' as *;

.container {
  box-sizing: border-box;
  width: 100%;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  .container {
    padding: 0;
  }
}

.container-fluid {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
  .container {
    padding: 0;
    max-width: none;
  }
}

html.drawer-disable-scroll {
  height: 100%;
  overflow: hidden;
  body {
    height: 100%;
    overflow: hidden;
  }
  .drawer-right {
    height: calc(100vh - 100px);
    overflow: auto;
  }
}

@media #{$gt-sm} {
  .cdk-global-scrollblock {
    body > {
      .lightbox {
        top: 100% !important;
        transform: translateY(-110%) !important;
        position: fixed;
      }
    }
  }
}

[contenteditable] {
  outline: none;
}

.line-height-1 {
  line-height: 1 !important;
}

.display-inline-flex {
  display: inline-flex !important;
}

button {
  &:not(.mdc-button) {
    border: 0;
  }
}

img {
  box-sizing: border-box;
  vertical-align: middle;
  &[contenteditable='false'] {
    &:hover {
      cursor: pointer;
      opacity: 0.85;
    }
  }
}

.clearfix {
  &:before,
  &:after {
    content: ' ';
    display: table;
  }
  &:after {
    clear: both;
  }
}

.y-center {
  @include middle();
}

.xy-center {
  @include middle-center;
}

.features-absolute {
  margin: -200px 0 0px;
}

.list-done {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
  li {
    list-style: none;
    &::marker {
      display: none;
      font-size: 0;
      width: 0;
      height: 0;
    }
    &:before {
      content: '';
      display: inline-block;
      vertical-align: middle;
      width: 16px;
      height: 16px;
      margin-right: 8px;
      background: url(/assets/images/icons/done.svg) center no-repeat;
      border-radius: 50%;
      background-size: 12px;
      color: var(--mat-sys-primary);
      background-color: var(--mat-sys-inverse-primary);
    }
  }
}

.list-clear {
  margin-left: 0;
  list-style: none;
  li {
    list-style: none;
    &::marker {
      display: none;
      font-size: 0;
      width: 0;
      height: 0;
    }
    &:before {
      content: '';
      display: inline-block;
      vertical-align: middle;
      width: 16px;
      height: 16px;
      margin-right: 8px;
      background: url(/assets/images/icons/clear.svg) center no-repeat;
      border-radius: 50%;
      background-size: 12px;
      color: var(--mat-sys-error);
      background-color: var(--mat-sys-error-container);
    }
  }
}

a.anchor {
  display: block;
  position: relative;
  top: -80px;
  visibility: hidden;
}

.media {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: 1;
  &:before {
    content: '';
    display: block;
  }
  &.media-2-1 {
    &:before {
      margin-top: 50%;
    }
  }
  &.media-16-9 {
    &:before {
      margin-top: 56.25%;
    }
  }
  &.media-4-3 {
    &:before {
      margin-top: 75%;
    }
  }
  &.media-1-1 {
    &:before {
      margin-top: 100%;
    }
  }
  &.media-1-2 {
    &:before {
      margin-top: 200%;
    }
  }
  &.media-140 {
    &:before {
      margin-top: 140%;
    }
  }
}

.cdk-overlay-container {
  .cdk-overlay-pane {
    .mat-mdc-menu-content {
      max-height: 400px;
    }
  }
}
.dark-theme .builder.dark > .mat-drawer-container .builder-list {
  background-color: transparent !important;
}

.video {
  &.cover {
    .vjs-poster {
      img {
        object-fit: cover;
      }
    }
  }
  &.contain {
    .vjs-poster {
      img {
        object-fit: contain;
      }
    }
  }
}

.custom-select {
  overflow: hidden !important;
  max-height: none !important;
  .cdk-virtual-scroll-viewport {
    height: 300px;
    display: block;
    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.2);
      border-radius: 4px;
    }

    mat-option {
      display: flex;
      align-items: center;
      height: 48px;

      mat-icon {
        margin-right: 12px;
        width: 24px;
        height: 24px;
        font-size: 24px;
      }
    }
  }
}

.article,
.base-text {
  table {
    @apply w-full min-w-full border-collapse border-0 border-solid;

    thead {
      tr {
        background-color: var(--mat-sys-surface-container);

        th {
          @apply py-3 px-4 text-left font-bold  border-0 border-b border-solid  text-sm;
          color: var(--mat-sys-on-surface-container-low);
          border-color: var(--mat-sys-surface-container-high);
          @media (min-width: 960px) {
            @apply text-base;
          }
        }
      }
    }

    tbody {
      tr {
        @apply border-0 border-b border-solid;
        border-color: var(--mat-sys-surface-container-highest);
        &:hover {
          background-color: var(--mat-sys-surface-container-highest);
        }
        &:nth-child(even) {
          background-color: var(--mat-sys-surface-container-low);
        }

        td {
          @apply py-3 px-4  text-sm border-0;
          color: var(--mat-sys-on-surface);
          @media (min-width: 960px) {
            @apply text-base;
          }

          &:first-child {
            @apply truncate max-w-xs;
            @media (min-width: 960px) {
              @apply max-w-none;
            }
          }
        }
      }
    }
  }
}
