/*! Hinode Consent – Banner, Einstellungen und Platzhalter
 * Themes: .hc-theme-dark (Sumi), .hc-theme-light (Washi), .hc-theme-auto
 * Akzentfarbe: --hc-accent (wird vom Plugin gesetzt). */

.hc,
.hc-ph,
.hc-reopen {
	--hc-accent: #c0392b;
	--hc-accent-hover: #a93226;
	--hc-on-accent: #fff;
	--hc-radius: 14px;
	--hc-font: inherit;
}

/* ---------- Farbwelten ---------- */

.hc-theme-dark {
	--hc-bg: #1d1d1f;
	--hc-bg-2: #262628;
	--hc-line: rgba(255, 255, 255, .12);
	--hc-text: #f3f1ee;
	--hc-muted: #b9b5ae;
	--hc-link: #f39a95;
	--hc-switch-off: #57575b;
	--hc-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
	--hc-backdrop: rgba(10, 10, 12, .62);
}

.hc-theme-light {
	--hc-bg: #fbf8f3;
	--hc-bg-2: #f2ede4;
	--hc-line: rgba(40, 30, 20, .14);
	--hc-text: #262422;
	--hc-muted: #5f5a53;
	--hc-link: #a72f24;
	--hc-switch-off: #a19a90;
	--hc-shadow: 0 24px 60px rgba(40, 30, 20, .22), 0 2px 8px rgba(40, 30, 20, .12);
	--hc-backdrop: rgba(30, 25, 20, .45);
}

.hc-theme-auto {
	--hc-bg: #fbf8f3;
	--hc-bg-2: #f2ede4;
	--hc-line: rgba(40, 30, 20, .14);
	--hc-text: #262422;
	--hc-muted: #5f5a53;
	--hc-link: #a72f24;
	--hc-switch-off: #a19a90;
	--hc-shadow: 0 24px 60px rgba(40, 30, 20, .22), 0 2px 8px rgba(40, 30, 20, .12);
	--hc-backdrop: rgba(30, 25, 20, .45);
}

@media (prefers-color-scheme: dark) {
	.hc-theme-auto {
		--hc-bg: #1d1d1f;
		--hc-bg-2: #262628;
		--hc-line: rgba(255, 255, 255, .12);
		--hc-text: #f3f1ee;
		--hc-muted: #b9b5ae;
		--hc-link: #f39a95;
		--hc-switch-off: #57575b;
		--hc-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35);
		--hc-backdrop: rgba(10, 10, 12, .62);
	}
}

/* ---------- Grundgeruest (robust gegen Template-CSS) ---------- */

.hc[hidden],
.hc [hidden],
.hc-reopen[hidden] {
	display: none !important;
}

.hc,
.hc *,
.hc *::before,
.hc *::after,
.hc-ph,
.hc-ph *,
.hc-reopen {
	box-sizing: border-box;
}

.hc {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	pointer-events: none;
	font-family: var(--hc-font);
	font-size: 15px;
	line-height: 1.55;
	color: var(--hc-text);
	text-align: left;
	letter-spacing: normal;
	text-transform: none;
	-webkit-font-smoothing: antialiased;
}

html.hc-lock,
html.hc-lock body {
	overflow: hidden !important;
}

.hc-backdrop {
	position: absolute;
	inset: 0;
	background: var(--hc-backdrop);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .25s ease;
}

.hc--modal .hc-backdrop {
	pointer-events: auto;
}

.hc-dialog {
	position: relative;
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: 0;
	background: var(--hc-bg);
	color: var(--hc-text);
	border-radius: var(--hc-radius);
	box-shadow: var(--hc-shadow);
	border-top: 4px solid var(--hc-accent);
	overflow: hidden;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}

.hc.is-open .hc-backdrop,
.hc.is-open .hc-dialog {
	opacity: 1;
	transform: none;
}

/* Layout: zentriertes Fenster */
.hc--modal {
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hc--modal .hc-dialog {
	max-width: 620px;
}

/* Layout: Box unten (nicht blockierend) */
.hc--box {
	align-items: flex-end;
	justify-content: flex-start;
	padding: 16px;
}

.hc--box.hc--right {
	justify-content: flex-end;
}

.hc--box .hc-dialog {
	max-width: 440px;
}

/* Layout: Leiste unten */
.hc--bar {
	align-items: flex-end;
	padding: 0;
}

.hc--bar .hc-dialog {
	max-width: none;
	border-radius: var(--hc-radius) var(--hc-radius) 0 0;
	max-height: 85vh;
}

.hc--bar .hc-layer {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
}

.hc-layer {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
}

.hc-body {
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 24px 26px 8px;
	flex: 1 1 auto;
}

.hc-foot {
	padding: 14px 26px 18px;
	border-top: 1px solid var(--hc-line);
	background: var(--hc-bg);
	flex: 0 0 auto;
}

/* ---------- Kopf ---------- */

.hc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
}

