/* VPH eLecture Showcase – Übersicht & Detailansicht.
   Gemeinsame VPH-Design-Tokens (identisch zum MOOC-Plugin) → einheitliches Bild.
   Markenfarben virtuelle-ph.at. Schrift vom Theme geerbt (DSGVO, kein Font-CDN). */

/* .vph-sc__modal wird per JS auf <body> gehoben (echtes seitenweites Overlay) und liegt
   damit AUSSERHALB von .vph-sc → es MUSS die Tokens selbst tragen, sonst verliert der
   Dialog-Rahmen background/radius/shadow (var() ohne Wert = transparent/0). */
.vph-sc, .vph-sc-detail, .vph-sc__modal {
	/* Marken- & Neutralfarben */
	--vph-blue: #0098d4;
	--vph-blue-dark: #006f95;
	--vph-cyan: #00a7e5;
	--vph-orange: #d54d13;
	--vph-orange-dark: #aa3e0f;
	--vph-magenta: #961353;

	--vph-ink: #353c44;              /* Headings */
	--vph-text: #3a4654;             /* Fließtext */
	--vph-muted: #586577;
	--vph-muted-strong: #5a6675;
	--vph-line: #e3e9ef;
	--vph-line-strong: #d3dbe4;
	--vph-soft: #f4f8fb;
	--vph-card: #ffffff;

	/* Radien */
	--vph-radius: 20px;
	--vph-radius-sm: 11px;

	/* Schatten (zweilagig: Kontakt + Ambient) */
	--vph-shadow: 0 1px 2px rgba(15,40,70,.06), 0 6px 16px -4px rgba(15,40,70,.10);
	--vph-shadow-lg: 0 2px 4px rgba(15,40,70,.08), 0 24px 48px -12px rgba(15,40,70,.22);
	--vph-shadow-modal: 0 1px 0 rgba(255,255,255,.6) inset, 0 24px 60px -18px rgba(15,40,70,.45), 0 8px 20px -10px rgba(15,40,70,.25);

	/* Fokus & Motion */
	--vph-ring: 0 0 0 2px #fff, 0 0 0 4px var(--vph-blue);
	--vph-ease: cubic-bezier(.2,.7,.25,1);
	--vph-dur-fast: .18s;

	color: var(--vph-text);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
.vph-sc *, .vph-sc-detail *, .vph-sc__modal * { box-sizing: border-box; }
.vph-sc-ico { width: 1.05em; height: 1.05em; flex: 0 0 auto; vertical-align: -2px; }
/* WICHTIG: .vph-sc__card/__row haben display:flex bzw. .vph-sc__month ist ein <section>,
   dessen display Themes (z. B. Divi) setzen → UA-[hidden] wird sonst überstimmt. Damit
   Filter/Suche/Pagination Items UND leere Monate wirklich aus-/einblenden, [hidden] hart erzwingen. */
.vph-sc__item[hidden], .vph-sc__card[hidden], .vph-sc__row[hidden],
.vph-sc__month[hidden] { display: none !important; }
/* Screenreader-Statusmeldung */
.vph-sc__status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ===== Übersicht ===== */
.vph-sc__bar {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 20px;
}
.vph-sc__search {
	flex: 1 1 240px; display: flex; align-items: center; gap: 8px;
	background: var(--vph-card); border: 1px solid var(--vph-line); border-radius: 999px;
	padding: 10px 16px; color: var(--vph-muted); box-shadow: var(--vph-shadow);
}
.vph-sc__search input {
	border: 0; outline: 0; flex: 1; background: transparent; font: inherit; color: var(--vph-text);
}
.vph-sc__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vph-sc__chip {
	font: inherit; border: 1px solid var(--vph-line); background: var(--vph-card); color: var(--vph-text);
	border-radius: 999px; padding: .5rem 1.05rem; font-size: .9375rem; font-weight: 600;
	cursor: pointer; line-height: 1.35;
	transition: background var(--vph-dur-fast) ease, border-color var(--vph-dur-fast) ease, color var(--vph-dur-fast) ease, transform var(--vph-dur-fast) var(--vph-ease);
}
.vph-sc__chip:hover { border-color: var(--vph-blue); color: var(--vph-blue-dark); transform: translateY(-1px); }
.vph-sc__chip.on { background: var(--vph-blue-dark); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -4px rgba(0,152,212,.42); }
.vph-sc__chip:focus-visible { outline: none; box-shadow: var(--vph-ring); }

.vph-sc__month { margin: 0 0 18px; }
.vph-sc__month-title {
	font-size: .875rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
	color: var(--vph-blue-dark); margin: 24px 0 12px; padding-bottom: 8px;
	border-bottom: 1px solid var(--vph-line);
}
.vph-sc__grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(1rem, 1.8vw, 1.5rem);
}
.vph-sc__card {
	display: flex; gap: 14px; background: var(--vph-card); border: 1px solid var(--vph-line);
	border-radius: var(--vph-radius); padding: 16px; text-decoration: none; color: inherit;
	box-shadow: var(--vph-shadow);
	transition: box-shadow var(--vph-dur-fast) ease, transform var(--vph-dur-fast) var(--vph-ease), border-color var(--vph-dur-fast) ease;
}
.vph-sc__card:hover { box-shadow: var(--vph-shadow-lg); transform: translateY(-4px); border-color: color-mix(in srgb, var(--vph-blue) 30%, var(--vph-line)); }
.vph-sc__date {
	flex: 0 0 auto; width: 56px; height: 60px; border-radius: var(--vph-radius-sm);
	background: var(--vph-blue); color: #fff;
	display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.vph-sc__date .d { font-size: 23px; font-weight: 800; }
.vph-sc__date .m { font-size: 11px; margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }
.vph-sc__cbody { min-width: 0; flex: 1; }
.vph-sc__title { font-size: 1rem; font-weight: 700; color: var(--vph-ink); margin: 0 0 7px; line-height: 1.35; }
.vph-sc__meta {
	display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--vph-muted);
	font-size: .8125rem; margin: 0 0 9px; line-height: 1.35;
}
.vph-sc__meta span { display: inline-flex; align-items: center; gap: 5px; }
.vph-sc__tag {
	display: inline-block; background: #fbe9f1; color: var(--vph-magenta);
	border-radius: 7px; padding: .28rem .62rem; font-size: .75rem; font-weight: 700;
}
.vph-sc__more {
	display: inline-flex; align-items: center; gap: 4px; margin-top: 9px;
	color: var(--vph-orange); font-size: .8125rem; font-weight: 700;
}
.vph-sc__none, .vph-sc__empty { color: var(--vph-muted); padding: 16px 0; }
.vph-sc__count { display: inline-flex; align-items: center; gap: 5px; color: var(--vph-blue-dark); font-weight: 700; }

