/* ========================================================================
   Import
 ========================================================================== */

/* ========================================================================
   Fonts
 ========================================================================== */

/* ========================================================================
   BS Base
 ========================================================================== */

:root {
  --swiper-theme-color: var(--bs-primary);
  --swiper-navigation-size: 2rem;
  --swiper-navigation-sides-offset: 1.5rem;
}

body,
html {
  overflow-x: hidden;
  height: 100%;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  border: 0;
}

/* ========================================================================
   BS Container
 ========================================================================== */

/* ========================================================================
   BS Table
 ========================================================================== */

/* ========================================================================
   BS Form
 ========================================================================== */

/* ========================================================================
   BS Button
 ========================================================================== */

/* ========================================================================
   BS Collapse
 ========================================================================== */

/* ========================================================================
   BS Dropdown
 ========================================================================== */

/* ========================================================================
   BS Button group
 ========================================================================== */

/* ========================================================================
   BS Nav
 ========================================================================== */

/* ========================================================================
   BS Navbar
 ========================================================================== */

/* ========================================================================
   BS Card
 ========================================================================== */

/* ========================================================================
   BS Accordion
 ========================================================================== */

/* ========================================================================
   BS Breadcrumb
 ========================================================================== */

/* ========================================================================
   BS Pagination
 ========================================================================== */

/* ========================================================================
   BS Babge
 ========================================================================== */

/* ========================================================================
   BS Allert
 ========================================================================== */

/* ========================================================================
   BS Progress
 ========================================================================== */

/* ========================================================================
   BS List group
 ========================================================================== */

/* ========================================================================
   BS Close
 ========================================================================== */

/* ========================================================================
   BS Toast
 ========================================================================== */

/* ========================================================================
   BS Modal
 ========================================================================== */

/* ========================================================================
   BS Tooltip
 ========================================================================== */

/* ========================================================================
   BS Popover
 ========================================================================== */

/* ========================================================================
   BS Carousel
 ========================================================================== */

/* ========================================================================
   BS Spinner
 ========================================================================== */

/* ========================================================================
   BS Off-canvas
 ========================================================================== */

/* ========================================================================
   Theme Icon button
 ========================================================================== */

