@charset "UTF-8";
@keyframes toastPop {
  0% {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes panelSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.d-none {
  display: none;
}

.modality-selector .d-flex {
  display: flex;
}

.modality-selector .d-flex.gap-3 {
  gap: 1rem;
}

.smart-editor-wrapper {
  width: 90vw;
  margin: 40px auto 0px;
}

.position-relative {
  position: relative;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.px-3 {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

.border-bottom {
  border-bottom: 1px solid #dee2e6 !important;
}
[data-theme=dark] .border-bottom {
  border-bottom: 1px solid #4b5563 !important;
}

.form-control-sm {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-row:hover .section-title {
  color: #0057F8;
}

.block-name {
  font-weight: 600;
  color: #212529;
  font-size: 0.9rem;
}

.preview-modal-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #212529;
}

/* === КНОПКИ === */
#btnCopyTemplate {
  transition: all 0.2s ease;
  margin-bottom: 60px;
  width: 100%;
  height: 44px;
  min-height: auto;
  line-height: 1;
  border-radius: 6px;
  border: 2px solid #dee2e6;
  margin-top: 60px;
  font-size: 18px;
}
[data-theme=dark] #btnCopyTemplate {
  color: #6b76a2;
  border: 2px solid #6b76a2;
}
#btnCopyTemplate:hover:not(:disabled) {
  background: var(--atlas-accent-color);
  border-color: #adb5bd;
  color: white;
}
[data-theme=dark] #btnCopyTemplate:hover:not(:disabled) {
  background: #1f2937;
  color: #6b76a2;
  border-color: #6b76a2;
}
#btnCopyTemplate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
#btnCopyTemplate.copied {
  background: #22C55E !important;
  border-color: #22C55E !important;
  color: #FFFFFF !important;
}

div button#btnLoadTemplate {
  line-height: 1;
  background: var(--atlas-accent-color);
  color: #FFFFFF;
}
[data-theme=dark] div button#btnLoadTemplate {
  color: var(--atlas-text-secondary);
  border-color: #374151;
}
div button#btnLoadTemplate {
  border: none;
  transition: opacity 0.2s;
  opacity: 1 !important;
  border-radius: 6px;
  font-size: 18px;
}

.btn-variant-picker {
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
  background: #FFFFFF;
}
.btn-variant-picker:hover {
  opacity: 1;
  transform: scale(1.05);
  z-index: 1000 !important;
}

.action-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--atlas-header-bg);
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s;
  cursor: pointer;
}
[data-theme=dark] .action-btn {
  color: var(--atlas-text-secondary);
  border-color: var(--atlas-border-color);
}
.action-btn:hover {
  background: #f8f9fa;
  border-color: var(--atlas-accent-color);
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.12);
}
.action-btn img, .action-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}
.action-btn.btn-variant-picker {
  display: none;
}

.block-actions-panel .action-btn.btn-variant-picker {
  display: none;
}

.btn-collapse-variants {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--atlas-text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-collapse-variants:hover {
  background: #e0edff;
  color: var(--atlas-accent-color);
}
.btn-collapse-variants svg {
  width: 12px;
  height: 12px;
}

/* === СЕЛЕКТОР МОДАЛЬНОСТИ === */
.modality-selector {
  padding: 8px 0;
}
.modality-selector button {
  min-width: 300px;
  background: var(--atlas-accent-color);
  height: 44px;
  min-height: auto;
  line-height: 1;
}
.modality-selector > .d-flex {
  flex-wrap: wrap !important;
  gap: 10px;
  align-items: center;
}
.modality-selector .position-relative {
  flex: 0 0 auto;
  margin-left: auto;
}
@media (max-width: 1500px) {
  .modality-selector .position-relative {
    flex: 1 1 auto;
    margin-left: 0;
  }
}
@media (max-width: 992px) {
  .modality-selector .position-relative {
    flex: 1 1 auto;
    min-width: 200px;
  }
}
@media (max-width: 768px) {
  .modality-selector .position-relative {
    flex: 1 1 100%;
    width: 100%;
    min-width: unset;
  }
}
.modality-selector select, .modality-selector input, .modality-selector button {
  height: 44px;
  min-height: auto;
  line-height: 1;
}
.modality-selector select {
  line-height: 1.3;
}

#templateSearch {
  max-width: 300px;
  min-width: 200px;
  width: 100%;
}
@media (max-width: 1500px) {
  #templateSearch {
    max-width: 100%;
    min-width: 150px;
  }
}
@media (max-width: 992px) {
  #templateSearch {
    min-width: 150px;
    height: 40px;
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  #templateSearch {
    min-width: unset;
    height: 38px;
    font-size: 13px;
  }
}

@media (max-width: 1500px) {
  #filterCategory {
    flex: 1 1 auto;
    min-width: 140px;
  }
}
@media (max-width: 992px) {
  #filterCategory {
    flex: 1 1 180px;
    min-width: 140px;
    height: 40px;
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  #filterCategory {
    flex: 1 1 100%;
    min-width: 100% !important;
    width: 100%;
    height: 38px;
    font-size: 13px;
  }
}

@media (max-width: 1500px) {
  #filterTemplate {
    flex: 1 1 auto;
    min-width: 150px;
  }
}
@media (max-width: 992px) {
  #filterTemplate {
    flex: 1 1 200px;
    min-width: 150px;
    height: 40px;
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  #filterTemplate {
    flex: 1 1 100%;
    min-width: 100% !important;
    width: 100%;
    height: 38px;
    font-size: 13px;
  }
}

#btnLoadTemplate {
  min-width: 300px;
  padding: 0 24px;
  font-size: 16px;
}
@media (max-width: 1500px) {
  #btnLoadTemplate {
    min-width: auto;
    flex: 0 1 auto;
    padding: 0 20px;
  }
}
@media (max-width: 992px) {
  #btnLoadTemplate {
    height: 40px;
    font-size: 14px;
    padding: 0 16px;
  }
}
@media (max-width: 768px) {
  #btnLoadTemplate {
    min-width: 100%;
    width: 100%;
    padding: 0 16px;
    height: 38px;
    font-size: 13px;
  }
}
#btnLoadTemplate i {
  font-size: 16px;
}
@media (max-width: 1500px) {
  #btnLoadTemplate i {
    font-size: 15px;
  }
}
@media (max-width: 992px) {
  #btnLoadTemplate i {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  #btnLoadTemplate i {
    font-size: 13px;
  }
}

&:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === НОВЫЙ ДИЗАЙН RADIO МОДАЛЬНОСТИ === */
.modality-radio {
  position: relative;
  cursor: pointer;
}
.modality-radio:not(:last-child) {
  margin-right: 8px;
}
@media (max-width: 480px) {
  .modality-radio:not(:last-child) {
    margin-right: 4px;
  }
}

.modality-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modality-label {
  display: block;
  padding: 8px 20px;
  background: var(--atlas-bg-card);
  border: 1px solid var(--atlas-border-color);
  border-radius: 20px;
  font-weight: 400;
  font-size: 14px;
  transition: all var(--atlas-transition-time);
  color: var(--atlas-text-primary);
  min-width: 60px;
  text-align: center;
  user-select: none;
  cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 992px) {
  .modality-label {
    padding: 6px 16px;
    font-size: 13px;
    min-width: 50px;
    border-radius: 18px;
  }
}
@media (max-width: 768px) {
  .modality-label {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 40px;
    border-radius: 16px;
  }
}
@media (max-width: 480px) {
  .modality-label {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 35px;
    border-radius: 14px;
  }
}

.modality-radio:hover .modality-label {
  background: var(--atlas-bg-card);
  border-color: var(--atlas-accent-color);
  color: var(--atlas-text-primary);
}

.modality-input:checked + .modality-label {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  border-color: var(--atlas-accent-color);
}

