/*
+==============================================================================+
|   _   _   _____   _____   ____    ___  __  __                                |
|  | \ | | | ____| |_   _| |  _ \  |_ _| \ \/ /                                |
|  |  \| | |  _|     | |   | |_) |  | |   \  /                                 |
|  | |\  | | |___    | |   |  _ <   | |   /  \                                 |
|  |_| \_| |_____|   |_|   |_| \_\ |___| /_/\_\                                |
|                                                                              |
|  IT | WEB | SOFTWARE | DIGITAL SOLUTIONS                                     |
|  Engineered by NETRIX                                                        |
|  https://www.netrix.de/                                                      |
|                                                                              |
+==============================================================================+
|  Projekt   : Protected Registration Button                                   |
|  Datei     : software/protected-registration-button/assets/frontend.css      |
|  Version   : 1.2.2                                                           |
|  Copyright : (c) 2026 NETRIX GmbH                                            |
|  Lizenz    : GPL-2.0-or-later; siehe license.txt                             |
+==============================================================================+
*/

.prb,
.prb-float,
.prb-dialog {
	--prb-button: #0E7490;
	--prb-button-text: #FFFFFF;
	--prb-accent: #0E7490;
	--prb-text: #1d2b3a;
	--prb-muted: #4a5868;
	--prb-surface: #f4f7f9;
	--prb-radius: 10px;
	--prb-compact-font: clamp(15px, 0.875rem + 0.2vw, 16px);
}

.prb {
	box-sizing: border-box;
	max-width: 760px;
	margin: 2rem auto;
	color: var(--prb-text);
	line-height: 1.55;
}

.prb *,
.prb *::before,
.prb *::after {
	box-sizing: inherit;
}

.prb--full {
	padding: clamp(1.25rem, 4vw, 2.5rem);
	background: #fff;
	border-top: 6px solid var(--prb-accent);
	border-radius: var(--prb-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.prb--compact {
	margin: 1.5rem 0;
}

.prb__logo {
	margin: 0 0 1.25rem;
	text-align: center;
}

.prb__logo img {
	display: inline-block;
	max-width: min(280px, 70%);
	height: auto;
}

.prb__title {
	margin: 0 0 0.75rem;
	color: var(--prb-text);
	text-align: center;
}

.prb__intro {
	margin: 0 0 1.5rem;
	text-align: center;
}

.prb__intro p,
.prb__privacy p,
.prb__details p {
	margin: 0 0 0.75em;
}

.prb__privacy {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--prb-surface);
	border-left: 4px solid var(--prb-accent);
	border-radius: 0 var(--prb-radius) var(--prb-radius) 0;
	/* Kleingedrucktes: folgt dem Theme, bleibt aber zwischen 13 und 15 px. */
	font-size: clamp(13px, 0.92em, 15px);
	line-height: 1.5;
	color: var(--prb-muted);
}

/* Theme-Regeln für p/li/h3 (z. B. feste Pixelgrößen) sollen die Hinweisgröße nicht sprengen. */
.prb .prb__privacy p,
.prb .prb__privacy li,
.prb .prb__details p {
	font-size: inherit;
	line-height: inherit;
}

.prb .prb__privacy-title {
	margin: 0 0 0.5rem;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: var(--prb-text);
}

.prb__privacy a,
.prb__details a {
	color: var(--prb-accent);
	text-decoration: underline;
}

.prb__privacy-link {
	margin-bottom: 0 !important;
}

.prb__details {
	margin: 0 0 1rem;
	font-size: clamp(13px, 0.92em, 15px);
	line-height: 1.5;
	color: var(--prb-muted);
}

.prb__details summary {
	cursor: pointer;
	color: var(--prb-accent);
	font-weight: 600;
}

.prb__details[open] summary {
	margin-bottom: 0.5rem;
}

/* Ohne JavaScript bleibt das Formular verborgen, der Noscript-Hinweis erscheint. */
.prb:not(.prb--js) .prb__form,
.prb__form[hidden] {
	display: none;
}

.prb__consent {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin: 0 0 1.25rem;
	font-size: clamp(14px, 1em, 17px);
	line-height: 1.45;
	cursor: pointer;
}

.prb__consent input {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--prb-accent);
	cursor: pointer;
}

.prb__actions {
	display: flex;
}

.prb__actions--left { justify-content: flex-start; }
.prb__actions--center { justify-content: center; }
.prb__actions--right { justify-content: flex-end; }

/* ---------- Button ---------- */

