/* Rekentool-popup (inc/tool-popup.php): dezelfde kaarten als /tools/ (css/tools-overzicht.css),
 * compacter; een gekozen tool is de echte tool-pagina in een iframe (?btm_embed=1).
 * Regel: nooit een rand om iets met een eigen achtergrondkleur. */

.btm-tooldialog.btm-tp {
	--tp-mint: #dcf4f2;
	--tp-teal: #054958;
	--tp-diep: #032a32;
	--tp-grijs: #687f84;
	width: min(1120px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	padding: 0;
	border: 0;
	border-radius: 28px;
	background: var(--tp-mint);
	box-shadow: 0 24px 70px rgba(3, 42, 50, .3);
	overflow-y: auto;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--tp-diep);
}
.btm-tooldialog.btm-tp::backdrop { background: rgba(3, 42, 50, .55); }

/* Kop */
.btm-tp__kop {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; gap: 12px;
	padding: 18px 24px 12px;
	background: var(--tp-mint);
}
.btm-tp__titel { flex: 1; font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .78px; text-transform: uppercase; color: var(--tp-teal); }
.btm-tp__terug, .btm-tp__sluit {
	border: 0; cursor: pointer; font: inherit; color: var(--tp-teal);
	background: #fff; border-radius: 999px; box-shadow: 0 6px 16px rgba(3, 42, 50, .08);
}
.btm-tp__terug { padding: 8px 14px; font-size: 14px; font-weight: 600; }
.btm-tp__sluit { width: 36px; height: 36px; font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.btm-tp__terug:hover, .btm-tp__sluit:hover { background: #f4fbfa; }
.btm-tp__terug:focus-visible, .btm-tp__sluit:focus-visible, .btm-tp .to-kaart:focus-visible { outline: 2px solid var(--tp-teal); outline-offset: 3px; }
.btm-tp__sluit:focus:not(:focus-visible) { outline: none; }

/* Kiezer: de kaarten van /tools/, compact */
.btm-tp__kiezer.to { background: transparent; overflow: visible; padding: 0 24px 8px; }
.btm-tp__intro { font-size: 17px; line-height: 24px; color: var(--tp-teal); margin: 0 0 18px; }
.btm-tp .btm-tp__lijst { list-style: none; margin: 0; padding: 0 0 8px !important; gap: 16px; }
.btm-tp .to-kaart {
	width: 100%; min-height: 0; gap: 12px; padding: 10px; border: 0; border-radius: 24px;
	font: inherit; text-align: left; cursor: pointer;
}
.btm-tp .to-kaart__beeld { height: 112px; border-radius: 18px; }
.btm-tp .to-kaart__illu { transform: scale(.72); }
.btm-tp .to-kaart__inhoud { gap: 4px; padding: 0 6px; }
.btm-tp .to-kaart__cat { font-size: 13px; line-height: 18px; }
.btm-tp .to-kaart__titel { display: block; font-size: 15.5px; line-height: 21px; font-weight: 600; color: var(--tp-diep); }
.btm-tp .to-kaart__tekst { display: block; font-size: 13px; line-height: 18px; }
.btm-tp .to-kaart__voet { padding: 2px 6px 6px; }
.btm-tp .to-kaart__actie { font-size: 14px; }
.btm-tp .to-kaart__rond { width: 34px; height: 34px; }

/* Gekozen tool */
.btm-tp__tool { position: relative; min-height: 320px; }
.btm-tp__frame { display: block; width: 100%; height: 640px; border: 0; background: transparent; opacity: 0; transition: opacity .2s ease; }
.btm-tp__frame.is-klaar { opacity: 1; }
.btm-tp__laden { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--tp-grijs); }

.btm-tp__voet { margin: 0; padding: 4px 24px 22px; font-size: 12.5px; line-height: 18px; color: var(--tp-grijs); }

@media (max-width: 900px) {
	.btm-tp .btm-tp__lijst { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.btm-tooldialog.btm-tp { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; margin: 0; }
	.btm-tp__kop { padding: 14px 16px 10px; }
	.btm-tp__kiezer.to { padding: 0 16px 8px; }
	.btm-tp .btm-tp__lijst { grid-template-columns: 1fr; gap: 12px; }
	.btm-tp .to-kaart { flex-direction: row; align-items: center; }
	.btm-tp .to-kaart__beeld { width: 96px; height: 80px; flex-shrink: 0; }
	.btm-tp .to-kaart__illu { transform: scale(.62); }
	.btm-tp .to-kaart__voet { display: none; }
	.btm-tp__voet { padding: 4px 16px 18px; }
}