/* === АДАПТАЦИЯ === */
/* Средние экраны (ноутбуки) */
@media (max-width: 1500px) {
  .modality-selector > .d-flex {
    gap: 8px;
  }
  .modality-selector button {
    min-width: auto;
  }
  .modality-selector .d-flex .d-flex:first-child {
    flex: 0 0 auto;
  }
}
/* Планшеты и маленькие ноутбуки */
@media (max-width: 992px) {
  .modality-selector > .d-flex {
    gap: 8px;
  }
  .modality-selector .d-flex .d-flex:first-child {
    flex: 0 0 auto;
  }
}
/* Мобилы */
@media (max-width: 768px) {
  .modality-selector > .d-flex {
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
  }
  /* Радио-кнопки МРТ/КТ - растягиваем */
  .modality-selector .d-flex .d-flex:first-child {
    width: 100%;
    display: flex;
    gap: 4px;
  }
  .modality-selector .d-flex .d-flex:first-child .modality-radio {
    flex: 1;
  }
  .modality-selector .d-flex .d-flex:first-child .modality-radio .modality-label {
    width: 100%;
    text-align: center;
  }
  #filterCategory,
  #filterTemplate,
  #btnLoadTemplate,
  .position-relative {
    width: 100% !important;
    min-width: 100% !important;
    margin-left: 0 !important;
  }
}
/* Маленькие мобилы */
@media (max-width: 480px) {
  .modality-selector {
    padding: 4px 0;
  }
  .modality-selector > .d-flex {
    gap: 4px;
  }
  #filterCategory,
  #filterTemplate,
  #btnLoadTemplate,
  #templateSearch {
    height: 36px;
    font-size: 12px;
  }
  #btnLoadTemplate {
    padding: 0 12px;
  }
  #btnLoadTemplate i {
    margin-right: 4px !important;
  }
}
/* === ПОИСК И ВЫПАДАЮЩИЙ СПИСОК === */
#templateSearch {
  border-radius: 6px;
  border: 2px solid var(--atlas-border-color);
  padding-left: 20px;
  background: var(--atlas-bg-main);
  color: var(--atlas-text-primary);
}
#templateSearch::placeholder {
  color: var(--atlas-text-secondary);
}
#templateSearch:focus {
  border-color: var(--atlas-accent-color);
  box-shadow: 0 0 0 3px rgba(0, 87, 248, 0.15);
}
[data-theme=dark] #templateSearch {
  background: var(--atlas-header-bg);
  color: var(--atlas-text-contrast);
  border-color: var(--atlas-border-color);
}
[data-theme=dark] #templateSearch::placeholder {
  color: var(--atlas-text-secondary);
}
[data-theme=dark] #templateSearch:focus {
  border-color: var(--atlas-accent-color);
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10001;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 4px;
}
[data-theme=dark] .search-dropdown {
  background: var(--atlas-header-bg);
  border-color: var(--atlas-border-color);
}
.search-dropdown-item {
  display: block;
  padding: 8px 14px;
  color: var(--atlas-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--atlas-border-color);
  cursor: pointer;
  transition: all 0.15s;
}
.search-dropdown-item:last-child {
  border-bottom: none;
}
.search-dropdown-item:hover, .search-dropdown-item.active {
  background: var(--atlas-bg-card);
  padding-left: 18px;
}
[data-theme=dark] .search-dropdown-item {
  color: var(--atlas-text-contrast);
  border-bottom-color: var(--atlas-border-color);
}
[data-theme=dark] .search-dropdown-item:hover, [data-theme=dark] .search-dropdown-item.active {
  background: var(--atlas-bg-card);
  padding-left: 18px;
}
.search-dropdown-item .name {
  font-weight: 500;
  display: block;
  transition: color 0.15s;
}
.search-dropdown-item .meta {
  font-size: 0.85rem;
  color: var(--atlas-text-secondary);
  margin-top: 2px;
  transition: color 0.15s;
}
.search-dropdown-item:hover .name {
  color: var(--atlas-accent-color);
}
.search-dropdown-item:hover .meta {
  color: var(--atlas-text-primary);
}
.search-dropdown-item mark {
  background: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
.search-dropdown-empty {
  padding: 12px 14px;
  color: var(--atlas-text-secondary);
  font-style: italic;
}
.search-dropdown-loading {
  padding: 12px 14px;
}

/* Тёмная тема для mark */
[data-theme=dark] .search-dropdown-item mark {
  background: rgba(255, 243, 205, 0.2);
  color: #ffd966;
}

[data-theme=dark] .search-dropdown-item:hover mark {
  background: rgba(255, 243, 205, 0.35);
  color: #ffed9e;
}

/* ============================================
   SMART TOAST - Уведомления
   ============================================ */
/* Базовые стили для тоста */
.smart-toast {
  position: fixed;
  z-index: 10000;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--atlas-font-sans);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 350px;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* Начальное состояние для анимации */
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  /* Состояние "показан" */
}
.smart-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.smart-toast {
  /* Состояние "скрыт" */
}
.smart-toast.smart-toast-hide {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  pointer-events: none !important;
}

/* ============================================
   ТИПЫ ТОСТОВ (цвета)
   ============================================ */
/* Успех */
.smart-toast-success {
  background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
  color: var(--atlas-text-contrast);
}

/* Ошибка */
.smart-toast-error {
  background: linear-gradient(135deg, var(--atlas-error-color) 0%, #ef4444 100%);
  color: var(--atlas-text-contrast);
}

/* Предупреждение */
.smart-toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #1f2937;
}

/* Информация */
.smart-toast-info {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  color: var(--atlas-text-contrast);
}

/* Основной (Primary) */
.smart-toast-primary {
  background: linear-gradient(135deg, var(--atlas-accent-color) 0%, #3b82f6 100%);
  color: var(--atlas-text-contrast);
}

/* Вторичный */
.smart-toast-secondary {
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
  color: var(--atlas-text-contrast);
}

/* Светлый */
.smart-toast-light {
  background: var(--atlas-bg-card);
  color: var(--atlas-text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Тёмный */
.smart-toast-dark {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: var(--atlas-text-contrast);
}

/* ============================================
   ПОЗИЦИИ ТОСТОВ
   ============================================ */
/* Верхний левый угол */
.smart-toast-top-left {
  top: 20px;
  left: 20px;
  bottom: auto;
  right: auto;
}

/* Верхний правый угол */
.smart-toast-top-right {
  top: 20px;
  right: 20px;
  bottom: auto;
  left: auto;
}

/* Нижний левый угол */
.smart-toast-bottom-left {
  bottom: 20px;
  left: 20px;
  top: auto;
  right: auto;
}

/* Нижний правый угол */
.smart-toast-bottom-right {
  bottom: 20px;
  right: 20px;
  top: auto;
  left: auto;
}

/* Верхний центр */
.smart-toast-top-center {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  right: auto;
}
.smart-toast-top-center.show {
  transform: translateX(-50%) translateY(0);
}
.smart-toast-top-center.smart-toast-hide {
  transform: translateX(-50%) translateY(20px) !important;
}

/* Нижний центр */
.smart-toast-bottom-center {
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  top: auto;
  right: auto;
}
.smart-toast-bottom-center.show {
  transform: translateX(-50%) translateY(0);
}
.smart-toast-bottom-center.smart-toast-hide {
  transform: translateX(-50%) translateY(20px) !important;
}

/* ============================================
   СОДЕРЖИМОЕ ТОСТА
   ============================================ */
.smart-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Иконка */
.smart-toast-icon {
  font-size: 18px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

/* Текст сообщения */
.smart-toast-message {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
  font-weight: 500;
}

/* Кнопка закрытия */
.smart-toast-close {
  cursor: pointer;
  opacity: 0.7;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  padding: 0 4px;
  transition: opacity var(--atlas-transition-time);
  flex-shrink: 0;
  margin-left: 8px;
}
.smart-toast-close:hover {
  opacity: 1;
}

/* Прогресс-бар */
.smart-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 0 8px 8px;
  animation: smartToastProgress 4s linear forwards;
  width: 100%;
}

.smart-toast-success .smart-toast-progress {
  background: rgba(255, 255, 255, 0.6);
}

.smart-toast-error .smart-toast-progress {
  background: rgba(255, 255, 255, 0.6);
}

.smart-toast-warning .smart-toast-progress {
  background: rgba(0, 0, 0, 0.2);
}

@keyframes smartToastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
/* ============================================
   СТАРЫЕ СТИЛИ ДЛЯ .copy-toast (обратная совместимость)
   ============================================ */
.copy-toast {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 87, 248, 0.2);
  z-index: 10002;
  animation: toastPop 0.25s ease-out forwards;
  pointer-events: none;
}
.copy-toast.warning {
  background: #f59e0b;
}
.copy-toast.error {
  background: var(--atlas-error-color);
}
@keyframes toastPop {
  0% {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

/* ============================================
   АНИМАЦИИ
   ============================================ */
/* Появление */
@keyframes smartToastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Исчезновение */
@keyframes smartToastSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}
/* Встряска (для ошибок) */
@keyframes smartToastShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}
.smart-toast-error.show {
  animation: smartToastShake 0.5s ease;
}

/* ============================================
   АДАПТИВНОСТЬ (Мобильные устройства)
   ============================================ */
@media (max-width: 768px) {
  .smart-toast {
    left: 10px;
    right: 10px;
    max-width: none;
    min-width: auto;
    font-size: 13px;
    padding: 10px 16px;
  }
  /* Для мобильных - все тосты по центру внизу */
  .smart-toast-top-left,
  .smart-toast-top-right,
  .smart-toast-top-center {
    top: auto;
    bottom: 20px;
    left: 10px;
    right: 10px;
    transform: none;
  }
  .smart-toast-top-left.show,
  .smart-toast-top-right.show,
  .smart-toast-top-center.show {
    transform: none;
  }
  .smart-toast-bottom-left,
  .smart-toast-bottom-right,
  .smart-toast-bottom-center {
    bottom: 20px;
    left: 10px;
    right: 10px;
    transform: none;
  }
  .smart-toast-bottom-left.show,
  .smart-toast-bottom-right.show,
  .smart-toast-bottom-center.show {
    transform: none;
  }
  .smart-toast-icon {
    font-size: 16px;
    width: 20px;
    height: 20px;
  }
  .copy-toast {
    top: auto;
    bottom: 80px;
    font-size: 0.85rem;
    padding: 8px 16px;
    white-space: nowrap;
  }
}
/* ============================================
   ТЁМНАЯ ТЕМА
   ============================================ */
[data-theme=dark] .smart-toast {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme=dark] .smart-toast-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #1f2937;
}

[data-theme=dark] .smart-toast-light {
  background: #374151;
  color: #f3f4f6;
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ
   ============================================ */
/* Группировка нескольких тостов */
.smart-toast:not(:last-child) {
  margin-bottom: 10px;
}

/* Кнопка закрытия при наведении */
.smart-toast-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* === ДЕРЕВО ВАРИАНТОВ === */
.tree-node {
  margin-bottom: 4px;
  user-select: none;
}
.tree-node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid transparent;
}
.tree-node-header:hover {
  background: var(--atlas-bg-card);
  border-color: var(--atlas-border-color);
}
.tree-node.active > .tree-node-header {
  background: rgba(0, 87, 248, 0.08);
  border-color: var(--atlas-accent-color);
}
.tree-node.expanded > .tree-children {
  display: block;
}
.tree-node.expanded > .tree-node-header .tree-toggle {
  transform: rotate(90deg);
}

.tree-toggle {
  background: var(--atlas-border-color);
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--atlas-text-secondary);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  line-height: 1;
}
.tree-toggle:hover {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
}
.tree-toggle.expanded {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
}
.tree-toggle.d-none {
  visibility: hidden;
  pointer-events: none;
  display: none;
}
.tree-toggle-sign {
  display: inline-block;
  transition: transform 0.2s;
}
.tree-node.expanded .tree-toggle-sign {
  transform: rotate(90deg);
  margin-left: 4px;
}