.hc .hc-btn.hc-back {
	flex: 0 0 auto;
	width: 36px;
	min-width: 0;
	min-height: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	border-width: 1px;
}

.hc .hc-back svg {
	flex: 0 0 auto;
}

.hc-logo {
	display: block;
	max-height: 42px;
	max-width: 140px;
	width: auto;
	height: auto;
}

.hc-sun {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--hc-accent);
	background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--hc-accent) 70%, #fff), var(--hc-accent) 62%);
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--hc-accent) 18%, transparent);
}

.hc .hc-title {
	margin: 0;
	padding: 0;
	font-family: var(--hc-font);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--hc-text);
	letter-spacing: .005em;
	text-transform: none;
	border: 0;
	outline: none;
}

/* Die Ueberschrift erhaelt den Fokus nur fuer Screenreader (tabindex=-1),
   sie ist kein Bedienelement – daher kein Fokusrahmen. */
.hc .hc-title:focus,
.hc .hc-title:focus-visible {
	outline: none;
}

.hc p,
.hc ul,
.hc dl {
	margin: 0 0 12px;
	padding: 0;
	color: var(--hc-text);
	font-size: inherit;
	line-height: inherit;
}

.hc .hc-text {
	color: var(--hc-text);
}

.hc .hc-text p:last-child {
	margin-bottom: 0;
}

.hc a {
	color: var(--hc-link);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}

.hc a:hover,
.hc a:focus {
	color: var(--hc-link);
	text-decoration-thickness: 2px;
}

.hc .hc-note {
	font-size: 13.5px;
	color: var(--hc-muted);
}

/* Uebersicht der Dienste auf der ersten Ebene */
.hc .hc-summary {
	list-style: none;
	margin: 14px 0 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--hc-bg-2);
	font-size: 13.5px;
}

.hc .hc-summary li {
	margin: 0;
	padding: 2px 0;
	list-style: none;
	color: var(--hc-text);
}

.hc .hc-summary strong {
	font-weight: 600;
}

.hc .hc-third {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	font-size: 13.5px;
	color: var(--hc-muted);
}

.hc .hc-third svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--hc-link);
}

/* ---------- Schaltflaechen ---------- */

/* Raster statt Flex: "Ablehnen" und "Akzeptieren" sind in jedem Layout
   exakt gleich gross (gleichwertige Wahl auf der ersten Ebene). */
.hc-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.hc .hc-actions .hc-btn {
	width: 100%;
}

.hc--box .hc-actions {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hc--box .hc-actions .hc-btn--ghost {
	grid-column: 1 / -1;
	order: 3;
}

.hc--bar .hc-actions {
	max-width: 760px;
	margin-left: auto;
}

.hc-btn,
.hc-ph .hc-btn,
.hc .hc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 10px 18px;
	font-family: var(--hc-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-align: center;
	white-space: normal;
	border-radius: 10px;
	border: 2px solid transparent;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

/* "Akzeptieren" und "Ablehnen" sind bewusst identisch gestaltet. */
.hc-btn--primary,
.hc .hc-btn--primary,
.hc-ph .hc-btn--primary {
	background: var(--hc-accent);
	border-color: var(--hc-accent);
	color: var(--hc-on-accent);
}

.hc-btn--primary:hover,
.hc-btn--primary:focus,
.hc .hc-btn--primary:hover,
.hc-ph .hc-btn--primary:hover {
	background: var(--hc-accent-hover);
	border-color: var(--hc-accent-hover);
	color: var(--hc-on-accent);
}

.hc-btn--ghost,
.hc .hc-btn--ghost {
	background: transparent;
	border-color: var(--hc-line);
	color: var(--hc-text);
}

.hc-btn--ghost:hover,
.hc .hc-btn--ghost:hover {
	background: var(--hc-bg-2);
	border-color: var(--hc-muted);
	color: var(--hc-text);
}

.hc .hc-btn:focus-visible,
.hc-ph .hc-btn:focus-visible,
.hc-reopen:focus-visible {
	outline: 3px solid var(--hc-link);
	outline-offset: 2px;
}

.hc .hc-links {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--hc-muted);
	text-align: center;
}

.hc .hc-links a {
	color: var(--hc-muted);
	font-weight: 400;
}

.hc .hc-links span {
	margin: 0 6px;
}

/* ---------- Einstellungen (zweite Ebene) ---------- */

.hc-cat {
	margin: 0 0 12px;
	border: 1px solid var(--hc-line);
	border-radius: 12px;
	background: var(--hc-bg-2);
	overflow: hidden;
}

.hc-cat__head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 14px 16px;
}

