/* Home hero card for the installation calculator and the equipment finder (inc/hero-switch.php).
   Owner approved mockup 6 on 12.11.2026 (03_ЛОКАЛНА_СРЕДА/mockups/home-switch-v6.src.css).
   Everything that re-frames the tools is scoped to .alx.is-on (set by assets/hero-switch.js);
   without JavaScript both tools show one under the other, as before. */

.airloc-hero.has-alx { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "card"; align-items: start; }
.airloc-hero.has-alx > * { min-width: 0; }
.airloc-hero.has-alx > .airloc-hero-text { grid-area: text; gap: 10px; }
.airloc-hero.has-alx > .alx { grid-area: card; }
@media (min-width: 1200px) {
	.airloc-hero.has-alx { grid-template-columns: minmax(0, 1fr) 560px; grid-template-areas: "text card"; column-gap: 40px; align-items: center; }
}

/* No JavaScript: plain wrapper, no chooser or bar. */
.alx:not(.is-on) > .alx-bar, .alx:not(.is-on) > .alx-pick { display: none; }
.alx:not(.is-on) > .alx-p + .alx-p { margin-top: 22px; }
/* „Монтаж и обслужване в София и страната“ is under the H1 now (visible for both tools). */
.alx .aic-area span:first-child { display: none; }
.alx .aic-area span + span::before { content: none; }

