/* IO Conditional Register — frontend styles */

/* Top bar: in document flow (pushes site header down, no overlay) */
.io-cr-header-bar {
	position: relative;
	width: 100%;
	z-index: 100;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 0.8125rem;
	line-height: 1.3;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
	border-bottom: 2px solid #f97316;
}

.io-cr-header-bar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0.5rem 0.75rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.45rem 0.9rem;
}

.io-cr-header-bar--progress {
	background: #0a0a0a;
	color: #fdba74;
}

.io-cr-header-bar--success {
	background: #0a0a0a;
	color: #4ade80;
	border-bottom-color: #4ade80;
}

.io-cr-header-bar__icon {
	flex-shrink: 0;
	font-size: 0.875rem;
	font-weight: 700;
	color: #f97316;
	line-height: 1;
}

.io-cr-header-bar--success .io-cr-header-bar__icon {
	color: #4ade80;
}

.io-cr-header-bar__text {
	flex: 1 1 auto;
	text-align: center;
	font-weight: 600;
	color: #fb923c;
	letter-spacing: 0.01em;
	min-width: 0;
}

.io-cr-header-bar--success .io-cr-header-bar__text {
	color: #86efac;
}

.io-cr-header-bar__timer-slot {
	flex-shrink: 0;
	min-width: 72px;
}

.io-cr-header-timer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 0.2rem 0.65rem;
	border-radius: 8px;
	border: 1px solid #f97316;
	background: rgba(249, 115, 22, 0.08);
	line-height: 1.15;
}

.io-cr-header-timer--active {
	border-color: #f97316;
}

.io-cr-header-timer--done {
	border-color: #4ade80;
	background: rgba(74, 222, 128, 0.08);
}

.io-cr-header-timer--error {
	border-color: #ef4444;
	background: rgba(239, 68, 68, 0.08);
}

.io-cr-header-timer__clock {
	font-size: 1rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: #f97316;
}

.io-cr-header-timer--done .io-cr-header-timer__clock {
	color: #4ade80;
	font-size: 0.875rem;
}

.io-cr-header-timer--error .io-cr-header-timer__clock {
	color: #fca5a5;
}

.io-cr-header-timer__label {
	font-size: 0.625rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fdba74;
	white-space: nowrap;
}

.io-cr-header-timer--done .io-cr-header-timer__label {
	color: #86efac;
}

.io-cr-header-bar__cta {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	background: #4ade80;
	color: #0a0a0a;
	border: 1px solid #4ade80;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.io-cr-header-bar__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(74, 222, 128, 0.35);
	color: #0a0a0a;
}

/* Register panel — black + orange theme */
.io-cr-panel {
	margin: 0 0 1.75rem;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.io-cr-panel__inner {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
}

.io-cr-panel__inner--progress {
	background: #0a0a0a;
	border: 2px solid #f97316;
}

.io-cr-panel__inner--success {
	background: #0a0a0a;
	border: 2px solid #4ade80;
	animation: io-cr-success-pulse 2s ease-in-out infinite;
}

@keyframes io-cr-success-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.35);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
	}
}

.io-cr-panel__icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #4ade80;
	color: #0a0a0a;
	font-size: 1.5rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.io-cr-panel__stat {
	flex-shrink: 0;
	text-align: center;
	min-width: 72px;
}

.io-cr-panel__stat-number {
	display: block;
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: #f97316;
}

.io-cr-panel__stat-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fb923c;
	margin-top: 0.25rem;
}

.io-cr-panel__title {
	margin: 0 0 0.35rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: #fdba74;
}

.io-cr-panel__text {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	color: #fb923c;
	line-height: 1.5;
}

.io-cr-panel__inner--success .io-cr-panel__title {
	color: #86efac;
	font-size: 1.25rem;
}

.io-cr-panel__inner--success .io-cr-panel__text {
	color: #4ade80;
	font-size: 1.05rem;
}

.io-cr-panel__bar {
	height: 8px;
	background: rgba(249, 115, 22, 0.2);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 0.75rem;
}

.io-cr-panel__bar-fill {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #fb923c, #f97316);
	border-radius: 999px;
	transition: width 0.4s ease;
}

.io-cr-panel__hint {
	margin: 0;
	font-size: 0.875rem;
	color: #fdba74;
	line-height: 1.45;
	opacity: 0.85;
}

/* Locked register form */
.io-cr-form--locked {
	opacity: 0.45;
	pointer-events: none;
	filter: grayscale(0.2);
	position: relative;
}

@media (max-width: 640px) {
	.io-cr-header-bar__inner {
		flex-wrap: wrap;
		padding: 0.4rem 0.65rem;
		gap: 0.35rem 0.5rem;
	}

	.io-cr-header-bar__text {
		flex: 1 1 100%;
		order: 2;
		font-size: 0.75rem;
	}

	.io-cr-header-bar__icon {
		order: 1;
	}

	.io-cr-header-bar__timer-slot {
		order: 1;
		margin-left: auto;
	}

	.io-cr-panel__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.io-cr-panel__stat {
		display: flex;
		align-items: baseline;
		gap: 0.5rem;
		min-width: 0;
	}

	.io-cr-panel__stat-number {
		font-size: 1.75rem;
	}

	.io-cr-panel__stat-label {
		margin-top: 0;
	}
}