.hc .hc-cat__name {
	margin: 0 0 2px;
	padding: 0;
	font-family: var(--hc-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--hc-text);
	text-transform: none;
	letter-spacing: normal;
	border: 0;
}

.hc .hc-cat__desc {
	margin: 0;
	font-size: 13.5px;
	color: var(--hc-muted);
}

.hc-always {
	flex: 0 0 auto;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hc-muted);
	white-space: nowrap;
	padding-top: 4px;
}

.hc-svc {
	border-top: 1px solid var(--hc-line);
	padding: 10px 16px 12px;
	background: var(--hc-bg);
}

.hc-svc__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.hc-svc__name {
	font-weight: 600;
	font-size: 14.5px;
}

.hc-svc details {
	margin-top: 4px;
	font-size: 13.5px;
}

.hc-svc summary {
	cursor: pointer;
	color: var(--hc-link);
	font-size: 13px;
	font-weight: 500;
	width: max-content;
	max-width: 100%;
	list-style: revert;
}

.hc-svc summary:focus-visible {
	outline: 2px solid var(--hc-link);
	outline-offset: 2px;
	border-radius: 3px;
}

.hc .hc-svc dl {
	display: grid;
	grid-template-columns: minmax(110px, max-content) 1fr;
	gap: 4px 14px;
	margin: 8px 0 0;
	color: var(--hc-text);
}

.hc .hc-svc dt {
	margin: 0;
	font-weight: 600;
	color: var(--hc-muted);
}

.hc .hc-svc dd {
	margin: 0;
	white-space: pre-line;
	overflow-wrap: anywhere;
}

/* Schalter: echte Checkbox (auch "teilweise" fuer Kategorien) */
.hc-switch {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	cursor: pointer;
}

.hc .hc-switch input {
	position: relative;
	width: 46px;
	height: 26px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--hc-switch-off);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .2s ease;
	vertical-align: middle;
	box-shadow: none;
	opacity: 1;
	clip: auto;
	pointer-events: auto;
}

.hc .hc-switch input::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
	transition: transform .2s ease;
}

.hc .hc-switch input:checked {
	background: var(--hc-accent);
}

.hc .hc-switch input:checked::after {
	transform: translateX(20px);
}

.hc .hc-switch input:indeterminate {
	background: var(--hc-switch-off);
	background: color-mix(in srgb, var(--hc-accent) 55%, var(--hc-switch-off));
}

.hc .hc-switch input:indeterminate::after {
	transform: translateX(10px);
}

.hc .hc-switch input:focus-visible {
	outline: 3px solid var(--hc-link);
	outline-offset: 2px;
}

.hc .hc-switch input:disabled {
	cursor: not-allowed;
	opacity: .65;
}

.hc-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ---------- Wieder-oeffnen-Knopf ---------- */

.hc-reopen {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .85);
	background: var(--hc-accent);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	cursor: pointer;
	opacity: .9;
	transition: transform .15s ease, opacity .15s ease;
}

.hc-reopen--right {
	left: auto;
	right: 16px;
}

.hc-reopen:hover,
.hc-reopen:focus {
	opacity: 1;
	transform: scale(1.06);
	background: var(--hc-accent);
	color: #fff;
}

.hc-reopen svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* ---------- Platzhalter fuer gesperrte Inhalte ---------- */

.hc-ph {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	margin: 0 auto;
	padding: 20px;
	border-radius: 12px;
	/* Aufgehende Sonne (日の出) als warmer Schein vom unteren Rand */
	background: var(--hc-bg-2);
	background:
		radial-gradient(ellipse 70% 55% at 50% 118%, color-mix(in srgb, var(--hc-accent) 26%, transparent) 0%, transparent 70%),
		var(--hc-bg-2);
	border: 1px solid var(--hc-line);
	color: var(--hc-text);
	font-size: 14.5px;
	line-height: 1.5;
	text-align: center;
	/* sichtbar lassen: nur dann waechst eine Box mit aspect-ratio mit ihrem Inhalt */
	overflow: visible;
}

