/* wp Widerruf - KI — frontend styles */

:root {
	--wpwki-primary: #1a73e8;
	--wpwki-text: #1a1a1a;
	--wpwki-bg: #ffffff;
	--wpwki-radius: 8px;
	--wpwki-font: inherit;
}

/* Trigger link */
.wpwki-trigger {
	cursor: pointer;
}

.wpwki-admin-notice {
	display: inline-block;
	padding: 4px 8px;
	background: #fff4e5;
	border: 1px solid #f59e0b;
	border-radius: 4px;
	color: #7c2d12;
	font-size: 13px;
}

/* Lightbox container */
.wpwki-lightbox {
	position: fixed !important;
	inset: 0 !important;
	z-index: 999999 !important;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 12px;
	overflow-y: auto;
	font-family: var(--wpwki-font);
	color: var(--wpwki-text);
	-webkit-font-smoothing: antialiased;
}

.wpwki-lightbox.is-open {
	display: flex !important;
}

.wpwki-lightbox__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 200ms ease;
}

.wpwki-lightbox.is-open .wpwki-lightbox__backdrop {
	opacity: 1;
}

.wpwki-lightbox__dialog {
	position: relative;
	width: 100%;
	max-width: 600px;
	background: var(--wpwki-bg);
	border-radius: var(--wpwki-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	margin: auto;
	padding: 32px 28px 28px;
	transform: translateY(20px);
	opacity: 0;
	transition: transform 300ms ease, opacity 300ms ease;
	box-sizing: border-box;
}

.wpwki-lightbox.is-open .wpwki-lightbox__dialog {
	transform: translateY(0);
	opacity: 1;
}

.wpwki-lightbox__close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wpwki-lightbox__close:hover,
.wpwki-lightbox__close:focus {
	background: #f0f0f0;
	color: #1a1a1a;
	outline: none;
}

.wpwki-lightbox__title {
	margin: 0 0 16px 0;
	font-size: 22px;
	line-height: 1.3;
	color: var(--wpwki-text);
	padding-right: 32px;
}

.wpwki-lightbox__content {
	font-size: 15px;
	line-height: 1.6;
}

.wpwki-lightbox__content p {
	margin: 0 0 14px 0;
}

.wpwki-lightbox__content h3 {
	margin: 20px 0 8px 0;
	font-size: 16px;
	color: var(--wpwki-text);
}

/* Step toggling */
.wpwki-step[hidden] {
	display: none !important;
}

.wpwki-intro {
	margin: 0 0 18px 0;
	color: #555;
}

/* Form */
.wpwki-form {
	display: block;
}

.wpwki-field {
	margin-bottom: 16px;
	position: relative;
}

.wpwki-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--wpwki-text);
}

.wpwki-req {
	color: #b32d2e;
	font-weight: 400;
}

.wpwki-field input[type="text"],
.wpwki-field input[type="email"],
.wpwki-field input[type="date"],
.wpwki-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font: inherit;
	font-size: 15px;
	background: #fff;
	color: var(--wpwki-text);
	line-height: 1.4;
}

.wpwki-field textarea {
	resize: vertical;
	min-height: 80px;
}

.wpwki-field input:focus,
.wpwki-field textarea:focus {
	outline: none;
	border-color: var(--wpwki-primary);
	box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.wpwki-field.has-error input,
.wpwki-field.has-error textarea {
	border-color: #b32d2e;
}

.wpwki-help {
	display: block;
	font-size: 12px;
	color: #777;
	margin-top: 4px;
}

.wpwki-error {
	display: none;
	font-size: 13px;
	color: #b32d2e;
	margin-top: 4px;
}

.wpwki-field.has-error .wpwki-error {
	display: block;
}

/* Actions */
.wpwki-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 22px;
}

.wpwki-actions--split {
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.wpwki-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	border-radius: 6px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
	transition: background-color 150ms ease, border-color 150ms ease;
	min-height: 44px;
}

.wpwki-btn--primary {
	background: var(--wpwki-primary);
	color: #fff;
	border-color: var(--wpwki-primary);
}

.wpwki-btn--primary:hover,
.wpwki-btn--primary:focus {
	background: #1557b0;
	border-color: #1557b0;
	outline: none;
}

.wpwki-btn--primary[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.wpwki-btn--secondary {
	background: #fff;
	color: var(--wpwki-text);
	border-color: #d1d5db;
}

.wpwki-btn--secondary:hover,
.wpwki-btn--secondary:focus {
	background: #f3f4f6;
	border-color: #9ca3af;
	outline: none;
}

/* Confirm summary */
.wpwki-summary {
	margin: 0 0 16px 0;
	padding: 16px 18px;
	background: #f8f9fa;
	border-radius: 6px;
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 6px 16px;
	font-size: 14px;
}

.wpwki-summary dt {
	font-weight: 600;
	color: #555;
	margin: 0;
}

.wpwki-summary dd {
	margin: 0;
	word-break: break-word;
	white-space: pre-wrap;
}

.wpwki-confirm-notice {
	font-size: 14px;
	color: #555;
	border-left: 3px solid var(--wpwki-primary);
	padding: 6px 0 6px 12px;
	margin-bottom: 8px;
}

/* Error contact display */
.wpwki-error-contact {
	background: #fdf2f2;
	border: 1px solid #f5c2c0;
	padding: 12px 14px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 12px;
}

/* Mobile */
@media (max-width: 768px) {
	.wpwki-lightbox {
		padding: 0;
	}

	.wpwki-lightbox__dialog {
		max-width: 100%;
		min-height: 100%;
		border-radius: 0;
		padding: 24px 18px;
	}

	.wpwki-lightbox__title {
		font-size: 20px;
	}

	.wpwki-summary {
		grid-template-columns: 1fr;
		gap: 2px 0;
	}

	.wpwki-summary dt {
		margin-top: 8px;
	}

	.wpwki-summary dt:first-child {
		margin-top: 0;
	}

	.wpwki-actions--split {
		flex-direction: column-reverse;
	}

	.wpwki-actions--split .wpwki-btn {
		width: 100%;
	}
}

/* Body scroll-lock helper */
body.wpwki-no-scroll {
	overflow: hidden !important;
}
