/* Вкладка «Документация Huawei» в карточке товара.

   Оформление повторяет ОБРАЗЕЦ карточки S5731-H48HB4XZ из макета
   2026-08-31 (karta-varianty.html): лента dwrap, липкое оглавление
   dtoc с номерами, разделы dsec, схема dfig, выноски списком с
   красным кружком cal-n, индикаторы карточками ind. Всё заведено под
   .vpane.hwdoc, чтобы стили не доставали до остальной карточки и до
   темы магазина. Лайтбокс живёт в body, поэтому его классы вне
   области вкладки и начинаются на hwlb. */

.vpane.hwdoc{padding-top:4px}
.hwdoc{--brand:#EA071D;--brand-t:#D4001A;--ink:#15181d;--ink-2:#5c6572;
 --ink-3:#8d949c;--line:#e3e6ea;--soft:#f4f6f8;--r:10px}
.hwdoc .dlead{color:var(--ink-2);font-size:13px;margin:0 0 18px;max-width:80ch}

/* лента и оглавление */
.hwdoc .dwrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:28px;
 align-items:start}
/* без min-width:0 колонка сетки растягивается под самую широкую таблицу
   и утаскивает за собой всю страницу */
.hwdoc .dwrap>*{min-width:0}
.hwdoc .dtoc{position:sticky;top:16px;font-size:14px;max-height:calc(100vh - 32px);
 overflow:auto}
.hwdoc .dtoc ol{list-style:none;margin:0;padding:0;counter-reset:d}
.hwdoc .dtoc li{counter-increment:d;margin:0 0 2px}
.hwdoc .dtoc a{display:block;padding:9px 10px;border-radius:8px;color:var(--ink-2);
 text-decoration:none;line-height:1.35;min-height:24px}
.hwdoc .dtoc a::before{content:counter(d) ". ";color:var(--ink-3)}
@media (hover: hover){.hwdoc .dtoc a:hover{background:var(--soft);color:var(--ink)}}
.hwdoc .dtoc a.on{background:var(--soft);color:var(--ink);font-weight:500}

/* разделы */
.hwdoc .dbody{min-width:0}
.hwdoc .dsec{padding:0 0 26px;margin:0 0 26px;border-bottom:1px solid var(--line)}
.hwdoc .dsec:last-of-type{border-bottom:0;margin-bottom:0}
/* Заголовки внутри вкладки: тема магазина задаёт h3 и h4 своим размером
   (у h4 это calc от корневого кегля, на широком экране получалось 32px,
   и подпись таблицы выглядела крупнее заголовка раздела). Здесь размер
   держится жёстко, иначе правка темы снова уводит вид вкладки. */
.hwdoc .dsec h3{font-size:19px!important;line-height:1.3!important;
 font-weight:600;margin:0 0 12px!important;scroll-margin-top:16px}
.hwdoc .dsec h4.dtt{font-size:15px!important;line-height:1.4!important;
 font-weight:500;margin:18px 0 6px!important;color:var(--ink-2)}
.hwdoc .dsec p{margin:0 0 10px;line-height:1.6;max-width:80ch}
.hwdoc .dsec ul.dul{margin:0 0 12px;padding-left:20px}
.hwdoc .dsec ul.dul li{margin:0 0 6px;max-width:80ch}
.hwdoc .dgap{color:var(--ink-2)}

