.datatable {
  max-width: 100%;
  background-color: #fff;
}

.datatable-scroll {
  width: 100%;
  max-height: 80vh;
  overflow-x: auto;
}

.datatable-scroll::-webkit-scrollbar {
  width: 6px;
  height: 10px;
}

.datatable table {
  font-size: 14px;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 100%;
}

.datatable thead {
  position: sticky;
  top: 0;
	left: 0;
  z-index: 103;
}

.datatable thead tr {
  background-color: #fff;
}

.datatable thead th {
  position: relative;
  padding: 0;
  border: 0;
  text-align: center;
  max-width: 180px;
  color: #5068A5;
  background-color: #E5EBF4;
  box-shadow:
    inset 0 1px 0 #eff1f6,   /* верх */
    inset 0 -1px 0 #eff1f6,  /* низ */
    inset -1px 0 0 #eff1f6;  /* правый край */
}

.datatable thead th:first-child {
  border-radius: 4px 0 0 4px;
}

.datatable thead th:last-child {
  border-radius: 0 4px 4px 0;
}

.datatable thead tr:first-child th:first-child {
  box-shadow:
    inset 0 1px 0 #eff1f6,   /* верх */
    inset 0 -1px 0 #eff1f6,  /* низ */
    inset -1px 0 0 #eff1f6,  /* правый край */
    inset 1px 0 0 #eff1f6;   /* левый край */
}

.datatable thead th.group-header {
  box-shadow:
    inset 0 1px 0 #eff1f6,   /* верх */
    inset -1px 0 0 #eff1f6;  /* правый край */
}

.datatable thead th.group-header:first-child {
  box-shadow:
    inset 0 1px 0 #eff1f6,   /* верх */
    inset -1px 0 0 #eff1f6,  /* правый край */
    inset 1px 0 0 #eff1f6;   /* левый край */
}

.datatable th .column-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  font-weight: 600;
}

.datatable th .column-header.start {
  align-items: start;
}

.datatable th .column-sorting {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.datatable th .column-name {
  white-space: normal;
  text-align: center;
}

.datatable .column-sticky {
  position: sticky;
  z-index: 2;
}

.datatable thead th .sorting {
  display: none;
}

.datatable thead th .color-button {
  cursor: pointer;
  margin-left: 5px;
}

.datatable thead th.sortable .sorting {
  display: flex;
  flex-shrink: 0;
  position: relative;
  margin-left: 5px;
}

.datatable thead th.sortable .sorting svg {
  width: 8px;
  height: 14px;
  color: rgba(51, 51, 51, 0.35);
  transition: color 0.3s ease;
}

.datatable thead th .dropdown-open {
  width: 16px;
  height: 18px;
  color: rgba(51, 51, 51, 0.35);
  transition: color 0.3s ease;
}

.datatable thead th.order-asc .dropdown-open,
.datatable thead th.order-desc .dropdown-open,
.datatable thead th.order-positive .dropdown-open {
  color: #333;
}

.datatable thead th.sortable.invert .sorting svg {
  color: rgba(255, 255, 52551, 0.5);
}

.datatable thead th.sortable .sort-down {
  transform: rotate(-180deg);
}

.datatable thead th.sortable.order-asc .sort-up {
  color: #333;
}

.datatable thead th.sortable.order-desc .sort-down {
  color: #333;
}

.datatable thead th.sortable.order-asc.invert .sort-up {
  color: #fff;
}

.datatable thead th.sortable.order-desc.invert .sort-down {
  color: #fff;
}

.datatable tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.datatable tbody tr:last-child td {
  border-bottom: none;
}

.datatable td {
  padding: 0.25rem;
  position: relative;
}

.datatable td.editable {
  cursor: pointer;
  background-color: #fff;
}

.datatable td.editable .editable-display,
.datatable td.editable .edit_provider input {
  display: inline-block;
  border: 1px solid #d9dfea;
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  font-size: 14px;
  width: 100%;
  height: 80%;
  min-height: 40px;
}

.datatable td.editable input,
.datatable td.editable select {
  background-color: #fff;
  border: 1px solid #9aa4b6;
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  font-size: 14px;
  width: 100%;
}

.datatable td.editable input:focus,
.datatable td.editable select:focus {
  box-shadow: none;
}

.datatable table td.editing {
  padding: 0;
}

.datatable table td.editing form,
.datatable table td.editing turbo-frame {
  width: 100%;
}

.datatable table td.editing input {
  width: 100%;
  height: 100%;
  padding: 0.3rem 0.5rem;
}

.datatable table td.editing select {
  width: 100%;
  padding: 0.75rem;
}


.datatable table td {
  text-align: center;
}

.datatable table td a {
  color: #5068A5;
  font-size: 14px;
}

.datatable .pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.datatable .pagination span {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  margin-right: -1px;
  font-size: 16px;
  line-height: 1.5rem;
  cursor: pointer;
}

.datatable .pagination span a {
  padding: 0.5rem 1rem;
  color: #5068a5;
  text-decoration: none;
}

.datatable .pagination span:hover {
  z-index: 10;
  color: #111827;
  border-color: #d1d5db;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.datatable .pagination span:focus {
  z-index: 10;
  outline: none;
  box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.25);
}

.datatable .pagination span:first-of-type {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.datatable .pagination span:last-of-type {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.datatable .pagination span.current {
  font-weight: 600;
  background-color: #f3f4f6;
  color: #1f2937;
}

.datatable .pagination span.current,
.datatable .pagination span.gap {
  padding: 0.5rem 1rem;
}

.table-container {
  width: 60%;
}

.table-text-wrap {
  width: 180px;
  white-space: normal;
  display: inline-block;
}

.image-zoom-wrapper {
  display: inline-block;
}

.zoomed-image {
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip: rect(0 0 0 0);
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 120%;
  width: 250%;
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.image-zoom-wrapper:hover .zoomed-image {
  opacity: 1;
  visibility: visible;
  width: 250%;
  height: unset;
  margin: unset;
  border: unset;
  padding: unset;
  white-space: unset;
  clip: unset;
  overflow: unset;
  pointer-events: auto;
}

.zoomed-image img {
  width: 100%;
  height: auto;
  display: block;
}

.small-image {
  height: 40px;
  width: auto;
}

.chart-cell {
  max-width: 200px;
  overflow: hidden;
  white-space: nowrap;
}