.tree-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--atlas-text-primary);
  text-transform: capitalize;
}

.tree-apply {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: 0.2s;
}
.tree-node-header:hover .tree-apply {
  opacity: 1;
}
.tree-apply:hover {
  background: #0b5ed7;
}

.tree-children {
  display: none;
  padding-left: 18px;
  margin-top: 4px;
  border-left: 2px solid var(--atlas-border-color);
}

.tree-node-hidden {
  display: none !important;
}

/* === ПАНЕЛЬ ВАРИАНТОВ === */
.variants-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--atlas-bg-main);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.variants-panel.show {
  right: 0;
}
@media (min-width: 992px) {
  .variants-panel.desktop-side {
    right: 0 !important;
    width: 380px !important;
    border-left: 3px solid var(--atlas-accent-color);
    box-shadow: -8px 0 32px rgba(0, 87, 248, 0.15);
  }
  .variants-panel.desktop-mode {
    position: absolute;
    top: 0;
    right: auto;
    left: 100%;
    margin-left: 12px;
    width: 280px;
    height: auto;
    max-height: 400px;
    border: 1px solid var(--atlas-accent-color);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 93, 165, 0.15);
    transform: none !important;
    transition: none;
    z-index: 10001;
    display: none;
  }
  .variants-panel.desktop-mode.show {
    display: flex;
  }
  .variants-panel.desktop-mode.flip-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 12px;
  }
  .variants-panel.desktop-mode::before {
    content: "";
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    border-right-color: var(--atlas-accent-color);
    left: -16px;
  }
  .variants-panel.desktop-mode.flip-left::before {
    border-right-color: transparent;
    border-left-color: var(--atlas-accent-color);
    left: auto;
    right: -16px;
  }
}

@media (max-width: 991px) {
  .variants-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }
  .variants-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .editor-variants-col {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    bottom: 0 !important;
    width: 85% !important;
    max-width: 400px !important;
    z-index: 100000 !important;
    transform: none !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: visible !important;
    display: block !important;
    background: transparent !important;
    pointer-events: none !important;
  }
  .editor-variants-col.active {
    right: 0 !important;
    pointer-events: auto !important;
  }
  .editor-variants-col #variantsPanel {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border: none !important;
    border-left: 3px solid var(--atlas-accent-color) !important;
    border-radius: 0 !important;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: var(--atlas-bg-main) !important;
    right: auto !important;
    top: auto !important;
    pointer-events: auto !important;
  }
  .editor-variants-col .variants-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 20px !important;
    border-bottom: 1px solid var(--atlas-border-color) !important;
    background: var(--atlas-bg-card) !important;
    flex-shrink: 0 !important;
  }
  .editor-variants-col .variants-header h5 {
    margin: 0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--atlas-text-primary) !important;
  }
  .editor-variants-col .variants-header .btn-collapse-variants {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: var(--atlas-text-secondary) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 0.8rem !important;
    transition: background 0.15s, color 0.15s !important;
    white-space: nowrap !important;
  }
  .editor-variants-col .variants-header .btn-collapse-variants:hover {
    background: #e0edff !important;
    color: var(--atlas-accent-color) !important;
  }
  .editor-variants-col .variants-header .btn-collapse-variants svg {
    width: 12px !important;
    height: 12px !important;
  }
  .editor-variants-col .variants-header .btn-close,
  .editor-variants-col .variants-header .js-close-variants {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    cursor: pointer !important;
    color: var(--atlas-text-secondary) !important;
    border-radius: 4px !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    margin-left: 8px !important;
  }
  .editor-variants-col .variants-header .btn-close:hover,
  .editor-variants-col .variants-header .js-close-variants:hover {
    background: rgba(0, 0, 0, 0.05) !important;
  }
  .editor-variants-col .px-3.py-2.border-bottom {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--atlas-border-color) !important;
    flex-shrink: 0 !important;
    background: var(--atlas-bg-main) !important;
  }
  .editor-variants-col #variantsSearchInput {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--atlas-border-color) !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
    background: var(--atlas-bg-main) !important;
    color: var(--atlas-text-primary) !important;
    box-sizing: border-box !important;
  }
  .editor-variants-col #variantsSearchInput:focus {
    border-color: var(--atlas-accent-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 87, 248, 0.1) !important;
  }
  .editor-variants-col #variantsSearchInput::placeholder {
    color: var(--atlas-text-secondary) !important;
  }
  .editor-variants-col .variants-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 12px 16px !important;
    -webkit-overflow-scrolling: touch !important;
    background: var(--atlas-bg-main) !important;
  }
  .editor-variants-col .variants-body .tree-node {
    margin-bottom: 4px !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-node-header {
    display: flex !important;
    align-items: center !important;
    padding: 8px 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-node-header:hover {
    background: var(--atlas-bg-card) !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-toggle.d-none {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    flex-shrink: 0 !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-toggle:not(.d-none) {
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: var(--atlas-text-secondary) !important;
    padding: 0 !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-title {
    flex: 1 !important;
    font-size: 0.9rem !important;
    color: var(--atlas-text-primary) !important;
    font-weight: 500 !important;
  }
  .editor-variants-col .variants-body .tree-node .tree-children {
    margin-left: 20px !important;
    padding-left: 8px !important;
    border-left: 2px solid var(--atlas-border-color) !important;
  }
}
@media (max-width: 480px) {
  .editor-variants-col {
    width: 100% !important;
    max-width: 100% !important;
  }
}
.variants-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--atlas-bg-card);
  border-bottom: 1px solid var(--atlas-border-color);
}
.variants-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--atlas-text-primary);
}
@media (min-width: 992px) {
  .variants-header {
    padding: 12px 16px;
    background: var(--atlas-bg-card);
    border-bottom-color: var(--atlas-border-color);
  }
  .variants-header h5 {
    font-size: 0.85rem;
    color: var(--atlas-accent-color);
  }
}

.variants-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.variants-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.variants-body::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 4px;
}
.variants-body::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 4px;
}
.variants-body::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