/* Mehrere Termine (Detailansicht) */
.vph-sc-detail__termine {
	margin: 0 0 20px; padding: 14px 18px;
	background: var(--vph-soft); border: 1px solid var(--vph-line); border-radius: var(--vph-radius-sm);
}
.vph-sc-detail__termine-label { display: block; font-weight: 700; color: var(--vph-ink); margin-bottom: 6px; }
.vph-sc-detail__termine ul { list-style: none; margin: 0; padding: 0; }
.vph-sc-detail__termine li { padding: 3px 0; color: var(--vph-text); }
.vph-sc-detail__termine li + li { border-top: 1px solid var(--vph-line); }

/* ===== Listen-Layout (layout="list") – kompakt & fein ===== */
.vph-sc--list .vph-sc__grid { display: block; }
.vph-sc--list .vph-sc__month-title { margin: 18px 0 8px; }
.vph-sc__row {
	display: flex; align-items: flex-start; gap: 12px;
	background: var(--vph-card); border: 1px solid var(--vph-line);
	border-radius: 10px; padding: 10px 12px; margin: 0 0 7px;
	box-shadow: var(--vph-shadow); cursor: pointer;
	transition: box-shadow var(--vph-dur-fast) ease, border-color var(--vph-dur-fast) ease;
}
.vph-sc__row:hover { box-shadow: var(--vph-shadow-lg); border-color: color-mix(in srgb, var(--vph-blue) 30%, var(--vph-line)); }
.vph-sc__row .vph-sc__date { width: 42px; height: 44px; border-radius: 9px; margin-top: 1px; }
.vph-sc__row .vph-sc__date .d { font-size: 17px; font-weight: 700; }
.vph-sc__row .vph-sc__date .m { font-size: 9.5px; margin-top: 2px; }
.vph-sc__rbody { flex: 1 1 auto; min-width: 0; }
.vph-sc__rtitle {
	display: block; font-weight: 600; font-size: .95rem; color: var(--vph-ink);
	text-decoration: none; line-height: 1.3;
}
.vph-sc__rtitle:hover { color: var(--vph-blue-dark); }
.vph-sc__rmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--vph-muted); font-size: .78rem; margin-top: 3px; }
.vph-sc__rmeta > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.vph-sc__rmeta .vph-sc-ico { width: .95em; height: .95em; }
.vph-sc__rlect > span { display: inline-block; max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
/* Buttons UNTER Titel/Meta – Titel nutzt die volle Breite. */
.vph-sc__rlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vph-sc__extlink {
	display: inline-flex; align-items: center; justify-content: center; gap: 5px;
	white-space: nowrap; font-size: .75rem; font-weight: 700; line-height: 1.15;
	padding: 6px 12px; border-radius: 999px; text-decoration: none;
	transition: background var(--vph-dur-fast) ease, transform var(--vph-dur-fast) var(--vph-ease);
}
.vph-sc__extlink:hover { transform: translateY(-1px); }
.vph-sc__extlink, .vph-sc__extlink:link, .vph-sc__extlink:visited,
.vph-sc__extlink:hover, .vph-sc__extlink:focus, .vph-sc__extlink:active { color: #fff !important; text-decoration: none !important; }
.vph-sc__extlink .vph-sc-ico { width: .95em; height: .95em; }
.vph-sc__extlink--anm { background: var(--vph-orange); }
.vph-sc__extlink--anm:hover { background: var(--vph-orange-dark); }
.vph-sc__extlink--room { background: var(--vph-blue-dark); }
.vph-sc__extlink--room:hover { background: #00567a; }

@media (max-width: 480px) {
	.vph-sc__rlinks { width: 100%; }
	.vph-sc__extlink { flex: 1 1 auto; }
}

/* ===== Pagination ===== */
.vph-sc__pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 22px 0 0; }
.vph-sc__pager[hidden] { display: none; }
.vph-sc__page {
	min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--vph-line); background: var(--vph-card); color: var(--vph-text);
	border-radius: var(--vph-radius-sm); font: inherit; font-weight: 700; font-size: .9375rem;
	line-height: 1; cursor: pointer;
	transition: background var(--vph-dur-fast) ease, border-color var(--vph-dur-fast) ease, color var(--vph-dur-fast) ease;
}
.vph-sc__page:hover:not(:disabled) { border-color: var(--vph-blue); color: var(--vph-blue-dark); }
.vph-sc__page.is-current { background: var(--vph-blue-dark); border-color: transparent; color: #fff; }
.vph-sc__page:disabled { opacity: .4; cursor: default; }
.vph-sc__page:focus-visible { outline: none; box-shadow: var(--vph-ring); }
.vph-sc__pager-gap { padding: 0 4px; color: var(--vph-muted); }
.vph-sc .vph-sc__page { min-height: 0 !important; } /* Divi-Härtung */

/* ===== Detailansicht ===== */
.vph-sc-detail-wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 48px; }
.vph-sc-detail__tag {
	display: inline-block; background: #fbe9f1; color: var(--vph-magenta);
	border-radius: 7px; padding: .32rem .7rem; font-size: .75rem; font-weight: 700; margin: 0 0 12px;
}
.vph-sc-detail__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 1.9rem); font-weight: 700; letter-spacing: -.015em; color: var(--vph-ink); line-height: 1.22; margin: 0 0 14px; }
.vph-sc-detail__meta {
	display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--vph-muted);
	font-size: .875rem; padding: 0 0 18px; margin: 0 0 20px; border-bottom: 1px solid var(--vph-line);
}
.vph-sc-detail__meta span { display: inline-flex; align-items: center; gap: 6px; }
.vph-sc-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; }

