/**
 * Frontend-Styles für den Widerruf-Button und das Formular.
 */

:root {
	--wrb-button-bg: #b30000;
	--wrb-button-text: #ffffff;
}

/* ---------- Button ---------- */
.wrb-button-wrap {
	display: block;
	margin: 1em 0;
}
.wrb-align-center { text-align: center; }
.wrb-align-right { text-align: right; }
.wrb-align-left { text-align: left; }

.wrb-button {
	display: inline-block;
	padding: 0.75em 1.5em;
	background-color: var(--wrb-button-bg);
	color: var(--wrb-button-text);
	border: 2px solid var(--wrb-button-bg);
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.wrb-button:hover,
.wrb-button:focus {
	opacity: 0.9;
	color: var(--wrb-button-text);
	text-decoration: none;
}
.wrb-button:focus-visible {
	outline: 3px solid #000;
	outline-offset: 2px;
}
.wrb-button--outline {
	background-color: transparent;
	color: var(--wrb-button-bg);
}
.wrb-button--outline:hover {
	background-color: var(--wrb-button-bg);
	color: var(--wrb-button-text);
}
.wrb-button--back {
	background-color: transparent;
	color: #333;
	border-color: #999;
}
.wrb-button--back:hover {
	background-color: #f0f0f0;
	color: #333;
}

/* ---------- Floating-Button ---------- */
.wrb-floating {
	position: fixed;
	z-index: 9990;
	padding: 0.7em 1.2em;
	background-color: var(--wrb-button-bg);
	color: var(--wrb-button-text);
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.wrb-floating:hover,
.wrb-floating:focus {
	color: var(--wrb-button-text);
	opacity: 0.92;
	text-decoration: none;
}
.wrb-floating--bottom-right { bottom: 20px; right: 20px; }
.wrb-floating--bottom-left { bottom: 20px; left: 20px; }
.wrb-floating--top-right { top: 20px; right: 20px; }
.wrb-floating--top-left { top: 20px; left: 20px; }

/* ---------- Formular ---------- */
.wrb-widerruf-wrapper {
	max-width: 640px;
}
.wrb-intro {
	margin-bottom: 1.5em;
}
.wrb-field {
	margin-bottom: 1.25em;
}
.wrb-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}
.wrb-field input[type="text"],
.wrb-field input[type="email"],
.wrb-field textarea {
	width: 100%;
	padding: 0.6em 0.75em;
	border: 1px solid #888;
	border-radius: 4px;
	font-size: 1rem;
	box-sizing: border-box;
}
.wrb-field--consent label {
	font-weight: 400;
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
}
.wrb-field--consent input {
	margin-top: 0.25em;
}
.wrb-privacy-link {
	display: contents;
}
.wrb-req { color: #b30000; }
.wrb-optional { color: #666; font-weight: 400; font-size: 0.85em; }
.wrb-hint {
	display: block;
	color: #555;
	font-size: 0.85em;
	margin-top: 0.3em;
}
.wrb-required-hint {
	color: #555;
	font-size: 0.85em;
}
.wrb-field--error input,
.wrb-field--error textarea {
	border-color: #b30000;
	background-color: #fff6f6;
}
.wrb-field-error {
	display: block;
	color: #b30000;
	font-size: 0.85em;
	margin-top: 0.3em;
}

/* Honeypot verstecken */
.wrb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wrb-errors {
	background: #fff6f6;
	border: 1px solid #b30000;
	border-left-width: 4px;
	padding: 1em 1.25em;
	margin-bottom: 1.5em;
	border-radius: 4px;
}
.wrb-errors ul { margin: 0.5em 0 0 1.2em; }

/* ---------- Review / Bestätigung ---------- */
.wrb-review-title { margin-top: 0; }
.wrb-review-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.25em 0;
}
.wrb-review-table th,
.wrb-review-table td {
	text-align: left;
	padding: 0.6em 0.85em;
	border: 1px solid #e0e0e0;
	vertical-align: top;
}
.wrb-review-table th {
	background: #f6f6f6;
	width: 40%;
}
.wrb-confirm-actions,
.wrb-actions {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 1em;
}

/* ---------- Erfolg ---------- */
.wrb-success {
	background: #f1faf1;
	border: 1px solid #46a546;
	border-left-width: 4px;
	padding: 1.5em;
	border-radius: 4px;
}
.wrb-success-icon {
	width: 44px;
	height: 44px;
	line-height: 44px;
	text-align: center;
	border-radius: 50%;
	background: #46a546;
	color: #fff;
	font-size: 1.5rem;
	margin-bottom: 0.5em;
}
.wrb-success h3 { margin-top: 0; }

@media (max-width: 480px) {
	.wrb-floating {
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%);
		bottom: 12px;
	}
	.wrb-review-table th { width: 100%; display: block; }
	.wrb-review-table td { display: block; }
}