/* ===== The card */
.alx.is-on { --alx-ok: var(--airloc-cta, #00843D); --alx-line: #D5DADF; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr;
	height: var(--alx-h, 700px); background: #fff; border: 1px solid var(--airloc-border, #E3E6EA); border-radius: 16px; box-shadow: 0 10px 30px rgba(38, 52, 63, .08);
	color: var(--airloc-text, #26343F); font-size: 15px; line-height: 1.5; scroll-margin-top: 90px; overflow: hidden; }
.alx.is-on *, .alx.is-on *::before, .alx.is-on *::after { box-sizing: border-box; }

/* Bar: back to the chooser + switch „Монтаж | Уред“. Hidden (kept in layout) on the chooser. */
.alx.is-on .alx-bar { grid-area: 1 / 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--airloc-border, #E3E6EA); }
.alx.is-on .alx-home { display: grid; place-items: center; flex: none; width: 42px; height: 42px; min-height: 0; margin: 0; padding: 0; border: 1.5px solid var(--alx-line); border-radius: 10px;
	background: #fff; color: var(--airloc-text, #26343F); font: inherit; font-size: 24px; line-height: 1; text-transform: none; box-shadow: none; cursor: pointer; }
.alx.is-on .alx-home:hover { border-color: var(--airloc-control-border, #7D8790); }
.alx.is-on .alx-seg { flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: #EEF1F4; }
.alx.is-on .alx-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; margin: 0; padding: 0 8px; border: 0; border-radius: 9px;
	background: transparent; color: var(--airloc-text-muted, #5F6870); font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer; }
.alx.is-on .alx-seg svg { width: 22px; height: 22px; flex: none; }
.alx.is-on .alx-seg button[aria-pressed="true"] { background: #fff; color: var(--airloc-text, #26343F); box-shadow: 0 1px 3px rgba(38, 52, 63, .18); }
.alx.is-on .alx-seg button[aria-pressed="true"] svg { color: var(--alx-ok); }

/* Panes share one cell. */
.alx.is-on .alx-p { grid-area: 2 / 1; min-width: 0; display: flex; flex-direction: column; }
.alx.is-on .alx-pick { grid-area: 1 / 1 / 3 / 2; gap: 12px; padding: 20px 16px 16px; }
.alx.is-on .alx-p:not(.is-cur), .alx.is-on.is-pick .alx-bar,
.alx.is-on .alx-p:not(.is-cur) *, .alx.is-on.is-pick .alx-bar * { visibility: hidden !important; } /* the tools set visible on their current step */

/* Chooser: two tiles one under the other, sharing the height. */
.alx.is-on .alx-h { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 700; color: inherit; outline: none; }
.alx.is-on .alx-tile { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 0; margin: 0; padding: 18px 16px;
	border: 1.5px solid var(--alx-line); border-radius: 14px; background: #fff; color: inherit; font: inherit; text-align: center; text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer; }
.alx.is-on .alx-tile:hover { border-color: var(--alx-ok); background: #F6FBF8; }
.alx.is-on button:focus-visible { outline: 3px solid rgba(0, 132, 61, .4); outline-offset: 2px; }
.alx.is-on .alx-ico { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 16px; background: #EEF7F2; color: var(--alx-ok); }
.alx.is-on .alx-ico svg { width: 44px; height: 44px; }
.alx.is-on .alx-t b { display: block; font-size: 19px; line-height: 1.3; font-weight: 700; }
.alx.is-on .alx-t small { display: block; max-width: 30ch; margin: 4px auto 0; font-size: 14px; line-height: 1.45; color: var(--airloc-text-muted, #5F6870); }
.alx.is-on .alx-go { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 8px; background: var(--alx-ok); color: #fff; font-size: 14.5px; font-weight: 700; }
.alx.is-on .alx-tile:hover .alx-go { background: var(--airloc-cta-hover, #006B31); }
@media (min-width: 480px) { .alx.is-on .alx-pick { padding: 22px 22px 20px; } }

/* The tools lose their own card frame inside the card; footers stay at the bottom. */
.alx.is-on .aic, .alx.is-on .alf { flex: 1 1 auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.alx.is-on .aic-eyebrow { display: none; } /* the switch already says „Монтаж“ */
/* Calculator footer (Back · price · Next) overflowed by 4 px at 375 px inside the card. */
.alx.is-on .aic-foot { gap: 6px; padding: 10px 8px; border-radius: 0; }
.alx.is-on .aic #aic-next { min-width: 96px; }
@media (min-width: 480px) { .alx.is-on .aic-foot { gap: 8px; padding: 12px 18px; } .alx.is-on .aic #aic-next { min-width: 112px; } }

/* Fixed height: only the current step is in the flow; a step taller than the card (multisplit result)
   scrolls inside the step area while the bar, the tool head and the footer stay.
   overscroll-behavior: auto (was contain until 12.11.2026 – owner: „скролът забива“ on the home page): at the end of
   the step area the wheel goes on to the page; with contain the page stood still while the pointer was over the card. */
.alx.is-on .aic-stack, .alx.is-on .alf-stack { display: block; position: relative; flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: auto; }
.alx.is-on .aic-st:not(.is-cur), .alx.is-on .alf-st:not(.is-cur) { position: absolute; top: 0; left: 0; width: 100%; max-height: 100%; overflow: hidden; } /* never adds scroll */

@media (prefers-reduced-motion: no-preference) { .alx.is-on .alx-p.is-cur { animation: alx-in .18s ease-out; } }
@keyframes alx-in { from { opacity: 0; } to { opacity: 1; } }

/* Tile texts (12.11.2026): balanced lines, so no single word is left alone on the last line. */
.alx.is-on .alx-t b, .alx.is-on .alx-t small { text-wrap: balance; }

/* Desktop (owner 12.11.2026: „на десктоп надписите да са малко по-големи“): chooser texts a step larger. */
@media (min-width: 1200px) {
	.alx.is-on .alx-h { font-size: 24px; }
	.alx.is-on .alx-t b { font-size: 22px; }
	.alx.is-on .alx-t small { max-width: 34ch; font-size: 16px; }
	.alx.is-on .alx-go { min-height: 44px; padding: 0 20px; font-size: 16px; }
	.alx.is-on .alx-ico { width: 72px; height: 72px; }
	.alx.is-on .alx-ico svg { width: 46px; height: 46px; }
}
