.jodit-ui-block:has(input[name='className']) {
  display: none;
}

.layout-two,
.layout-three,
.layout-left,
.layout-right {
  display: flex;
  gap: 10px;
}

.layout-two .column,
.layout-three .column,
.layout-left .narrow,
.layout-left .wide,
.layout-right .narrow,
.layout-right .wide {
  border: 1px solid #ddd;
  padding: 10px;
}

.layout-two .column,
.layout-three .column {
  flex: 1;
}

.layout-left .narrow {
  flex: 1;
}

.layout-left .wide {
  flex: 3;
}

.layout-right .narrow {
  flex: 1;
}

.layout-right .wide {
  flex: 3;
}

details.jodit-spoiler {
  border: 1px solid #ccc;
  margin: 5px 0;
  border-radius: 4px;
}

details.jodit-spoiler[open] > summary.jodit-spoiler__summary {
  border-bottom: 1px solid #ccc;
}

summary.jodit-spoiler__summary {
  padding: 8px;
  background: #f5f5f5;
  cursor: pointer;
  user-select: none;
  list-style: none;
  border-radius: 4px;
}

details summary::-webkit-details-marker {
  display: none;
}

.jodit-spoiler-content {
  padding: 8px;
  min-height: 16px;
}

.jodit-tabs.custom-jodit-tabs {
  display: flex;
  margin-bottom: 10px;
}

.jodit-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
}

.jodit-tab.active {
  background-color: rgba(219, 219, 219, 0.4);
  color: black;
}

.jodit-tab-content {
  display: none;
  margin-bottom: 10px;
}

.jodit-tab-content.active {
  display: block;
}

.custom-table-popup {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  z-index: 1000;
  width: 220px;
}

.jodit-table-grid {
  text-align: center;
}

.jodit-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  margin-bottom: 10px;
}

.jodit-grid-wrapper span {
  display: block;
  width: 18px;
  height: 18px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  cursor: pointer;
}

.jodit-grid-wrapper span.hovered {
  background: #007bff;
  border-color: #0056b3;
}

.jodit-table-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jodit-table-inputs input {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
}

.jodit-table-inputs button {
  padding: 6px;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
}

.jodit-table-inputs button:hover {
  background: #0056b3;
}

.jodit-toolbar-button.active {
  background-color: #e0e0e0 !important;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

/* Стили для закрепленных элементов */
.sticky-row {
  position: sticky !important;
  top: 0;
  background: #fff;
  z-index: 2;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.sticky-col {
  position: sticky !important;
  left: 0;
  background: #fff;
  z-index: 2;
  box-shadow: 2px 0 2px -1px rgba(0, 0, 0, 0.1);
}

/* Улучшенное позиционирование попапов */
.jodit-popup {
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #fff;
}

.jodit-ui-input {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* .custom-table-scroll-container этот класс толька для созданных таблиц, не скопированных */
.custom-table-scroll-container table,
.jodit-wysiwyg .custom-table-scroll-container table {
  min-width: 0;
  table-layout: fixed;
  margin-right: 0;
}

.custom-table-scroll-container td,
.custom-table-scroll-container th {
  min-width: 50px;
  padding: 8px;
  border: 1px solid #ddd;
  position: relative;
  word-break: break-word;
}
