/* post-legacy.css — область статьи «как на бою».
   Этап 2c. Подключается ТОЛЬКО на странице поста (см. yellow/journal/head.phtml).

   Все значения сняты с оригинального рендера темы (?yjlegacy=1) через computed style,
   не «на глаз». Источники правил: skin/.../css/brander-overrides.css,
   skin/frontend/ultimo/default/css/{styles,common,override-theme}.css.
   Область всегда светлая — переключатель темы на неё не действует (шапка/футер слушаются).

   Порядок подключения: journal.css -> post-legacy.css (важно: перебиваем глобальные
   правила .y-body для p/ul/img/a/h1-h5). */

/* ------------------------------------------------------------------ шрифты темы */
@font-face {
  font-family: "Montserrat";
  src: url("../../fonts/Montserrat/Montserrat-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../../fonts/Montserrat/Montserrat-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../../fonts/Montserrat/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  /* тема объявляет для 700 сначала Bold.ttf, затем SemiBold.woff2 — по каскаду
     побеждает второй, поэтому берём именно его, иначе жирный в статье будет тяжелее оригинала */
  src: url("../../fonts/Montserrat/Montserrat-SemiBold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../../fonts/Montserrat/Montserrat-Italic.ttf");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../../fonts/Montserrat/Montserrat-BoldItalic.woff2") format("woff2");
  font-weight: 700; font-style: italic; font-display: swap;
}
/* иконочный шрифт темы — нужен только ради стрелки «>» в крошках */
@font-face {
  font-family: "icomoon";
  src: url("../../fonts/icomoon.woff?g70cib") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------------ обёртка */
.y-legacy {
  background: #ffffff;
  color: #333333;
  font: 400 16px/1.5 Montserrat, sans-serif;
  text-align: left;
  padding-top: 20px;
}
/* светлая всегда, независимо от переключателя темы */
:root[data-theme="dark"] .y-legacy { background: #ffffff; color: #333333; }

.y-legacy *, .y-legacy *::before, .y-legacy *::after { box-sizing: border-box; }
/* сброс темы (reset.css темы: «* { margin:0; padding:0 }», «ul,ol { list-style:none }») —
   без него отступы списков и заголовков не совпадут с оригиналом */
.y-legacy * { margin: 0; padding: 0; }
.y-legacy ul, .y-legacy ol { list-style: none; }
.y-legacy caption, .y-legacy th, .y-legacy td { vertical-align: top; text-align: left; font-weight: 400; }
.y-legacy table { border: 0; border-collapse: collapse; border-spacing: 0; empty-cells: show; font-size: 100%; }

.y-legacy .container { width: 100%; max-width: 1440px; margin: 0 auto; }
.y-legacy .inner-container { padding-left: 70px; padding-right: 70px; }
.y-legacy .col-main { float: left; width: 100%; }
/* .col-main плавающий (float:left) — без клирфикса на обёртках блок схлопывается
   и подвал наезжает на статью. В теме это делает общий clearfix (.main::after и др.). */
.y-legacy::after,
.y-legacy .main::after,
.y-legacy .inner-container::after,
.y-legacy .col-main::after,
.y-legacy .breadcrumbs::after,
.y-legacy .page-title::after { display: block; content: ""; clear: both; }

/* ------------------------------------------------------------------ крошки */
.y-legacy .breadcrumbs { line-height: 1.5em; margin: 0 0 5px; }
.y-legacy .breadcrumbs ul { margin: 0; padding: 0; list-style: none; }
.y-legacy .breadcrumbs li { float: left; margin: 0; padding: 0; background: none; }
.y-legacy .breadcrumbs li > * { display: inline-block; vertical-align: middle; }
.y-legacy .breadcrumbs li a,
.y-legacy .breadcrumbs li span { color: #000000; font-weight: 400; font-size: 12px; text-decoration: none; }
.y-legacy .breadcrumbs li > a { opacity: .8; }
.y-legacy .breadcrumbs li > span { opacity: .4; }
.y-legacy .breadcrumbs li > a:hover { opacity: 1; color: #000000; }
.y-legacy .breadcrumbs li .sep {
  vertical-align: top;
  margin: 0 7px 0 5px;
  transform: rotate(180deg);
  opacity: .4;
}
.y-legacy .breadcrumbs li .sep::before {
  display: inline-block;
  font-family: "icomoon";
  font-style: normal; font-weight: 400; font-variant: normal; text-transform: none;
  -webkit-font-smoothing: antialiased;
  content: "\e904";
  font-size: 10px;
}
.y-legacy .breadcrumbs img { vertical-align: baseline; height: auto; }

/* ------------------------------------------------------------------ заголовок и мета */
.y-legacy .page-title { margin-bottom: 20px; }
.y-legacy .page-title.post-title { margin-bottom: 0; overflow: hidden; }
.y-legacy .page-title h1 {
  margin: 0;
  min-height: 0;
  font-family: Montserrat, sans-serif;
  font-size: 2.25em;     /* 36px */
  line-height: 1.25em;   /* 45px */
  font-weight: 400;
  color: #333333;
  text-transform: none;
  letter-spacing: normal;
}

.y-legacy .post-info { margin: 0 0 24px; font-size: 16px; line-height: 1.5; color: #333333; }
.y-legacy .post-info .author_name span,
.y-legacy .post-info .post-post_date span { font-weight: 700; }

.y-legacy .post-post_image { padding: 20px 0; }
.y-legacy .post-post_image img { width: 100%; height: auto; }
.y-legacy .post-preview_image { float: left; margin: 0 20px 20px 0; }

/* ------------------------------------------------------------------ тело статьи */
.y-legacy .post-post_content {
  margin-bottom: 60px;
  font-size: 16px;
  line-height: 1.2;
  color: #333333;
}
.y-legacy .post-post_content p { font-size: 15px; line-height: 1.2; margin: 0 0 15px; }
.y-legacy .post-post_content ul { margin: 0 0 15px 45px; padding: 0; list-style-type: disc; }
.y-legacy .post-post_content ol { margin: 0 0 15px 45px !important; padding: 0; list-style-type: decimal; }
.y-legacy .post-post_content li { margin: 0 0 7px; padding: 0; background: none; display: list-item; }
.y-legacy .post-post_content ul li p,
.y-legacy .post-post_content ol li p { margin: 0; }
.y-legacy .post-post_content h1,
.y-legacy .post-post_content h2,
.y-legacy .post-post_content h3,
.y-legacy .post-post_content h4,
.y-legacy .post-post_content h5,
.y-legacy .post-post_content h6 {
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  color: #333333;
  margin: 0 0 10px;
}
.y-legacy .post-post_content h2 { font-size: 1.4em; line-height: 1.25em; }
.y-legacy .post-post_content h3 { font-size: 1.3em; line-height: 1.2em; }
.y-legacy .post-post_content h4 { font-size: 1.2em; line-height: 1.2em; }
.y-legacy .post-post_content h5 { font-size: 1em;   line-height: 1.2em; }
.y-legacy .post-post_content strong,
.y-legacy .post-post_content b { font-weight: 700; }
.y-legacy .post-post_content a { color: #6a5eff; text-decoration: none; }
.y-legacy .post-post_content a:hover { color: #6a5eff; text-decoration: underline; }
.y-legacy .post-post_content img {
  display: inline;
  max-width: 100%;
  height: auto;
  margin: 0;
}

/* Таблицы в статьях свёрстаны инлайновыми стилями (border, padding, background,
   width, margin приходят из самого контента) — тема их не переопределяет,
   поэтому и мы не переопределяем: только сброс темы выше. */

/* ------------------------------------------------------------------ блоки под статьёй */
.y-legacy .box-collateral,
.y-legacy .form-add { margin-bottom: 60px; }

.y-legacy .like_h2 {
  display: block;
  font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  font-size: 2em;       /* 32px — как в оригинале */
  line-height: 1.25em;
  font-weight: 400;
  color: #333333;
  margin: 0 0 15px;
}
.y-legacy .form-list { margin: 0; padding: 0; list-style: none; }
.y-legacy .form-list > li { margin: 0 0 12px; padding: 0; background: none; }
.y-legacy .form-list label { display: inline; font-size: 16px; line-height: 1.5; }
.y-legacy .form-list label em { display: none; }  /* как в теме: звёздочка скрыта */
.y-legacy input.input-text,
.y-legacy textarea {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  border-radius: 0;
  background: transparent;
  color: #000000;
  font-family: Montserrat, sans-serif;
}
.y-legacy fieldset { border: 0; }
.y-legacy input.input-text { padding: 8px 0; border-bottom-style: inset; }
.y-legacy textarea { padding: 8px; min-height: 110px; resize: vertical; }
.y-legacy .buttons-set { margin-top: 12px; }
.y-legacy .buttons-set button,
.y-legacy .form-add .button {
  min-width: 120px; height: 40px; padding: 0 10px;
  display: inline-flex; justify-content: center; align-items: center; text-align: center;
  font-weight: 700; line-height: normal; font-size: 14px;
  border-radius: 5px; border: 2px solid #ffce00; background: #ffce00; color: #000000;
  cursor: pointer;
}
.y-legacy .buttons-set button:hover { background: #ffd93d; border-color: #ffd93d; }
.y-legacy .validation-advice { color: #e02b27; font-size: 12px; margin-top: 4px; }

/* слайдер товаров из старого шаблона (вставляется в середину контента) */
.y-legacy .post-products { margin: 20px 0; }

/* ------------------------------------------------------------------ адаптив темы */
@media only screen and (max-width: 1280px) {
  .y-legacy .inner-container { padding-left: 20px; padding-right: 20px; }
}
@media only screen and (max-width: 767px) {
  .y-legacy .page-title h1 { font-size: 1.5em; }  /* 24px / 30px */
  .y-legacy .post-preview_image { width: 100%; float: none; text-align: center; }
}
@media only screen and (max-width: 375px) {
  .y-legacy .inner-container { padding-left: 10px; padding-right: 10px; }
}

/* 2s (16.10.2026): отступ ячеек таблиц статей задаётся здесь — инлайновый style="padding:6px" убран из контента 589/594
   ради лимита поля TEXT 65 000 байт (−13,7 КБ и −6,5 КБ); у ячеек с собственным inline-style он по-прежнему побеждает. */
.y-legacy .post-post_content td { padding: 6px; }

/* 2s (16.10.2026): калькулятор трейда W/F/L — js/roblox-calc.js, контейнер <div class="yj-calc"> в контенте 539/589/594 */
.y-legacy .yj-calc { margin: 16px 0 24px; padding: 16px; border: 1px solid #e5e5e5; border-radius: 10px; background: #fafafa; }
.y-legacy .yj-calc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.y-legacy .yj-calc h4 { margin: 0 0 8px; font: 600 15px/1.3 Montserrat, sans-serif; color: #333; }
.y-legacy .yj-row { display: flex; gap: 6px; margin: 0 0 6px; align-items: center; }
.y-legacy .yj-row input, .y-legacy .yj-row select {
  height: 36px; border: 1px solid #d6d6d6; border-radius: 6px; padding: 0 8px;
  font: 400 14px Montserrat, sans-serif; background: #fff; color: #333; -webkit-appearance: none; appearance: none;
}
.y-legacy .yj-row select { padding-right: 22px; background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23777'/%3E%3C/svg%3E") no-repeat right 8px center; }
.y-legacy .yj-row input[type="number"] { -moz-appearance: textfield; }
.y-legacy .yj-name { flex: 1 1 auto; min-width: 0; }
.y-legacy .yj-form { flex: 0 0 118px; }
.y-legacy .yj-qty { flex: 0 0 56px; text-align: center; }
.y-legacy .yj-row.yj-bad .yj-name { border-color: #e02b27; }
.y-legacy .yj-hint { font-size: 12px; line-height: 1.3; color: #b3261e; margin: -2px 0 6px; }
.y-legacy .yj-del { flex: 0 0 32px; height: 36px; border: 1px solid #d6d6d6; border-radius: 6px; background: #fff; cursor: pointer; font: 400 18px/1 Montserrat, sans-serif; color: #777; }
.y-legacy .yj-del:hover { color: #b3261e; border-color: #b3261e; }
.y-legacy .yj-add, .y-legacy .yj-actions button {
  height: 36px; padding: 0 14px; border-radius: 6px; border: 2px solid #ffce00; background: #ffce00; color: #000;
  font: 700 14px Montserrat, sans-serif; cursor: pointer;
}
.y-legacy .yj-add { background: #fff; }
.y-legacy .yj-add:hover, .y-legacy .yj-actions button:hover { background: #ffd93d; border-color: #ffd93d; }
.y-legacy .yj-sum { margin: 8px 0 0; font-size: 14px; color: #555; }
.y-legacy .yj-sum b { font-weight: 700; color: #333; }
.y-legacy .yj-verdict { margin: 16px 0 0; padding: 12px 14px; border-radius: 8px; background: #eeeeee; color: #555; font: 600 16px/1.3 Montserrat, sans-serif; }
.y-legacy .yj-verdict.yj-win { background: #e3f6e8; color: #1d7a3a; }
.y-legacy .yj-verdict.yj-fair { background: #eef2ff; color: #3b4bb8; }
.y-legacy .yj-verdict.yj-over { background: #fff3d6; color: #8a5a00; }
.y-legacy .yj-verdict.yj-lose { background: #fde8e7; color: #b3261e; }
.y-legacy .yj-actions { display: flex; gap: 8px; margin: 12px 0 0; flex-wrap: wrap; }
.y-legacy .yj-actions .yj-reset { background: #fff; }
.y-legacy .post-post_content p.yj-note { margin: 10px 0 0; font-size: 13px; line-height: 1.35; color: #777; }
@media (max-width: 767px) {
  .y-legacy .yj-calc { padding: 12px; }
  .y-legacy .yj-calc-cols { grid-template-columns: 1fr; }
  .y-legacy .yj-form { flex: 0 0 104px; }
}

/* 2j: широкие таблицы статьи прокручиваются внутри своей обёртки, страница по горизонтали не едет */
.y-legacy .y-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
.y-legacy .y-table-scroll > table { margin-top: 0 !important; margin-bottom: 0 !important; }
@media (max-width: 767px) {
  .y-legacy .y-table-scroll > table { min-width: 560px; }
  .y-legacy .col-main img { max-width: 100%; height: auto; }
}
