/* GDPR-Compliant ReCaptcha — settings page (Settings_Menu::options_page()).
 * Design language mirrors style_analysis.css (Direct-Analysis-Guide-Strip): white cards,
 * hairline borders, soft shadows, WP-admin-blue accent, pill badges. No frameworks, no
 * webfonts. Replaces the old burger-menu/drag-modal/table-based layout — the current markup
 * is flat (status strip → pill tabs (wrap on mobile, no burger) → one card per group → option
 * rows with an inline help popover), see SETTINGS_MODERNIZE_PLAN.md "Design-Kontrakt". */

.gdpr-settings-wrap {
	max-width: 960px;
	padding: 4px 0 32px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #1d2327;
}

.large-checkmark {
	font-size: 20px;
	color: #1e7e34;
	font-weight: bold;
}

.large-smiley {
	font-size: 18px;
}

/* ---------------------------------------------------------------------------------------
 * Status strip (Settings_Menu::render_status_strip())
 * ------------------------------------------------------------------------------------- */

.gdpr-status-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	padding: 12px 16px;
	margin: 16px 0;
}

.gdpr-status-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	background: #f2f2f2;
	color: #666;
	white-space: nowrap;
}

.gdpr-status-item.gdpr-status-green {
	background: #e6f4ea;
	color: #1e7e34;
}

.gdpr-status-item.gdpr-status-amber {
	background: #fdf3e1;
	color: #8a5a00;
}

.gdpr-status-item.gdpr-status-green::before,
.gdpr-status-item.gdpr-status-amber::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------------------
 * Pill tabs (Settings_Menu::options_page(), nav.gdpr-pill-tabs) — wrap on narrow screens
 * instead of a burger menu (Verhaltens-Entscheid 6).
 * ------------------------------------------------------------------------------------- */

.gdpr-pill-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}

.gdpr-pill-tab {
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	background: #fff;
	color: #1d2327;
	font-size: 13px;
	padding: 6px 14px;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.gdpr-pill-tab:hover {
	background: #f2f2f2;
}

.gdpr-pill-tab.is-active {
	background: #2271b1;
	border-color: transparent;
	color: #fff;
}

.gdpr-pill-tab.is-active:hover {
	background: #1d5e94;
}

/* ---------------------------------------------------------------------------------------
 * Cards + option rows (Settings_Menu::render_option_row())
 * ------------------------------------------------------------------------------------- */

.gdpr-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	/* No overflow:hidden — it would clip the absolutely-positioned help popover
	 * of the card's last option row (rows have no own background, so there is
	 * nothing that needs corner clipping anyway). */
}

.gdpr-option-row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f1;
}

.gdpr-option-row:last-child {
	border-bottom: none;
}

.gdpr-option-main {
	flex: 1 1 auto;
	min-width: 0;
}

.gdpr-option-label {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
}

.gdpr-option-main .gdpr-badge {
	margin-left: 8px;
	vertical-align: middle;
}

.gdpr-option-short {
	font-size: 13px;
	color: #666;
	margin: 4px 0 0;
}

.gdpr-option-control {
	flex: 0 0 auto;
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ---------------------------------------------------------------------------------------
 * Badges (Settings_Menu::get_badge_map()) — defined locally, style_analysis.css is not
 * enqueued on the settings page.
 * ------------------------------------------------------------------------------------- */

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

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

.gdpr-badge-recommend {
	background: #e8f1f8;
	color: #2271b1;
}

/* ---------------------------------------------------------------------------------------
 * Toggle switch (BOOL control, Settings_Menu::render_control())
 * ------------------------------------------------------------------------------------- */

.gdpr-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex: 0 0 auto;
}

.gdpr-toggle input {
	opacity: 0;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.gdpr-toggle-slider {
	position: absolute;
	inset: 0;
	background: #d0d0d0;
	border-radius: 999px;
	transition: background-color 150ms ease;
	pointer-events: none;
}

.gdpr-toggle-slider::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 150ms ease;
}

.gdpr-toggle input:checked + .gdpr-toggle-slider {
	background: #2271b1;
}

.gdpr-toggle input:checked + .gdpr-toggle-slider::before {
	transform: translateX(18px);
}

.gdpr-toggle input:focus-visible + .gdpr-toggle-slider {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

/* ---------------------------------------------------------------------------------------
 * Help toggle + popover (Settings_Menu::render_option_row())
 * ------------------------------------------------------------------------------------- */

.gdpr-help-toggle {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid #e0e0e0;
	background: #fff;
	color: #2271b1;
	font-weight: 600;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background-color 150ms ease, color 150ms ease;
}

.gdpr-help-toggle:hover {
	background: #f2f2f2;
}

.gdpr-help-toggle[aria-expanded="true"] {
	background: #2271b1;
	color: #fff;
	border-color: transparent;
}

.gdpr-help-popover {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	width: min(420px, 90vw);
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	padding: 14px 16px;
	font-size: 13px;
	line-height: 1.5;
	z-index: 100;
	text-align: left;
	color: #1d2327;
}

.gdpr-help-popover[hidden] {
	display: none !important;
}

.gdpr-help-popover ul,
.gdpr-help-popover ol {
	margin: 8px 0;
	padding-left: 20px;
}

.gdpr-help-popover li {
	margin-bottom: 4px;
}

.gdpr-help-popover code {
	background: #f2f2f2;
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 12px;
}

/* ---------------------------------------------------------------------------------------
 * Inputs (Settings_Menu::render_control())
 * ------------------------------------------------------------------------------------- */

.gdpr-option-control textarea.regular-text {
	min-height: 96px;
	width: 340px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.gdpr-option-control select[multiple] {
	min-width: 220px;
}

/* ---------------------------------------------------------------------------------------
 * Save button container (unchanged sticky behaviour, kept from the previous stylesheet)
 * ------------------------------------------------------------------------------------- */

#submit-container {
	position: sticky;
	right: 0;
	bottom: 0;
	background: transparent;
	padding: 5px 0;
	margin: 16px 0 0;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

#submit-container .submit {
	margin: 0;
	pointer-events: auto;
}

/* ---------------------------------------------------------------------------------------
 * Mobile (≤640px) — no burger menu; pills already wrap, rows stack, popover becomes a
 * full-width block under the row instead of an absolutely positioned card.
 * ------------------------------------------------------------------------------------- */

@media (max-width: 640px) {
	.gdpr-option-row {
		flex-direction: column;
		gap: 8px;
	}

	.gdpr-option-control {
		width: 100%;
		justify-content: space-between;
		/* Let the static-positioned popover (below) drop onto its own full-width
		 * line instead of sharing the flex row with the control + help button. */
		flex-wrap: wrap;
	}

	.gdpr-option-control input.regular-text,
	.gdpr-option-control textarea.regular-text,
	.gdpr-option-control select[multiple] {
		width: 100%;
	}

	.gdpr-help-popover {
		position: static;
		flex-basis: 100%;
		width: 100%;
		box-sizing: border-box;
		margin-top: 8px;
		box-shadow: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gdpr-pill-tab,
	.gdpr-help-toggle,
	.gdpr-toggle-slider,
	.gdpr-toggle-slider::before {
		transition: none;
	}
}
