/* Questions: a line above each, the question in semibold and an orange round plus on the right. */
.wp-block-details {
	border-top: 1px solid var(--wp--preset--color--color-8);
}

.wp-block-details:last-child {
	border-bottom: 1px solid var(--wp--preset--color--color-8);
}

.wp-block-details summary {
	position: relative;
	padding: 16px 56px 16px 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.55;
	list-style: none;
	cursor: pointer;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	top: 50%;
	right: 0;
	width: 32px;
	height: 32px;
	margin-top: -16px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--color-2);
	color: var(--wp--preset--color--color-10);
	font-size: 26px;
	font-weight: 400;
	line-height: 31px;
	text-align: center;
}

.wp-block-details[open] summary::after {
	content: "–";
}

.wp-block-details > :not(summary) {
	margin-top: 0;
	padding-bottom: var(--wp--preset--spacing--40);
}

/* Route chooser: six lying coloured bars stacked on the left, each overlapping the one above like a
   tab, and a bordeaux panel on the right that shows the open route. Only one route is open at a time,
   because the details share a name. The panel is the details content, placed against the group. */
.wp-block-group.is-style-routes {
	position: relative;
	display: flex;
	flex-direction: column;
}

.wp-block-group.is-style-routes > * {
	margin: 0;
}

.wp-block-group.is-style-routes .wp-block-details {
	position: static;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background-color: var(--wp--preset--color--color-7);
}

.wp-block-group.is-style-routes .wp-block-details:nth-child(2) { background-color: var(--wp--preset--color--color-5); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(3) { background-color: var(--wp--preset--color--color-2); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(4) { background-color: var(--wp--preset--color--color-3); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(5) { background-color: var(--wp--preset--color--color-6); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(6) { background-color: var(--wp--preset--color--color-1); }

.wp-block-group.is-style-routes .wp-block-details summary {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 98px;
	padding: 0 100px 0 30px;
	color: var(--wp--preset--color--color-10);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large-plus);
	font-weight: 400;
	letter-spacing: 0.05em;
	line-height: 1.1;
	text-transform: uppercase;
}

.wp-block-group.is-style-routes .wp-block-details summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--color-10);
	outline-offset: -6px;
}

/* The house icon sits at the right end of the bar. */
.wp-block-group.is-style-routes .wp-block-details summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 30px;
	bottom: auto;
	left: auto;
	width: 40px;
	height: 36px;
	margin: -18px 0 0;
	border-radius: 0;
	background: url(../../images/icons/route-1.svg) center / contain no-repeat;
}

