html,
body {
  height: 100%;
}

.wrap {
  min-height: 100%;
  height: auto;
  margin: 0 auto -60px;
  padding: 0 0 60px;
}

.wrap > .container {
  padding: 70px 15px 20px;
}

.footer {
  height: 60px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.jumbotron {
  text-align: center;
  background-color: transparent;
}

.jumbotron .btn {
  font-size: 21px;
  padding: 14px 24px;
}

.not-set {
  color: #c55;
  font-style: italic;
}

.is-invalid {
  border-color: red;
}
/* Correct Bootstrap Outlines */

a:focus,
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus,
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
  outline: none;
}

.form-control {
  height: auto;
}
label {
  font-weight: unset;
}

/* add sorting icons to gridview sort links */
a.asc:after,
a.desc:after {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: "Glyphicons Halflings";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  padding-left: 5px;
}

a.asc:after {
  content: /*"\e113"*/ "\e151";
}

a.desc:after {
  content: /*"\e114"*/ "\e152";
}

.sort-numerical a.asc:after {
  content: "\e153";
}

.sort-numerical a.desc:after {
  content: "\e154";
}

.sort-ordinal a.asc:after {
  content: "\e155";
}

.sort-ordinal a.desc:after {
  content: "\e156";
}

.grid-view th {
  white-space: nowrap;
}

.hint-block {
  display: block;
  margin-top: 5px;
  color: #999;
}

.error-summary {
  color: #a94442;
  background: #fdf7f7;
  border-left: 3px solid #eed3d7;
  padding: 10px 20px;
  margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
  padding: 15px;
  border: none;
}

@media (max-width: 767px) {
  .nav li > form > button.logout {
    display: block;
    text-align: left;
    width: 100%;
    padding: 10px 15px;
  }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
  text-decoration: none;
}

.nav > li > form > button.logout:focus {
  outline: none;
}

.b-example-divider {
  flex-shrink: 0;
  width: 1.5rem;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.1);
  border: solid rgba(0, 0, 0, 0.15);
  border-width: 1px 0;
  box-shadow: inset 0 0.5em 1.5em rgba(0, 0, 0, 0.1),
    inset 0 0.125em 0.5em rgba(0, 0, 0, 0.15);
}

.bi {
  vertical-align: -0.125em;
  pointer-events: none;
  fill: currentColor;
}

.dropdown-toggle {
  outline: 0;
}

.nav-flush .nav-link {
  border-radius: 0;
}

.btn-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.65);
  background-color: transparent;
  border: 0;
}
.btn-toggle:hover,
.btn-toggle:focus {
  color: rgba(0, 0, 0, 0.85);
  background-color: #d2f4ea;
}

.btn-toggle::before {
  width: 1.25em;
  line-height: 0;
  content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%280,0,0,.5%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
  transition: transform 0.35s ease;
  transform-origin: 0.5em 50%;
}

.btn-toggle[aria-expanded="true"] {
  color: rgba(0, 0, 0, 0.85);
}
.btn-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.btn-toggle-nav a {
  display: inline-flex;
  padding: 0.1875rem 0.5rem;
  margin-top: 0.125rem;
  margin-left: 1.25rem;
  text-decoration: none;
}
.btn-toggle-nav a:hover,
.btn-toggle-nav a:focus {
  background-color: #d2f4ea;
}

.scrollarea {
  overflow-y: auto;
}

.fw-semibold {
  font-weight: 600;
}
.lh-tight {
  line-height: 1.25;
}

.hide {
  display: none;
}

.mx-wdt125 {
  max-width: 125px !important;
}

.mx-wdt150 {
  max-width: 150px !important;
}

.kv-fileinput-caption {
  max-width: 55% !important;
}

.bx-search {
  cursor: pointer;
}

.bx-search-base {
  width: 90%;
}
.bx-search-center {
  width: 100%;
}

tr.nomenclat td {
  background-color: #e7f8e6;
  --bs-table-accent-bg: none !important;
}