.variants-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--atlas-overlay);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.variants-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 992px) {
  .variants-overlay {
    display: none !important;
  }
}

#variantsSearchInput {
  font-size: 0.85rem;
  border-color: var(--atlas-border-color);
  transition: border-color 0.2s;
  background: var(--atlas-bg-main);
  color: var(--atlas-text-primary);
}
#variantsSearchInput:focus {
  border-color: var(--atlas-accent-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 87, 248, 0.15);
}
#variantsSearchInput::placeholder {
  color: var(--atlas-text-secondary);
}
[data-theme=dark] #variantsSearchInput {
  background: var(--atlas-header-bg);
  color: var(--atlas-text-contrast);
  border-color: var(--atlas-border-color);
}
[data-theme=dark] #variantsSearchInput::placeholder {
  color: var(--atlas-text-secondary);
}
[data-theme=dark] #variantsSearchInput:focus {
  border-color: var(--atlas-accent-color);
}

/* Встроенная панель (embedded) */
.variants-panel.embedded {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
  transform: none !important;
  right: auto !important;
  top: auto !important;
  display: block !important;
}

.embedded-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--atlas-text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.embedded-close:hover {
  background: var(--atlas-border-color);
  color: var(--atlas-text-primary);
}

/* === РЕДАКТОР БЛОКОВ === */
.placeholder-editor:empty::before {
  content: attr(data-placeholder);
  color: #adb5bd;
  font-style: italic;
}

.block-editor {
  border: 1px dashed #dee2e6;
  border-radius: 6px;
  padding: 12px 14px;
  min-height: 24px;
  background: var(--atlas-bg-main);
  font-size: 0.95rem;
  line-height: 2;
  word-break: break-word;
  transition: all 0.2s;
  margin: 0 !important;
  outline: none;
}
[data-theme=dark] .block-editor {
  border: 1px dashed var(--atlas-text-secondary);
}
.block-editor > * {
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit;
}
.block-editor > :first-child {
  margin-top: 0 !important;
}
.block-editor > :last-child {
  margin-bottom: 0 !important;
}
.block-editor:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  background: #FFFFFF;
}
[data-theme=dark] .block-editor:focus {
  background: #1f2937;
}
.block-editor.conclusion-editor {
  border-style: solid;
  border-color: #cfe2ff;
  background: #f8fbff;
}
[data-theme=dark] .block-editor.conclusion-editor {
  background: none;
  border: 1px dashed var(--atlas-text-secondary);
  color: var(--atlas-text-secondary);
}
.block-editor.recommendation-editor {
  border-style: solid;
  border-color: #d1e7dd;
  background: #f8fbf9;
}

.block-editor-wrapper:hover .block-actions-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.block-editor[contenteditable=true] {
  font-weight: inherit !important;
  font-style: inherit !important;
  text-decoration: inherit !important;
}
.block-editor[contenteditable=true] span[data-fmt=bold],
.block-editor[contenteditable=true] b, .block-editor[contenteditable=true] strong {
  font-weight: bold !important;
}
.block-editor[contenteditable=true] span[data-fmt=italic],
.block-editor[contenteditable=true] i, .block-editor[contenteditable=true] em {
  font-style: italic !important;
}
.block-editor[contenteditable=true] span[data-fmt=underline],
.block-editor[contenteditable=true] u {
  text-decoration: underline !important;
}

.block-item {
  border-radius: 8px;
  transition: box-shadow 0.2s;
}
.block-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 11;
}

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

/* === ПАНЕЛЬ ДЕЙСТВИЙ БЛОКА === */
.block-actions-panel {
  position: absolute;
  top: 50%;
  right: -15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  transform: translateY(-50%) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

/* Панель для заключения */
#panel-conclusion {
  padding: 0px 0px 0px 50px;
  margin-left: -50px;
}
#panel-conclusion .block-actions-panel {
  position: absolute;
  top: 50%;
  right: -15px;
  display: flex;
  gap: 4px;
  z-index: 100;
  transform: translateY(-50%) !important;
}
#panel-conclusion .action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #dc2626;
  transition: all 0.2s;
  border: 1px solid #dee2e6;
  background: var(--atlas-header-bg);
  box-shadow: none;
}
[data-theme=dark] #panel-conclusion .action-btn {
  color: var(--atlas-text-secondary);
}
#panel-conclusion .action-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  transform: scale(1.1);
}
[data-theme=dark] #panel-conclusion .action-btn:hover {
  background-color: var(--atlas-header-bg);
}
#panel-conclusion .action-btn svg {
  width: 14px;
  height: 14px;
}

.block-editor.placeholder-editor::before {
  content: attr(data-placeholder);
  color: #adb5bd;
  font-style: italic;
  pointer-events: none;
  user-select: none;
  display: block;
  min-height: 1.2em;
  line-height: 1.4;
}

/* При фокусе делаем чуть прозрачнее */
.block-editor.placeholder-editor:focus::before {
  opacity: 0.7;
}

/* Если класса нет — плейсхолдер не рисуется */
.block-editor:not(.placeholder-editor)::before {
  content: none;
}

/* Визуальное отличие пустых блоков */
.block-item.is-placeholder {
  opacity: 0.9;
  background: #fafafa;
}

.block-item.is-placeholder:hover {
  opacity: 1;
  border-left-color: #005da5 !important;
  background: #fff;
}

.block-item.is-placeholder.has-content {
  border-left-style: solid !important;
  transition: border-left-color 0.3s ease;
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ========== */
/* Эти стили добавляются поверх существующих и НЕ меняют их */
/* Мобильные устройства - панель действий всегда видна для активного блока */
@media (max-width: 991.98px) {
  /* Панель действий для активного блока */
  .block-item.active .block-actions-panel,
  .block-item.is-focused .block-actions-panel,
  .block-editor-wrapper.active .block-actions-panel,
  .block-editor-wrapper.is-focused .block-actions-panel {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  /* Подсветка активного блока */
  .block-item.active,
  .block-item.is-focused {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 6px;
    position: relative;
    z-index: 5;
  }
  /* Увеличенные кнопки для удобства касания */
  .block-actions-panel .action-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
  }
  /* Увеличенная зона касания для кнопок */
  .block-actions-panel .action-btn::after {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
  }
  /* Анимация появления панели */
  .block-item.active .block-actions-panel {
    animation: mobileActionsFadeIn 0.2s ease;
  }
  @keyframes mobileActionsFadeIn {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}
/* Очень маленькие экраны */
@media (max-width: 576px) {
  .block-actions-panel .action-btn {
    min-width: 32px;
    min-height: 32px;
    padding: 4px;
  }
  .block-actions-panel .action-btn svg {
    width: 14px;
    height: 14px;
  }
  .block-item.active,
  .block-item.is-focused {
    outline-width: 1.5px;
  }
}
/* Поддержка темной темы */
[data-theme=dark] .block-item.active,
[data-theme=dark] .block-item.is-focused {
  outline-color: #0d6efd;
  background: rgba(13, 110, 253, 0.05);
}

/* === ИНЛАЙН ПЕРЕМЕННЫЕ === */
.var-dropdown-menu {
  position: fixed;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  max-height: 240px;
  overflow-y: auto;
  width: 220px;
  z-index: 10001;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.var-dropdown-menu.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.var-dropdown-menu::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.var-dropdown-menu::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 4px;
}
.var-dropdown-menu::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 4px;
}
.var-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #6c757d;
}