.wp-block-group.is-style-routes .wp-block-details:nth-child(2) summary::after { background-image: url(../../images/icons/route-2.svg); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(3) summary::after { background-image: url(../../images/icons/route-3.svg); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(4) summary::after { background-image: url(../../images/icons/route-4.svg); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(5) summary::after { background-image: url(../../images/icons/route-5.svg); }
.wp-block-group.is-style-routes .wp-block-details:nth-child(6) summary::after { background-image: url(../../images/icons/route-6.svg); }

.wp-block-group.is-style-routes .wp-block-details > :not(summary) {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 280px 24px 28px;
	border-radius: 10px;
	background-color: var(--wp--preset--color--color-1);
	color: var(--wp--preset--color--color-10);
}

.wp-block-group.is-style-routes .wp-block-details > :not(summary)::before {
	content: "";
	position: absolute;
	top: -21px;
	right: -10px;
	width: 327.5px;
	height: 241.7px;
	background: url(../../images/houses/huis-lijn.svg) center / contain no-repeat;
	opacity: 0.094;
}

.wp-block-group.is-style-routes .wp-block-details > :not(summary)::after {
	content: "";
	position: absolute;
	top: 167px;
	left: 31px;
	width: 270px;
	height: 89px;
	background: url(../../images/kronkel.svg) center / contain no-repeat;
}

/* Wide screens (from 1200px, below that the routes stack): the bars take the left 660 of 1296 px and overlap by 20 px, the panel of 550 px
   stands on the right over the full height of the stack. */
@media (min-width: 1200px) {
	.wp-block-group.is-style-routes {
		min-height: 591px;
	}

	.wp-block-group.is-style-routes .wp-block-details {
		width: calc(660 / 1296 * 100%);
		height: 118px;
	}

	.wp-block-group.is-style-routes .wp-block-details + .wp-block-details {
		margin-top: -20px;
	}

	.wp-block-group.is-style-routes .wp-block-details:last-child {
		height: 97px;
	}

	.wp-block-group.is-style-routes .wp-block-details > :not(summary) {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: calc(550 / 1296 * 100%);
		padding: 34px;
	}
}

/* Coloured variant: the open panel takes the colour of its route instead of bordeaux, and the big house
   in it is the house icon of that route, in the same shape and colour as on the bar. */
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(1) > :not(summary) { background-color: var(--wp--preset--color--color-7); }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(2) > :not(summary) { background-color: var(--wp--preset--color--color-5); }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(3) > :not(summary) { background-color: var(--wp--preset--color--color-2); }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(4) > :not(summary) { background-color: var(--wp--preset--color--color-3); }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(5) > :not(summary) { background-color: var(--wp--preset--color--color-6); }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(6) > :not(summary) { background-color: var(--wp--preset--color--color-1); }

/* The house is drawn at 5 px per icon unit, against the top right corner. Each route sets the size of
   its icon (--hw, --hh) and the middle of the bottom of its door (--dx, --dy), so the dotted line can
   end exactly in that door. The end of the line lies at 98.9% of its width and 40% of its height. */
.wp-block-group.is-style-routes.is-colored .wp-block-details > :not(summary) {
	--kw: 270px;
}

.wp-block-group.is-style-routes.is-colored .wp-block-details > :not(summary)::before {
	top: 24px;
	right: 24px;
	width: calc(var(--hw) * 5px);
	height: calc(var(--hh) * 5px);
	background: var(--house);
	-webkit-mask: var(--icon) center / 100% 100% no-repeat;
	-webkit-mask-size: 100% 100%;
	mask: var(--icon) center / 100% 100% no-repeat;
	mask-size: 100% 100%;
	opacity: 1;
}

.wp-block-group.is-style-routes.is-colored .wp-block-details > :not(summary)::after {
	top: calc(24px + var(--dy) * 5px - var(--kw) * 0.3303 * 0.4005);
	left: calc(100% - 24px - var(--hw) * 5px + var(--dx) * 5px - var(--kw) * 0.9888);
	width: var(--kw);
	height: calc(var(--kw) * 0.3303);
	background: var(--line, #ffa00a);
	-webkit-mask: url(../../images/kronkel.svg) center / 100% 100% no-repeat;
	-webkit-mask-size: 100% 100%;
	mask: url(../../images/kronkel.svg) center / 100% 100% no-repeat;
	mask-size: 100% 100%;
}

/* On the amber and yellow panels the amber line and label disappear, so they turn bordeaux there. */
.wp-block-group.is-style-routes.is-colored .wp-block-details:is(:nth-child(1), :nth-child(4)) > :not(summary) {
	--line: var(--wp--preset--color--color-1);
}

.wp-block-group.is-style-routes.is-colored .wp-block-details:is(:nth-child(1), :nth-child(4)) .is-style-eyebrow {
	color: var(--wp--preset--color--color-1) !important;
}

@media (max-width: 1199px) {
	.wp-block-group.is-style-routes.is-colored .wp-block-details > :not(summary) {
		--kw: 170px;
	}
}

.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(1) > :not(summary) { --house: #ff5500; --icon: url(../../images/icons/route-1.svg); --hw: 43.2; --hh: 37.56; --dx: 25.92; --dy: 36.0; }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(2) > :not(summary) { --house: #aa0000; --icon: url(../../images/icons/route-2.svg); --hw: 39.95; --hh: 37.56; --dx: 21.03; --dy: 36.1; }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(3) > :not(summary) { --house: #7f001b; --icon: url(../../images/icons/route-3.svg); --hw: 44.87; --hh: 37.56; --dx: 10.49; --dy: 37.0; }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(4) > :not(summary) { --house: #ff0073; --icon: url(../../images/icons/route-4.svg); --hw: 39.72; --hh: 33.25; --dx: 30.44; --dy: 32.7; }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(5) > :not(summary) { --house: #ff8500; --icon: url(../../images/icons/route-5.svg); --hw: 40.0; --hh: 33.24; --dx: 9.75; --dy: 32.2; }
.wp-block-group.is-style-routes.is-colored .wp-block-details:nth-child(6) > :not(summary) { --house: #ff5500; --icon: url(../../images/icons/route-6.svg); --hw: 47.45; --hh: 35.02; --dx: 9.57; --dy: 31.5; }
