/* Old product descriptions rebuilt by inc/legacy-desc.php (Egor 09.11): the type, rows and tables of the Content pages,
   nothing of the old site. Loaded after product.css on products without a Content page, only while bm_legacy_desc is on. */

.bm-ld > * + * { margin-top: 28px; }
.bm-ld p { margin: 0 0 14px; }
.bm-ld-run > :last-child, .bm-ld-wide > :last-child, .bm-ld-box > :last-child { margin-bottom: 0; }
.bm-ld .bm-ld-h { margin: 26px 0 8px; font-family: 'Funnel Display', 'Funnel Display Fallback', sans-serif; font-weight: 600; font-size: 20px; line-height: 26px; letter-spacing: -0.015em; }
.bm-ld-run > .bm-ld-h:first-child, .bm-ld-wide > .bm-ld-h:first-child, .bm-ld-box > .bm-ld-h:first-child { margin-top: 0; }
.bm-ld ul, .bm-ld ol { margin: 0 0 14px; padding-left: 20px; }
.bm-ld li + li { margin-top: 6px; }
.bm-ld li::marker { color: var(--ink-soft); }
.bm-ld strong { font-weight: 600; }
.bm-ld sup, .bm-ld sub { font-size: .72em; line-height: 0; }

/* A real table: our rules across the width, it scrolls inside itself on a phone */
.bm-ld-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bm-ld-table:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.bm-ld .bm-ld-table table { display: table; width: 100%; max-width: none; margin: 0; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.bm-ld-table th, .bm-ld-table td { min-width: 112px; padding: 10px 20px 10px 0; text-align: left; vertical-align: top; font-weight: 400; border-bottom: 1px solid var(--rule); }
.bm-ld-table .bm-ld-long { min-width: 200px; }
.bm-ld-table thead th { padding-top: 0; font-size: 13px; line-height: 18px; color: var(--ink-soft); }
.bm-ld-table table:not(:has(thead)) tbody tr:first-child td { border-top: 1px solid var(--rule); }
.bm-ld-table .bm-ld-span td { color: var(--ink-soft); }

/* Label and value rows: the same table as Specifications */
.bm-ld .bm-content-table { margin: 0; overflow: visible; }

/* Films and pictures */
.bm-ld-media { display: grid; gap: 24px; }
.bm-ld-video { aspect-ratio: 16 / 9; background: var(--ink); }
.bm-ld .bm-ld-video iframe, .bm-ld .bm-ld-video video { display: block; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border: 0; }
.bm-ld-media--img { display: flex; flex-wrap: wrap; align-items: flex-start; }
.bm-ld-img { margin: 0; max-width: 100%; }
.bm-ld-img img { display: block; max-width: 100%; height: auto; }

/* A framed cell of the old site, such as a customer's letter */
.bm-ld-box { padding: 20px 24px; background: var(--cream); }

@media (min-width: 768px) {
  .bm-ld-media--video.bm-ld-media--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-ld-list--cols { column-count: 2; column-gap: 40px; }
  .bm-ld-list--cols li { break-inside: avoid; }
  .bm-ld-list--cols li + li { margin-top: 0; padding-top: 6px; }
}

@media (min-width: 1024px) {
  .bm-ld > * + * { margin-top: 40px; }
  .bm-ld-run--cols { column-count: 2; column-gap: 56px; }
  .bm-ld-run--cols > * { break-inside: avoid; }
  .bm-ld-run--cols > .bm-ld-h { break-after: avoid; }
  .bm-ld-run--cols .bm-ld-list--cols { column-count: auto; }
  /* One film: the left half, as on the Content pages. Across 1400 px it only looks blurred. */
  .bm-ld-media--video.bm-ld-media--1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Next to Specifications the description has half the width: one column. The theme's own two columns for long text are ours here. */
.bmc-split .bm-ld-run--cols, .bmc-split .bm-ld-list--cols { column-count: auto; }
.bmc-cols .bm-content-block:has(> .bm-ld) { column-count: auto; }

/* Films in the gallery: the last frames, YouTube's cover with a play button, the player only after a tap */
.woocommerce-product-gallery__image.bm-ld-film { position: relative; background: var(--ink); }
.bm-ld-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: var(--ink) center / cover no-repeat; }
.bm-ld-play-i { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); border-radius: 10px; background: rgba(10,14,20,.72); transition: background .15s; }
.bm-ld-play-i::after { content: ""; position: absolute; left: 28px; top: 14px; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.bm-ld-play:hover .bm-ld-play-i, .bm-ld-play:focus-visible .bm-ld-play-i { background: var(--red); }
.bm-ld-film-f { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bm-ld-film-t { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 84px 12px 16px; background: linear-gradient(transparent, rgba(10,14,20,.78)); color: #fff; font-size: 14px; line-height: 19px; pointer-events: none; }
.bm-ld-film.is-playing .bm-ld-film-t { display: none; }
.bm-ld-film-link { color: #fff; text-decoration: underline; }
.flex-control-thumbs .bm-ld-thumb-film { position: relative; }
.flex-control-thumbs .bm-ld-thumb-film img { mix-blend-mode: normal; object-fit: cover; }
.flex-control-thumbs .bm-ld-thumb-film::after { content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(10,14,20,.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M10 7.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") center / 26px no-repeat; pointer-events: none; }
/* The magnifier opens the photo lightbox, a film frame has no photo */
.woocommerce-product-gallery:has(.bm-ld-film.flex-active-slide) .woocommerce-product-gallery__trigger { display: none; }

/* The short description at the top */
.bm-ld--short p + p, .bm-ld--short p + ul, .bm-ld--short ul + p { margin-top: 10px; }
.bm-ld--short p { margin: 0; }
.bm-ld--short ul, .bm-ld--short ol { margin: 8px 0 0; padding-left: 20px; }
.bm-ld--short .bm-ld-sh { font-weight: 600; }
.bm-ld-note { padding-left: 12px; border-left: 3px solid var(--red); font-weight: 500; color: inherit; }
.bm-ld--short .bm-ld-note { margin-top: 10px; }
.bm-ld-fold-i { max-height: calc(1.5em * 5); overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.bm-ld-fold.is-open .bm-ld-fold-i, .bm-ld-fold.is-fit .bm-ld-fold-i { max-height: none; -webkit-mask-image: none; mask-image: none; }
.bm-ld-fold.is-fit .bm-ld-more { display: none; }
.bm-ld-more { margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bm-ld-more:hover { color: var(--red); }
