/* Demo Popup styles. Scoped under .demo-popup-* to avoid theme collisions. */

.demo-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 20px;
	box-sizing: border-box;
	opacity: 0;
	transition: opacity 180ms ease;
}

.demo-popup-overlay.is-open {
	display: flex;
	opacity: 1;
}

.demo-popup-modal {
	background: #fff;
	width: 100%;
	max-width: 460px;
	border-radius: 10px;
	padding: 32px;
	box-sizing: border-box;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1f2937;
	max-height: 90vh;
	overflow-y: auto;
	transform: translateY(10px);
	transition: transform 180ms ease;
}

.demo-popup-overlay.is-open .demo-popup-modal {
	transform: translateY(0);
}

.demo-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	border-radius: 4px;
}

.demo-popup-close:hover {
	background: #f3f4f6;
	color: #111827;
}

.demo-popup-heading {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 600;
	color: #111827;
}

.demo-popup-description {
	margin: 0 0 20px;
	font-size: 14px;
	color: #4b5563;
	line-height: 1.5;
}

.demo-popup-field {
	margin-bottom: 14px;
}

.demo-popup-field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
	color: #374151;
}

.demo-popup-req {
	color: #dc2626;
}

.demo-popup-field input,
.demo-popup-field textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	box-sizing: border-box;
	background: #fff;
	color: #111827;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}

.demo-popup-field textarea {
	font-family: inherit;
	resize: vertical;
	min-height: 84px;
}

.demo-popup-field input:focus,
.demo-popup-field textarea:focus {
	outline: none;
	border-color: #9B6BC7;
	box-shadow: 0 0 0 3px rgba(155, 107, 199, 0.2);
}

.demo-popup-field.has-error input {
	border-color: #dc2626;
}

.demo-popup-error {
	display: block;
	min-height: 0;
	font-size: 12px;
	color: #dc2626;
	margin-top: 4px;
}

.demo-popup-pre-submit {
	font-size: 12px;
	color: #6b7280;
	margin: 8px 0 16px;
	line-height: 1.5;
}

.demo-popup-submit {
	display: block;
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #9B6BC7;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 120ms ease;
}

.demo-popup-submit:hover {
	background: #845BA9;
}

.demo-popup-submit:disabled {
	background: #C8AEE0;
	cursor: not-allowed;
}

.demo-popup-message {
	margin-top: 14px;
	font-size: 14px;
	min-height: 20px;
	text-align: center;
}

.demo-popup-message.is-success {
	color: #6C4B8B;
}

.demo-popup-message.is-error {
	color: #dc2626;
}

body.demo-popup-open {
	overflow: hidden;
}

/* Persistent success panel shown after a submission. */
.demo-popup-success[hidden],
.demo-popup-content[hidden] {
	display: none;
}

.demo-popup-success {
	text-align: center;
	padding: 8px 0 4px;
}

.demo-popup-success-icon {
	width: 84px;
	height: 84px;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #EDE4F5;
	animation: demo-popup-icon-pop 280ms ease forwards;
}

.demo-popup-success-circle {
	stroke: #9B6BC7;
	stroke-width: 2;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: demo-popup-circle-draw 500ms ease forwards;
}

.demo-popup-success-check {
	stroke: #9B6BC7;
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: demo-popup-check-draw 320ms ease forwards 360ms;
}

.demo-popup-success-title {
	margin: 0 0 8px;
	font-size: 21px;
	font-weight: 600;
	color: #111827;
}

.demo-popup-success-text {
	margin: 0;
	font-size: 14px;
	color: #4b5563;
	line-height: 1.5;
}

@keyframes demo-popup-icon-pop {
	0%   { transform: scale(0.6); opacity: 0; }
	60%  { transform: scale(1.08); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

@keyframes demo-popup-circle-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes demo-popup-check-draw {
	to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.demo-popup-success-icon,
	.demo-popup-success-circle,
	.demo-popup-success-check {
		animation: none;
	}
	.demo-popup-success-circle,
	.demo-popup-success-check {
		stroke-dashoffset: 0;
	}
}
