/* ==========================================================================
   AP Live Canvas Hash — BEM, ap- prefix, Dark IT theme
   ========================================================================== */

.ap-canvas-hash {
	--ap-lch-bg: rgba(28, 28, 32, 0.85);
	--ap-lch-border: rgba(255, 255, 255, 0.08);
	--ap-lch-text: #e4e4e7;
	--ap-lch-muted: #a1a1aa;
	--ap-lch-accent: #22d3ee;
	--ap-lch-glow: rgba(34, 211, 238, 0.35);
	--ap-lch-hash: #a78bfa;
	--ap-lch-radius: 12px;
	--ap-lch-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	--ap-lch-transition: 0.25s ease;

	max-width: 480px;
	margin: 1.5rem auto;
	font-family: system-ui, -apple-system, sans-serif;
	color: var(--ap-lch-text);
}

.ap-canvas-hash__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	padding: 1.5rem;
	background: var(--ap-lch-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--ap-lch-border);
	border-radius: var(--ap-lch-radius);
	box-shadow: var(--ap-lch-shadow);
}

.ap-canvas-hash__canvas {
	position: absolute;
	left: -9999px;
	width: 200px;
	height: 80px;
	visibility: hidden;
}

.ap-canvas-hash__btn {
	padding: 0.625rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ap-lch-bg);
	background: var(--ap-lch-accent);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background var(--ap-lch-transition), box-shadow var(--ap-lch-transition), transform var(--ap-lch-transition);
}

.ap-canvas-hash__btn:hover {
	background: #67e8f9;
	box-shadow: 0 0 20px var(--ap-lch-glow);
}

.ap-canvas-hash__btn:active {
	transform: scale(0.98);
}

.ap-canvas-hash__btn:focus-visible {
	outline: 2px solid var(--ap-lch-accent);
	outline-offset: 2px;
}

.ap-canvas-hash__results {
	width: 100%;
	padding: 1rem 1.25rem;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--ap-lch-border);
	border-radius: 8px;
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity var(--ap-lch-transition), transform var(--ap-lch-transition);
}

.ap-canvas-hash__results.is-visible {
	opacity: 1;
	transform: translateY(0);
	animation: ap-canvas-hash-reveal 0.4s ease forwards;
}

@keyframes ap-canvas-hash-reveal {
	0% {
		opacity: 0;
		transform: translateY(-8px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

.ap-canvas-hash__hash {
	display: block;
	font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ap-lch-hash);
	text-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
	letter-spacing: 0.05em;
	word-break: break-all;
	margin-bottom: 0.75rem;
}

.ap-canvas-hash__warning {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ap-lch-muted);
}