/*
 * Hintergrund, Schrift, Kante (3D), Schatten und Bewegung laufen über Variablen. So setzen
 * sich Stil, Schatten und Hover-Effekt frei kombinierbar zusammen, und Theme-Regeln für
 * button:hover überschreiben die Farben nicht.
 */
.prb-btn {
	--prb-btn-bg: var(--prb-button);
	--prb-btn-fg: var(--prb-button-text);
	--prb-ty: 0px;
	--prb-sc: 1;
	--prb-inset: inset 0 0 0 transparent;
	--prb-edge: 0 0 0 transparent;
	--prb-drop: 0 0 0 transparent;
	display: inline-flex;
	gap: 0.6em;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.7em 1.5em;
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--prb-btn-bg);
	color: var(--prb-btn-fg);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	cursor: pointer;
	box-shadow: var(--prb-inset), var(--prb-edge), var(--prb-drop);
	transform: translateY(var(--prb-ty)) scale(var(--prb-sc));
	transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.prb-btn:hover,
.prb-btn:focus {
	background: var(--prb-btn-bg);
	color: var(--prb-btn-fg);
}

.prb-btn:active {
	--prb-sc: 0.98;
}

.prb-btn:focus-visible {
	outline: 3px solid var(--prb-accent);
	outline-offset: 3px;
}

/* Stil */
.prb-btn--style-gradient {
	--prb-btn-bg: linear-gradient(135deg, var(--prb-button-light) 0%, var(--prb-button) 45%, var(--prb-button-dark) 100%);
}

.prb-btn--style-outline {
	--prb-btn-bg: transparent;
	--prb-btn-fg: var(--prb-button);
	border-color: var(--prb-button);
}

.prb-btn--style-outline:hover,
.prb-btn--style-outline:focus-visible {
	--prb-btn-bg: var(--prb-button);
	--prb-btn-fg: var(--prb-button-text);
}

.prb-btn--style-3d {
	--prb-btn-bg: linear-gradient(180deg, var(--prb-button-light) 0%, var(--prb-button) 55%);
	--prb-inset: inset 0 1px 0 rgba(255, 255, 255, 0.3);
	--prb-edge: 0 5px 0 var(--prb-button-dark);
	margin-bottom: 5px;
}

/* Schatten */
.prb-btn--shadow-soft { --prb-drop: 0 6px 16px rgba(0, 0, 0, 0.18); }
.prb-btn--shadow-medium { --prb-drop: 0 10px 24px rgba(0, 0, 0, 0.24); }
.prb-btn--shadow-strong { --prb-drop: 0 16px 36px rgba(0, 0, 0, 0.34), 0 4px 10px rgba(0, 0, 0, 0.2); }
.prb-btn--shadow-glow { --prb-drop: 0 6px 24px var(--prb-button-glow); }

/* Hover-Effekt */
.prb-btn--hover-lift:hover { --prb-ty: -2px; filter: brightness(1.06); }
.prb-btn--hover-grow:hover { --prb-sc: 1.05; filter: brightness(1.04); }
.prb-btn--hover-darken:hover { filter: brightness(0.88); }

/* 3D: Button gibt beim Klick nach (steht nach den Hover-Regeln, damit es Vorrang hat). */
.prb-btn--style-3d:active {
	--prb-ty: 3px;
	--prb-sc: 1;
	--prb-edge: 0 2px 0 var(--prb-button-dark);
}

.prb-btn:disabled {
	--prb-ty: 0px;
	--prb-sc: 1;
	cursor: progress;
	opacity: 0.75;
	filter: none;
}

.prb-btn--pill { border-radius: 999px; }
.prb-btn--rounded { border-radius: 8px; }
.prb-btn--square { border-radius: 0; }

.prb-btn--small { min-height: 2.25rem; padding: 0.45em 1.1em; font-size: 0.9em; }
.prb-btn--normal { font-size: 1em; }
.prb-btn--large { min-height: 3.25rem; padding: 0.8em 1.9em; font-size: 1.1em; }

.prb-btn--w-full { width: 100%; }
.prb-btn--upper { text-transform: uppercase; }

.prb-btn .prb-icon {
	flex: 0 0 auto;
	width: 1.25em;
	height: 1.25em;
}

