/**
 * Glückskeks – phpBB 3.3 Extension
 * Farben anpassen: in der CSS-Datei deines Styles z. B.
 * :root { --gk-akzent: #b5651d; }
 */
:root {
	--gk-akzent: #c07a2a;
	--gk-teig-rand: #a8691e;
	--gk-zettel: #fffdf4;
	--gk-zettel-text: #3b3226;
	--gk-zettel-rand: #e8dcc0;
	--gk-gewinn: #2f7d4f;
}

.glueckskeks-titel { margin-bottom: 8px; }

.glueckskeks-panel .inner { text-align: center; }

.gk-buehne {
	padding: 10px 0 4px;
	min-height: 220px;
}

.gk-hinweis {
	font-size: 1.1em;
	margin: 0 0 6px;
}

/* Der Keks */
.gk-keks-knopf {
	display: inline-block;
	background: none;
	border: 0;
	padding: 0;
	margin: 0 auto;
	cursor: pointer;
	line-height: 0;
}
.gk-keks-knopf.gk-still { cursor: default; }
.gk-keks-knopf:focus-visible { outline: 2px solid var(--gk-akzent); outline-offset: 4px; border-radius: 8px; }

.gk-keks {
	width: 220px;
	max-width: 70vw;
	height: auto;
	overflow: visible;
}

.gk-keks .gk-teig {
	fill: url(#gk-teig);
	stroke: var(--gk-teig-rand);
	stroke-width: 2;
	stroke-linejoin: round;
}
.gk-keks .gk-falte {
	fill: none;
	stroke: var(--gk-teig-rand);
	stroke-width: 1.5;
	stroke-linecap: round;
	opacity: .45;
}
.gk-keks .gk-zettelchen {
	fill: var(--gk-zettel);
	stroke: var(--gk-zettel-rand);
	stroke-width: 1;
	opacity: 0;
	transition: opacity .3s ease .25s;
}
.gk-keks .gk-kruemel circle {
	fill: #d9a457;
	opacity: 0;
	transition: opacity .3s ease .2s;
}

.gk-keks .gk-links,
.gk-keks .gk-rechts {
	transform-box: fill-box;
	transition: transform .55s cubic-bezier(.3, 1.4, .5, 1);
}
.gk-keks .gk-links { transform-origin: 100% 60%; }
.gk-keks .gk-rechts { transform-origin: 0% 60%; }

.gk-keks-knopf:not(.gk-still):hover .gk-keks { animation: gk-wippen 1.2s ease-in-out infinite; }

.gk-keks.gk-wackeln { animation: gk-wackeln .45s ease-in-out infinite; }

.gk-keks.gk-geknackt { animation: none; }
.gk-keks.gk-geknackt .gk-links { transform: translate(-22px, 8px) rotate(-18deg); }
.gk-keks.gk-geknackt .gk-rechts { transform: translate(22px, 8px) rotate(18deg); }
.gk-keks.gk-geknackt .gk-zettelchen,
.gk-keks.gk-geknackt .gk-kruemel circle { opacity: 1; }

@keyframes gk-wippen {
	0%, 100% { transform: translateY(0) rotate(0); }
	50% { transform: translateY(-4px) rotate(-2deg); }
}
@keyframes gk-wackeln {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-5deg); }
	75% { transform: rotate(5deg); }
}

/* Der Zettel */
.gk-zettel {
	position: relative;
	max-width: 520px;
	margin: 6px auto 10px;
	padding: 18px 24px 14px;
	background: var(--gk-zettel);
	color: var(--gk-zettel-text);
	border: 1px solid var(--gk-zettel-rand);
	border-radius: 3px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	transform-origin: top center;
}
.gk-zettel::before,
.gk-zettel::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-radius: 50%;
	background: var(--gk-zettel-rand);
	opacity: .6;
}
.gk-zettel::before { left: 8px; }
.gk-zettel::after { right: 8px; }

.gk-zettel.gk-offen { animation: gk-ausrollen .6s ease-out both; }

@keyframes gk-ausrollen {
	from { opacity: 0; transform: scaleY(.15) translateY(-20px); }
	to { opacity: 1; transform: none; }
}

.gk-spruch {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.35em;
	line-height: 1.45;
}
.gk-kategorie {
	margin: 8px 0 0;
	font-size: .85em;
	opacity: .65;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.gk-gewinn {
	color: var(--gk-gewinn);
	font-weight: bold;
	font-size: 1.1em;
	margin: 4px 0;
}
.gk-naechster { opacity: .8; margin: 4px 0 0; }
.gk-aktion { margin-top: 6px; }

.gk-links-unten {
	margin: 14px 0 0;
	padding-top: 8px;
	border-top: 1px solid rgba(128, 128, 128, .25);
}
.gk-zaehler { opacity: .7; }

.gk-tagesspruch h3 { margin-top: 0; }
.gk-spruch-klein {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.15em;
	line-height: 1.45;
}

/* Sammlung und Einreichungen */
.gk-sammlung { list-style: none; margin: 0; padding: 0; }
.gk-sammlung li { padding: 8px 10px; border-radius: 4px; margin-bottom: 2px; }
.gk-meta { margin: 3px 0 0; font-size: .9em; opacity: .7; }
.gk-status { font-weight: bold; }
.gk-status-frei { color: #2f7d4f; }
.gk-status-wartet { color: #a87318; }
.gk-status-abgelehnt { color: #a33a3a; }

/* Startseite */
.gk-index-inhalt { display: flex; align-items: center; gap: 12px; }
.gk-index-keks { flex: 0 0 auto; line-height: 0; }
.gk-index-keks .gk-keks { width: 70px; }
.gk-index-text p { margin: 2px 0; }
.gk-index-knopf { margin-left: 6px; vertical-align: middle; }

/* Punkt am Link, wenn ein Keks wartet */
.gk-punkt {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gk-akzent);
	vertical-align: super;
	margin-left: 2px;
}

@media (max-width: 700px) {
	.gk-spruch { font-size: 1.2em; }
	.gk-zettel { padding: 16px 18px 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.gk-keks, .gk-keks *, .gk-zettel { animation: none !important; transition: none !important; }
}

/* Reaktionen (mit der Erweiterung „Reaktionen“) */
.gk-reaktionen { display: flex; justify-content: center; margin: 6px 0 2px; }
.gk-sammlung .gk-reaktionen,
.gk-tagesspruch .gk-reaktionen { justify-content: flex-start; }
.gk-reaktionen .reak-leiste { margin: 0; border-top: 0; padding-top: 0; }