/* Resizable */
.pl-product-merge-container {
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30vh; /* Початкова висота */
  min-height: 100px;
  max-height: calc(100vh - 50px);
  border: 1px solid #ccc;
  overflow: auto;
  background-color: #eee;
  box-shadow: 0 0 20px 1px gray;
  z-index: 10;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.ui-resizable-n {
  position: absolute !important;
  width: 100%;
  height: 10px;
  top: 0;
  cursor: n-resize;
  background-color: #ccc;
}

.pl-product-merge-container.off {
  display: none;
}

.pl-search-selected {
  position: relative;
  box-shadow: 0 0 10px 10px lightgray;
  z-index: 10;
}

#marge_tovar {
  height: 90%;
  overflow: auto;
  flex: 1;
}

#pl-panel-switcher.off {
  opacity: 0.5;
}

#pl-panel-switcher.off > span {
  display: inline !important;
}

footer.panel-search-margin {
  margin-bottom: 30vh;
}

#loader2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;

  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
}

/*.spinner-border { {*/
/*  width: 5rem;*/
/*  height: 5rem;*/
/*}*/
.tooltip-inner {
  background-color: #f8f9fa !important;
  color: #212529 !important;
  border: 1px solid #ddd;
}

.tooltip-arrow::before {
  border-top-color: #f8f9fa !important;
}
/**************** Price view**********************/

.drag-drop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
  text-align: center;
  cursor: move;
}

.drag-drop-item .text {
  flex: 1;
}

.btn-container {
  display: flex;
  gap: 5px;
}

#drag-drop-container a {
  border-radius: 0.3rem;
}

.ui-state-highlight {
  border: 1px dashed #007bff;
  background: #f0f8ff;
  list-style: none;
}

.btn-outline-secondary,
.btn-outline-danger {
  font-size: 1rem;
}

.drag-drop-item .btn {
  margin-left: 10px;
}

/* Modal */
#rule-modal.modal .close,
#testDataModal.modal .close {
  color: #5a6268 !important;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: #f8f9fa;
  padding-bottom: 5px;
  z-index: 999;
  opacity: 0.8;
}

#rule-modal .nav {
  flex-wrap: nowrap;
}

#rule-modal .modal-content {
  width: fit-content;
}

.table-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 15px;
}

#myTabContent1 {
  margin-right: 15px;
}

.custom-treeselect-list::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
  width: 8px;
}

.custom-treeselect-list::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.custom-treeselect-list::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
  background: #888;

  border-radius: 10px;
}

.custom-treeselect-list::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.treeselect-list--focused {
  border-color: #d7dde4 !important;
}
.treeselect-input--focused {
  border-color: #d7dde4 !important;
}

.table-container {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

.modal .close:hover {
  background-color: #e2e3e5;
}

.modal .close span {
  font-size: 2rem;
  margin-bottom: 3px;
}
.form-container {
  width: 400px;
  margin-left: 2rem;
}

@media (max-width: 767px) {
  .modal-body {
    flex-direction: column;
  }

  .form-container {
    max-width: fit-content;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .modal-dialog {
    max-width: 100%;
  }
  .modal-content {
    height: 100%;
  }
  .modal-header,
  .modal-footer {
    padding: 10px;
  }

  .modal-body {
    display: block;
    padding: 10px;
  }

  .form-container {
    width: 100%;
    margin: 0;
  }

  .table-container-sm {
    width: 100%;
  }

  .table {
    font-size: 14px;
  }

  #addButton {
    width: 100%;
  }

  .nav-tabs {
    flex-direction: column;
  }

  .nav-item {
    margin-bottom: 5px;
  }
  .ui-menu-item {
    max-width: 250px;
  }
  .tab-content {
    margin-left: auto;
    margin-right: auto;
  }
}

.nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-item .nav-link {
  border-radius: 5px 5px 0 0;
  border: 1px solid #dee2e6;
  border-bottom: none;
}

.nav-tabs .nav-item .nav-link.active {
  border-color: #dee2e6 #dee2e6 #fff;
  background-color: #fff;
}

.nav-tabs .nav-item .nav-link:not(.active) {
  background-color: #f8f9fa;
}

.custom-treeselect-list {
  max-height: 500px;
  overflow-y: auto;
}

#autocomplete-results,
#autocomplete-brand-results,
#autocomplete-partner-results {
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 0.25rem;
}

