/* 3D configurator entry points (owner 2026-11-24 / 25, handoff «Передача-кнопка-3D-конфигуратора-2026-11-25»; inc/c3d.php):
   the glass button of the home and rubric heroes, the tab under the header (every page), the tile at the bottom of the
   mobile menu. Every rule is scoped to .bm-c3d-* (no rule starts at html, body, :root, main or .bm-hdr); ASCII outside
   comments (rule category.css_ascii_2026_10_14). The cube: the still frame (2.3 KB) at first paint; the big buttons'
   cubes get .is-go once the page has loaded (assets/js/c3d.js) and switch to the animated file, never under reduced
   motion; the tab and the tile draw frames of the sprite into a canvas (c3d.js) and keep the still frame until then. */
.bm-c3d-btn__cube, .bm-c3d-tab__cube, .bm-c3d-menu__cube { display: grid; flex: none; place-items: center; background: url(../img/c3d/cube-88-still.webp) 50% / contain no-repeat; }
.bm-c3d-tab__cube.is-ready, .bm-c3d-menu__cube.is-ready { background: none; }
.bm-c3d-tab__cube canvas, .bm-c3d-menu__cube canvas { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
	.bm-c3d-btn__cube.is-go { background-image: url(../img/c3d/cube-88.webp); }
}
/* the arrows: one mask each, coloured by background (no inline SVG in the markup) */
.bm-c3d-btn::after, .bm-c3d-tab::after, .bm-c3d-menu::after { content: ""; flex: none; background: currentColor; -webkit-mask: var(--c3d-arrow) 50% / contain no-repeat; mask: var(--c3d-arrow) 50% / contain no-repeat; }
@media (forced-colors: active) {
	.bm-c3d-btn::after, .bm-c3d-tab::after, .bm-c3d-menu::after { forced-color-adjust: none; background: CanvasText; }
}

/* ---------- glass button (home hero: next to «Наші роботи» / «Каталог»; rubric hero: next to «Розрахувати свій проєкт») ---------- */
.bm-c3d-btn {
	--c3d-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	display: inline-flex; align-items: center; gap: 8px;
	min-height: 46px; padding: 4px 16px 4px 5px;
	border: 1px solid rgba(255, 255, 255, .32); border-radius: 2px;
	background: rgba(255, 255, 255, .12); color: #fff; text-align: left;
	transition: background-color 180ms ease, border-color 180ms ease;
}
.bm-c3d-btn:hover, .bm-c3d-btn:focus-visible { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2); color: #fff; }
.bm-c3d-btn::after { width: 16px; height: 16px; margin-left: 6px; }
.bm-c3d-btn__cube { width: 36px; height: 36px; }
.bm-c3d-btn__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bm-c3d-btn__title { font: 800 12.5px/1.2 var(--bm-fd); letter-spacing: .05em; text-transform: uppercase; }
.bm-c3d-btn__sub { font: 400 11.5px/1.25 var(--bm-fb); color: var(--bm-g200); }
/* the subtitle is two halves («Зберіть проєкт» + «та дізнайтесь ціну»): one line from 360 px in both font phases (the
   mockups); it breaks only between them, and only on the rubric button below 360 px (no font-swap shift) */
.bm-c3d-btn__sub > span, .bm-c3d-menu__sub > span { white-space: nowrap; }
@media (max-width: 359px) {
	.bm-c3d-btn--lg .bm-c3d-btn__sub > span { display: block; }
}
.bm-c3d-btn--lg { min-height: 52px; padding: 4px 18px 4px 6px; }
.bm-c3d-btn--lg .bm-c3d-btn__cube { width: 40px; height: 40px; }
.bm-c3d-btn--lg .bm-c3d-btn__title { font-size: 13px; }
.bm-c3d-btn--lg .bm-c3d-btn__sub { font-size: 12px; }
/* the same height as the orange neighbour in the row (theme: home 52.8 px from 1101 px, 44 px at 768-1100, 46 px on
   phones; rubric 52.8 px) */
.bm-b-hero__cta .bm-c3d-btn, .bm-cat-hero__cta .bm-c3d-btn { align-self: stretch; }
@media (max-width: 1100px) and (min-width: 768px) {
	.bm-b-hero__cta .bm-c3d-btn { min-height: 44px; margin-block: -1px; padding-block: 3px; }
}
@media (max-width: 767px) {
	.bm-c3d-btn__text { flex: 1 1 auto; }
	.bm-c3d-btn::after { margin-left: 0; }
}
/* the rubric CTA row: the hero caps its children at 600 px (category.css), the orange + the glass button need about
   617 px; one row from 768 px up in both languages and font phases (layout only) */
