/* TCB Demo — modal */
.tcb-demo {
	width: min(1200px, 96vw);
	max-width: none;
	height: min(820px, 92vh);
	padding: 0;
	border: 1px solid var(--wp--preset--color--line, #2a2a36);
	border-radius: 18px;
	background: #0b0b0f;
	color: #f4f4f7;
	overflow: hidden;
}

.tcb-demo::backdrop {
	background: rgba(4, 4, 6, 0.86);
	backdrop-filter: blur(6px);
}

.tcb-demo[open] {
	display: flex;
	flex-direction: column;
}

.tcb-demo__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	background: #111117;
	border-bottom: 1px solid #23232e;
}

.tcb-demo__live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #8ef0a8;
	white-space: nowrap;
}

.tcb-demo__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ade80;
	box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
	animation: tcb-pulse 2s infinite;
}

@keyframes tcb-pulse {
	50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

.tcb-demo__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #f4f4f7;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tcb-demo__timer {
	margin: 0;
	font-variant-numeric: tabular-nums;
	font-size: 14px;
	color: #a0a0ae;
	background: #1a1a22;
	padding: 4px 10px;
	border-radius: 999px;
}

.tcb-demo__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid #2a2a36;
	border-radius: 10px;
	background: transparent;
	color: #f4f4f7;
	cursor: pointer;
}

.tcb-demo__close:hover {
	background: #1f1f29;
}

.tcb-demo__frame {
	position: relative;
	flex: 1;
	background: #000;
}

.tcb-demo__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tcb-demo__loading {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	background: #0b0b0f;
	color: #a0a0ae;
	font-size: 14px;
}

.tcb-demo__loading[hidden] {
	display: none;
}

.tcb-demo__spinner {
	width: 34px;
	height: 34px;
	border: 3px solid #23232e;
	border-top-color: #4ade80;
	border-radius: 50%;
	animation: tcb-spin 0.9s linear infinite;
}

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

.tcb-demo__foot {
	display: flex;
	align-items: center;
	gap: 16px;
	justify-content: space-between;
	padding: 12px 16px;
	background: #111117;
	border-top: 1px solid #23232e;
}

.tcb-demo__check {
	margin: 0;
	font-size: 13px;
	color: #f5c451;
	flex: 1;
}

.tcb-demo__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

@media (max-width: 640px) {
	.tcb-demo {
		width: 100vw;
		height: 100dvh;
		border-radius: 0;
		border: 0;
	}

	.tcb-demo__bar {
		gap: 10px;
		padding: 10px 12px;
	}

	.tcb-demo__live {
		font-size: 10px;
	}

	.tcb-demo__title {
		display: none;
	}

	.tcb-demo__foot {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
}