.ui-widget.ui-widget-content {
  z-index: 1090;
  overflow-y: auto !important;
  max-height: 200px;
}

#autocomplete-results .list-group-item,
#autocomplete-brand-results .list-group-item,
#autocomplete-partner-results .list-group-item {
  cursor: pointer;
}

#autocomplete-results .ui-menu .ui-widget,
#autocomplete-brand-results .ui-menu .ui-widget,
#autocomplete-partner-results .ui-menu .ui-widget {
  overflow-y: auto !important;
}

.price-table-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-message {
  margin-top: 20px;
  color: red;
  font-weight: bold;
}

#loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
}

.tooltip-inner {
  background-color: #f8f9fa !important;
  color: #212529 !important;
  border: 1px solid #ddd;
}

.tooltip-arrow::before {
  border-top-color: #f8f9fa !important;
}

/* Nomenclature-price */
.tree-label {
  margin-top: 20px;
}

.price-cell {
  position: relative;
}

.price-cell input,
.old-price input {
  width: 90px;
  height: 27px;
}

.price-cell button {
  font-size: 12px;
  margin: 2px;
  padding: 6px 15px;
  display: inline-block;
}

#price-table tbody {
  font-size: 13px;
}

#price-table > :not(caption) > * > * {
  padding: 0.2rem;
}

.select2-container--default
  .select2-selection--multiple.select2-selection--clearable {
  min-height: 38px;
}

.select2-container .select2-search--inline .select2-search__field {
  min-height: 28px;
  padding-top: 3px;
}

.select2-multiple .form-control {
  border: 1px solid #d9dee3 !important;
}

#loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;

  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
}

#no-results {
  padding: 20px;
  font-size: 1.2rem;
  color: #6c757d;
  text-align: center;
}

#price-table th {
  text-align: center;
}

#price-table th,
#price-table td {
  vertical-align: middle;
  padding: 8px;
  border: 1px solid #ddd;
}

#price-table th[rowspan="2"] {
  vertical-align: middle;
}

/* *************Price table ****************/
.custom-table {
  font-size: 0.8rem;
  margin: 0;
  text-align: center;
}

.custom-table th,
.custom-table td {
  padding: 5px;
  vertical-align: middle;
}

.custom-table th {
  font-weight: 600;
}

.custom-table.table-bordered {
  border: none;
}

.custom-table.table-bordered th,
.custom-table.table-bordered td {
  border: none;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.custom-table thead th {
  background-color: #f8f9fa;
  text-align: center;
}

.custom-table tbody tr {
  border-bottom: 1px solid #ddd;
}

.custom-table tbody td,
.custom-table tbody th {
  border: none;
}

.compact-form .mb-2 {
  margin-bottom: 8px;
}

.compact-form .form-control-sm {
  padding: 4px 8px;
  font-size: 12px;
  height: 30px;
}

.compact-form .btn-sm {
  font-size: 12px;
  padding: 4px 12px;
}

.compact-form .form-select {
  padding: 4px 8px;
  font-size: 12px;
  height: 30px;
}

#rule-modal .modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
}

.form-label.small {
  font-size: 0.6rem;
  margin-bottom: 1px;
  color: #6c757d;
}

.delete-btn {
  cursor: pointer;
  color: #dc3545;
  font-size: 16px;
}

.delete-btn:hover {
  color: #c82333;
}

.table-container-sm {
  max-height: 250px;
  overflow-y: auto;
  position: relative;
  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
}

.table-container-sm table {
  border-collapse: separate;
  width: 100%;
}

.table-container-sm thead {
  position: sticky;
  top: 0;
  background-color: #f8f9fa;
  z-index: 1;
  box-shadow: 0 0 10px 1px lightgrey;
}

/* Custom scrollbar styles */
.table-container-sm::-webkit-scrollbar {
  width: 5px;
}

.table-container-sm::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.table-container-sm::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.table-container-sm::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.custom-table th[rowspan="2"] {
  vertical-align: middle;
}