.tm-icon-btn {
  display: inline-block;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bs-body-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  border: 0;
  background-color: transparent;
  transition:
    color 0.15s ease-in-out,
    background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.tm-icon-btn:hover {
  color: var(--bs-primary);
}

/* ========================================================================
   Theme Layout
 ========================================================================== */

.tm-layout {
  height: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: row;
}

.tm-layout-header,
.tm-layout-footer {
  position: relative;
}

.tm-layout-header > .row,
.tm-layout-footer > .row {
  position: relative;
}

.tm-layout-header.container,
.tm-layout-header.container-fluid,
.tm-layout-header.container-xxl,
.tm-layout-header.container-xl,
.tm-layout-header.container-lg,
.tm-layout-header.container-md,
.tm-layout-header.container-sm,
.tm-layout-footer.container,
.tm-layout-footer.container-fluid,
.tm-layout-footer.container-xxl,
.tm-layout-footer.container-xl,
.tm-layout-footer.container-lg,
.tm-layout-footer.container-md,
.tm-layout-footer.container-sm {
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
}

@media (min-width: 1200px) {
  .tm-layout-header.container,
  .tm-layout-header.container-fluid,
  .tm-layout-header.container-xxl,
  .tm-layout-header.container-xl,
  .tm-layout-header.container-lg,
  .tm-layout-header.container-md,
  .tm-layout-header.container-sm,
  .tm-layout-footer.container,
  .tm-layout-footer.container-fluid,
  .tm-layout-footer.container-xxl,
  .tm-layout-footer.container-xl,
  .tm-layout-footer.container-lg,
  .tm-layout-footer.container-md,
  .tm-layout-footer.container-sm {
    padding-right: var(--bs-gutter-x);
    padding-left: var(--bs-gutter-x);
  }
}

.tm-layout-header .tm-layout-heading,
.tm-layout-footer .tm-layout-heading {
  position: relative;
  font-size: 1.25rem;
}

@media (min-width: 1200px) {
  .tm-layout-header .tm-layout-heading,
  .tm-layout-footer .tm-layout-heading {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .tm-layout-header .tm-layout-heading.text-truncate,
  .tm-layout-footer .tm-layout-heading.text-truncate {
    max-width: 15rem;
  }
}

.tm-header-item,
.tm-footer-item,
.tm-btn-back {
  display: flex;
  min-height: 4rem;
  align-items: center;
}

@media (min-width: 1200px) {
  .tm-btn-back {
    margin-left: -4.5rem;
  }

  .tm-btn-back .tm-icon-btn {
    height: 3rem;
    width: 3rem;
    line-height: 3rem;
    border-radius: 0.5rem 0 0 0.5rem;
    background-color: var(--bs-body-bg);
    opacity: 0.5;
    box-shadow: var(--bs-box-shadow-sm) !important;
  }

  .tm-btn-back .tm-icon-btn:hover {
    color: var(--bs-body-color);
    opacity: 0.7;
  }

  .tm-btn-back .tm-icon-btn .bi-arrow-left::before {
    content: "\f659";
  }
}

.tm-header-item .nav {
  flex-wrap: nowrap;
  gap: 1rem;
}

.tm-header-item .nav-link {
  position: relative;
  padding: 0;
  height: 4rem;
  line-height: 4rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bs-body-color);
}

.tm-header-item .nav-link.active,
.tm-header-item .show > .nav-link {
  color: var(--bs-primary);
}

.tm-header-item .nav-link.active::before,
.tm-header-item .show > .nav-link::before {
  content: "";
  display: block;
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background-color: var(--bs-primary);
  transition: 0.3s ease-in-out;
  transition-property: right;
}

.tm-layout-body {
  position: relative;
  padding: 1.5rem 0;
  flex-grow: 1;
  overflow-y: auto;
}

.tm-layout-body > .container,
.tm-layout-body > .container-fluid,
.tm-layout-body > .container-xxl,
.tm-layout-body > .container-xl,
.tm-layout-body > .container-lg,
.tm-layout-body > .container-md,
.tm-layout-body > .container-sm {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

@media (min-width: 1200px) {
  .tm-layout-body > .container,
  .tm-layout-body > .container-fluid,
  .tm-layout-body > .container-xxl,
  .tm-layout-body > .container-xl,
  .tm-layout-body > .container-lg,
  .tm-layout-body > .container-md,
  .tm-layout-body > .container-sm {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}

/* ========================================================================
   Theme Sidebar
 ========================================================================== */

.tm-sidebar.offcanvas-xl {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 1200px) {
  .tm-sidebar.offcanvas-xl {
    width: 4rem;
    background-color: var(--bs-dark) !important;
  }
}

.tm-sidebar .nav-link {
  padding: 0.5rem 0.5rem;
  position: relative;
  font-size: 1.25rem;
  color: var(--bs-heading-color);
}

@media (min-width: 1200px) {
  .tm-sidebar .nav-link {
    padding: 0;
    margin: 0.25rem 0;
    font-size: 1.25rem;
    color: var(--bs-light);
    height: 3rem;
    width: 4rem;
    line-height: 3rem;
    text-align: center;
  }
}

@media (min-width: 1200px) {
  .tm-sidebar .nav-link:hover {
    color: var(--bs-primary);
  }
}

.tm-sidebar .nav-link.active,
.tm-sidebar .nav-link.show {
  color: var(--bs-primary);
}

@media (min-width: 1200px) {
  .tm-sidebar .nav-link.active::before {
    content: "";
    display: block;
    height: 3rem;
    width: 3rem;
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 1200px) {
  .tm-sidebar .nav-link.show::before {
    content: "";
    display: block;
    height: 3rem;
    width: 3.5rem;
    position: absolute;
    top: 50%;
    right: 0;
    left: auto;
    border-radius: 0.5rem 0 0 0.5rem;
    border-right: 0.5rem var(--bs-border-style) var(--bs-border-color);
    background-color: var(--bs-body-bg);
    transform: translate(0, -50%);
  }
}

@media (min-width: 1200px) {
  .tm-sidebar .nav-link i {
    position: relative;
    z-index: 1;
  }
}

.tm-sidebar .dropend .dropdown-menu {
  position: static;
  width: 100%;
  padding: 1rem 0;
  margin: 0;
  border: 0;
  border-radius: var(--bs-dropdown-border-radius);
  background-color: rgba(0, 0, 0, 0.05);
}

@media (min-width: 1200px) {
  .tm-sidebar .dropend .dropdown-menu {
    position: fixed;
    top: 0;
    right: auto;
    left: 4rem;
    bottom: 0;
    width: calc(25% - 4rem);
    padding: 0 0 1rem 0;
    border-right: var(--bs-border-width) var(--bs-border-style)
      var(--bs-border-color);
    border-radius: 0;
    overflow-y: auto;
    background-color: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm) !important;
  }
}

@media (max-width: 1199.98px) {
  .tm-sidebar .dropend .nav-link.active + .dropdown-menu {
    display: block;
  }
}

.tm-sidebar .tm-sidebar-header {
  display: block;
  margin-bottom: 0;
  height: 4rem;
  font-size: 1.25rem;
  line-height: 4rem;
  padding: 0 0.75rem;
  color: var(--bs-heading-color);
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .tm-sidebar .tm-sidebar-header {
    font-size: 1.5rem;
    padding: 0 1.5rem;
  }
}

.tm-sidebar .dropdown-header,
.tm-sidebar .dropdown-item {
  padding: 0.4rem 0.75rem;
  font-size: 1.1rem;
}

@media (min-width: 1200px) {
  .tm-sidebar .dropdown-header,
  .tm-sidebar .dropdown-item {
    padding: 0.4rem 1.5rem;
  }
}

.tm-logo {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 0.25rem 0.5rem 0.25rem 0.5rem;
}

/* ========================================================================
   Theme Filter
 ========================================================================== */

.tm-filter.offcanvas-xl {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 1200px) {
  .tm-filter.offcanvas-xl {
    width: calc(25% - 4rem);
    border-right: var(--bs-border-width) var(--bs-border-style)
      var(--bs-border-color);
  }
}

.tm-filter-dropdown > .btn {
  position: relative;
  width: 100%;
  padding: var(--bs-btn-padding-y) calc(var(--bs-btn-padding-x) * 2 + 0.5rem)
    var(--bs-btn-padding-y) var(--bs-btn-padding-x);
  text-align: left;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.tm-filter-dropdown > .btn:active,
.tm-filter-dropdown > .btn.active,
.tm-filter-dropdown > .btn.show {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #b897fa;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(112, 47, 244, 0.25);
}

.tm-filter-dropdown > .btn::after {
  content: "\f282";
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-size: 0.75rem !important;
  font-weight: 400 !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -0.125em;
  position: absolute;
  top: 50%;
  right: var(--bs-btn-padding-x);
  transform: translateY(-50%);
}

.tm-filter-dropdown > .btn:active::after,
.tm-filter-dropdown > .btn.active::after,
.tm-filter-dropdown > .btn.show::after {
  content: "\f286";
}

/* ========================================================================
   Theme List
 ========================================================================== */

.tm-list {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

/* ========================================================================
   Тема Контент-панель (Offcanvas)
 ========================================================================== */

.tm-content-offcanvas {
  /* Фиксированное позиционирование панели */
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1035;

  /* Базовые стили отображения */
  display: none; /* По умолчанию скрыт */
  background-color: var(--bs-body-bg);
  background-clip: padding-box;
  outline: 0;

  /* Оптимизированная анимация сдвига */
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
  will-change: transform;
}

/* Адаптивная ширина для больших экранов */
@media (min-width: 1200px) {
  .tm-content-offcanvas {
    width: 75%;
    border-left: var(--bs-border-width) var(--bs-border-style)
      var(--bs-border-color);
  }
}

/* Состояние начала показа */
.tm-content-offcanvas.showing {
  display: block;
  visibility: visible;
}

/* Состояние начала скрытия */
.tm-content-offcanvas.hiding {
  display: block;
  visibility: visible;
  transform: translateX(100%);
}

/* Полностью показанное состояние */
.tm-content-offcanvas.show {
  display: block;
  visibility: visible;
  transform: translateX(0);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.075);
}

/* Основной контент внутри панели */
.tm-content-offcanvas > main {
  display: block;
  position: relative;
  height: 100%;
}

/* ========================================================================
   Theme Content Offcanvas
 ========================================================================== */

.tm-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.tm-backdrop.show {
  display: block;
  opacity: 1;
}

.tm-content-page {
  display: flex;
  height: calc(100% - 4rem);
  flex-direction: row;
}

.tm-content-page-left {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
}

.tm-content-page-right.offcanvas-xl {
  width: 100%;
  display: flex;
  height: 100%;
  flex-direction: column;
}

@media (min-width: 1200px) {
  .tm-content-page-right.offcanvas-xl {
    width: 33.333333%;
    border-left: var(--bs-border-width) var(--bs-border-style)
      var(--bs-border-color);
  }
}

/* ========================================================================
   Theme Dropzone
 ========================================================================== */
.dmxDropzone:not(.form-control) {
  background-color: transparent !important;
  border-color: var(--bs-border-color) !important;
}

.dmxDropzoneThumb:hover::before {
  background-color: rgba(207, 63, 63, 0.8);
  content: "Удалить";
}

/* ========================================================================
   Theme SUmmernote
 ========================================================================== */

.tm-summernote.h-100 > .card {
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.tm-summernote.h-100 .note-editor .note-toolbar {
  display: flex;
  min-height: 4rem;
  margin: 0;
  padding: 0.25rem 0.75rem;
  background: var(--bs-body-bg);
  border: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1200px) {
  .tm-summernote.h-100 .note-editor .note-toolbar {
    padding: 0.25rem 1.5rem;
  }
}

.tm-summernote.h-100 .note-editor .note-toolbar > .note-btn-group {
  margin: 0;
}

.tm-summernote.h-100 .note-editor .note-editing-area {
  flex-grow: 1 !important;
}

.tm-summernote.h-100 .note-editor.note-airframe .note-placeholder,
.tm-summernote.h-100 .note-editor.note-frame .note-placeholder {
  padding: 1.5rem 0.75rem;
}

@media (min-width: 1200px) {
  .tm-summernote.h-100 .note-editor.note-airframe .note-placeholder,
  .tm-summernote.h-100 .note-editor.note-frame .note-placeholder {
    padding: 1.5rem 1.5rem;
  }
}

.tm-summernote.h-100
  .note-editor.note-airframe
  .note-editing-area
  .note-codable,
.tm-summernote.h-100 .note-editor.note-frame .note-editing-area .note-codable,
.tm-summernote.h-100
  .note-editor.note-airframe
  .note-editing-area
  .note-editable,
.tm-summernote.h-100 .note-editor.note-frame .note-editing-area .note-editable {
  height: 100% !important;
  border-radius: 0 !important;
  padding: 1.5rem 0.75rem;
}

@media (min-width: 1200px) {
  .tm-summernote.h-100
    .note-editor.note-airframe
    .note-editing-area
    .note-codable,
  .tm-summernote.h-100 .note-editor.note-frame .note-editing-area .note-codable,
  .tm-summernote.h-100
    .note-editor.note-airframe
    .note-editing-area
    .note-editable,
  .tm-summernote.h-100
    .note-editor.note-frame
    .note-editing-area
    .note-editable {
    padding: 1.5rem 1.5rem;
  }
}

.tm-summernote.h-100 .note-statusbar {
  display: none;
}

.tm-summernote .note-file-clip {
  max-width: 100% !important;
}

.tm-summernote .note-popover.popover {
  position: absolute;
}

.tm-summernote .bs-popover-bottom > .popover-arrow,
.tm-summernote
  .bs-popover-auto[data-popper-placement^="bottom"]
  > .popover-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.tm-summernote .popover-body {
  padding: 5px 5px 10px 10px;
}

.tm-summernote .popover-body > .btn-group {
  margin: 5px 5px 0 0;
}
