/* -------------------------------------------------------------------------
 * Gerettete Divi-Module: Geraetekacheln, Knoepfe, Akkordeon
 *
 * Gehoert zu includes/divi-rettung.php. Bewusst knapp: Diese Seiten werden
 * irgendwann nach Gutenberg migriert, dann faellt beides weg. Bis dahin soll
 * die Geraeteauswahl funktionieren und nicht nach Platzhalter aussehen.
 * ------------------------------------------------------------------------- */

/* Das Raster der Geraetekacheln.
   auto-fill mit 148px: Bei 1180px Inhaltsbreite ergibt das sieben Kacheln je
   Reihe. Schmaler waere die Beschriftung dreizeilig, breiter blieben bei zwoelf
   Modellen zu viele Luecken in der letzten Reihe. */
.edvr-dk-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
	gap: 12px;
	margin: 30px 0;
	padding: 0;
	list-style: none;
}

.edvr-dk {
	display: flex;
	flex-direction: column;
	padding: 0 0 12px;
	border: 1px solid #e4e8ec;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.edvr-dk:hover,
.edvr-dk:focus-visible {
	border-color: #02628F;
	box-shadow: 0 8px 22px -14px rgba(2, 98, 143, .6);
	transform: translateY(-2px);
}

/* Die Bildflaeche als eigener Kasten mit festem Mass.
   Die Geraetefotos stammen aus verschiedenen Jahren: manche freigestellt auf
   Weiss, manche auf schwarzem Grund, manche quer, manche hoch. Ein fester
   Rahmen mit `contain` bringt sie auf eine gemeinsame Grundlinie, ohne etwas
   zu beschneiden.

   Der Grund ist WEISS, nicht grau. Bei vielen der Fotos ist ein weisser Rand
   mit ins JPEG gebrannt; auf grauem Grund stand dann ein helles Rechteck im
   dunkleren Rahmen, bei jeder Kachel unterschiedlich breit. Auf Weiss
   verschwindet dieser Rand, und die dunklen Aufnahmen setzen sich von selbst
   ab. */
.edvr-dk__bild {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 104px;
	padding: 10px;
	background: #fff;
}

.edvr-dk img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* Die Beschriftung sitzt unten und bekommt zwei Zeilen Platz. So stehen die
   Namen aller Kacheln einer Reihe auf derselben Hoehe, auch wenn einer wie
   „Surface Pro 5 (2017)" umbricht. */
.edvr-dk__name {
	margin-top: auto;
	padding: 11px 10px 0;
	min-height: 2.6em;
	font-size: 13.5px;
	line-height: 1.3;
	font-weight: 600;
	text-align: center;
	text-wrap: balance;
	color: #10202b;
}

.edvr-dk:hover .edvr-dk__name,
.edvr-dk:focus-visible .edvr-dk__name {
	color: #02628F;
}

/* Einzelne Knoepfe ausserhalb des Rasters, etwa „Mehr dazu". */
.edvr-dbutton {
	display: inline-block;
	margin: 6px 8px 6px 0;
	padding: 9px 18px;
	border: 1px solid #c8d0d6;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, background .15s ease;
}

.edvr-dbutton:hover,
.edvr-dbutton:focus-visible {
	border-color: #02628F;
	background: #F2F8FB;
}

/* Einzelne Bilder ohne Knopf daneben. */
.edvr-dbild {
	display: inline-block;
	max-width: 100%;
}

.edvr-dbild img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* -------------------------------------------------------------------------
 * Akkordeon
 *
 * `<details>` statt JavaScript: Der Browser kann das, es ist mit der Tastatur
 * bedienbar, und die Suchmaschine liest den zugeklappten Text mit.
 * ------------------------------------------------------------------------- */

.edvr-dacc {
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	margin: 10px 0;
	background: #fff;
}

.edvr-dacc + .edvr-dacc {
	margin-top: -1px;
}

.edvr-dacc > summary {
	cursor: pointer;
	list-style: none;
	padding: 15px 46px 15px 18px;
	font-weight: 600;
	font-size: 16.5px;
	position: relative;
}

.edvr-dacc > summary::-webkit-details-marker { display: none; }

/* Das Zeichen als CSS-Form, nicht als Textzeichen: ein getipptes + oder ▾
   wird vom Screenreader vorgelesen und skaliert nicht mit. */
.edvr-dacc > summary::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid #02628F;
	border-bottom: 2px solid #02628F;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .18s ease;
}

.edvr-dacc[open] > summary::after {
	transform: translateY(-30%) rotate(-135deg);
}

.edvr-dacc > summary:focus-visible {
	outline: 2px solid #02628F;
	outline-offset: -2px;
	border-radius: 8px;
}

.edvr-dacc__body {
	padding: 0 18px 16px;
}

.edvr-dacc__body > p:first-child { margin-top: 0; }
.edvr-dacc__body > p:last-child  { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
	.edvr-dk,
	.edvr-dacc > summary::after { transition: none; }
	.edvr-dk:hover { transform: none; }
}

@media (max-width: 540px) {
	.edvr-dk-raster { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; }
	.edvr-dk__bild { height: 80px; padding: 8px; }
	.edvr-dk__name { font-size: 12.5px; padding-top: 9px; }
}