.var-dropdown-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--atlas-text-primary);
  border-bottom: 1px solid var(--atlas-border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.var-dropdown-item:last-child {
  border-bottom: none;
}
.var-dropdown-item:hover {
  background: var(--atlas-bg-card);
  color: var(--atlas-accent-color);
}
.var-dropdown-item .var-type-icon {
  opacity: 0.5;
  font-size: 0.9em;
}

.var-action-panel {
  position: fixed;
  display: flex;
  gap: 2px;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 3px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.var-action-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.var-action-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  color: var(--atlas-text-secondary);
  transition: background 0.15s, color 0.15s;
}
.var-action-btn:hover {
  background: var(--atlas-border-color);
  color: var(--atlas-accent-color);
}
.var-action-btn.delete:hover {
  background: rgba(220, 38, 38, 0.1);
  color: var(--atlas-error-color);
}
.var-action-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.var-wrapper {
  display: inline-flex;
  align-items: baseline;
  margin: 0 2px;
  vertical-align: baseline;
}
.var-wrapper:hover {
  background: rgba(0, 87, 248, 0.06);
  border-radius: 3px;
}
.var-wrapper:has(.inline-var-select) {
  vertical-align: bottom;
}
.var-wrapper {
  display: inline-block;
  max-width: 100%;
}

.inline-var-input, .inline-var-number {
  border: none;
  border-bottom: 1.5px solid var(--atlas-border-color);
  background: transparent;
  padding: 0 2px;
  font: inherit;
  font-size: 0.9em;
  color: var(--atlas-accent-color);
  font-weight: 500;
  outline: none;
  min-width: 20px;
  width: auto;
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 60px;
  transition: width 0.1s ease;
}
.inline-var-input:focus, .inline-var-number:focus {
  border-bottom-color: var(--atlas-accent-color);
  background: rgba(0, 87, 248, 0.05);
}
.inline-var-input::placeholder, .inline-var-number::placeholder {
  color: var(--atlas-accent-color);
  opacity: 1;
}

.inline-var-select {
  border: 1px dashed var(--atlas-border-color);
  border-radius: 4px;
  background: var(--atlas-bg-main);
  padding: 2px 24px 2px 8px;
  font: inherit;
  font-size: 0.9em;
  line-height: 1.4;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M2 3l4 4 4-4' fill='none' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  width: fit-content;
  min-width: 0;
  box-sizing: border-box;
  max-width: 100% !important;
  color: var(--atlas-text-primary);
}
[data-theme=dark] .inline-var-select {
  color: var(--atlas-text-contrast);
  background-color: var(--atlas-header-bg);
}
.inline-var-select:hover {
  border-color: var(--atlas-accent-color);
  background-color: var(--atlas-bg-card);
}
.inline-var-select:focus {
  outline: none;
  border-style: solid;
  border-color: var(--atlas-accent-color);
  box-shadow: 0 0 0 3px rgba(0, 87, 248, 0.15);
}
.inline-var-select option {
  background-color: #ffffff;
  color: #0f172a;
}
.inline-var-select option:first-child {
  color: var(--atlas-text-secondary);
  font-style: italic;
  font-weight: 400;
  background-color: #ffffff;
}
.inline-var-select.placeholder-active {
  color: var(--atlas-text-secondary);
  font-style: italic;
  font-weight: 400;
  border-color: var(--atlas-border-color);
}

/* === ПЛАВАЮЩАЯ ПАНЕЛЬ ФОРМАТИРОВАНИЯ === */
.smart-fmt-toolbar {
  position: fixed;
  display: none;
  gap: 4px;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--atlas-transition-time), transform var(--atlas-transition-time);
}
.smart-fmt-toolbar.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.smart-fmt-toolbar button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all var(--atlas-transition-time);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--atlas-text-primary);
}
.smart-fmt-toolbar button:hover {
  background: var(--atlas-bg-card);
}
.smart-fmt-toolbar button.active {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
}
.smart-fmt-toolbar button b, .smart-fmt-toolbar button i, .smart-fmt-toolbar button u {
  pointer-events: none;
}

/* === МОДАЛКИ === */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--atlas-overlay);
  z-index: 20000;
  justify-content: center;
  align-items: center;
}
.preview-modal.show {
  display: flex;
}
.preview-modal-content {
  background: var(--atlas-bg-main);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.preview-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--atlas-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.preview-modal-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--atlas-text-primary);
}
.preview-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--atlas-text-primary);
}
.preview-modal-footer {
  background: var(--atlas-bg-card);
}

.preview-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--atlas-text-secondary);
}

#blockContentModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--atlas-overlay);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
#blockContentModal.show {
  display: flex;
}
#blockContentModal .preview-modal-content {
  background: var(--atlas-bg-main);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
#blockContentModal .preview-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--atlas-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#blockContentModal .preview-modal-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--atlas-text-primary);
}
#blockContentModal .preview-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--atlas-text-secondary);
  cursor: pointer;
  line-height: 1;
}
#blockContentModal .preview-modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Затемнение фона (оверлей) */
.reset-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--atlas-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-family: var(--atlas-font-sans);
  animation: fadeIn var(--atlas-transition-time) ease-out;
}

/* Контейнер модального окна */
.reset-modal {
  background-color: var(--atlas-bg-main);
  border-radius: 8px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  margin: 16px;
}

/* Внутренний контент с отступами */
.reset-modal-content {
  padding: 32px 28px 28px 28px;
}

/* Заголовок с иконкой */
.reset-modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--atlas-text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Текст сообщения */
.reset-modal-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--atlas-text-primary);
  margin-bottom: 28px;
}

.reset-modal-text strong {
  color: var(--atlas-error-color);
  font-weight: 600;
}

/* Контейнер для кнопок */
.reset-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Базовый стиль кнопок */
.reset-modal-btn {
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--atlas-transition-time) ease;
  border: none;
  background: none;
  font-family: inherit;
}

/* Кнопка "Отмена" (вторичная) */
.reset-modal-btn:first-child {
  background-color: var(--atlas-bg-card);
  color: var(--atlas-text-primary);
  border: 1px solid var(--atlas-border-color);
}

.reset-modal-btn:first-child:hover {
  background-color: var(--atlas-border-color);
  transform: translateY(-1px);
}

/* Кнопка "Сбросить" (основная, опасное действие) */
.reset-modal-btn.primary {
  background-color: var(--atlas-error-color);
  color: var(--atlas-text-contrast);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.reset-modal-btn.primary:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Активное состояние кнопок */
.reset-modal-btn:active {
  transform: translateY(1px);
}

/* Фокус для доступности */
.reset-modal-btn:focus-visible {
  outline: 2px solid var(--atlas-accent-color);
  outline-offset: 2px;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* Адаптация для мобильных устройств (до 600px) */
@media (max-width: 600px) {
  .reset-modal-content {
    padding: 24px 20px 20px 20px;
  }
  .reset-modal-title {
    font-size: 1.3rem;
  }
  .reset-modal-actions {
    flex-direction: column-reverse;
  }
  .reset-modal-btn {
    width: 100%;
    padding: 12px 20px;
    justify-content: center;
    text-align: center;
  }
  .reset-modal-actions {
    gap: 10px;
  }
}
/* styles.css + smart-editor.css - Стили для тулбара, Undo/Redo и копирования */
/* Undo/Redo кнопки */
.btn-undo, .btn-redo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: 0.375rem;
  transition: all var(--atlas-transition-time) ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-undo,
.btn-redo {
  color: var(--atlas-text-primary);
  background-color: var(--atlas-bg-card);
  border-color: var(--atlas-border-color);
}

.btn-undo:hover:not(:disabled),
.btn-redo:hover:not(:disabled) {
  background-color: var(--atlas-border-color);
  border-color: var(--atlas-text-secondary);
}

.btn-undo:disabled, .btn-redo:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Иконки для кнопок (если используются) */
.btn-undo::before {
  content: "↩️";
  font-size: 1rem;
}

.btn-redo::before {
  content: "↪️";
  font-size: 1rem;
}

/* Альтернативные иконки через Font Awesome или Bootstrap Icons */
.btn-undo .bi-arrow-return-left,
.btn-redo .bi-arrow-return-right {
  margin-right: 0.25rem;
}

/* Панель инструментов */
.toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background-color: var(--atlas-bg-main);
  border-bottom: 1px solid var(--atlas-border-color);
  border-radius: 0.5rem 0.5rem 0 0;
}

/* Группы кнопок */
.toolbar-group {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.toolbar-divider {
  width: 1px;
  height: 1.5rem;
  background-color: var(--atlas-border-color);
  margin: 0 0.5rem;
}

/* Тулбар для редактора */
.editor-toolbar {
  position: fixed;
  top: 164px;
  right: 16px;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 87, 248, 0.08);
  transition: all var(--atlas-transition-time) cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-toolbar:hover {
  box-shadow: 0 6px 20px rgba(0, 87, 248, 0.15);
  border-color: var(--atlas-accent-color);
}

/* Кнопки тулбара */
.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--atlas-accent-color);
  transition: all var(--atlas-transition-time) ease;
  position: relative;
}

.toolbar-btn:hover:not(:disabled) {
  background: var(--atlas-bg-card);
  transform: scale(1.05);
}

.toolbar-btn:active:not(:disabled) {
  transform: scale(0.92);
  background: var(--atlas-border-color);
}

.toolbar-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

.toolbar-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  pointer-events: none;
}

/* Разделитель */
.toolbar-divider {
  width: 80%;
  height: 1px;
  background: var(--atlas-border-color);
  margin: 2px 0;
}

/* Тултипы */
.toolbar-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: 110%;
  transform: translateY(-50%) translateX(4px);
  background: var(--atlas-text-primary);
  color: var(--atlas-text-contrast);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--atlas-transition-time), transform var(--atlas-transition-time);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10001;
}

