/* Блоки статей из редактора: наборы картинок, формулы, врезки, раскрывающиеся блоки, таблицы характеристик,
   выравнивание картинок, увеличение по щелчку. Используется на сайте и внутри редактора. */

/* карусель: без скрипта — лента с прокруткой, со скриптом (blocks.js) — стрелки и счётчик */
.lm-gallery{clear:both;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;margin:0 0 24px;border:1px solid #DDE1E6;background:#F2F4F7;scrollbar-width:thin}
.lm-gallery>figure{flex:0 0 100%;min-width:0;margin:0;scroll-snap-align:start;display:flex;flex-direction:column}
.lm-gallery img{display:block;width:100%;height:440px;max-height:72vw;object-fit:contain;background:#F2F4F7}
.lm-gallery.lm-h-s img{height:320px}.lm-gallery.lm-h-l img{height:560px}
.lm-gallery figcaption{margin:0;padding:10px 14px;background:#FFFFFF;border-top:1px solid #DDE1E6;font-family:'PT Sans','Segoe UI',sans-serif;font-size:15px;line-height:1.45;color:#4A5260;flex:1}
.lm-car{clear:both;margin:0 0 24px}
.lm-car>.lm-gallery{margin:0;scrollbar-width:none}.lm-car>.lm-gallery::-webkit-scrollbar{display:none}
.lm-car-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0 0;font-family:'PT Sans','Segoe UI',sans-serif;font-size:15px;color:#4A5260}
.lm-car-bar button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;background:#FFFFFF;color:#1F3A5F;border:1px solid #1F3A5F;border-radius:2px;cursor:pointer}
.lm-car-bar button:hover{background:#1F3A5F;color:#FFFFFF}
.lm-car-bar button:disabled{opacity:.35;cursor:default;background:#FFFFFF;color:#1F3A5F}
.lm-car-bar button:focus-visible,.lm-gallery:focus-visible{outline:2px solid #1F3A5F;outline-offset:2px}
.lm-car-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.lm-car-dots span{width:8px;height:8px;border-radius:50%;background:#C9CDD3}.lm-car-dots span.on{background:#1F3A5F}

/* картинки в ряд */
.lm-row{clear:both;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 24px;align-items:start}
.lm-row.lm-row-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.lm-row>figure{margin:0}
.lm-row img{display:block;width:100%;height:auto;border:1px solid #DDE1E6}
.lm-row figcaption{font-family:'PT Sans','Segoe UI',sans-serif;font-size:15px;line-height:1.45;color:#4A5260;margin-top:6px}
@media (max-width:640px){.lm-row,.lm-row.lm-row-3{grid-template-columns:minmax(0,1fr)}}

/* картинка слева / справа с обтеканием / по центру (кнопки выравнивания) */
figure.align-left,img.align-left{float:left;max-width:50%;margin:4px 24px 12px 0}
figure.align-right,img.align-right{float:right;max-width:50%;margin:4px 0 12px 24px}
figure.align-center{display:table;margin-left:auto;margin-right:auto}
figure.align-center figcaption{display:table-caption;caption-side:bottom}
@media (max-width:640px){figure.align-left,figure.align-right,img.align-left,img.align-right{float:none;max-width:100%;margin:0 0 20px}}

/* формулы */
.lm-math math{font-family:'Cambria Math','STIX Two Math','Latin Modern Math',math;font-size:1.12em}
.lm-math-block{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:8px 0 20px;overflow-x:auto}
.lm-math-block>math{grid-column:2;margin:0}
.lm-math-num{grid-column:3;justify-self:end;font-family:'PT Sans','Segoe UI',sans-serif;color:#2E333B}

/* врезки «Примечание» и «Важно» */
.lm-note{clear:both;margin:0 0 20px;padding:14px 18px;background:#F2F4F7;border-left:3px solid #1F3A5F}
.lm-note::before{content:"Примечание";display:block;margin-bottom:6px;font-family:'PT Sans','Segoe UI',sans-serif;font-size:14px;font-weight:700;letter-spacing:.02em;color:#1F3A5F}
.lm-note.lm-warn{background:#FFFFFF;border:1px solid #DDE1E6;border-left:3px solid #8A1C1C}
.lm-note.lm-warn::before{content:"Важно";color:#8A1C1C}
.lm-note>:last-child{margin-bottom:0}

/* раскрывающийся блок */
details.mce-accordion{clear:both;margin:0 0 20px;border:1px solid #DDE1E6;background:#FFFFFF}
details.mce-accordion>summary{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 14px;background:#F2F4F7;font-family:'PT Sans','Segoe UI',sans-serif;font-weight:700;color:#1A1A1A;cursor:pointer;list-style:none}
details.mce-accordion>summary::-webkit-details-marker{display:none}
details.mce-accordion>summary::before{content:"";flex:0 0 auto;width:7px;height:7px;border-right:2px solid #1F3A5F;border-bottom:2px solid #1F3A5F;transform:rotate(-45deg)}
details.mce-accordion[open]>summary::before{transform:rotate(45deg)}
details.mce-accordion[open]>summary{border-bottom:1px solid #DDE1E6}
details.mce-accordion>:not(summary){margin-left:16px;margin-right:16px}
details.mce-accordion>summary+*{margin-top:14px}details.mce-accordion>:last-child{margin-bottom:16px}

/* таблица характеристик */
table.lm-spec{min-width:60%}
table.lm-spec caption{caption-side:top;text-align:left;padding:0 0 8px;font-weight:700;color:#1A1A1A}
table.lm-spec th,table.lm-spec thead td{background:#F2F4F7;font-weight:700;text-align:left;color:#1A1A1A}
table.lm-spec tbody tr:nth-child(even) td{background:#FAFBFC}
table caption{font-family:'PT Sans','Segoe UI',sans-serif}

/* ссылка на документ */
.lm-file-meta{font-family:'PT Sans','Segoe UI',sans-serif;font-size:.9em;color:#4A5260;white-space:nowrap}
hr{clear:both;height:0;margin:32px 0;border:0;border-top:1px solid #C9CDD3}

/* увеличение картинки по щелчку */
img.lm-zoom{cursor:zoom-in}
.lm-lb{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:56px 16px 16px;background:rgba(15,25,40,.92);font-family:'PT Sans','Segoe UI',sans-serif}
.lm-lb img{max-width:100%;max-height:calc(100vh - 150px);object-fit:contain;background:#FFFFFF}
.lm-lb-cap{max-width:900px;text-align:center;font-size:15px;line-height:1.45;color:#E3E6EA}
.lm-lb button{position:absolute;display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;background:transparent;color:#FFFFFF;border:1px solid rgba(255,255,255,.5);border-radius:2px;cursor:pointer}
.lm-lb button:hover,.lm-lb button:focus-visible{background:rgba(255,255,255,.14);outline:none;border-color:#FFFFFF}
.lm-lb-x{top:8px;right:8px}.lm-lb-p{left:8px;top:50%;margin-top:-24px}.lm-lb-n{right:8px;top:50%;margin-top:-24px}
.lm-lb-c{position:absolute;top:20px;left:16px;font-size:14px;color:#C9CDD3}