.bm-cat-hero__cta:has(> .bm-c3d-btn) { max-width: 680px; }

/* ---------- tab under the header (every page; inside header.bm-hdr, under its bar) ---------- */
.bm-c3d-tab {
	--c3d-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
	--c3d-bg: rgba(246, 247, 250, .9); --c3d-line: rgba(42, 46, 71, .26); --c3d-ink: var(--bm-navy); --c3d-blur: blur(8px);
	position: absolute; top: 100%; right: max(var(--bm-pad), (100% - var(--bm-container)) / 2 + var(--bm-pad)); z-index: 0;
	display: flex; align-items: center; gap: 4px;
	height: 32px; margin-top: -1px; padding: 0 10px 0 2px;
	border: 1px solid var(--c3d-line); border-top: 0; border-radius: 0 0 4px 4px;
	background: var(--c3d-bg); -webkit-backdrop-filter: var(--c3d-blur); backdrop-filter: var(--c3d-blur);
	color: var(--c3d-ink); font: 700 11px/1 var(--bm-fb); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
	transform: translateY(-36px); opacity: 0; visibility: hidden;
	transition: transform 380ms var(--bm-ease), opacity 220ms ease, background-color 220ms ease, border-color 220ms ease, color 220ms ease, visibility 0s linear 380ms;
}
.bm-c3d-tab.is-in:not(.is-off) { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
/* dark look over the dark sections (c3d.js) */
.bm-c3d-tab.is-dark { --c3d-bg: rgba(255, 255, 255, .12); --c3d-line: rgba(255, 255, 255, .32); --c3d-ink: #fff; --c3d-blur: none; }
.bm-c3d-tab:hover, .bm-c3d-tab:focus-visible { color: var(--bm-orange-text); }
.bm-c3d-tab.is-dark:hover, .bm-c3d-tab.is-dark:focus-visible { --c3d-line: rgba(255, 255, 255, .5); color: #fff; }
.bm-c3d-tab::after { width: 13px; height: 13px; background: var(--bm-orange); }
.bm-c3d-tab__cube { width: 30px; height: 28px; background-size: 29px; }
.bm-c3d-tab__cube canvas { width: 29px; height: 29px; }
@media (max-width: 767px) {
	.bm-c3d-tab { height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
	.bm-c3d-tab { transition: none; }
}

/* ---------- tile at the bottom of the mobile menu (variant A, owner 2026-11-25): the look of «Модулі в наявності» ---------- */
.bm-c3d-menu {
	--c3d-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E");
	display: flex; flex: none; align-items: center; gap: 8px;
	min-height: 52px; margin: auto 12px 12px; padding: 0 12px 0 6px;
	border: 1px solid var(--bm-g200); border-radius: var(--bm-r-md); background: var(--bm-g50); color: var(--bm-navy);
}
.bm-c3d-menu:hover { color: var(--bm-orange-text); }
.bm-c3d-menu::after { width: 18px; height: 18px; background: var(--bm-orange); }
.bm-c3d-menu__cube { width: 38px; height: 38px; background-size: 34px; }
.bm-c3d-menu__cube canvas { width: 34px; height: 34px; }
.bm-c3d-menu__text { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.bm-c3d-menu__title { font: 700 12.5px/1.2 var(--bm-fd); letter-spacing: .06em; text-transform: uppercase; }
.bm-c3d-menu__sub { font: 400 12px/1.3 var(--bm-fb); color: var(--bm-g600); }
/* the menu body becomes a flex column while it holds the tile (:has(); without it the tile simply follows the links):
   the tile sits at its bottom, 12 px above the dark bar, and scrolls with the menu on short screens */
.bm-mnav__body:has(> .bm-c3d-menu) { display: flex; flex-direction: column; padding-bottom: 0; }
.bm-mnav__body:has(> .bm-c3d-menu) > * { flex-shrink: 0; }
.bm-mnav__body:has(> .bm-c3d-menu) .bm-mnav__links { margin-bottom: 16px; }

/* the launcher's window (blockmodul-core/configurator/launcher.js .bmc-box, overflow hidden): the widget's scrollIntoView
   («Залишити заявку ↓») scrolled the box itself and its «Закрити» bar went off the top (owner 03.12). clip = not
   scrollable at all; c3d.js resets it where clip is unknown. */
.bmc-overlay .bmc-box { overflow: clip; }
