/* =========================================================================
   Darkframe Onboarding Engine — Popup skin: hacker-intercept
   =========================================================================
   Dark overlay + narrow centred panel, CRT-green accents, monospace text.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Popup container
   ------------------------------------------------------------------------- */
#dfoe-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 200ms ease;
	pointer-events: none;
}

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

#dfoe-popup-panel {
	position: relative;
	width: min(520px, 92vw);
	background: var(--df-bg-surface, #0f0f0f);
	border: 1px solid var(--df-border-mid, #2a2a2a);
	border-radius: var(--df-radius, 2px);
	padding: 28px 32px;
	box-shadow: 0 0 40px rgba(0, 255, 65, 0.06);
	color: var(--df-text, #c8c8c8);
	font-family: var(--df-font-mono, monospace);
}

/* Scanline texture overlay */
#dfoe-popup-panel::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 2px,
		rgba(0, 0, 0, 0.06) 2px,
		rgba(0, 0, 0, 0.06) 4px
	);
	pointer-events: none;
	border-radius: inherit;
}

/* -------------------------------------------------------------------------
   Popup header
   ------------------------------------------------------------------------- */
.dfoe-popup-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 20px;
}

.dfoe-popup-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--df-accent, #00ff41);
	margin: 0;
}

.dfoe-popup-close-btn {
	background: none;
	border: none;
	color: var(--df-text-dim, #666);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 0 16px;
	transition: color 120ms;
}

.dfoe-popup-close-btn:hover {
	color: var(--df-text, #c8c8c8);
}

/* -------------------------------------------------------------------------
   Message display area
   ------------------------------------------------------------------------- */
.dfoe-popup-messages {
	min-height: 60px;
	margin-bottom: 24px;
}

.dfoe-popup-line {
	font-size: 13px;
	line-height: 1.6;
	color: var(--df-text, #c8c8c8);
	margin: 0 0 6px;
}

.dfoe-popup-line--accent {
	color: var(--df-accent, #00ff41);
}

.dfoe-popup-line--dim {
	color: var(--df-text-dim, #666);
	font-size: 11px;
}

/* Typing cursor */
.dfoe-popup-cursor {
	display: inline-block;
	width: 8px;
	height: 14px;
	background: var(--df-accent, #00ff41);
	vertical-align: middle;
	animation: dfoe-blink 1s step-end infinite;
}

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

/* -------------------------------------------------------------------------
   Popup step body (form fields, input prompts)
   ------------------------------------------------------------------------- */
.dfoe-popup-body {
	margin-bottom: 20px;
}

.dfoe-popup-field-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--df-text-dim, #666);
	margin-bottom: 5px;
}

.dfoe-popup-field {
	display: block;
	width: 100%;
	padding: 8px 10px;
	font-family: var(--df-font-mono, monospace);
	font-size: 13px;
	background: var(--df-bg, #080808);
	border: 1px solid var(--df-border-mid, #2a2a2a);
	border-radius: var(--df-radius, 2px);
	color: var(--df-text-bright, #e8e8e8);
	outline: none;
	box-sizing: border-box;
	margin-bottom: 12px;
	transition: border-color 120ms;
}

.dfoe-popup-field:focus {
	border-color: var(--df-accent, #00ff41);
}

.dfoe-popup-error {
	font-size: 11px;
	color: #ff5555;
	margin-bottom: 12px;
	display: none;
}

.dfoe-popup-error.is-visible {
	display: block;
}

/* -------------------------------------------------------------------------
   Popup footer / CTAs
   ------------------------------------------------------------------------- */
.dfoe-popup-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.dfoe-popup-cta {
	padding: 9px 22px;
	font-family: var(--df-font-mono, monospace);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 1px solid var(--df-accent, #00ff41);
	border-radius: var(--df-radius, 2px);
	background: transparent;
	color: var(--df-accent, #00ff41);
	cursor: pointer;
	transition: background 120ms, color 120ms;
}

.dfoe-popup-cta:hover,
.dfoe-popup-cta:focus {
	background: var(--df-accent, #00ff41);
	color: var(--df-bg, #080808);
	outline: none;
}

.dfoe-popup-cta:disabled {
	opacity: 0.4;
	pointer-events: none;
}

.dfoe-popup-dismiss {
	font-family: var(--df-font-mono, monospace);
	font-size: 11px;
	background: none;
	border: none;
	color: var(--df-text-dim, #666);
	cursor: pointer;
	text-decoration: underline;
	padding: 0;
	letter-spacing: 0.04em;
}

.dfoe-popup-dismiss:hover {
	color: var(--df-text, #c8c8c8);
}

/* Processing indicator */
.dfoe-popup-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid var(--df-border-mid, #2a2a2a);
	border-top-color: var(--df-accent, #00ff41);
	border-radius: 50%;
	animation: dfoe-spin 0.6s linear infinite;
	margin-left: auto;
}

.dfoe-popup-spinner.is-visible {
	display: block;
}

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

/* =========================================================================
   Skin: win95 — Windows 95 dialog
   ========================================================================= */
.dfoe-popup-skin-win95 { background: rgba(0,0,128,0.4); }
.dfoe-popup-skin-win95 #dfoe-popup-panel {
	background: #c0c0c0;
	border: none;
	border-radius: 0;
	box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf, 4px 4px 0 #000;
	font-family: 'MS Sans Serif', 'Segoe UI', Arial, sans-serif;
	color: #000;
	padding: 0;
	max-width: 420px;
}
.dfoe-popup-skin-win95 #dfoe-popup-panel::before { display: none; }
.dfoe-popup-skin-win95 .dfoe-popup-header {
	background: linear-gradient(to right, #000080, #1084d0);
	color: #fff;
	padding: 3px 4px;
	margin-bottom: 0;
}
.dfoe-popup-skin-win95 .dfoe-popup-title {
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	text-transform: none;
	letter-spacing: 0;
}
.dfoe-popup-skin-win95 .dfoe-popup-close-btn {
	background: #c0c0c0;
	border: none;
	box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
	color: #000;
	font-size: 11px;
	width: 16px;
	height: 14px;
	line-height: 1;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.dfoe-popup-skin-win95 .dfoe-popup-messages,
.dfoe-popup-skin-win95 .dfoe-popup-body { padding: 12px 16px 4px; }
.dfoe-popup-skin-win95 .dfoe-popup-line { font-size: 13px; color: #000; font-family: inherit; }
.dfoe-popup-skin-win95 .dfoe-popup-footer {
	padding: 8px 16px 12px;
	justify-content: center;
	gap: 8px;
}
.dfoe-popup-skin-win95 .dfoe-popup-cta,
.dfoe-popup-skin-win95 .dfoe-popup-dismiss {
	background: #c0c0c0;
	color: #000;
	border: none;
	box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
	font-family: inherit;
	font-size: 13px;
	padding: 4px 20px;
	border-radius: 0;
	letter-spacing: 0;
	text-transform: none;
	min-width: 80px;
}
.dfoe-popup-skin-win95 .dfoe-popup-cta:active,
.dfoe-popup-skin-win95 .dfoe-popup-dismiss:active {
	box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf;
}
.dfoe-popup-skin-win95 .dfoe-popup-field {
	background: #fff;
	border: 2px inset #808080;
	border-radius: 0;
	color: #000;
	font-family: inherit;
}
.dfoe-popup-skin-win95 .dfoe-popup-error { color: #cc0000; font-size: 12px; }

/* =========================================================================
   Skin: mainframe — Modern Mainframe
   ========================================================================= */
.dfoe-popup-skin-mainframe #dfoe-popup-panel {
	--df-bg-surface: #0a0e14;
	--df-border-mid: #1e2d3d;
	--df-accent:     #4fc3f7;
	--df-text:       #8baec4;
	--df-text-dim:   #3d5a72;
	background: var(--df-bg-surface);
	border: 1px solid var(--df-border-mid);
	border-radius: 0;
	box-shadow: 0 0 0 1px #4fc3f720, 0 20px 60px rgba(0,0,0,0.8);
	font-family: 'Courier New', monospace;
	max-width: 560px;
	padding: 0;
}
.dfoe-popup-skin-mainframe #dfoe-popup-panel::before { display: none; }
.dfoe-popup-skin-mainframe .dfoe-popup-header {
	background: #0d1520;
	border-bottom: 1px solid #1e2d3d;
	padding: 10px 20px;
	margin-bottom: 0;
}
.dfoe-popup-skin-mainframe .dfoe-popup-title {
	font-size: 11px;
	letter-spacing: 0.2em;
	color: var(--df-accent);
}
.dfoe-popup-skin-mainframe .dfoe-popup-messages { padding: 20px 20px 0; }
.dfoe-popup-skin-mainframe .dfoe-popup-body { padding: 0 20px; }
.dfoe-popup-skin-mainframe .dfoe-popup-footer { padding: 16px 20px 20px; border-top: 1px solid #1e2d3d; }
.dfoe-popup-skin-mainframe .dfoe-popup-line { font-size: 12px; color: #8baec4; }
.dfoe-popup-skin-mainframe .dfoe-popup-cta {
	background: transparent;
	border: 1px solid #4fc3f7;
	color: #4fc3f7;
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.15em;
	padding: 8px 24px;
	border-radius: 0;
}
.dfoe-popup-skin-mainframe .dfoe-popup-cta:hover { background: #4fc3f715; }
.dfoe-popup-skin-mainframe .dfoe-popup-dismiss { color: #3d5a72; border-color: #1e2d3d; }
.dfoe-popup-skin-mainframe .dfoe-popup-field {
	background: #060a0f;
	border: 1px solid #1e2d3d;
	border-radius: 0;
	color: #4fc3f7;
	font-family: inherit;
}

/* =========================================================================
   Skin: classified — Classified Dossier
   ========================================================================= */
.dfoe-popup-skin-classified { background: rgba(0,0,0,0.7); }
.dfoe-popup-skin-classified #dfoe-popup-panel {
	--df-bg-surface: #f5f0e8;
	--df-border-mid: #c8b89a;
	--df-accent:     #cc0000;
	--df-text:       #1a1a1a;
	--df-text-dim:   #666;
	background: var(--df-bg-surface);
	border: 1px solid var(--df-border-mid);
	border-radius: 2px;
	box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 0 80px rgba(0,0,0,0.04);
	font-family: 'Courier New', monospace;
	color: var(--df-text);
}
.dfoe-popup-skin-classified #dfoe-popup-panel::before {
	background: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0,0,0,0.015) 4px, rgba(0,0,0,0.015) 8px);
}
.dfoe-popup-skin-classified .dfoe-popup-header { border-bottom: 2px solid #c8b89a; }
.dfoe-popup-skin-classified .dfoe-popup-title {
	color: #cc0000;
	font-size: 11px;
	letter-spacing: 0.25em;
}
.dfoe-popup-skin-classified .dfoe-popup-close-btn { color: #888; }
.dfoe-popup-skin-classified .dfoe-popup-close-btn:hover { color: #cc0000; }
.dfoe-popup-skin-classified .dfoe-popup-line {
	font-size: 13px;
	color: #1a1a1a;
	border-bottom: 1px solid rgba(0,0,0,0.06);
	padding-bottom: 8px;
}
.dfoe-popup-skin-classified .dfoe-popup-cta {
	background: #cc0000;
	color: #fff;
	border: none;
	border-radius: 1px;
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.2em;
}
.dfoe-popup-skin-classified .dfoe-popup-cta:hover { background: #aa0000; }
.dfoe-popup-skin-classified .dfoe-popup-dismiss { color: #888; border-color: #c8b89a; }
.dfoe-popup-skin-classified .dfoe-popup-field {
	background: #fff;
	border: 1px solid #c8b89a;
	border-radius: 0;
	color: #1a1a1a;
	font-family: inherit;
}
.dfoe-popup-skin-classified .dfoe-popup-error { color: #cc0000; }

/* =========================================================================
   Skin: neon-cyber — Neon Cyber
   ========================================================================= */
.dfoe-popup-skin-neon-cyber { background: rgba(0,0,0,0.92); }
.dfoe-popup-skin-neon-cyber #dfoe-popup-panel {
	--df-bg-surface: #0d0015;
	--df-border-mid: #3d0066;
	--df-accent:     #ff00cc;
	--df-text:       #cc88ff;
	--df-text-dim:   #663399;
	background: var(--df-bg-surface);
	border: 1px solid #ff00cc44;
	border-radius: 4px;
	box-shadow: 0 0 30px #ff00cc22, 0 0 60px #00ccff11, inset 0 0 30px rgba(255,0,204,0.04);
	font-family: 'Courier New', monospace;
}
.dfoe-popup-skin-neon-cyber #dfoe-popup-panel::before {
	background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,0,204,0.03) 3px, rgba(255,0,204,0.03) 6px);
}
.dfoe-popup-skin-neon-cyber .dfoe-popup-title {
	color: #ff00cc;
	text-shadow: 0 0 10px #ff00cc88;
	font-size: 12px;
	letter-spacing: 0.15em;
}
.dfoe-popup-skin-neon-cyber .dfoe-popup-close-btn { color: #663399; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-close-btn:hover { color: #ff00cc; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-line { color: #cc88ff; font-size: 13px; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-line--accent { color: #00ccff; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-cta {
	background: linear-gradient(135deg, #ff00cc, #9900ff);
	border: none;
	color: #fff;
	font-family: inherit;
	font-size: 12px;
	letter-spacing: 0.1em;
	box-shadow: 0 0 16px #ff00cc66;
}
.dfoe-popup-skin-neon-cyber .dfoe-popup-cta:hover { box-shadow: 0 0 24px #ff00ccaa; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-dismiss { color: #663399; border-color: #3d0066; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-field {
	background: #0a0010;
	border: 1px solid #ff00cc44;
	border-radius: 2px;
	color: #ff00cc;
	font-family: inherit;
}
.dfoe-popup-skin-neon-cyber .dfoe-popup-field:focus { border-color: #ff00cc; box-shadow: 0 0 8px #ff00cc44; }
.dfoe-popup-skin-neon-cyber .dfoe-popup-error { color: #ff4466; }

/* =========================================================================
   Popup audio player
   =========================================================================
   Uses CSS custom properties so every popup skin automatically gets the
   right colours. Skin-specific overrides follow below.
   ========================================================================= */
.dfoe-popup-audio-player {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0 4px;
}

.dfoe-popup-audio-play {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	background: transparent;
	border: 1px solid var(--df-accent, #00ff41);
	border-radius: var(--df-radius, 2px);
	color: var(--df-accent, #00ff41);
	font-family: var(--df-font-mono, monospace);
	font-size: 11px;
	line-height: 1;
	cursor: pointer;
	transition: background 120ms, color 120ms;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dfoe-popup-audio-play:hover:not(:disabled) {
	background: var(--df-accent, #00ff41);
	color: var(--df-bg, #080808);
}

.dfoe-popup-audio-play:disabled {
	opacity: 0.45;
	cursor: default;
}

.dfoe-popup-audio-track {
	flex: 1;
	height: 4px;
	background: var(--df-border-mid, #2a2a2a);
	border-radius: 2px;
	overflow: hidden;
	cursor: pointer;
}

.dfoe-popup-audio-fill {
	height: 100%;
	background: var(--df-accent, #00ff41);
	border-radius: inherit;
	transition: width 0.25s linear;
}

.dfoe-popup-audio-time {
	flex-shrink: 0;
	font-size: 11px;
	font-family: var(--df-font-mono, monospace);
	color: var(--df-text-dim, #666);
	min-width: 72px;
	text-align: right;
	letter-spacing: 0.04em;
}

/* win95 — bevel button, solid progress bar */
.dfoe-popup-skin-win95 .dfoe-popup-audio-play {
	background: #c0c0c0;
	border: none;
	box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
	color: #000;
	font-family: 'MS Sans Serif', 'Segoe UI', Arial, sans-serif;
	font-size: 13px;
	width: 32px;
	height: 24px;
	border-radius: 0;
}
.dfoe-popup-skin-win95 .dfoe-popup-audio-play:active:not(:disabled) {
	box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf;
}
.dfoe-popup-skin-win95 .dfoe-popup-audio-play:hover:not(:disabled) {
	background: #c0c0c0;
	color: #000;
}
.dfoe-popup-skin-win95 .dfoe-popup-audio-track {
	background: #808080;
	height: 6px;
	border-radius: 0;
}
.dfoe-popup-skin-win95 .dfoe-popup-audio-fill {
	background: #000080;
	border-radius: 0;
}
.dfoe-popup-skin-win95 .dfoe-popup-audio-time {
	color: #000;
	font-family: 'MS Sans Serif', 'Segoe UI', Arial, sans-serif;
	font-size: 11px;
}

/* classified — ink-red accent on paper background */
.dfoe-popup-skin-classified .dfoe-popup-audio-track {
	background: #d4c8b0;
	height: 3px;
}
.dfoe-popup-skin-classified .dfoe-popup-audio-fill {
	background: #cc0000;
}
.dfoe-popup-skin-classified .dfoe-popup-audio-time {
	color: #888;
}

/* =========================================================================
   Terminal: ASCII logo line
   ========================================================================= */
.dfoe-terminal-line--logo {
	color: inherit;
	opacity: 0.9;
	white-space: pre;
	font-size: 0.85em;
	line-height: 1.2;
}