.toolbar-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Уведомления */
.copy-toast {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 87, 248, 0.2);
  z-index: 10002;
  animation: toastPop 0.25s ease-out forwards;
}

.copy-toast.error {
  background: var(--atlas-error-color);
}

/* Анимации */
@keyframes toastPop {
  0% {
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}
/* dragdrop.css - Стили для Drag & Drop модуля */
.section-right, .block-item, .block-editor-wrapper, .section-row,
#panel-conclusion, #panel-recommendations {
  overflow: visible !important;
}

#panel-conclusion, #panel-recommendations {
  min-height: 60px;
  position: relative;
}

.section-right {
  position: relative !important;
  min-height: 50px;
  transition: background var(--atlas-transition-time) ease;
  border-radius: 8px;
}

.section-right.drop-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 20px;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

.section-right.drop-active {
  background: rgba(0, 87, 248, 0.03) !important;
}

.section-row {
  position: relative;
  transition: opacity var(--atlas-transition-time) ease, transform var(--atlas-transition-time) ease;
}

.section-row[dragging="1"] {
  opacity: 0.4 !important;
  transform: scale(0.98);
}

.section-drag-handle {
  position: absolute;
  left: -36px;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  opacity: 0;
  transition: opacity var(--atlas-transition-time), transform var(--atlas-transition-time);
  color: var(--atlas-accent-color);
  z-index: 100;
  padding: 4px;
  border-radius: 6px;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  user-select: none;
}

.section-row:hover .section-drag-handle {
  opacity: 1;
}

.section-drag-handle:hover {
  background: var(--atlas-bg-card);
  transform: translateY(-50%) scale(1.1);
}

.section-drag-handle:active {
  cursor: grabbing;
  transform: translateY(-50%) scale(0.95);
}

.section-drag-handle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.section-placeholder {
  height: 100px;
  background: rgba(0, 87, 248, 0.1);
  border: 2px dashed var(--atlas-accent-color);
  border-radius: 8px;
  margin: 10px 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--atlas-accent-color);
  font-weight: 500;
}

.block-item, .conclusion-block, .recommendation-block {
  position: relative !important;
  /*z-index: 10 !important;*/
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity var(--atlas-transition-time) ease;
}

.block-item:last-child, .conclusion-block:last-child, .recommendation-block:last-child {
  margin-bottom: 0;
}

.block-item[dragging="1"], .conclusion-block[dragging="1"], .recommendation-block[dragging="1"] {
  opacity: 0.4 !important;
  box-shadow: none !important;
  transform: scale(0.98) !important;
  transition: none !important;
}

.drag-handle {
  position: absolute !important;
  left: -36px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 28px;
  height: 28px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: grab !important;
  opacity: 0;
  transition: opacity var(--atlas-transition-time), transform var(--atlas-transition-time) !important;
  color: var(--atlas-accent-color) !important;
  z-index: 99999 !important;
  padding: 4px;
  border-radius: 6px;
  background: var(--atlas-bg-main) !important;
  border: 1px solid var(--atlas-border-color) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  pointer-events: auto !important;
  user-select: none !important;
  outline: none !important;
}

.drag-handle:active {
  cursor: grabbing !important;
  transform: translateY(-50%) scale(0.95) !important;
}

.block-item:hover .drag-handle,
.conclusion-block:hover .drag-handle,
.recommendation-block:hover .drag-handle {
  opacity: 1 !important;
}

.drag-handle:hover {
  background: var(--atlas-bg-card) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

.drag-handle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.drag-placeholder {
  height: 60px;
  background: var(--atlas-bg-card);
  border: 2px dashed var(--atlas-accent-color);
  border-radius: 8px;
  margin: 8px 0;
  pointer-events: none;
  box-sizing: border-box;
  flex-shrink: 0;
}

body.dd-conclusion-active #panel-conclusion * {
  pointer-events: none !important;
}

body.dd-recommendation-active #panel-recommendations * {
  pointer-events: none !important;
}

@media (max-width: 768px) {
  .drag-handle,
  .section-drag-handle {
    display: none !important;
  }
}
/* history.css - Стили для модуля истории */
/* Toast уведомления */
.history-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(0, 87, 248, 0.2);
  z-index: 10001;
  opacity: 0;
  transition: opacity var(--atlas-transition-time);
}

.history-toast.error {
  background: var(--atlas-error-color);
}

/* UI контейнер */
.history-ui {
  position: fixed;
  top: 112px;
  right: 16px;
  z-index: 100001;
}

/* Кнопка истории */
.history-btn {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 8px;
  color: var(--atlas-accent-color);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all var(--atlas-transition-time) ease;
  padding: 0;
  position: relative;
}

.history-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 87, 248, 0.15);
  border-color: var(--atlas-accent-color);
  transform: scale(1.05);
}

.history-btn:active {
  transform: scale(0.95);
}

.history-btn .btn-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--atlas-text-primary);
  color: var(--atlas-text-contrast);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--atlas-transition-time), transform var(--atlas-transition-time);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme=dark] .history-btn .btn-tooltip {
  background: var(--atlas-bg-card);
  color: var(--atlas-text-contrast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--atlas-border-color);
}

.history-btn:hover .btn-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Меню истории */
.history-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--atlas-bg-main);
  border: 1px solid var(--atlas-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  min-width: 300px;
  max-width: 360px;
  overflow: hidden;
  z-index: 10000;
}

[data-theme=dark] .history-menu {
  background: var(--atlas-header-bg);
  border-color: var(--atlas-border-color);
}

/* Заголовок меню */
.history-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--atlas-border-color);
  background: var(--atlas-bg-card);
}

[data-theme=dark] .history-header {
  background: var(--atlas-header-bg);
  border-bottom-color: var(--atlas-border-color);
}

[data-theme=dark] .history-header strong {
  color: var(--atlas-text-contrast);
}

/* Список версий */
.history-list {
  max-height: 320px;
  overflow-y: auto;
}

/* Элемент списка */
.history-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--atlas-border-color);
  cursor: pointer;
  transition: background var(--atlas-transition-time);
  color: var(--atlas-text-primary);
}

.history-item:hover {
  background: var(--atlas-bg-card);
}

.history-item.active {
  background: var(--atlas-bg-card);
}

[data-theme=dark] .history-item {
  color: var(--atlas-text-contrast);
  border-bottom-color: var(--atlas-border-color);
}

[data-theme=dark] .history-item:hover {
  background: var(--atlas-bg-card);
}

[data-theme=dark] .history-item.active {
  background: rgba(0, 87, 248, 0.15);
}

/* Бейджи статусов */
.history-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.history-badge.active {
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
}

.history-badge.archive {
  background: var(--atlas-bg-card);
  color: var(--atlas-text-secondary);
}

.history-badge.branch {
  background: var(--atlas-bg-card);
  color: var(--atlas-accent-color);
}

.history-badge.modified {
  background: #fff3e0;
  color: #f57c00;
}

[data-theme=dark] .history-badge.modified {
  background: rgba(245, 124, 0, 0.2);
  color: #f57c00;
}

[data-theme=dark] .history-badge.archive {
  background: var(--atlas-header-bg);
  color: var(--atlas-text-secondary);
}

[data-theme=dark] .history-badge.branch {
  background: var(--atlas-header-bg);
  color: var(--atlas-accent-color);
}

/* Футер меню */
.history-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--atlas-border-color);
  background: var(--atlas-bg-card);
}

[data-theme=dark] .history-footer {
  background: var(--atlas-header-bg);
  border-top-color: var(--atlas-border-color);
}

.history-clear-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--atlas-border-color);
  border-radius: 8px;
  background: var(--atlas-bg-main);
  color: var(--atlas-text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--atlas-transition-time);
}

.history-clear-btn:hover {
  border-color: var(--atlas-error-color);
  color: var(--atlas-error-color);
}

[data-theme=dark] .history-clear-btn {
  background: var(--atlas-bg-card);
  color: var(--atlas-text-secondary);
}

[data-theme=dark] .history-clear-btn:hover {
  border-color: var(--atlas-error-color);
  color: var(--atlas-error-color);
}

/* Overlay для промпта */
.history-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--atlas-overlay);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

/* Карточка промпта */
.history-card {
  background: var(--atlas-bg-main);
  border-radius: 14px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: cardIn 0.25s ease-out;
}

