/**
 * Constructie-tools (/tools) in Menzis-stijl. Laadt na css/tools.css en geldt
 * alleen binnen .ms-tools (de toolpagina's), zodat de rekentool-popup op
 * /offerte ongemoeid blijft. Geen randen om vlakken met een eigen kleur.
 * Schemakleuren staan als SVG-attributen in de JS; CSS overschrijft ze hier.
 */
.btm-tools.ms-tools {
	--navy: #043572;
	--slate: #043572;
	--blauw: #0762d4;
	--blauw-d: #0057c2;
	--tekst: #1a1a1a;
	--muted: #536d89;
	--lijn: #e8e8e8;
	--bg: #f0f7fe;
	--ms-geel: #fec352;
	--ms-geel-d: #fcb53c;
	--ms-licht-2: #eaf3fd;
	--ms-zacht: #abcffc;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ms-tools h1,
.ms-tools h2,
.ms-tools h3 { font-family: inherit; }

/* Kruimelpad + chips */
.ms-tools .ms-kruimel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.ms-tools .ms-kruimel a { color: var(--blauw); text-decoration: none; }
.ms-tools .ms-kruimel a:hover { text-decoration: underline; }
.ms-tools .ms-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.ms-tools .ms-chips li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #fff;
	color: var(--navy);
	font-size: 14px;
	font-weight: 600;
}
.ms-tools .ms-chips li::before {
	content: "";
	width: 16px;
	height: 16px;
	background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323856e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ── Kop ─────────────────────────────────────────────────────────────── */
.ms-tools .btm-tool-hero { background: var(--bg); border: 0; border-radius: 0 0 32px 32px; padding: 40px 0 64px; }
.ms-tools .btm-tool-hero h1 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; }
.ms-tools .btm-tool-hero h1 .accent { color: var(--blauw); }
.ms-tools .btm-tool-hero .hero-copy p { font-size: 17px; line-height: 1.6; color: var(--navy); max-width: 40em; }