.prb--busy .prb-btn .prb-icon {
	animation: prb-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes prb-pulse {
	from { transform: translateX(0); }
	to { transform: translateX(3px); }
}

/* ---------- Hinweise ---------- */

.prb__hint,
.prb__status {
	margin: 0.75rem 0 0;
	font-size: clamp(13px, 0.88em, 15px);
}

.prb__hint {
	display: flex;
	gap: 0.4rem;
	align-items: center;
	color: var(--prb-muted);
}

.prb__hint > span {
	min-width: 0;
}

.prb__hint a,
.prb__provider-line a {
	color: var(--prb-accent);
	text-decoration: underline;
}

.prb__hint--left { justify-content: flex-start; }
.prb__hint--center { justify-content: center; text-align: center; }
.prb__hint--right { justify-content: flex-end; text-align: right; }

.prb__status {
	min-height: 1.5em;
}

.prb__status--center { text-align: center; }
.prb__status--right { text-align: right; }

.prb__status--error {
	color: #b42318;
	font-weight: 600;
}

.prb__noscript {
	padding: 1rem;
	background: #fff4e5;
	border-radius: var(--prb-radius);
}

/* Honeypot: für Menschen unsichtbar. */
.prb__hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.prb__embed[hidden] {
	display: none;
}

.prb__frame {
	display: block;
	width: 100%;
	min-height: 1600px;
	border: 0;
	border-radius: var(--prb-radius);
	background: #fff;
}

/* ---------- Schwebender Button ---------- */

/*
 * Oberste Ebene über dem Seiteninhalt, aber unter Cookie-Bannern (z. B. Borlabs 999999).
 * Abstand vom Rand: --prb-fx / --prb-fy (Einstellungen), auf Smartphones höchstens 12 px.
 */
.prb-float {
	--prb-fx: 20px;
	--prb-fy: 20px;
	--prb-x: var(--prb-fx);
	--prb-y: var(--prb-fy);
	--prb-bar: 0px;
	position: fixed;
	z-index: 99990;
}

body.admin-bar .prb-float { --prb-bar: 32px; }

.prb-float--top-left { top: calc(var(--prb-y) + var(--prb-bar)); left: var(--prb-x); }
.prb-float--top-right { top: calc(var(--prb-y) + var(--prb-bar)); right: var(--prb-x); }
.prb-float--bottom-left { bottom: var(--prb-y); left: var(--prb-x); }
.prb-float--bottom-right { bottom: var(--prb-y); right: var(--prb-x); }

.prb-float--top-center,
.prb-float--bottom-center {
	left: 50%;
	transform: translateX(-50%);
}

.prb-float--top-center { top: calc(var(--prb-y) + var(--prb-bar)); }
.prb-float--bottom-center { bottom: var(--prb-y); }

.prb-float--middle-left,
.prb-float--middle-right {
	top: 50%;
	transform: translateY(-50%);
}

.prb-float--middle-left { left: 0; }
.prb-float--middle-right { right: 0; }

/* Seitliche Lasche: Text senkrecht, bündig am Rand. */
.prb-float--middle-left .prb-btn,
.prb-float--middle-right .prb-btn {
	min-height: 0;
	padding: 1.1em 0.7em;
	writing-mode: vertical-rl;
}

.prb-float--middle-left .prb-btn { border-radius: 0 10px 10px 0; }
.prb-float--middle-right .prb-btn { border-radius: 10px 0 0 10px; }

.prb-float--middle-left .prb-btn--square,
.prb-float--middle-right .prb-btn--square { border-radius: 0; }

/* Kontur-Stil braucht über beliebigem Seiteninhalt eine Fläche. */
.prb-float .prb-btn--style-outline { --prb-btn-bg: #fff; }
.prb-float .prb-btn--style-outline:hover,
.prb-float .prb-btn--style-outline:focus-visible { --prb-btn-bg: var(--prb-button); }

/* Aufmerksamkeit: kurze Bewegung alle 4 Sekunden, pausiert beim Darüberfahren. */
.prb-float__inner {
	display: flex;
}

.prb-float--anim-pulse .prb-float__inner {
	animation: prb-float-pulse 4s ease-in-out 2s infinite;
}

.prb-float--anim-bounce .prb-float__inner {
	animation: prb-float-bounce 4s ease-in-out 2s infinite;
}

.prb-float:hover .prb-float__inner,
.prb-float:focus-within .prb-float__inner {
	animation-play-state: paused;
}

@keyframes prb-float-pulse {
	0%, 70%, 100% { transform: scale(1); }
	80% { transform: scale(1.07); }
	90% { transform: scale(0.98); }
}

@keyframes prb-float-bounce {
	0%, 70%, 100% { transform: translateY(0); }
	78% { transform: translateY(-10px); }
	86% { transform: translateY(0); }
	92% { transform: translateY(-4px); }
}

@media (max-width: 782px) {
	body.admin-bar .prb-float { --prb-bar: 46px; }
}

@media (max-width: 600px) {
	.prb-float--desktop { display: none; }
	.prb-float {
		--prb-x: min(var(--prb-fx), 12px);
		--prb-y: min(var(--prb-fy), 12px);
	}
	/* Die Admin-Leiste scrollt auf Smartphones mit, deshalb hier kein Zuschlag. */
	body.admin-bar .prb-float { --prb-bar: 0px; }
}

/* ---------- Kompakte Schrift: Dialog immer, alle Varianten auf Smartphones ---------- */

/*
 * Der Dialog hängt am Seitenende außerhalb des Inhalts und erbt sonst die Grundschrift des
 * Themes (oft 18–20 px, Überschriften 30 px und mehr). Dann passen Hinweis und Button auf
 * dem Smartphone nicht mehr auf einen Bildschirm. Der Baustein bekommt deshalb im Dialog und
 * auf schmalen Bildschirmen eine eigene, kompakte Größe. Themes können sie über
 * --prb-compact-font anpassen. Die Selektoren sind bewusst zweistufig, damit Theme-Regeln
 * wie ".entry-content p" oder "h2" sie nicht überschreiben.
 */
.prb-dialog .prb {
	font-size: var(--prb-compact-font);
	line-height: 1.5;
}

.prb-dialog .prb__intro p,
.prb-dialog .prb__privacy p,
.prb-dialog .prb__details p,
.prb-dialog .prb__privacy li {
	font-size: inherit;
	line-height: inherit;
}

.prb-dialog .prb__title {
	margin: 0 2rem 0.75rem;
	font-size: 1.4em;
	line-height: 1.25;
	letter-spacing: normal;
}

.prb-dialog .prb__intro {
	margin-bottom: 1.25rem;
}

.prb-dialog .prb__privacy {
	margin-bottom: 1.25rem;
	font-size: 0.875em;
}

.prb-dialog .prb__consent {
	gap: 0.6rem;
	margin-bottom: 1rem;
	font-size: 1em;
	line-height: 1.45;
}

.prb-dialog .prb-btn {
	font-size: 1em;
}

@media (max-width: 600px) {
	.prb.prb {
		font-size: var(--prb-compact-font);
		line-height: 1.5;
	}

	.prb .prb__intro p,
	.prb .prb__privacy p,
	.prb .prb__details p,
	.prb .prb__privacy li {
		font-size: inherit;
		line-height: inherit;
	}

	.prb .prb__privacy p {
		margin-bottom: 0.6em;
	}

	.prb .prb__title {
		font-size: 1.25em;
		line-height: 1.25;
		letter-spacing: normal;
	}

	.prb .prb__privacy {
		margin-bottom: 1.25rem;
		padding: 0.75rem 0.9rem;
		font-size: 0.875em;
	}

	.prb .prb__consent {
		gap: 0.6rem;
		margin-bottom: 1rem;
		font-size: 1em;
		line-height: 1.45;
	}

	.prb .prb-btn {
		font-size: 1em;
	}

	/* Button über die volle Breite: ein Fingertipp, kein Zeilenumbruch. */
	.prb .prb__actions .prb-btn {
		width: 100%;
	}
}

/* ---------- Dialog ---------- */

.prb-dialog {
	width: min(600px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	padding: 0;
	border: 0;
	border-top: 6px solid var(--prb-accent);
	border-radius: var(--prb-radius);
	background: #fff;
	color: var(--prb-text);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	overflow: auto;
}

.prb-dialog::backdrop {
	background: rgba(15, 23, 32, 0.55);
}

.prb-dialog .prb {
	margin: 0;
	padding: clamp(1.25rem, 4vw, 2rem);
	padding-top: 2.25rem;
}

.prb-dialog .prb__logo img {
	max-width: min(200px, 60%);
}

@media (max-width: 600px) {
	.prb-dialog {
		width: calc(100vw - 16px);
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
	}

	.prb-dialog .prb {
		padding: 2.25rem 1rem 1rem;
	}

	.prb-dialog .prb__title {
		margin-inline: 1.75rem;
	}
}

.prb-dialog__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--prb-muted);
	cursor: pointer;
}

.prb-dialog__close:hover,
.prb-dialog__close:focus-visible {
	background: var(--prb-surface);
	color: var(--prb-text);
}

html.prb-dialog-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.prb-btn,
	.prb--busy .prb-btn .prb-icon,
	.prb-float__inner {
		transition: none;
		animation: none !important;
	}

	.prb-btn:hover {
		--prb-ty: 0px;
		--prb-sc: 1;
	}
}