[data-theme=dark] .history-card {
  background: var(--atlas-header-bg);
  border: 1px solid var(--atlas-border-color);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* Кнопки промпта */
.history-btn-empty {
  padding: 10px 20px;
  border: 1px solid var(--atlas-border-color);
  border-radius: 8px;
  background: var(--atlas-bg-main);
  color: var(--atlas-text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--atlas-transition-time);
}

.history-btn-empty:hover {
  border-color: var(--atlas-accent-color);
  color: var(--atlas-accent-color);
}

[data-theme=dark] .history-btn-empty {
  background: var(--atlas-bg-card);
  color: var(--atlas-text-contrast);
  border-color: var(--atlas-border-color);
}

[data-theme=dark] .history-btn-empty:hover {
  border-color: var(--atlas-accent-color);
  color: var(--atlas-accent-color);
}

.history-btn-branch {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--atlas-transition-time);
  box-shadow: 0 2px 8px rgba(0, 87, 248, 0.3);
}

.history-btn-branch:hover {
  background: var(--atlas-accent-color);
  box-shadow: 0 4px 12px rgba(0, 87, 248, 0.4);
}

[data-theme=dark] .history-btn-branch {
  box-shadow: 0 2px 8px rgba(0, 87, 248, 0.5);
}

/* variants.css - Стили для модуля вариантов */
/* Панель вариантов */
.variants-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--atlas-bg-main);
  border-left: 1px solid var(--atlas-border-color);
}

.variants-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--atlas-border-color);
  background: var(--atlas-bg-card);
}

.variants-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--atlas-text-primary);
}

.variants-search-wrapper {
  padding: 12px 16px;
  border-bottom: 1px solid var(--atlas-border-color);
  background: var(--atlas-bg-main);
}

.variants-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--atlas-border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: border-color var(--atlas-transition-time);
  background: var(--atlas-bg-main);
  color: var(--atlas-text-primary);
}

.variants-search-input:focus {
  outline: none;
  border-color: var(--atlas-accent-color);
  box-shadow: 0 0 0 2px rgba(0, 87, 248, 0.1);
}

.variants-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* Дерево вариантов */
.tree-node {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree-node-header {
  display: flex;
  align-items: center;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: default;
  transition: background var(--atlas-transition-time);
}

.tree-node-header:hover {
  background: var(--atlas-bg-card);
}

.tree-toggle {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--atlas-text-secondary);
  padding: 0;
  margin-right: 4px;
}

.tree-toggle-sign {
  font-weight: bold;
}

.tree-title {
  flex: 1;
  font-size: 0.875rem;
  color: var(--atlas-text-primary);
  cursor: pointer;
}

.tree-children {
  margin-left: 20px;
  display: none;
}

.tree-node.expanded > .tree-children {
  display: block;
}

/* Модальное окно выбора блока */
.blocks-choice-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--atlas-bg-main);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  width: 400px;
  max-width: 90%;
  max-height: 80%;
  overflow: auto;
}

.blocks-choice-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--atlas-border-color);
}

.blocks-choice-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--atlas-text-primary);
}

.blocks-choice-body {
  padding: 15px;
}

.blocks-choice-footer {
  padding: 10px 15px;
  border-top: 1px solid var(--atlas-border-color);
  text-align: right;
}

.block-choice-item {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--atlas-border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--atlas-transition-time);
}

.block-choice-item:hover {
  background: var(--atlas-bg-card);
}

.block-choice-title-text {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--atlas-text-primary);
}

.block-choice-preview {
  font-size: 0.8rem;
  color: var(--atlas-text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.block-choice-apply-btn {
  padding: 4px 12px;
  background: var(--atlas-accent-color);
  color: var(--atlas-text-contrast);
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background var(--atlas-transition-time);
}

.block-choice-apply-btn:hover {
  background: #00447c;
}

.blocks-choice-cancel-btn {
  padding: 6px 16px;
  background: var(--atlas-bg-card);
  border: 1px solid var(--atlas-border-color);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--atlas-transition-time);
  color: var(--atlas-text-primary);
}

.blocks-choice-cancel-btn:hover {
  background: var(--atlas-border-color);
}

.blocks-choice-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--atlas-overlay);
  z-index: 99999;
}

/* Desktop layout */
.editor-layout-row {
  display: flex;
  gap: 20px;
}

.editor-main-col {
  flex: 1;
  min-width: 0;
}

.editor-variants-col {
  width: 320px;
  flex-shrink: 0;
  display: none;
}

.editor-variants-col.active {
  display: block;
}

.editor-layout-row.variants-open .editor-main-col {
  width: calc(100% - 340px);
}
@media (max-width: 768px) {
  .editor-layout-row.variants-open .editor-main-col {
    width: 100%;
  }
}

/* Адаптивность */
@media (max-width: 991px) {
  .editor-variants-col {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .editor-variants-col.active {
    transform: translateX(0);
  }
  .variants-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--atlas-overlay);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  .variants-overlay.show {
    opacity: 1;
    visibility: visible;
  }
}
.variants-spinner-wrapper {
  text-align: center;
  padding: 2rem 1rem;
}

.variants-spinner {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.variants-spinner-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--atlas-accent-color);
  animation: variants-spinner-bounce 1.4s ease-in-out infinite both;
}

.variants-spinner-circle:nth-child(1) {
  animation-delay: -0.32s;
}

.variants-spinner-circle:nth-child(2) {
  animation-delay: -0.16s;
}

.variants-spinner-circle:nth-child(3) {
  animation-delay: 0s;
}

@keyframes variants-spinner-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.variants-spinner-text {
  margin-top: 0.5rem;
  color: var(--atlas-text-secondary);
  font-size: 0.85rem;
}

/* Микро-спиннер для кнопок */
.micro-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--atlas-bg-card);
  border-top: 2px solid var(--atlas-accent-color);
  border-radius: 50%;
  animation: micro-spin 0.8s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes micro-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* ========== МОБИЛЬНЫЕ КНОПКИ ПЕРЕМЕЩЕНИЯ ========== */
@media (max-width: 991.98px) {
  /* Секции - кнопки под названием секции */
  .section-row .section-left .mobile-move-buttons {
    display: flex !important;
    gap: 4px;
    padding: 4px 0;
    margin-top: 2px;
    margin-bottom: 4px;
    position: relative;
    z-index: 5;
  }
  /* Блоки - кнопки в начале блока */
  .block-item .mobile-move-buttons,
  .conclusion-block .mobile-move-buttons,
  .recommendation-block .mobile-move-buttons {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  .mobile-move-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    touch-action: manipulation;
    position: relative;
  }
  .mobile-move-btn:active:not(.disabled) {
    transform: scale(0.9);
    background: rgba(0, 93, 165, 0.1);
  }
  .mobile-move-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
  }
  .mobile-move-btn.mobile-move-up,
  .mobile-move-btn.mobile-move-down {
    color: #0d6efd;
  }
  .mobile-move-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
  }
  /* Увеличенная зона касания */
  .mobile-move-btn::after {
    content: "";
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 6px;
  }
  /* Анимация появления */
  .mobile-move-buttons {
    animation: mobileMoveFadeIn 0.2s ease;
    display: flex;
  }
  @keyframes mobileMoveFadeIn {
    from {
      opacity: 0;
      transform: translateY(-4px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  /* Темная тема */
  [data-theme=dark] .mobile-move-btn {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
  }
  [data-theme=dark] .mobile-move-btn.mobile-move-up,
  [data-theme=dark] .mobile-move-btn.mobile-move-down {
    color: #60a5fa;
  }
  [data-theme=dark] .mobile-move-btn:active:not(.disabled) {
    background: rgba(96, 165, 250, 0.15);
  }
  [data-theme=dark] .block-item .mobile-move-buttons,
  [data-theme=dark] .conclusion-block .mobile-move-buttons,
  [data-theme=dark] .recommendation-block .mobile-move-buttons {
    border-bottom-color: rgba(255, 255, 255, 0.05);
  }
}
/* === ОСНОВНОЙ ЛЕЙАУТ РЕДАКТОРА === */
.editor-container {
  margin: 0 auto;
}

/* Скрываем тулбар по умолчанию */
.editor-toolbar {
  display: none !important;
}

/* Показываем, когда есть класс active или loaded */
.editor-toolbar.active {
  display: flex !important; /* или block, в зависимости от вашего стиля */
}

#smartEditorContainer {
  margin-top: 60px;
}
@media (max-width: 1024px) {
  #smartEditorContainer {
    width: calc(100% - 50px);
  }
}

@media (min-width: 992px) {
  .smart-template-editor.editor-container {
    display: flex;
    flex-direction: column;
    margin-right: 0 !important;
  }
}

