/* =========================================================================
   Darkframe Onboarding Engine — Terminal skin: crt-green
   =========================================================================
   Full-viewport terminal overlay, CRT phosphor-green on near-black.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Terminal overlay
   ------------------------------------------------------------------------- */
#dfoe-terminal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #000;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transition: opacity 300ms ease;
	pointer-events: none;
	font-family: var(--df-font-mono, 'Courier New', monospace);
}

#dfoe-terminal-overlay.dfoe-is-open {
	opacity: 1;
	pointer-events: auto;
}

/* CRT scanline effect */
#dfoe-terminal-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 1px,
		rgba(0, 0, 0, 0.25) 1px,
		rgba(0, 0, 0, 0.25) 2px
	);
	pointer-events: none;
	z-index: 1;
}

/* CRT vignette */
#dfoe-terminal-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.7) 100%);
	pointer-events: none;
	z-index: 2;
}

/* -------------------------------------------------------------------------
   Terminal chrome
   ------------------------------------------------------------------------- */
.dfoe-terminal-bar {
	display: flex;
	align-items: center;
	padding: 6px 14px;
	border-bottom: 1px solid #0a2a0a;
	flex-shrink: 0;
	position: relative;
	z-index: 3;
}

.dfoe-terminal-bar-title {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #005500;
	flex: 1;
}

.dfoe-terminal-bar-status {
	font-size: 10px;
	color: #003300;
	letter-spacing: 0.06em;
}

/* -------------------------------------------------------------------------
   Output area
   ------------------------------------------------------------------------- */
.dfoe-terminal-output {
	flex: 1;
	overflow-y: auto;
	padding: 18px 24px 12px;
	position: relative;
	z-index: 3;
	scroll-behavior: smooth;
}

/* Hide scrollbar but keep scrolling */
.dfoe-terminal-output::-webkit-scrollbar { width: 4px; }
.dfoe-terminal-output::-webkit-scrollbar-track { background: transparent; }
.dfoe-terminal-output::-webkit-scrollbar-thumb { background: #002200; }

.dfoe-terminal-line {
	display: block;
	font-size: 13px;
	line-height: 1.55;
	color: #00cc33;
	white-space: pre-wrap;
	word-break: break-word;
	margin-bottom: 1px;
	text-shadow: 0 0 4px rgba(0, 200, 50, 0.4);
}

.dfoe-terminal-line--dim {
	color: #004400;
}

.dfoe-terminal-line--bright {
	color: #00ff41;
	text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.dfoe-terminal-line--error {
	color: #ff3333;
	text-shadow: 0 0 4px rgba(255, 50, 50, 0.4);
}

.dfoe-terminal-line--prompt::before {
	content: '> ';
	color: #00ff41;
}

/* Block cursor on last line */
.dfoe-terminal-cursor {
	display: inline-block;
	width: 9px;
	height: 1em;
	background: #00ff41;
	vertical-align: text-bottom;
	animation: dfoe-crt-blink 1s step-end infinite;
	box-shadow: 0 0 6px rgba(0, 255, 65, 0.8);
}

@keyframes dfoe-crt-blink {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0; }
}

/* -------------------------------------------------------------------------
   Input area
   ------------------------------------------------------------------------- */
.dfoe-terminal-input-row {
	display: flex;
	align-items: center;
	padding: 8px 24px 14px;
	border-top: 1px solid #0a2a0a;
	flex-shrink: 0;
	position: relative;
	z-index: 3;
	gap: 6px;
}

.dfoe-terminal-prompt-glyph {
	color: #00ff41;
	font-size: 13px;
	flex-shrink: 0;
	text-shadow: 0 0 4px rgba(0, 255, 65, 0.6);
}

.dfoe-terminal-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	font-family: var(--df-font-mono, monospace);
	font-size: 13px;
	color: #00ff41;
	caret-color: #00ff41;
	text-shadow: 0 0 4px rgba(0, 255, 65, 0.4);
}

.dfoe-terminal-input::placeholder {
	color: #003300;
}

/* Password masking — show dots as green squares */
.dfoe-terminal-input[type="password"] {
	letter-spacing: 0.15em;
}

/* Hidden until needed */
.dfoe-terminal-input-row.is-hidden {
	display: none;
}

/* -------------------------------------------------------------------------
   Audio indicator (voice note moment)
   ------------------------------------------------------------------------- */
.dfoe-terminal-audio-bar {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 6px 24px;
	border-top: 1px solid #0a2a0a;
	flex-shrink: 0;
	position: relative;
	z-index: 3;
}

.dfoe-terminal-audio-bar.is-visible {
	display: flex;
}

.dfoe-terminal-audio-label {
	font-size: 11px;
	color: #00aa22;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	animation: dfoe-pulse 1.4s ease-in-out infinite;
}

@keyframes dfoe-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: 0.4; }
}

/* -------------------------------------------------------------------------
   Processing state
   ------------------------------------------------------------------------- */
.dfoe-terminal-processing {
	display: none;
	font-size: 11px;
	color: #005500;
	padding: 0 24px 10px;
	letter-spacing: 0.06em;
	position: relative;
	z-index: 3;
}

.dfoe-terminal-processing.is-visible {
	display: block;
}