/* схема панели */
.hwdoc .dfig{margin:14px 0;padding:0}
.hwdoc .dfig img{display:block;max-width:100%;height:auto;border:1px solid var(--line);
 border-radius:8px;background:#fff;cursor:zoom-in}
.hwdoc .dfig figcaption{margin-top:8px;font-size:13px;color:var(--ink-2);max-width:70ch}

/* выноски со схемы */
.hwdoc .callouts{margin:12px 0;padding:0;list-style:none}
.hwdoc .callouts li{display:flex;gap:12px;padding:9px 0;
 border-bottom:1px solid var(--line);line-height:1.55;font-size:14.5px}
.hwdoc .callouts li:last-child{border-bottom:0}
.hwdoc .cal-n{flex:0 0 26px;height:26px;border-radius:50%;background:var(--brand);
 color:#fff;display:inline-flex;align-items:center;justify-content:center;
 font-size:13px;font-weight:500}

/* индикаторы */
.hwdoc .inds{display:grid;gap:12px;margin:12px 0}
.hwdoc .ind{border:1px solid var(--line);border-radius:var(--r);padding:14px 16px}
.hwdoc .ind-h{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.hwdoc .ind-h b{font-size:15px}
.hwdoc .ind-h span{font-size:13.5px;color:var(--ink-2)}
.hwdoc .ind ul{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.hwdoc .ind li{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px;
 font-size:14px;line-height:1.5}
.hwdoc .ind li b{font-weight:500;color:var(--ink-2)}

/* таблицы */
.hwdoc .tw{overflow-x:auto;min-width:0;-webkit-overflow-scrolling:touch;margin:0 0 14px}
.hwdoc table.dtab{border-collapse:collapse;width:100%;font-size:14px;min-width:520px}
.hwdoc table.dtab th,.hwdoc table.dtab td{border:1px solid var(--line);padding:8px 10px;
 text-align:left;vertical-align:top;font-size:14px;line-height:1.5}
.hwdoc table.dtab thead th{background:var(--soft);font-weight:600;white-space:nowrap}
.hwdoc table.dtab tbody th{font-weight:500;background:#fbfcfd}
/* Правки дизайнера «Правки 5», правка 2 (2026-09-13). Отступ таблицы внутри рамочной
   обёртки .tw снят в catalog.css (.tw>table{margin:0}). Внешние границы ячеек теперь
   ложились бы вплотную к рамке обёртки двойной линией, поэтому по периметру они
   сняты: рамку и скругление даёт обёртка. */
.hwdoc .tw>table.dtab tr>*:first-child{border-left:0}
.hwdoc .tw>table.dtab tr>*:last-child{border-right:0}
.hwdoc .tw>table.dtab thead tr:first-child>*{border-top:0}
.hwdoc .tw>table.dtab tbody:last-child tr:last-child>*{border-bottom:0}

@media(max-width:900px){
 .hwdoc .dwrap{grid-template-columns:minmax(0,1fr);gap:14px}
 .hwdoc .dtoc{position:static;max-height:none;border:1px solid var(--line);
  border-radius:var(--r);padding:8px}
}
/* min-width 520 на экране 390 давал прокрутку в каждой таблице.
   На узком экране таблица ужимается до ширины экрана. */
@media(max-width:520px){
 .hwdoc table.dtab{min-width:0;font-size:13px}
 .hwdoc table.dtab th,.hwdoc table.dtab td{padding:7px 8px}
 .hwdoc table.dtab thead th{white-space:normal}
 .hwdoc .ind li{grid-template-columns:minmax(0,1fr);gap:2px}
}

/* схема во весь экран */
.hwlb{position:fixed;inset:0;z-index:2000;background:rgba(10,12,15,.94);
 display:grid;grid-template-columns:56px minmax(0,1fr) 56px;
 grid-template-rows:minmax(0,1fr) auto;align-items:center;justify-items:center}
.hwlb-img{grid-column:2;grid-row:1;max-width:100%;max-height:calc(100vh - 96px);
 object-fit:contain;background:#fff;border-radius:8px;cursor:zoom-out}
.hwlb-x{position:absolute;top:10px;right:12px;width:44px;height:44px}
.hwlb-p{grid-column:1;grid-row:1}
.hwlb-n{grid-column:3;grid-row:1}
.hwlb-x,.hwlb-p,.hwlb-n{border:0;background:none;color:#fff;font-size:30px;
 line-height:1;cursor:pointer;min-width:44px;min-height:44px}
@media (hover: hover){.hwlb-x:hover,.hwlb-p:hover,.hwlb-n:hover{color:#EA071D}}
.hwlb-bar{grid-column:1/-1;grid-row:2;display:flex;gap:16px;align-items:baseline;
 justify-content:space-between;width:min(1100px,92vw);color:#cfd4da;
 font-size:13px;padding:12px 0 18px}
.hwlb-num{white-space:nowrap;color:#8d949c}
@media(max-width:520px){
 .hwlb{grid-template-columns:40px minmax(0,1fr) 40px}
 /* 2026-09-15, аудит A4.15. Было min-width:40px: цель нажатия уменьшалась
    именно на телефоне, где палец, а не курсор. Держим 44 px, как в остальном
    каталоге, уменьшаем только кегль стрелки. */
 .hwlb-p,.hwlb-n{min-width:44px;min-height:44px;font-size:24px}
}