.hc-ph__box {
	max-width: 440px;
}

.hc-ph__icon {
	display: inline-flex;
	color: var(--hc-link);
	margin-bottom: 4px;
}

.hc-ph .hc-ph__title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	color: var(--hc-text);
}

.hc-ph .hc-ph__text {
	margin: 0 0 14px;
	color: var(--hc-muted);
	font-size: 13.5px;
}

.hc-ph__actions {
	margin-bottom: 10px;
}

.hc-ph .hc-ph__remember {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 13.5px;
	color: var(--hc-text);
}

.hc-ph .hc-ph__remember input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--hc-accent);
}

.hc-ph .hc-ph__remember label {
	margin: 0;
	font-size: inherit;
	color: inherit;
	font-weight: 400;
	display: inline;
}

.hc-ph .hc-ph__more {
	font-size: 13px;
	color: var(--hc-link);
}

/* ---------- Tabelle fuer die Datenschutzerklaerung ---------- */

.hc-table-wrap {
	overflow-x: auto;
	margin: 0 0 1.5em;
}

.hc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .92em;
}

.hc-table th,
.hc-table td {
	padding: .55em .7em;
	border: 1px solid rgba(128, 128, 128, .35);
	vertical-align: top;
	text-align: left;
}

.hc-table td {
	white-space: pre-line;
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.hc-table thead th {
	background: rgba(128, 128, 128, .15);
}

.hc-table tbody th {
	min-width: 9em;
}

.hc-table__name {
	display: block;
	font-weight: 700;
}

.hc-table__cat {
	display: block;
	font-size: .85em;
	font-weight: 400;
	opacity: .75;
	margin-bottom: .3em;
}

.hc-table tbody th a {
	font-size: .85em;
	font-weight: 400;
}

/* Schmale Bildschirme: jede Zeile als Karte */
@media (max-width: 760px) {
	.hc-table thead {
		display: none;
	}

	.hc-table,
	.hc-table tbody,
	.hc-table tr,
	.hc-table th,
	.hc-table td {
		display: block;
		width: 100%;
	}

	.hc-table tr {
		margin: 0 0 1em;
		border: 1px solid rgba(128, 128, 128, .35);
		border-radius: 8px;
		overflow: hidden;
	}

	.hc-table th,
	.hc-table td {
		border: 0;
		border-top: 1px solid rgba(128, 128, 128, .2);
	}

	.hc-table tbody th {
		border-top: 0;
		background: rgba(128, 128, 128, .15);
	}

	.hc-table td::before {
		content: attr(data-label);
		display: block;
		font-size: .8em;
		font-weight: 700;
		opacity: .7;
		white-space: normal;
	}
}

.hc-settings-btn {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: .55em 1.1em;
	border-radius: 8px;
	border: 0;
	background: #c0392b;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.hc-settings-btn:hover,
.hc-settings-btn:focus {
	filter: brightness(.92);
	color: #fff;
}

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
	.hc--modal,
	.hc--box {
		align-items: flex-end;
		padding: 0;
	}

	.hc--modal .hc-dialog,
	.hc--box .hc-dialog {
		max-width: none;
		border-radius: var(--hc-radius) var(--hc-radius) 0 0;
		max-height: 92vh;
		max-height: 92dvh;
	}

	.hc-body {
		padding: 18px 18px 6px;
	}

	.hc-foot {
		padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
	}

	.hc .hc-title {
		font-size: 19px;
	}

	.hc-actions,
	.hc--box .hc-actions {
		grid-template-columns: 1fr;
	}

	.hc-actions .hc-btn--ghost,
	.hc--box .hc-actions .hc-btn--ghost {
		grid-column: auto;
		order: 3;
	}

	.hc .hc-svc dl {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.hc .hc-svc dd {
		margin-bottom: 6px;
	}

	.hc-reopen {
		bottom: 12px;
		left: 12px;
		width: 42px;
		height: 42px;
	}

	.hc-reopen--right {
		left: auto;
		right: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hc-backdrop,
	.hc-dialog,
	.hc-reopen,
	.hc .hc-switch input,
	.hc .hc-switch input::after {
		transition: none !important;
	}
}

@media print {
	.hc,
	.hc-reopen {
		display: none !important;
	}
}
