/* css/document-editor.css
 * ★ F-2c-6 — document-editor: WYSIWYG + inline-услуги + PDF диалог.
 *
 * ★ U-1 (2026-10-31) — пилот UI-kit:
 *   Стили карточек / таблиц / rework-баннера / топбара / send-модалки
 *   переехали в css/ui/_ui.css (wi-*). Здесь остаётся только layout
 *   экрана и обвязка shadow DOM.
 *   Удалены: .document-editor__topbar*, .document-editor__rework-banner*,
 *   .document-editor__card*, .document-editor__services*, .document-editor__total,
 *   dialog.de-send-dialog, .de-send*, @keyframes de-spin.
 */

/* ============================================================
   Layout экрана
   ============================================================ */
.document-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.document-editor__split {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.document-editor__left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  position: sticky;
  top: 12px;
}


/* ============================================================
   Правая панель — контейнер shadow DOM (стили документа приходят
   из бэкенда, этот блок — только обвязка).
   ============================================================ */
.document-editor__right.de-doc-host {
  display: block;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 28px 32px;
  min-height: calc(100vh - 220px);
  position: relative;
  overflow: hidden;
}

.de-doc-host[data-loading]::before {
  content: 'Загрузка документа…';
  display: block;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 40px 20px;
}


/* ============================================================
   Хост для wi-dropzone (upload-режим)
   ============================================================ */
.document-editor .de-upload-host {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}


/* ============================================================
   Send-модалка: обвязка wi-modal--lg + wi-preview
   (wi-modal и wi-preview — в css/ui/_ui.css; здесь только
   то, что относится к этому экрану — растяжка preview + download)
   ============================================================ */
.wi-send-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.wi-send-body .wi-preview {
  flex: 1 1 auto;
  min-height: 0;
}
.wi-send-body__extra {
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}


/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1100px) {
  .document-editor__split { grid-template-columns: 1fr; }
  .document-editor__left { position: static; order: 2; }
  .document-editor__right { order: 1; padding: 20px; min-height: 60vh; }
}
@media (max-width: 760px) {
  .document-editor__right { padding: 16px; }
}