/* Direct-analysis-mode overlay: analysis window + guide bar (state machine, replaces the
 * old stacking showInfo/showSuccess/showAlert popups — see recaptcha-gdpr-analysis.js
 * setGuideState()/renderGuide()). Modern-minimalist neutral palette (WP-admin blue accent,
 * no framework/webfonts). */

/* ---------------------------------------------------------------------------------------
 * Analysis window
 * ------------------------------------------------------------------------------------- */

/* Single fixed, top-centered element (no more nested fixed-in-fixed wrapper — a
 * position:fixed child never contributes to its own fixed parent's auto width, which made
 * the old double-container centering trick collapse the outer wrapper to 0×0 and render the
 * window off-screen). Centered via left:50%/transform; dragElement() below freezes this to
 * explicit px on first drag so there is no jump. Opacity fade-in on insertion. */
#gdpr-analysis-container {
	position: fixed;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	padding: 0px;
	margin: 0px;
	opacity: 0;
	transition: opacity 300ms ease-in-out;
	resize: both;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	height: auto;
	max-height: min(65vh, 560px);
	width: min(700px, calc(100vw - 24px));
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 640px) {
	#gdpr-analysis-container {
		left: 8px;
		right: 8px;
		transform: none;
		width: calc(100vw - 16px);
		max-height: 55vh;
		resize: none;
	}
}

.logoImage {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
	background-image: url('images/Logo_Webseite.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.logoImageLarge {
	width: 50px;
	height: 50px;
	margin: 0 auto;
	background-image: url('images/Logo_Webseite.svg');
	background-size: cover;
}

/* Header + guide strip: kept together in one sticky wrapper so both stay visible while
 * #gdpr-analysis-container (the scroll container) scrolls the accordion body underneath
 * them. z-index lifts the wrapper above the in-flow accordion rows; overflow:hidden clips
 * the header's own square top corners to the wrapper's rounded shape. */
#gdpr-analysis-sticky {
	position: sticky;
	top: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.96);
	border-radius: 12px 12px 0 0;
	overflow: hidden;
}

#gdpr-analysis-containerheader {
	display: flex;
	align-items: center;
	cursor: move;
	width: 100%;
	box-sizing: border-box;
	background-color: #ffffff;
	color: #1d2327;
	height: 40px;
	padding: 0 12px;
	border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 640px) {
	#gdpr-analysis-containerheader {
		cursor: default;
	}
}

.gdpr-header-title {
	flex: 1 1 auto;
	font-size: 13px;
	font-weight: 600;
}

#gdpr-analysis-containerbody {
	width: 100%;
}

.gdprContainer {
	overflow-wrap: anywhere;
	/* The element gets inline `width: 100%; padding: 10px` from JS — without
	 * border-box that computes to parent + 20px and forces horizontal overflow
	 * inside the window. */
	box-sizing: border-box;
}

/* Accordion rows: status icon + ellipsised name + right-aligned badge pills, replacing the
 * old "name | in scope: true | submission: … | ajax: …" plain-text line. */
.akkordeonButton {
	display: block;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 3px;
	border: 0px;
	font-weight: normal;
	cursor: pointer;
	transition: background-color 200ms ease;
	text-align: left;
	border-bottom: 1px solid #e0e0e0;
	overflow: hidden;
}

.akkordeonButtonAktiv,
.akkordeonButton:hover {
	background-color: #f2f2f2;
}

/* Soft highlight overlay used by the guide bar's "Review entry" action to draw attention to
 * the target row without permanently altering its category color. */
.gdpr-highlight::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff3cd;
	opacity: 0.6;
	animation: gdpr-highlight-fade 1.5s ease forwards;
	pointer-events: none;
}

@keyframes gdpr-highlight-fade {
	from {
		opacity: 0.6;
	}

	to {
		opacity: 0;
	}
}

.gdpr-akkordeon-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

.gdpr-status-icon {
	flex: 0 0 auto;
	font-size: 13px;
	line-height: 1;
}