/* Двухколоночный лейаут */
.editor-layout-row {
  display: flex;
  gap: 20px;
}
@media (min-width: 992px) {
  .editor-layout-row {
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
}
@media (min-width: 992px) {
  .editor-layout-row.variants-open .editor-main-col {
    padding-right: 34px;
  }
}

.editor-main-col {
  flex: 1;
  min-width: 0;
  transition: padding-right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-variants-col {
  width: 0;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.editor-variants-col.active {
  width: 320px;
}
@media (min-width: 992px) {
  .editor-variants-col {
    flex-shrink: 0;
    align-self: stretch;
    visibility: hidden;
    overflow: clip;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
  }
  .editor-variants-col.active {
    width: 320px;
    visibility: visible;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
  }
}
@media (min-width: 992px) {
  .editor-variants-col #variantsPanel {
    position: sticky;
    top: 16px;
    right: auto !important;
    transform: none !important;
    transition: none !important;
    width: 320px !important;
    height: auto !important;
    max-height: calc(100vh - 80px);
    border: 1px solid #cfe2ff;
    border-left: 3px solid #0057F8;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0, 93, 165, 0.1);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
  }
  [data-theme=dark] .editor-variants-col #variantsPanel {
    background: var(--atlas-header-bg);
    border: none;
  }
  .editor-variants-col #variantsPanel .btn-close,
  .editor-variants-col #variantsPanel .desktop-close-btn {
    display: none !important;
  }
}

/* Стили для таблиц в редакторе */
.smart-editor-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.smart-editor-table th,
.smart-editor-table td {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  text-align: left;
  vertical-align: top;
}

.smart-editor-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.smart-editor-table tr:hover td {
  background: #f5f5f5;
}

/* Для таблиц, скопированных из Excel */
.smart-editor-table[border="1"] th,
.smart-editor-table[border="1"] td {
  border: 1px solid #aaa;
}

/* === CSS ПЕРЕМЕННЫЕ ДЛЯ ТЕМНОЙ ТЕМЫ === */
:root {
  --atlas-header-bg: #1d1d1f;
  --panel-section-bg: transparent;
  --panel-section-active-bg: rgba(0, 87, 248, 0.03);
  --panel-section-variants-bg: #f8fafc;
  --panel-section-variants-border: var(--atlas-accent-color);
}

[data-theme=dark] {
  --atlas-header-bg: #1d1d1f;
  --panel-section-bg: rgba(255, 255, 255, 0.02);
  --panel-section-active-bg: rgba(0, 87, 248, 0.08);
  --panel-section-variants-bg: rgba(30, 58, 95, 0.3);
  --panel-section-variants-border: #2c4f7a;
}

/* === СЕКЦИИ И ПАНЕЛИ === */
.panel-section {
  margin-bottom: 28px;
}

.panel-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}
.panel-header.desc {
  color: #6c757d;
  border-bottom-color: #dee2e6;
}
.panel-header.conc {
  color: #0057F8;
  border-bottom-color: #cfe2ff;
}
.panel-header.rec {
  color: #198754;
  border-bottom-color: #d1e7dd;
}

.section-row {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  transition: all 0.2s;
}
.section-row.active {
  background: var(--panel-section-active-bg);
  border-radius: 8px;
  padding: 0px 8px;
  margin-left: -8px;
  margin-right: -8px;
}
.section-row.active .section-left {
  border-left: 3px solid #0057F8;
  padding-left: 12px;
}
.section-row:hover .section-actions {
  opacity: 1;
}

.section-left {
  width: 220px;
  flex-shrink: 0;
  padding-top: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #212529;
}
@media (max-width: 768px) {
  .section-left {
    width: 100%;
  }
}

.section-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.section-title {
  color: #212529;
}

.section-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 4px;
  color: #212529;
}

@media (min-width: 992px) {
  .section-variants-container {
    margin-top: 16px;
    padding: 12px;
    background: var(--panel-section-variants-bg);
    border: 1px solid var(--panel-section-variants-border);
    border-radius: 8px;
    border-left: 4px solid var(--panel-section-variants-border);
  }
}

/* === ТЁМНАЯ ТЕМА (только для специфичных случаев) === */
[data-theme=dark] .panel-header {
  border-bottom-color: #374151;
}
[data-theme=dark] .panel-header.desc {
  color: #9ca3af;
  border-bottom-color: #374151;
}
[data-theme=dark] .panel-header.conc {
  color: #3b82f6;
  border-bottom-color: rgba(59, 130, 246, 0.2);
}
[data-theme=dark] .panel-header.rec {
  color: #10b981;
  border-bottom-color: rgba(16, 185, 129, 0.2);
}
[data-theme=dark] .section-left,
[data-theme=dark] .section-title,
[data-theme=dark] .section-right {
  color: #e5e7eb;
}
[data-theme=dark] .section-row.active .section-left {
  border-left-color: #3b82f6;
}
[data-theme=dark] .section-actions button, [data-theme=dark] .section-actions .action-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #d1d5db;
}
[data-theme=dark] .section-actions button:hover, [data-theme=dark] .section-actions .action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
[data-theme=dark] .section-variants-container {
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .section-row {
    flex-direction: column;
    align-items: start;
  }
  .section-right {
    width: 100%;
  }
}
/* === АДАПТИВНОСТЬ === */
@media (max-width: 991px) {
  .modality-selector .d-flex {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  #filterCategory, #filterTemplate, #templateSearch, #btnCopyTemplate {
    width: 100%;
    min-width: auto !important;
  }
  #btnLoadTemplate {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .inline-var-select {
    font-size: 1em;
    padding: 4px 28px 4px 8px;
  }
  .editor-layout-row {
    display: block;
  }
  .editor-variants-col {
    display: none;
  }
  #variantsPanel {
    position: fixed !important;
    top: 64px !important;
    right: -400px !important;
    width: 320px !important;
    height: calc(100vh - 64px) !important;
    transform: none !important;
    transition: right 0.3s ease !important;
    display: flex !important;
    flex-direction: column;
    border-radius: 0 !important;
    border: none !important;
    border-left: 1px solid #e0e0e0 !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1) !important;
  }
  #variantsPanel.show {
    right: 0 !important;
  }
}
@media (min-width: 1024px) {
  .section-row {
    flex-direction: row;
  }
  .section-row > div {
    width: 220px;
  }
  .editor-variants-col.active {
    width: 320px;
  }
}
/* Сброс для десктопа (body class для панели) */
@media (min-width: 992px) {
  body.variants-panel-open .smart-template-editor.editor-container {
    margin-right: 380px;
    transition: margin-right 0.3s ease;
  }
}

/* === СПЕЦИФИЧНЫЕ СТИЛИ ДЛЯ SMART EDITOR === */
#filterTemplate:disabled,
#btnLoadTemplate:disabled,
#btnCopyTemplate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.block-editor span[data-fmt=bold] {
  font-weight: bold !important;
}

.block-editor span[data-fmt=italic] {
  font-style: italic !important;
}

.block-editor span[data-fmt=underline] {
  text-decoration: underline !important;
}

.block-editor[contenteditable=true] {
  font-weight: inherit;
  font-style: inherit;
  text-decoration: inherit;
}

.block-editor[contenteditable=true] {
  font-weight: inherit !important;
  font-style: inherit !important;
  text-decoration: inherit !important;
  line-height: 1.5;
}

.block-editor b,
.block-editor strong {
  font-weight: bold !important;
}

.block-editor i,
.block-editor em {
  font-style: italic !important;
}

.block-editor u {
  text-decoration: underline !important;
}

#panel-conclusion .block-actions-panel {
  position: absolute;
  top: 50%;
  right: -15px;
  display: flex;
  gap: 4px;
  z-index: 100;
  transform: translateY(-50%) !important;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.2em;
}

.text-primary {
  color: #0057F8;
}

.text-muted {
  color: var(--atlas-text-secondary);
}

.text-center {
  text-align: center;
}

.py-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* EditorLoader Spinner Styles */
.smart-spinner-wrapper {
  text-align: center;
  padding: 3rem 1rem;
}

.smart-spinner {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.spinner-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #007bff;
  animation: smart-spinner-bounce 1.4s ease-in-out infinite both;
}

.spinner-circle:nth-child(1) {
  animation-delay: -0.32s;
}

.spinner-circle:nth-child(2) {
  animation-delay: -0.16s;
}

.spinner-circle:nth-child(3) {
  animation-delay: 0s;
}

@keyframes smart-spinner-bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
.smart-spinner-text {
  margin-top: 1rem;
  color: #6c757d;
  font-size: 0.9rem;
}

/*# sourceMappingURL=smart-editor.css.map */
