/* ================================================================
   СТРАНИЦА ОПЛАТА И ДОСТАВКА
   ================================================================ */

/* ── Hero ─────────────────────────────────────────────────────── */
.dlv-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  margin-bottom: 2rem;
}

.dlv-hero__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.1rem;
  background: linear-gradient(135deg, #1e293b 0%, #2d3f55 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(30, 41, 59, 0.22);
}

.dlv-hero__title {
  font-size: clamp(1.4rem, 3vw, 2rem) !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 !important;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* ── Карточка-обёртка ─────────────────────────────────────────── */
.dlv-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* ================================================================
   RICHTEXT-BODY — сброс конфликтов style.css + нормальные стили
   для HTML из CKEditor. Применяется в delivery, contacts, etc.
   ================================================================ */

.richtext-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

/* ── Абзацы ───────────────────────────────────────────────────── */
.richtext-body p {
  margin-top: 0;
  margin-bottom: 1em;
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

/* ── Заголовки ────────────────────────────────────────────────── */
.richtext-body h1 {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 1.5em 0 0.5em !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.richtext-body h2 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 1.4em 0 0.45em !important;
  line-height: 1.25;
  padding-bottom: 0.35em;
  border-bottom: 2px solid #e2e8f0;
}

.richtext-body h3 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 1.25em 0 0.4em !important;
  line-height: 1.3;
}

.richtext-body h4,
.richtext-body h5,
.richtext-body h6 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 1.1em 0 0.35em !important;
}

/* ── Списки ───────────────────────────────────────────────────── */
.richtext-body ul,
.richtext-body ol {
  margin: 0 0 1em 0 !important;
  padding-left: 1.75em !important;
  list-style-position: outside !important;
}

.richtext-body ul {
  list-style-type: disc !important;
}

.richtext-body ol {
  list-style-type: decimal !important;
}

.richtext-body li {
  float: none !important;
  display: list-item !important;
  margin-bottom: 0.35em !important;
  padding: 0 !important;
  font-size: 1rem;
  line-height: 1.65;
  color: #334155;
}

.richtext-body ul ul,
.richtext-body ol ol,
.richtext-body ul ol,
.richtext-body ol ul {
  margin-top: 0.25em !important;
  margin-bottom: 0.25em !important;
}

/* ── Ссылки ───────────────────────────────────────────────────── */
.richtext-body a {
  color: #2563eb !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.richtext-body a:hover {
  color: #1d4ed8 !important;
}

/* ── Выделение ────────────────────────────────────────────────── */
.richtext-body strong,
.richtext-body b {
  font-weight: 700 !important;
  color: #1e293b;
}

.richtext-body em,
.richtext-body i {
  font-style: italic !important;
}

/* ── Таблицы ──────────────────────────────────────────────────── */
.richtext-body table {
  width: 100%;
  border-collapse: collapse !important;
  border-spacing: 0;
  margin-bottom: 1.25em;
  font-size: 0.95rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.richtext-body thead tr,
.richtext-body th {
  background: linear-gradient(135deg, #1e293b 0%, #2d3f55 100%) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.richtext-body th,
.richtext-body td {
  padding: 0.65rem 1rem !important;
  text-align: left !important;
  vertical-align: top;
  border-bottom: 1px solid #e2e8f0;
  font-weight: normal;
}

.richtext-body tr:last-child td {
  border-bottom: none;
}

.richtext-body tbody tr:nth-child(even) {
  background: #f8fafc;
}

.richtext-body tbody tr:hover {
  background: #f1f5f9;
}

/* ── Цитата ───────────────────────────────────────────────────── */
.richtext-body blockquote {
  margin: 1.25em 0 !important;
  padding: 1rem 1.25rem !important;
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  border-radius: 0 10px 10px 0;
  color: #1e3a8a;
  font-style: italic;
}

/* ── Горизонтальная линия ─────────────────────────────────────── */
.richtext-body hr {
  border: none;
  border-top: 2px solid #e2e8f0;
  margin: 1.75em 0 !important;
}

/* ── Изображения ──────────────────────────────────────────────── */
.richtext-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 0.75em 0;
  display: block;
}

/* ── Код ──────────────────────────────────────────────────────── */
.richtext-body code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  color: #dc2626;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.richtext-body pre {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1em;
}

.richtext-body pre code {
  background: none;
  color: #334155;
  padding: 0;
}

/* Первый/последний — без лишних отступов */
.richtext-body > *:first-child { margin-top: 0 !important; }
.richtext-body > *:last-child  { margin-bottom: 0 !important; }

/* ================================================================
   ТЁМНАЯ ТЕМА
   ================================================================ */

html[data-theme="dark"] .dlv-hero__title {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .dlv-hero__icon {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .dlv-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .richtext-body,
html[data-theme="dark"] .richtext-body p,
html[data-theme="dark"] .richtext-body li {
  color: #cbd5e1;
}

html[data-theme="dark"] .richtext-body h1,
html[data-theme="dark"] .richtext-body h2,
html[data-theme="dark"] .richtext-body h3,
html[data-theme="dark"] .richtext-body h4,
html[data-theme="dark"] .richtext-body h5,
html[data-theme="dark"] .richtext-body h6 {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] .richtext-body h2 {
  border-bottom-color: #334155;
}

html[data-theme="dark"] .richtext-body a       { color: #60a5fa !important; }
html[data-theme="dark"] .richtext-body a:hover { color: #93c5fd !important; }

html[data-theme="dark"] .richtext-body strong,
html[data-theme="dark"] .richtext-body b { color: #f1f5f9; }

html[data-theme="dark"] .richtext-body table { border-color: #334155; }

html[data-theme="dark"] .richtext-body th,
html[data-theme="dark"] .richtext-body td { border-bottom-color: #334155; }

html[data-theme="dark"] .richtext-body tbody tr:nth-child(even) { background: #0f172a; }
html[data-theme="dark"] .richtext-body tbody tr:hover { background: #263248; }

html[data-theme="dark"] .richtext-body blockquote {
  background: #0c1a3d;
  border-left-color: #3b82f6;
  color: #93c5fd;
}

html[data-theme="dark"] .richtext-body hr { border-top-color: #334155; }

html[data-theme="dark"] .richtext-body code {
  background: #0f172a;
  color: #f87171;
}

html[data-theme="dark"] .richtext-body pre {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] .richtext-body pre code { color: #94a3b8; }

/* ── Мобильная адаптация ──────────────────────────────────────── */
@media (max-width: 767px) {
  .dlv-hero   { padding: 1.5rem 0.5rem 1.25rem; margin-bottom: 1.25rem; }
  .dlv-card   { padding: 1.25rem 1rem; }

  .richtext-body table { font-size: 0.85rem; }
  .richtext-body th,
  .richtext-body td    { padding: 0.5rem 0.65rem !important; }
}