.gdpr-entry-name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gdpr-badges {
	flex: 0 0 auto;
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.gdpr-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.gdpr-badge-covered {
	background: #e6f4ea;
	color: #1e7e34;
}

.gdpr-badge-not-covered {
	background: #fdf3e1;
	color: #8a5a00;
}

.gdpr-badge-neutral {
	background: #f2f2f2;
	color: #666;
}

.gdprSaveButton {
	background-color: #2271b1;
	color: #ffffff;
	border: none;
	cursor: pointer;
	font-size: 13px;
	border-radius: 6px;
	padding: 8px 14px;
	margin: 6px 0;
}

.gdprSaveButton:hover {
	background-color: #1d5e94;
}

.akkordeonEinheit {
	background-color: white;
	border: 1px solid #e0e0e0;
	padding: 12px;
	overflow: hidden;
	overflow-wrap: anywhere;
	display: none;
}

/* Micro-hint shown inside a not-yet-covered entry, replacing the old recommendAction/
 * recommendPattern popup text. */
.gdpr-akkordeon-hint {
	font-size: 12px;
	color: #8a5a00;
	background: #fdf3e1;
	border-radius: 6px;
	padding: 6px 10px;
	margin-bottom: 8px;
}

.hiddenInput {
	background-color: #fdf3e1;
	color: #1d2327;
}

.coveredSubmissionType {
	background-color: #e6f4ea;
	color: #1d2327;
}

.ordinarySubmissionType {
	background-color: #ffffff;
	color: #1d2327;
}

#gdpr-analysis-container table {
	table-layout: fixed;
	width: 100%;
}

#gdpr-analysis-container td,
#gdpr-analysis-container th {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.centered-spinner {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 40px;
	z-index: 9999991;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

#blockingOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.2);
	z-index: 9999990;
}

/* ---------------------------------------------------------------------------------------
 * Guide strip (setGuideState() in recaptcha-gdpr-analysis.js) — persistent, single,
 * state-driven status row INSIDE the analysis window (sticky, directly below the header —
 * see #gdpr-analysis-sticky above and ensureAnalysisWindow()). Replaces the old stacking
 * showInfo/showSuccess/showAlert popups (.centered-info/-success/-alert +
 * .schliessen_button, removed) AND the earlier standalone viewport-corner guide bar (no
 * more fixed positioning, card look, minimize/badge — the strip IS part of the window now).
 * ------------------------------------------------------------------------------------- */

#gdpr-guide-bar {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border-bottom: 1px solid #e0e0e0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	transition: background-color 200ms ease;
}

#gdpr-guide-bar.gdpr-guide-state-armed {
	background: #fafafa;
}

#gdpr-guide-bar.gdpr-guide-state-captured {
	background: #fdf6e8;
}

#gdpr-guide-bar.gdpr-guide-state-saved {
	background: #eef7f0;
}

#gdpr-guide-bar.gdpr-guide-state-error {
	background: #fdeeee;
}

#gdpr-guide-bar .gdpr-guide-panel {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.gdpr-guide-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	margin-top: 2px;
}

.gdpr-guide-pulse-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2271b1;
	animation: gdpr-pulse 1.6s ease-in-out infinite;
}

@keyframes gdpr-pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.4;
		transform: scale(1.3);
	}
}

.gdpr-guide-text {
	flex: 1 1 auto;
	min-width: 0;
}

.gdpr-guide-title {
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	overflow-wrap: anywhere;
	/* Long captured names (the title interpolates the entry name) must not blow the
	 * strip up to many lines — clamp to two, the full name lives in the accordion row. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gdpr-guide-subtitle {
	font-size: 13px;
	color: #666;
	margin-top: 2px;
	overflow-wrap: anywhere;
}

.gdpr-guide-dots {
	display: flex;
	gap: 4px;
	align-items: center;
	margin-top: 6px;
}

.gdpr-guide-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ddd;
}

.gdpr-guide-dot-active {
	background: #2271b1;
}

.gdpr-guide-action {
	flex: 0 0 auto;
	align-self: center;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	padding: 6px 10px;
	cursor: pointer;
	white-space: nowrap;
}

.gdpr-guide-action:hover {
	background: #1d5e94;
}

@media (prefers-reduced-motion: reduce) {
	.gdpr-guide-pulse-dot,
	.gdpr-highlight::before {
		animation: none;
	}
}