/* Buttons */
.vph-sc-btn {
	display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px;
	border-radius: 999px; font-weight: 700; font-size: .9375rem; line-height: 1.35;
	transition: background var(--vph-dur-fast) ease, transform var(--vph-dur-fast) var(--vph-ease), box-shadow var(--vph-dur-fast) ease;
	box-shadow: var(--vph-shadow);
}
.vph-sc-btn:hover { transform: translateY(-2px); box-shadow: var(--vph-shadow-lg); }
.vph-sc-btn, .vph-sc-btn:link, .vph-sc-btn:visited, .vph-sc-btn:hover, .vph-sc-btn:focus, .vph-sc-btn:active {
	color: #fff !important; text-decoration: none !important;
}
.vph-sc-btn:focus-visible { outline: none; box-shadow: var(--vph-ring); }
.vph-sc-btn--primary { background: var(--vph-orange); }
.vph-sc-btn--primary:hover { background: var(--vph-orange-dark); }
.vph-sc-btn--room { background: var(--vph-blue-dark); }
.vph-sc-btn--room:hover { background: #00567a; }
.vph-sc-btn::before { content: ""; width: 1.2em; height: 1.2em; flex: 0 0 auto; background: center / contain no-repeat; }
.vph-sc-btn--primary::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20330%20391%27%20fill%3D%27%23ffffff%27%3E%3Cg%20transform%3D%27matrix%281%2C0%2C0%2C1%2C0%2C-970.746%29%27%3E%3Cg%20transform%3D%27matrix%280.0938704%2C0%2C0%2C0.157602%2C0%2C970.746%29%27%3E%3Cg%20transform%3D%27matrix%281.02385%2C0%2C0%2C1%2C-8.79776%2C0%29%27%3E%3Cg%20transform%3D%27matrix%2814.9836%2C0%2C0%2C9.13727%2C-104400%2C-50354.2%29%27%3E%3Cpath%20d%3D%27M7103.62%2C5541.97C7126.08%2C5542.05%207148.36%2C5549.57%207166.18%2C5562.95L7157.5%2C5574.52C7132.17%2C5555.51%207096.71%2C5551.17%207067.51%2C5563.85C7039.62%2C5575.95%207018.6%2C5602.89%207014.12%2C5633.44C7008.75%2C5670.12%207028.12%2C5709.4%207062.31%2C5726.92C7091.99%2C5742.14%207130.12%2C5739.15%207157.31%2C5718.85L7157.5%2C5718.71L7166.18%2C5730.28C7143.7%2C5747.15%207114.23%2C5754.41%207086.45%2C5749.9C7054.44%2C5744.69%207025.36%2C5723.69%207010.3%2C5694.52C6995.29%2C5665.46%206995.01%2C5629.2%207009.73%2C5599.83C7026.87%2C5565.61%207063.76%2C5542.15%207103.01%2C5541.97C7103.21%2C5541.97%207103.42%2C5541.97%207103.62%2C5541.97Z%27%2F%3E%3C%2Fg%3E%3Cg%20transform%3D%27matrix%2810.4049%2C0%2C0%2C6.34508%2C-4159.23%2C-2694.12%29%27%3E%3Cpath%20d%3D%27M595.71%2C539.524C615.665%2C539.715%20635.455%2C547.519%20650.059%2C561.115C668.849%2C578.609%20678.436%2C605.388%20675.034%2C630.826C670.628%2C663.783%20643.91%2C692.768%20610.424%2C699.193C585.39%2C703.996%20558.268%2C696.161%20539.62%2C678.38C520.54%2C660.188%20511.331%2C632.289%20515.806%2C606.332C520.227%2C580.681%20537.931%2C557.733%20561.597%2C546.851C572.267%2C541.945%20584.171%2C539.488%20595.71%2C539.524ZM594.803%2C560.357C573.341%2C560.562%20552.376%2C573.243%20542.333%2C592.268C533.706%2C608.61%20533.297%2C628.981%20541.198%2C645.625C552.405%2C669.234%20580.086%2C683.8%20606.498%2C678.733C630.714%2C674.086%20650.904%2C652.915%20654.334%2C628.437C656.991%2C609.472%20649.883%2C589.416%20635.862%2C576.363C625.038%2C566.285%20610.296%2C560.498%20595.578%2C560.357C595.32%2C560.356%20595.061%2C560.356%20594.803%2C560.357Z%27%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E"); }
.vph-sc-btn--room::before { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23ffffff%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%272%27%20y%3D%276%27%20width%3D%2713%27%20height%3D%2712%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M15%2010l6-3v10l-6-3z%27%2F%3E%3C%2Fsvg%3E"); }

.vph-sc-detail__desc { margin: 0 0 6px; }
.vph-sc-detail__h {
	font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	color: var(--vph-blue-dark); margin: 24px 0 8px;
}
.vph-sc-detail__goals {
	background: #eef6fb; border: 1px solid #cfe3f3; border-radius: var(--vph-radius-sm); padding: 14px 18px;
}
.vph-sc-detail__goals ul { margin: 0; padding-left: 18px; }
.vph-sc-detail__goals li { margin: 4px 0; }
.vph-sc-detail__goals p { margin: 0; }
.vph-sc-detail__join {
	background: var(--vph-soft); border: 1px solid var(--vph-line); border-radius: var(--vph-radius-sm);
	padding: 14px 18px; font-size: .9375rem;
}
.vph-sc-detail__join a { color: var(--vph-blue-dark); word-break: break-word; }

/* ===== Inline-Overlay (Modal) ===== */
.vph-sc__card { cursor: pointer; }
body.vph-sc-modal-open { overflow: hidden; }

.vph-sc__modal {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 24px 16px; overflow: auto;
}
.vph-sc__modal[hidden] { display: none; }
.vph-sc__overlay {
	position: fixed; inset: 0; background: rgba(13,28,48,.55);
	-webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.vph-sc__dialog {
	position: relative; z-index: 1; width: 100%; max-width: 760px;
	max-height: 85vh;                      /* nicht die ganze Höhe */
	display: flex; flex-direction: column; /* Kopf fix, Inhalt scrollt */
	background: var(--vph-card); border: 1px solid rgba(255,255,255,.7);
	border-radius: calc(var(--vph-radius) + 4px);
	box-shadow: var(--vph-shadow-modal);
	overflow: hidden;                      /* runde Ecken + interner Scroll */
	animation: vph-sc-pop .32s cubic-bezier(.16,1,.3,1);
}
.vph-sc__modal-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 28px 30px;
}
@keyframes vph-sc-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to   { opacity: 1; transform: none; }
}
.vph-sc__close {
	position: absolute; top: 12px; right: 14px;
	width: 40px; height: 40px; border: 1px solid rgba(15,40,70,.10); border-radius: 50%;
	background: rgba(255,255,255,.96); color: var(--vph-ink); font-size: 24px; line-height: 1;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 10px rgba(0,0,0,.14);
	transition: background var(--vph-dur-fast) ease, transform var(--vph-dur-fast) var(--vph-ease);
}
.vph-sc__close:hover { background: #fff; transform: rotate(90deg) scale(1.05); }
.vph-sc__close:focus-visible { outline: none; box-shadow: var(--vph-ring); }
.vph-sc__modal-body .vph-sc-detail { max-width: none; }
.vph-sc__modal-body .vph-sc-detail__title { padding-right: 40px; }

/* ===== Theme-/Divi-Härtung (konsistent zum MOOC-Plugin) ===== */
.vph-sc h1, .vph-sc h2, .vph-sc h3,
.vph-sc-detail h1, .vph-sc-detail h2, .vph-sc-detail h3 { color: var(--vph-ink) !important; }
.vph-sc button, .vph-sc-detail button {
	font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important;
	min-width: 0 !important; background-image: none !important;
}
.vph-sc .vph-sc__chip { border-radius: 999px !important; min-height: 0 !important; }
.vph-sc .vph-sc__chip.on { color: #fff !important; background: var(--vph-blue-dark) !important; border-color: transparent !important; }

@media (forced-colors: active) {
	.vph-sc__chip:focus-visible, .vph-sc-btn:focus-visible, .vph-sc__close:focus-visible { outline: 2px solid transparent; outline-offset: 2px; }
}

@media (prefers-reduced-motion: reduce) {
	.vph-sc__dialog { animation: none; }
	.vph-sc__card, .vph-sc-btn, .vph-sc__chip { transition: none; }
	.vph-sc__card:hover, .vph-sc-btn:hover, .vph-sc__chip:hover { transform: none; }
	.vph-sc__close:hover { transform: none; }
}

@media (max-width: 600px) {
	.vph-sc-btn { flex: 1 1 auto; justify-content: center; }
	.vph-sc__dialog { padding: 22px 18px; }
}
