/* HCH Adventskalender – Farben und Schriften des Handball Club Hamburg.
   Die Schriften Source Sans 3 und Apotek lädt die Website selbst, das Plugin bindet keine Fonts ein. */
.hchak,
.hchak-dialog {
	--hchak-blau: #00194e;
	--hchak-rot: #e40000;
	--hchak-akzent: var(--hchak-rot);
	--hchak-schrift: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
	--hchak-headline: "Apotek", "Source Sans 3", sans-serif;
	--hchak-headline-gewicht: 900;
	--hchak-headline-stil: italic;
	font-family: var(--hchak-schrift);
}

/* ---------- Kalender ---------- */
.hchak {
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	container-type: inline-size;
}
.hchak-buehne {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-size: 100% 100%;
	border-radius: 8px;
	box-shadow: 0 14px 40px rgba(10, 25, 45, .3);
}
.hchak-slot { position: absolute; perspective: 900px; }
.hchak-slot.ist-offen { z-index: 2; }

/* Was hinter der Tür liegt */
.hchak-innen {
	position: absolute; inset: 0; margin: 0; padding: 0; border: 0;
	display: flex; align-items: center; justify-content: center;
	background: radial-gradient(circle at 50% 30%, #0d3383, var(--hchak-blau) 75%);
	background-size: cover; background-position: center;
	color: var(--hchak-rot); cursor: pointer; border-radius: 3px;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), inset 0 5px 14px rgba(0,0,0,.5);
}
.hchak-innen svg { width: 32%; height: 32%; opacity: .5; transition: transform .3s, opacity .3s; }
.hchak-innen.hat-bild svg { display: none; }
.hchak-innen:hover svg, .hchak-innen:focus-visible svg { transform: scale(1.12) rotate(8deg); opacity: 1; }
.hchak-innen:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Die Tür */
.hchak-tuer {
	position: absolute; inset: 0; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
	transform-origin: left center; transform-style: preserve-3d;
	transition: transform 1s cubic-bezier(.35, .1, .15, 1);
}
.hchak-tuer:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hchak-vorne, .hchak-hinten { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 3px; }
.hchak-vorne {
	background-image: var(--hchak-bild);
	background-size: var(--bs);
	background-position: var(--bp);
	box-shadow: 0 0 0 1.5px rgba(255,255,255,.45);
}
.hchak-vorne::after {
	content: ""; position: absolute; inset: 4px; pointer-events: none;
	border: 2.5px dashed rgba(255,255,255,.75); border-radius: 2px;
}
.ist-offen .hchak-innen {
	box-shadow: 0 0 0 1.5px rgba(255,255,255,.45), inset 0 0 0 1px rgba(0,0,0,.45), inset 0 5px 14px rgba(0,0,0,.5);
}
.hchak-nr {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	font-family: var(--hchak-headline); font-weight: var(--hchak-headline-gewicht); font-style: var(--hchak-headline-stil);
	font-size: clamp(18px, 6cqw, 52px); line-height: 1; color: #fff; padding-right: .06em;
	-webkit-text-stroke: .07em var(--hchak-blau); paint-order: stroke fill;
	text-shadow: 0 1px 2px rgba(0, 12, 45, .9), 0 3px 12px rgba(0, 12, 45, .75);
}
.hchak-hinten {
	transform: rotateY(180deg);
	background: linear-gradient(90deg, #c9d1e0, #eef1f7);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.ist-offen .hchak-tuer { transform: rotateY(-108deg); pointer-events: none; }
.ist-laden .hchak-tuer { cursor: progress; }
.ist-gesperrt .hchak-tuer { cursor: not-allowed; }
.ist-heute .hchak-vorne { animation: hchak-puls 2.4s ease-in-out infinite; }
@keyframes hchak-puls {
	0%, 100% { box-shadow: 0 0 0 3px var(--hchak-rot), 0 0 0 rgba(228,0,0,0); }
	50%      { box-shadow: 0 0 0 3px var(--hchak-rot), 0 0 26px rgba(228,0,0,.9); }
}
.hchak-wackeln .hchak-tuer { animation: hchak-wackeln .45s; }
@keyframes hchak-wackeln {
	20% { transform: rotateY(-6deg); } 45% { transform: rotateY(-2deg); }
	70% { transform: rotateY(-4deg); } 100% { transform: rotateY(0); }
}
.hchak-sofort .hchak-tuer { transition: none; }

.hchak-meldung {
	position: absolute; left: 50%; bottom: 4%; z-index: 5;
	transform: translate(-50%, 12px); max-width: 90%;
	background: var(--hchak-blau); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.3);
	padding: .6em 1.1em; border-radius: 999px; text-align: center;
	font-size: clamp(13px, 2.4cqw, 16px); line-height: 1.3;
	opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.hchak-meldung.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.hchak-testhinweis {
	margin: 0 0 10px; padding: 8px 12px; border-radius: 6px;
	background: #fff4d6; color: #5c4400; font-size: 14px;
}

/* ---------- Popup ---------- */
.hchak-dialog {
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100dvh - 24px);
	margin: auto; padding: 0; border: 0; border-radius: 10px;
	background: #fff; color: #18213a;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	overflow: auto; overscroll-behavior: contain;
}
.hchak-dialog::backdrop { background: rgba(8, 18, 32, .72); }
.hchak-dialog-innen { position: relative; padding: 28px 24px 24px; }
.hchak-schliessen {
	position: absolute; top: 6px; right: 6px; width: 44px; height: 44px;
	border: 0; background: transparent; color: inherit;
	font-size: 30px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.hchak-schliessen:hover { background: rgba(0,0,0,.06); }
.hchak-titel {
	margin: 0 40px 16px 0; color: var(--hchak-blau);
	font-family: var(--hchak-headline); font-weight: var(--hchak-headline-gewicht); font-style: var(--hchak-headline-stil);
	font-size: 2.1rem; line-height: 1.05; text-transform: uppercase; letter-spacing: .01em;
}
.hchak-medium { display: block; width: 100%; height: auto; border-radius: 6px; margin: 0 0 16px; }
.hchak-text { margin: 0 0 16px; line-height: 1.55; }
.hchak-text > :last-child { margin-bottom: 0; }

.hchak-video { aspect-ratio: 16 / 9; background: #111; border-radius: 6px; overflow: hidden; margin: 0 0 16px; }
.hchak-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.hchak-video-start {
	all: unset; box-sizing: border-box; cursor: pointer; width: 100%; height: 100%;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 8px; padding: 16px; color: #fff; text-align: center;
}
.hchak-video-start small { opacity: .75; font-size: 12px; max-width: 32ch; }
.hchak-video-start:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.hchak-play { width: 64px; height: 44px; border-radius: 12px; background: var(--hchak-akzent); position: relative; }
.hchak-play::after {
	content: ""; position: absolute; left: 26px; top: 13px;
	border-left: 16px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}

.hchak-formular fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.hchak-formular legend { font-weight: 700; font-size: 1.15rem; margin: 0 0 10px; padding: 0; line-height: 1.35; color: var(--hchak-blau); }
.hchak-option {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 11px 12px; margin: 0 0 8px; border: 1px solid #d3d8df; border-radius: 6px; cursor: pointer;
}
.hchak-option input { margin: 3px 0 0; accent-color: var(--hchak-akzent); }
.hchak-option:has(input:checked) { border-color: var(--hchak-akzent); background: rgba(228, 0, 0, .05); }
.hchak-feld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: .92rem; }
.hchak-feld input, .hchak-feld textarea {
	font: inherit; width: 100%; box-sizing: border-box; margin: 0;
	padding: 10px 12px; border: 1px solid #c4cad3; border-radius: 6px; background: #fff; color: inherit;
}
.hchak-feld input:focus, .hchak-feld textarea:focus { outline: 2px solid var(--hchak-blau); outline-offset: 0; border-color: transparent; }
.hchak-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .hchak-reihe { grid-template-columns: 1fr; } }
.hchak-check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: .92rem; line-height: 1.4; }
.hchak-check input { margin: 3px 0 0; accent-color: var(--hchak-akzent); }
.hchak-check a { color: inherit; text-decoration: underline; }
.hchak-absenden {
	display: inline-block; border: 0; border-radius: 6px; cursor: pointer;
	padding: 12px 28px; background: var(--hchak-akzent); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem;
	transition: background .2s;
}
.hchak-absenden:hover { background: #c00000; }
.hchak-absenden:disabled { opacity: .6; cursor: progress; }
.hchak-absenden:focus-visible { outline: 3px solid var(--hchak-blau); outline-offset: 2px; }
.hchak-fehler { margin: 0 0 12px; padding: 10px 12px; border-radius: 6px; background: #fde8e8; color: #b00000; font-size: .92rem; }
.hchak-erfolg { margin: 0; padding: 16px; border-radius: 6px; background: #e8edf7; color: var(--hchak-blau); font-weight: 600; line-height: 1.45; border-left: 4px solid var(--hchak-rot); }
.hchak-vorbei { margin: 0; padding: 12px; border-radius: 6px; background: #eef1f7; color: #3a4560; font-size: .95rem; }
.hchak-sponsor {
	margin: 24px -24px -24px; padding: 18px 24px 22px;
	border-top: 1px solid #e1e6ef; background: #f6f8fb; text-align: center;
}
.hchak-sponsor p { margin: 0 0 10px; font-size: .88rem; color: #4d5770; }
.hchak-sponsor a { display: inline-block; }
.hchak-sponsor img { display: inline-block; max-width: 220px; max-height: 64px; width: auto; height: auto; vertical-align: middle; }
.hchak-honig { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.hchak-laedt { margin: 0; color: #5b6573; }

@media (prefers-reduced-motion: reduce) {
	.hchak-tuer { transition-duration: .01s; }
	.ist-heute .hchak-vorne { animation: none; box-shadow: 0 0 0 3px var(--hchak-rot); }
	.hchak-wackeln .hchak-tuer { animation: none; }
}
