/**
 * _legal.css
 * Стили для юридических документов
 */

/* ============================================================
   ОСНОВНЫЕ СТИЛИ СТРАНИЦЫ
   ============================================================ */

/* ===== BREADCRUMB ===== */
.breadcrumb-wrap {
  background: #f3f5f9;
  border-bottom: 1px solid var(--color-divider, #eeedf4);
}
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 80px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-graphite, #8a94a6);
}
.breadcrumb a {
  color: var(--color-graphite, #8a94a6);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--color-accent, #7b1c34);
}
.breadcrumb__sep {
  color: var(--color-light-gray, #b0b8c8);
}
.breadcrumb__current {
  color: var(--color-techno-blue, #001544);
  font-weight: 600;
}

/* ===== DOC HERO ===== */
.doc-hero {
  background: var(--color-techno-blue, #001544);
  padding: 56px 40px 48px;
}
.doc-hero__inner {
  max-width: 800px;
  margin: 0 auto;
}
.doc-hero__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.doc-hero__title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 14px;
}
.doc-hero__sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  margin-bottom: 20px;
}
.doc-hero__meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.doc-hero__meta-item {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-hero__meta-item span {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== MAIN CONTENT ===== */
.doc-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.doc-section {
  margin-bottom: 48px;
  scroll-margin-top: 140px;
}
.doc-section__num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a6fc4;
  margin-bottom: 8px;
}
.doc-section__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-techno-blue, #001544);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-cool-gray-blue, #e7edf4);
}

/* ============================================================
   СТИЛИ ДЛЯ СОДЕРЖИМОГО
   ============================================================ */

.doc-section__content p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-techno-blue, #001544);
  margin-bottom: 16px;
}

.doc-section__content strong {
  font-weight: 600;
  color: var(--color-techno-blue, #001544);
}

.doc-section__content em {
  font-style: italic;
  color: var(--color-accent-blue, #2d3e6b);
}

.doc-section__content a {
  color: var(--color-blue, #18428c);
  text-decoration: none;
}
.doc-section__content a:hover {
  text-decoration: underline;
}

.doc-section__content blockquote {
  background: #f0f3fa;
  border-left: 4px solid var(--color-blue, #18428c);
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
  margin: 16px 0;
  font-style: italic;
  color: var(--color-accent-blue, #2d3e6b);
}
.doc-section__content blockquote p {
  margin: 0;
}

/* ============================================================
   СПИСКИ
   ============================================================ */

/* ---- ОБЫЧНЫЙ СПИСОК С ТИРЕ ---- */
.doc-sublist {
  list-style: none;
  padding: 0;
  margin: 10px 0 16px 0;
}
.doc-sublist li {
  padding: 5px 0 5px 18px;
  border-bottom: 1px dashed var(--color-divider, #eeedf4);
  position: relative;
  font-size: 14px;
  color: var(--color-accent-blue, #2d3e6b);
}
.doc-sublist li:last-child {
  border-bottom: none;
}
.doc-sublist li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-light-gray, #b0b8c8);
}

/* ---- НУМЕРОВАННЫЙ СПИСОК ---- */
.doc-section__content ol {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px 0;
  counter-reset: item;
}
.doc-section__content ol li {
  padding: 5px 0 5px 28px;
  border-bottom: 1px dashed var(--color-divider, #eeedf4);
  position: relative;
  font-size: 14px;
  color: var(--color-accent-blue, #2d3e6b);
  counter-increment: item;
}
.doc-section__content ol li:last-child {
  border-bottom: none;
}
.doc-section__content ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  color: var(--color-light-gray, #b0b8c8);
  font-weight: 600;
}

/* ---- ВЛОЖЕННЫЕ СПИСКИ ---- */
.doc-sublist ul,
.doc-sublist ol,
.doc-section__content ul ul,
.doc-section__content ol ul,
.doc-section__content ul ol,
.doc-section__content ol ol {
  margin: 4px 0 8px 20px;
}
.doc-sublist ul li:last-child,
.doc-sublist ol li:last-child,
.doc-section__content ul ul li:last-child,
.doc-section__content ol ul li:last-child,
.doc-section__content ul ol li:last-child,
.doc-section__content ol ol li:last-child {
  border-bottom: none;
}

/* ============================================================
   ОБЫЧНЫЙ ПУНКТ (ОДИНОЧНЫЙ)
   ============================================================ */

.doc-clause {
  margin-bottom: 14px;
  padding-left: 20px;
  position: relative;
  list-style: none;
}
.doc-clause::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: var(--color-light-gray, #b0b8c8);
}
.doc-clause strong:first-child {
  font-weight: 600;
  color: var(--color-blue, #18428c);
  font-size: 13px;
  margin-right: 4px;
}

/* ============================================================
   ПРЕДУПРЕЖДЕНИЕ (КРАСНЫЙ) - ВЕСЬ БЛОК
   ============================================================ */

.doc-clause--warning {
  background: rgba(123, 28, 52, 0.05);
  border-left: 3px solid var(--color-accent, #7b1c34);
  border-radius: 0 4px 4px 0;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  list-style: none;
}

/* Первый li - заголовок предупреждения */
.doc-clause--warning li:first-child {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-techno-blue, #001544);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(123, 28, 52, 0.15);
  margin-bottom: 6px;
  font-weight: 500;
}
.doc-clause--warning li:first-child strong {
  font-weight: 700;
  color: var(--color-accent, #7b1c34);
}

/* Остальные li - пункты списка */
.doc-clause--warning li:not(:first-child) {
  padding: 5px 0 5px 18px;
  position: relative;
  font-size: 14px;
  color: var(--color-accent-blue, #2d3e6b);
  border-bottom: 1px dashed rgba(123, 28, 52, 0.1);
}
.doc-clause--warning li:not(:first-child)::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(123, 28, 52, 0.3);
}
.doc-clause--warning li:last-child {
  border-bottom: none;
}

/* ============================================================
   ВЫДЕЛЕННЫЙ ПУНКТ (СИНИЙ) - ВЕСЬ БЛОК
   ============================================================ */

.doc-clause--highlight {
  background: #f0f3fa;
  border-left: 3px solid var(--color-blue, #18428c);
  border-radius: 0 4px 4px 0;
  padding: 14px 16px;
  margin: 0 0 14px 0;
  list-style: none;
}

/* Первый li - заголовок выделенного пункта */
.doc-clause--highlight li:first-child {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-techno-blue, #001544);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(24, 66, 140, 0.15);
  margin-bottom: 6px;
  font-weight: 500;
}
.doc-clause--highlight li:first-child strong {
  font-weight: 700;
  color: var(--color-blue, #18428c);
}

/* Остальные li - пункты списка */
.doc-clause--highlight li:not(:first-child) {
  padding: 5px 0 5px 18px;
  position: relative;
  font-size: 14px;
  color: var(--color-accent-blue, #2d3e6b);
  border-bottom: 1px dashed rgba(24, 66, 140, 0.1);
}
.doc-clause--highlight li:not(:first-child)::before {
  content: "—";
  position: absolute;
  left: 0;
  color: rgba(24, 66, 140, 0.3);
}
.doc-clause--highlight li:last-child {
  border-bottom: none;
}

/* ============================================================
   ОПЕРАТОР КАРД
   ============================================================ */

.operator-card {
  background: #fff;
  border: 1px solid var(--color-divider, #eeedf4);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 0 0 40px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 32px;
}
.operator-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-graphite, #8a94a6);
  margin-bottom: 4px;
}
.operator-card__value {
  font-size: 14px;
  color: var(--color-techno-blue, #001544);
  font-weight: 500;
}
.operator-card__value a {
  color: var(--color-blue, #18428c);
  text-decoration: none;
}
.operator-card__value a:hover {
  text-decoration: underline;
}

/* ============================================================
   БЕЙДЖ СРОКА
   ============================================================ */

.term-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e7edf4;
  border-radius: 3px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-techno-blue, #001544);
  margin: 8px 0;
}
.term-badge svg {
  flex-shrink: 0;
  color: var(--color-blue, #18428c);
}

/* ============================================================
   СЕТКА ПРАВ
   ============================================================ */

.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.rights-item {
  background: #fff;
  border: 1px solid var(--color-divider, #eeedf4);
  border-radius: 4px;
  padding: 16px;
  font-size: 13px;
  color: var(--color-techno-blue, #001544);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.rights-item:hover {
  border-color: var(--color-blue, #18428c);
}
.rights-item__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-blue, #18428c);
  margin-top: 1px;
}

/* ============================================================
   ОГЛАВЛЕНИЕ (ЛИПКОЕ)
   ============================================================ */

.doc-toc {
  position: relative;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-divider, #eeedf4);
  transition: box-shadow 0.3s ease;
  margin: 0;
}

.doc-toc--sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(238, 237, 244, 0.8);
}

.doc-toc--bottom {
  position: absolute !important;
  bottom: 0 !important;
  top: auto !important;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: none;
  border-top: 1px solid rgba(238, 237, 244, 0.8);
}

.doc-toc__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc-toc__scroll {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 20px 0;
}

.doc-toc__link {
  font-size: 12px;
  color: var(--color-graphite, #8a94a6);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--color-divider, #eeedf4);
  border-radius: 2px;
  white-space: nowrap;
  transition: all 0.2s;
}
.doc-toc__link:hover {
  color: var(--color-techno-blue, #001544);
  border-color: var(--color-light-gray, #b0b8c8);
  background: var(--color-cool-gray-blue, #e7edf4);
}
.doc-toc__link.active {
  background: var(--color-blue, #18428c);
  color: #fff;
  border-color: var(--color-blue, #18428c);
}

/* ============================================================
   DOC FOOTER
   ============================================================ */

.doc-footer {
  background: var(--color-techno-blue, #001544);
  padding: 32px 40px;
}
.doc-footer__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.doc-footer__brand {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.doc-footer__meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.doc-footer__home {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}
.doc-footer__home:hover {
  color: #fff;
}

/* ============================================================
   СТИЛИ ДЛЯ РЕДАКТОРА (подсветка блоков)
   ============================================================ */

/* Предупреждение в редакторе */
.mce-content-body .doc-clause--warning {
  border: 2px dashed var(--color-accent, #7b1c34) !important;
  background: rgba(123, 28, 52, 0.05) !important;
}
.mce-content-body .doc-clause--warning:before {
  content: "⚠️ Предупреждение";
  display: block;
  font-size: 10px;
  color: var(--color-accent, #7b1c34);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Выделенный пункт в редакторе */
.mce-content-body .doc-clause--highlight {
  border: 2px dashed var(--color-blue, #18428c) !important;
  background: rgba(24, 66, 140, 0.05) !important;
}
.mce-content-body .doc-clause--highlight:before {
  content: "🔵 Выделенный пункт";
  display: block;
  font-size: 10px;
  color: var(--color-blue, #18428c);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Обычный список в редакторе */
.mce-content-body .doc-sublist {
  border: 2px dashed #e7edf4 !important;
  padding: 8px !important;
}
.mce-content-body .doc-sublist:before {
  content: "📋 Список с тире";
  display: block;
  font-size: 10px;
  color: #8a94a6;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Оператор кард в редакторе */
.mce-content-body .operator-card {
  border: 2px dashed #e7edf4 !important;
  padding: 16px !important;
}
.mce-content-body .operator-card:before {
  content: "🏢 Карточка оператора";
  display: block;
  font-size: 10px;
  color: #8a94a6;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Бейдж срока в редакторе */
.mce-content-body .term-badge {
  border: 2px dashed #e7edf4 !important;
  padding: 8px 14px !important;
}
.mce-content-body .term-badge:before {
  content: "⏱️ Бейдж срока";
  display: block;
  font-size: 10px;
  color: #8a94a6;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Сетка прав в редакторе */
.mce-content-body .rights-grid {
  border: 2px dashed #e7edf4 !important;
  padding: 12px !important;
}
.mce-content-body .rights-grid:before {
  content: "📊 Сетка прав";
  display: block;
  font-size: 10px;
  color: #8a94a6;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 992px) {
  .breadcrumb {
    padding: 12px 40px;
  }
  .doc-hero {
    padding: 40px 40px 32px;
  }
}

@media (max-width: 768px) {
  .breadcrumb {
    padding: 10px 24px;
    font-size: 12px;
  }
  .doc-hero {
    padding: 32px 24px 28px;
  }
  .doc-hero__title {
    font-size: 22px;
  }
  .doc-hero__meta {
    gap: 16px;
  }
  .doc-toc__scroll {
    padding: 16px 0;
    gap: 4px;
  }
  .doc-toc__link {
    font-size: 11px;
    padding: 3px 8px;
  }
  .doc-body {
    padding: 32px 24px 60px;
  }
  .doc-section__title {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .breadcrumb {
    padding: 8px 16px;
    font-size: 11px;
  }
  .doc-hero {
    padding: 24px 16px 20px;
  }
  .doc-hero__title {
    font-size: 20px;
  }
  .doc-hero__meta-item {
    font-size: 10px;
  }
  .doc-toc__scroll {
    padding: 12px 0;
  }
  .doc-toc__link {
    font-size: 10px;
    padding: 2px 6px;
  }
  .doc-body {
    padding: 24px 16px 40px;
  }
  .doc-section {
    margin-bottom: 32px;
  }
  .doc-section__title {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }
  .operator-card {
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }
  .rights-grid {
    grid-template-columns: 1fr;
  }
  .doc-footer__inner {
    flex-direction: column;
    text-align: center;
  }
  .doc-footer {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .doc-hero__title {
    font-size: 18px;
  }
  .doc-hero__sub {
    font-size: 12px;
  }
  .doc-hero__meta {
    flex-direction: column;
    gap: 6px;
  }
  .doc-section__content p,
  .doc-section__content ul li,
  .doc-section__content ol li {
    font-size: 13px;
  }
  .doc-clause {
    padding-left: 14px;
  }
  .doc-clause--warning,
  .doc-clause--highlight {
    padding: 12px 14px;
  }
  .rights-item {
    padding: 12px 14px;
    font-size: 12px;
  }
}

.doc-section__num {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5fa8ff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.doc-section__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0b1e3a;
  margin-bottom: 1rem;
}
.doc-section__content {
  font-size: 0.95rem;
  color: #1e293b;
}
.doc-section__content p {
  margin-bottom: 0.75rem;
}
.doc-section__content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.doc-section__content ul li {
  margin-bottom: 0.3rem;
}
.doc-clause-highlight {
  background: #f1f6fe;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border-left: 4px solid #2a5c9a;
}
.doc-clause-warning {
  background: #fef9f0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border-left: 4px solid #e67e22;
}
.operator-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin: 1rem 0;
  border: 1px solid #e9edf2;
}
.operator-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.3px;
}
.operator-card__value {
  font-weight: 600;
  color: #0b1e3a;
}
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.rights-item {
  background: #f1f5f9;
  padding: 0.6rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0b1e3a;
  text-align: center;
}
.term-badge {
  display: inline-block;
  background: #1a3a6b;
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
@media (max-width: 600px) {
  .doc-section {
    padding: 1.2rem;
  }
  .operator-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .rights-grid {
    grid-template-columns: 1fr;
  }
  .doc-hero__title {
    font-size: 1.6rem;
  }
}