/* Iso-illustratie in Menzis-blauw */
.ms-tools svg [stroke="#14213D"] { stroke: var(--navy); }
.ms-tools svg [fill="#14213D"] { fill: var(--navy); }
.ms-tools svg [fill="#4d80ee"] { fill: var(--blauw); }
.ms-tools svg [stroke="#4d80ee"] { stroke: var(--blauw); }
.ms-tools svg [fill="#6f97f2"] { fill: #5b9cf2; }
.ms-tools svg [fill="#c3d2f2"] { fill: var(--ms-zacht); }
.ms-tools svg [fill="#dbe6fb"] { fill: #cde3fd; }

/* ── Rekentool ───────────────────────────────────────────────────────── */
.ms-tools .tool { padding: 48px 0 72px; }
.ms-tools .grid2 { gap: 40px; grid-template-columns: .9fr 1.1fr; }
.ms-tools .invoer { background: var(--bg); border-radius: 16px; padding: 28px; }
.ms-tools .invoer-head h2 { font-size: 24px; font-weight: 700; }
.ms-tools .adv-toggle { color: var(--blauw); font-weight: 600; font-size: 14px; }
.ms-tools .adv-toggle:hover { color: var(--blauw-d); text-decoration: underline; }
.ms-tools .veld > label { font-size: 15px; font-weight: 600; color: var(--navy); }
.ms-tools .pills button { background: #fff; color: var(--navy); border-radius: 8px; font-size: 15px; padding: 11px 18px; }
.ms-tools .pills button:hover { background: var(--ms-licht-2); }
.ms-tools .pills button.active { background: var(--navy); color: #fff; }
.ms-tools .getal { background: #fff; border-radius: 8px; color: var(--navy); }
.ms-tools input[type=range] { background: var(--ms-zacht); }
.ms-tools input[type=range]::-webkit-slider-thumb { width: 24px; height: 24px; background: var(--blauw); box-shadow: 0 2px 6px rgba(0, 47, 108, .3); }
.ms-tools input[type=range]::-moz-range-thumb { width: 24px; height: 24px; background: var(--blauw); }
.ms-tools .slider-txt { color: var(--navy); font-size: 14.5px; }

.ms-tools .schema { border: 0; border-radius: 16px; background: var(--bg); }
.ms-tools .schema-head { border-bottom: 0; padding: 18px 22px 4px; }
.ms-tools .schema-head .eyebrow { color: var(--navy); letter-spacing: .08em; }
.ms-tools .readout { font-family: inherit; color: var(--blauw); font-size: 15px; }
.ms-tools .beam-svg { background: linear-gradient(rgba(4, 53, 114, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(4, 53, 114, .05) 1px, transparent 1px); background-size: 22px 22px; }
.ms-tools .beam-svg rect[fill="#f7f9fa"] { fill: #fff; }

.ms-tools .results h2 { font-size: 24px; font-weight: 700; }
.ms-tools .results .sub { color: var(--muted); font-size: 15px; }
.ms-tools .tbl { border-radius: 16px; overflow: hidden; }
.ms-tools .tbl th { background: var(--bg); color: var(--navy); font-size: 13.5px; border-bottom: 0; }
.ms-tools .tbl td { color: var(--tekst); font-size: 15px; }
.ms-tools .tbl tbody tr:nth-child(even) { background: #fff; }
.ms-tools .tbl tbody tr:hover { background: #f7fbff; }
.ms-tools .maat { font-family: inherit; color: var(--navy); }
.ms-tools .selecteer { background: var(--bg); color: var(--blauw); border-radius: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.ms-tools .selecteer:hover { background: var(--blauw); color: #fff; }
.ms-tools tr.gekozen { background: var(--ms-licht-2) !important; }
.ms-tools tr.gekozen .selecteer { background: var(--blauw); color: #fff; }
.ms-tools .geen { border: 0; background: #fff4e5; color: #8a4b00; border-radius: 12px; }
.ms-tools .disc { color: var(--muted); font-size: 13px; }

/* Oplegging-resultaat + breakdown */
.ms-tools .result { background: var(--navy); }
.ms-tools .result__maat { font-family: inherit; }
.ms-tools .bd { border: 0; background: var(--bg); border-radius: 12px; }
.ms-tools .bd__v { font-family: inherit; }

/* Instellingen-venster */
.ms-tools dialog { border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 47, 108, .25); }
.ms-tools dialog::backdrop { background: rgba(4, 53, 114, .45); }
.ms-tools .dlg-h,
.ms-tools .dlg-f { border-color: var(--lijn); }
.ms-tools .dlg-b label { color: var(--navy); }
.ms-tools .dlg-b select,
.ms-tools .dlg-b input { background: var(--bg); color: var(--navy); }
.ms-tools .btn { background: var(--bg); color: var(--blauw); border-radius: 8px; }
.ms-tools .btn-p { background: var(--ms-geel); color: var(--navy); }
.ms-tools .btn-p:hover { background: var(--ms-geel-d); }

/* ── Offerte-blok ────────────────────────────────────────────────────── */
.ms-tools .cta-section.btm-tools-cta { background: var(--bg); border-radius: 32px 32px 0 0; }
.ms-tools .btm-tools-cta .cta-title { color: var(--navy); font-family: inherit; font-weight: 900; }
.ms-tools .btm-tools-cta .cta-subtitle { color: var(--navy); }
.ms-tools .btm-tools-cta .cta-usp { color: var(--navy); }
.ms-tools .btm-tools-cta .cta-usp svg { color: #23856e; }
.ms-tools .btm-tools-cta .cta-form { border-radius: 16px; box-shadow: 0 16px 32px -4px rgba(0, 47, 108, .1); }
.ms-tools .btm-tools-cta .cta-form-fields input { border: 0; background: var(--bg); border-radius: 8px; color: var(--navy); font-family: inherit; }
.ms-tools .btm-tools-cta .cta-form-fields input::placeholder { color: #8097b5; }
.ms-tools .btm-tools-cta .cta-form-fields input:focus { border: 0; box-shadow: 0 0 0 3px var(--ms-zacht); }
.ms-tools .btm-tools-cta .cta-form .tools-cta { background: var(--ms-geel); border: 0; color: var(--navy); border-radius: 8px; font-family: inherit; font-weight: 600; }
.ms-tools .btm-tools-cta .cta-form .tools-cta:hover { background: var(--ms-geel-d); }
.ms-tools .btm-tools-cta .cta-form-disclaimer { color: var(--muted); }
.ms-tools .btm-tools-cta .cta-form-disclaimer a { color: var(--blauw); }
.ms-tools .btm-tools-cta .cta-form .to-status { color: #23856e; }
.ms-tools .btm-tools-cta .cta-form .to-bedankt__icoon { background: #23856e; }
.ms-tools .btm-tools-cta .cta-form .to-bedankt__groot { color: var(--navy); }
.ms-tools .btm-tools-cta .cta-team-strong,
.ms-tools .btm-tools-cta .cta-google-number { color: var(--navy); }
.ms-tools .btm-tools-cta .cta-team-sub,
.ms-tools .btm-tools-cta .cta-google-count { color: var(--muted); }
.ms-tools .btm-tools-cta .cta-google-badge { border: 0; box-shadow: 0 8px 20px -4px rgba(0, 47, 108, .12); }
.ms-tools .btm-tools-cta .cta-google-badge:hover { background: #fff; }

/* ── Overzicht /tools ────────────────────────────────────────────────── */
.ms-tools .btm-tools-index { padding: 0 0 72px; }
.ms-tools .btm-tools-index .index-hero { background: var(--bg); border-radius: 0 0 32px 32px; padding: 48px max(24px, calc((100vw - 1180px) / 2 + 24px)) 64px; margin: 0 calc(50% - 50vw) 48px; }
.ms-tools .btm-tools-index .eyebrow { color: var(--blauw); letter-spacing: .08em; }
.ms-tools .btm-tools-index h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 900; letter-spacing: -.02em; }
.ms-tools .btm-tools-index .lead { color: var(--navy); font-size: 17px; }
.ms-tools .btm-tools-index .tool-card { border: 0; background: var(--bg); border-radius: 16px; padding: 24px; }
.ms-tools .btm-tools-index .tool-card:hover { background: var(--ms-licht-2); box-shadow: none; }
.ms-tools .btm-tools-index .tool-card__cat { background: #fff; color: var(--blauw); }
.ms-tools .btm-tools-index .tool-card__titel { font-size: 19px; }
.ms-tools .btm-tools-index .tool-card__arrow { color: var(--blauw); }

.ms-tools :focus-visible { outline: 3px solid var(--ms-zacht); outline-offset: 2px; }
@media (min-width: 881px) {
	.ms-tools .invoer { position: sticky; top: 112px; }
}
@media (max-width: 880px) {
	.ms-tools .grid2 { grid-template-columns: 1fr; }
	.ms-tools .invoer { padding: 22px; }
	.ms-tools .tbl { display: block; overflow-x: auto; }
}

/* ── Balklaag: advies-eerst-opzet (.tool--advies) ────────────────────── */
.ms-tools .calc { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
.ms-tools .tool--advies .invoer { padding: 28px 28px 20px; }
.ms-tools .tool--advies .invoer-head { margin-bottom: 20px; }
.ms-tools .tool--advies .invoer-head h2 { font-size: 22px; }
.ms-tools .stap { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
.ms-tools .stap + .stap { border-top: 1px solid rgba(4, 53, 114, .08); }
.ms-tools .stap__nr { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; font-weight: 700; margin-top: 1px; }
.ms-tools .stap__label { display: block; font-size: 15px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.ms-tools .pills--seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: #fff; border-radius: 10px; }
.ms-tools .pills--seg button { padding: 10px 8px; border-radius: 7px; background: transparent; font-size: 15px; text-align: center; }
.ms-tools .pills--seg button:hover { background: var(--bg); }
.ms-tools .pills--seg button.active { background: var(--navy); color: #fff; }
.ms-tools .span-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ms-tools .span-kop .stap__label { margin-bottom: 4px; }
.ms-tools .span-waarde { font-size: 26px; font-weight: 900; color: var(--blauw); font-variant-numeric: tabular-nums; }
.ms-tools .span-grenzen { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.ms-tools .uitkomst { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.ms-tools .advies { background: var(--bg); border-radius: 16px; padding: 28px 28px 12px; }
.ms-tools .advies__kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.ms-tools .advies__eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--ms-geel); color: var(--navy); font-size: 13px; font-weight: 700; }
.ms-tools .advies__maat { margin: 12px 0 4px; font-size: clamp(34px, 4vw, 48px); font-weight: 900; line-height: 1; color: var(--navy); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ms-tools .advies__maat small { font-size: .45em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ms-tools .advies__sub { margin: 0; font-size: 15px; color: var(--navy); }
.ms-tools .advies__meter { text-align: right; flex-shrink: 0; }
.ms-tools .advies__pct { display: block; font-size: 28px; font-weight: 900; color: var(--blauw); line-height: 1; }
.ms-tools .advies__pct-lbl { font-size: 13px; color: var(--muted); }
.ms-tools .meter { display: block; height: 8px; border-radius: 999px; background: #fff; overflow: hidden; margin: 18px 0 8px; }
.ms-tools .meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blauw); transition: width .25s ease; }
.ms-tools .tool--advies .beam-svg { background: none; margin: 0 -8px; width: calc(100% + 16px); }

.ms-tools .tool--advies .results h2 { font-size: 20px; margin-bottom: 14px; }
.ms-tools .maten { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ms-tools .maat-kaart { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 14px 12px; border: 0; border-radius: 12px; background: var(--bg); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease; }
.ms-tools .maat-kaart:hover { background: var(--ms-licht-2); }
.ms-tools .maat-kaart__maat { font-size: 18px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.ms-tools .maat-kaart__pct { font-size: 13px; color: var(--muted); }
.ms-tools .maat-kaart__tag { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; background: var(--ms-geel); color: var(--navy); font-size: 11px; font-weight: 700; }
.ms-tools .maat-kaart .meter--klein { width: 100%; height: 5px; margin: 8px 0 0; }
.ms-tools .maat-kaart.gekozen { background: var(--navy); }
.ms-tools .maat-kaart.gekozen .maat-kaart__maat { color: #fff; }
.ms-tools .maat-kaart.gekozen .maat-kaart__pct { color: #cddff2; }
.ms-tools .maat-kaart.gekozen .meter--klein { background: rgba(255, 255, 255, .2); }
.ms-tools .maat-kaart.gekozen .meter--klein > span { background: var(--ms-geel); }

@media (min-width: 981px) {
	.ms-tools .tool--advies .invoer { position: sticky; top: 112px; }
}
@media (max-width: 980px) {
	.ms-tools .calc { grid-template-columns: 1fr; }
	.ms-tools .tool--advies .invoer { position: static; }
}
@media (max-width: 520px) {
	.ms-tools .tool--advies .invoer,
	.ms-tools .advies { padding: 20px 18px 10px; }
	.ms-tools .maten { grid-template-columns: 1fr 1fr; }
}
/* In de popup is er geen kop boven de tool: minder ruimte bovenin. */
.btm-tooldialog.ms-tools .tool--advies { padding-top: 16px; }
.btm-tooldialog.ms-tools .invoer { position: static !important; }
/* Stapnummers via een teller: een verborgen stap (vloerverwarming bij dak) telt niet mee. */
.ms-tools .tool--advies .invoer { counter-reset: stap; }
.ms-tools .stap { counter-increment: stap; }
.ms-tools .stap__nr::before { content: counter(stap); }
@media (max-width: 880px) {
	.ms-tools .btm-tool-hero { padding: 28px 0 40px; }
	.ms-tools .btm-tool-hero .hero-art { display: none; }
}
