/* ==========================================================================
   Widerrufsbutton für WooCommerce – Public CSS
   Nutzt Theme-CSS-Custom-Properties für maximale Kompatibilität.
   ========================================================================== */

/* --- Footer-Wrapper ---------------------------------------------------- */
.wbw-footer-wrapper {
	text-align: center;
	padding: 12px 16px;
}

/* --- Trigger-Button ---------------------------------------------------- */
/* Erbt .button / .wp-element-button vom Theme.
   Nur minimale Overrides für den Footer-Kontext. */
.wbw-footer-button {
	font-size: 0.875rem;
}

/* --- Modal Overlay ----------------------------------------------------- */
.wbw-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	/* Animation */
	opacity: 0;
	transition: opacity 0.2s ease;
}

.wbw-modal-overlay.wbw-visible {
	opacity: 1;
}

/* Versteckt via HTML-Attribut, aber sichtbar wenn .wbw-visible */
.wbw-modal-overlay[hidden] {
	display: none !important;
}

/* --- Modal Container --------------------------------------------------- */
.wbw-modal-container {
	background: var(--wp--preset--color--background, #fff);
	color: var(--wp--preset--color--foreground, inherit);
	font-family: var(--wp--preset--font-family--body, inherit);
	border-radius: var(--wp--custom--border-radius, 8px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px;
	position: relative;
	transform: translateY(20px);
	transition: transform 0.25s ease;
}

.wbw-modal-overlay.wbw-visible .wbw-modal-container {
	transform: translateY(0);
}

/* --- Schließen-Button -------------------------------------------------- */
.wbw-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--wp--preset--color--foreground, #555);
	padding: 4px 8px;
	border-radius: 4px;
	transition: background 0.15s;
}

.wbw-modal-close:hover {
	background: rgba(0, 0, 0, 0.08);
}

/* --- Schritt-Indikator ------------------------------------------------- */
.wbw-steps {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 24px;
	font-size: 0.8rem;
}

.wbw-step {
	color: var(--wp--preset--color--foreground, #888);
	opacity: 0.5;
	font-weight: 600;
	transition: opacity 0.2s;
}

.wbw-step--active {
	opacity: 1;
	color: var(--wp--preset--color--primary, #2271b1);
}

.wbw-step-divider {
	color: var(--wp--preset--color--foreground, #ccc);
	opacity: 0.5;
}

/* --- Modal-Titel & Intro ----------------------------------------------- */
.wbw-modal-title {
	font-size: 1.3rem;
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--heading, inherit);
	color: var(--wp--preset--color--foreground, inherit);
}

.wbw-modal-intro {
	font-size: 0.9rem;
	color: var(--wp--preset--color--foreground, #555);
	margin: 0 0 20px;
	opacity: 0.8;
}

/* --- Formular-Gruppen -------------------------------------------------- */
.wbw-form-group {
	margin-bottom: 16px;
}

.wbw-form-group label {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--wp--preset--color--foreground, inherit);
}

.wbw-form-group input[type="text"],
.wbw-form-group input[type="email"],
.wbw-form-group textarea {
	width: 100%;
	box-sizing: border-box;
	/* Erbt Theme-Styles für Inputs */
	font-family: inherit;
	font-size: 0.9rem;
}

.wbw-form-group textarea {
	resize: vertical;
	min-height: 90px;
}

/* Checkbox-Gruppe */
.wbw-form-group--checkbox label {
	font-weight: 400;
}

.wbw-checkbox-label {
	display: flex !important;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
}

.wbw-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.wbw-required {
	color: #c0392b;
}

.wbw-optional {
	color: var(--wp--preset--color--foreground, #888);
	opacity: 0.7;
	font-weight: 400;
	font-size: 0.8em;
}

.wbw-field-hint {
	font-size: 0.78rem;
	color: var(--wp--preset--color--foreground, #888);
	opacity: 0.75;
	margin: 4px 0 0;
}

.wbw-required-note {
	font-size: 0.78rem;
	color: var(--wp--preset--color--foreground, #888);
	opacity: 0.7;
	margin: 4px 0 16px;
}

/* --- Deadline-Info ----------------------------------------------------- */
.wbw-deadline-info {
	font-size: 0.82rem;
	margin-top: 6px;
	padding: 8px 12px;
	border-radius: 4px;
	display: none;
}

.wbw-deadline-info.wbw-deadline--ok {
	background: #eafaf1;
	color: #1e8449;
	border-left: 3px solid #27ae60;
	display: block;
}

.wbw-deadline-info.wbw-deadline--expired {
	background: #fdf3f3;
	color: #c0392b;
	border-left: 3px solid #e74c3c;
	display: block;
}

/* --- Fehler-Meldung ---------------------------------------------------- */
.wbw-error-message {
	background: #fdf3f3;
	color: #c0392b;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 0.875rem;
	margin-bottom: 16px;
}

/* --- Aktions-Buttons --------------------------------------------------- */
.wbw-form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}

.wbw-btn-secondary {
	background: none;
	border: 1px solid var(--wp--preset--color--foreground, #ccc);
	color: var(--wp--preset--color--foreground, #555);
	padding: 10px 20px;
	border-radius: var(--wp--custom--border-radius, 4px);
	cursor: pointer;
	font-size: 0.875rem;
	transition: background 0.15s;
}

.wbw-btn-secondary:hover {
	background: rgba(0, 0, 0, 0.05);
}

/* --- Zusammenfassung (Schritt 2) --------------------------------------- */
.wbw-summary {
	background: var(--wp--preset--color--background, #f8f9fa);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 16px;
}

.wbw-summary-row {
	display: flex;
	padding: 10px 16px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 0.875rem;
}

.wbw-summary-row:last-child {
	border-bottom: none;
}

.wbw-summary-label {
	font-weight: 600;
	min-width: 130px;
	color: var(--wp--preset--color--foreground, #555);
	opacity: 0.8;
}

.wbw-summary-value {
	color: var(--wp--preset--color--foreground, #333);
	word-break: break-word;
}

.wbw-confirm-notice {
	font-size: 0.82rem;
	color: var(--wp--preset--color--foreground, #555);
	opacity: 0.75;
	margin-bottom: 0;
}

/* --- Erfolgs-Ansicht --------------------------------------------------- */
.wbw-success {
	text-align: center;
	padding: 20px 0;
}

.wbw-success-icon {
	width: 64px;
	height: 64px;
	background: var(--wp--preset--color--primary, #27ae60);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
	margin: 0 auto 20px;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 480px) {
	.wbw-modal-container {
		padding: 20px 16px;
	}

	.wbw-form-actions {
		flex-direction: column-reverse;
	}

	.wbw-form-actions .button,
	.wbw-form-actions .wbw-btn-secondary {
		width: 100%;
		text-align: center;
	}

	.wbw-summary-row {
		flex-direction: column;
		gap: 2px;
	}

	.wbw-summary-label {
		min-width: unset;
	}
}