/* General input styling */
.table-input,
.table-select {
  width: 100%;
  font-size: 14px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #333;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Styling for focus state */
.table-input:focus,
.table-select:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.table-select option {
  background-color: #fff;
  color: #333;
}

.availability-change {
  color: #696cff;
  cursor: pointer;
}

.fade {
  opacity: 1;
}

.modal-header:before,
.modal-header::after {
  content: none !important;
}

.stat-card {
  margin: 20px 0;
}

#ui-id-1,
#ui-id-2 {
  max-width: 450px;
  max-height: 290px;
  overflow-y: auto;
  overflow-x: hidden;
}

#product_find {
  overflow-y: scroll;
  height: 100%;
  position: relative;
  overflow-x: hidden;
  max-height: 350px;
}

.form-control {
  height: auto;
}

/*Email mask tabs styles*/
.collapse.in {
  display: block;
}
.tab-delete {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  right: 4px;
  top: calc(50% - 10px);
  background-color: #949494;
  border-radius: 50px;
  height: 20px;
  width: 20px;
  padding-bottom: 2px;
  color: white;
  cursor: pointer;
}
.tabs-header {
  padding-right: 30px !important;
}
.tab-add-one {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background-color: #949494;
  border-radius: 50px;
  height: 20px;
  width: 20px;
  padding-bottom: 2px;
  color: white;
  cursor: pointer;
  margin: auto 10px;
}
.file-name-all {
  position: absolute;
  top: 0;
  right: 0;
  /* padding: 5px; */
}

table {
  width: 100%;
}

table th,
table td {
  word-wrap: break-word;
  white-space: normal;
}

body {
  overflow-x: auto;
}

.checkbox-group {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.checkbox-group .form-check {
  margin-right: 20px;
}

@media (max-width: 768px) {
  body {
    -webkit-overflow-scrolling: touch;
  }

  #data-container table,
  table {
    width: auto;
    min-width: 100%;
  }

  .grid-view {
    max-width: 768px;
    overflow-x: scroll;
  }

  table th,
  table td {
    word-wrap: break-word;
    white-space: normal;
  }
}

.merge-delete-button {
  cursor: pointer;
}

.merge-delete-button:hover {
  color: #c55;
}

#save-btn {
  margin-top: 30px;
  margin-left: 150px;
}

.highlight-red {
  color: red;
}

/* for upload button */
.file-selected {
  background-color: #71dd37;
  border-color: #71dd37;
  color: white;
}

.input-error {
  border: 2px solid red;
  background-color: #ffe6e6;
}
/* Стилі для кастомної модалки */
.custom-modal {
  display: none;
  position: fixed;
  top: 50px;
  left: 0;
  width: 100%;
  max-width: 90%;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  background: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.custom-modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 100%;

  overflow: hidden;
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* Контейнери для горизонтального зображення */

.image-preview-horizontal {
  max-width: 300px;
  max-height: 200px;
  display: none;
  cursor: pointer;
}

.image-preview-horizontal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Контейнери для вертикального зображення */
.image-preview-container-vertical {
  max-width: 200px;
  text-align: center;
}

.image-preview-vertical {
  max-width: 200px;
  max-height: 200px;
  display: none;
  cursor: pointer;
}

.image-preview-vertical img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Колонка час і чекбокси */
.time-comment {
  margin-top: 5px;
  font-size: 10px;
  color: #a1aab2;
}

.time-checkbox {
  width: 12px;
  height: 12px;
  margin: 0;
}
.time-label {
  font-size: 14px;
  line-height: 0.5;
}

/* Framework style editing*/
.btn-primary.active.focus {
  background-color: #595cd9;
  border-color: #595cd9;
}

.select2-container--default.select2-container--focus
  .select2-selection--multiple {
  border-color: #696cff !important;
}

/* Promotion */
.promotion-image-container:has(img) {
  height: 300px;
}

.select2-container .select2-selection--multiple {
  display: flex !important;
  align-items: center;
  min-height: calc(1.5em + 0.75rem + 2px) !important;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container .select2-selection__choice {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  margin: 2px;
  font-size: 0.875rem;
  color: #212529;
}

.select2-container--krajee-bs3
  .select2-selection--multiple
  .select2-selection__choice__remove {
  display: contents !important;
}
