/**
 * Clever Tickets embed styles.
 *
 * Everything is scoped to .ct-embed* classes. The iframe height is driven
 * by JS (CT_RESIZE messages); CSS only guarantees full width, no borders,
 * and no horizontal overflow at any viewport width.
 */

.ct-embed {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5em;
}

.ct-embed__frame {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 0;
}

/* Loading overlay
   ------------------------------------------------------------------ */

.ct-embed__loading {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
	pointer-events: none;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ct-embed--ready .ct-embed__loading,
.ct-embed--error .ct-embed__loading {
	opacity: 0;
	visibility: hidden;
}

.ct-embed__spinner {
	display: inline-block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid rgba(128, 128, 128, 0.25);
	border-top-color: rgba(96, 96, 96, 0.9);
	animation: ct-embed-spin 0.8s linear infinite;
}

@keyframes ct-embed-spin {
	to {
		transform: rotate(360deg);
	}
}

.ct-embed__loading-text {
	font-size: 14px;
	line-height: 1.4;
	color: #6b7280;
}

/* Error panel
   ------------------------------------------------------------------ */

.ct-embed__error {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	box-sizing: border-box;
	padding: 24px;
	text-align: center;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	color: #374151;
}

.ct-embed__error[hidden] {
	display: none;
}

.ct-embed__error p {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #374151;
}

.ct-embed__retry {
	display: inline-block;
	padding: 8px 18px;
	font-size: 14px;
	line-height: 1.4;
	color: #1f2937;
	background: #f3f4f6;
	border: 1px solid #9ca3af;
	border-radius: 4px;
	cursor: pointer;
}

.ct-embed__retry:hover,
.ct-embed__retry:focus {
	background: #e5e7eb;
}

/* Config notice (editors/admins only)
   ------------------------------------------------------------------ */

.ct-embed-config-notice {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5em;
	padding: 12px 16px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-left: 4px solid #d97706;
	border-radius: 2px;
	color: #78350f;
}

.ct-embed-config-notice p {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.5;
}

.ct-embed-config-notice p:last-child {
	margin-bottom: 0;
}

.ct-embed-config-notice__meta {
	font-size: 12px;
	opacity: 0.8;
}

/* Reduced motion
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.ct-embed__spinner {
		animation: none;
	}

	.ct-embed__loading {
		transition: none;
	}
}
