/* ==========================================
   1. GLOBALE STILARTER & BASE (SaaS Look)
   ========================================== */
body {
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #1a1b26; /* Tokyo Night Baggrund */
	color: #fff;
	font-family: 'Poppins', sans-serif;
}

input, select, textarea { font-family: 'Poppins', sans-serif; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #16161e; }
::-webkit-scrollbar-thumb { background: #2d2b3b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #414868; }

/* ==========================================
   2. GAMLE ADMIN/GENERELLE ELEMENTER
   ========================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

.card { 
	background: #16161e; padding: 25px; border-radius: 12px; text-decoration: none; color: white; 
	display: block; transition: all 0.3s ease; border: 1px solid #2d2b3b; border-top: 4px solid #555; 
	box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.card:hover { transform: translateY(-5px); background: #1a1a24; border-color: #414868; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
.card.blue { border-top-color: #3b82f6; }
.card.green { border-top-color: #10b981; }
.card.red { border-top-color: #f43f5e; }

.box { background: #16161e; padding: 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid #2d2b3b; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #2d2b3b; }
th { color: #a9b1d6; font-size: 0.85em; text-transform: uppercase; letter-spacing: 1px; }

/* ==========================================
   3. SNOW STUDIO: HOVED-LAYOUT
   ========================================== */
.main-wrapper { 
	height: 100vh; 
	width: 100vw; 
	display: flex; 
	flex-direction: column; 
}

body.editor-page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	overflow: hidden;
}
body.editor-page .main-wrapper {
	flex: 1;
	min-height: 0;
	height: auto;
	width: 100%;
}
body.editor-page .ide-wrapper {
	flex: 1;
	min-height: 0;
	height: 100%;
}

.ide-wrapper {
	display: flex;
	height: 100vh; 
	width: 100%;
	margin: 0;
	background: #1a1b26; 
}

/* ==========================================
   4. SIDEBAR (VÆRKTØJER & FORMS)
   ========================================== */
.ide-sidebar {
	width: 280px; /* RETTET FRA 380px */
	flex: 0 0 280px; /* RETTET FRA 380px */
	background: #16161e; 
	border-right: 1px solid #292e42; 
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	padding-bottom: 40px;
	z-index: 10;
}
.sidebar-header {
	padding: 16px 18px 18px 18px;
	border-bottom: 1px solid var(--snow-border, #292e42);
}
.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--snow-border, #292e42);
}
.sidebar-brand img {
	width: 26px;
	height: 26px;
	border-radius: 7px;
	flex-shrink: 0;
}
.sidebar-brand-title {
	font-size: 1.05em;
	font-weight: 800;
	color: var(--snow-text, #fff);
	letter-spacing: -0.2px;
	line-height: 1.1;
}
.sidebar-brand-badge {
	margin-left: auto;
	font-size: 0.65em;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--snow-accent-soft, rgba(168,85,247,0.16));
	color: var(--snow-accent, #a855f7);
	border: 1px solid var(--snow-accent, rgba(168,85,247,0.35));
}
.sidebar-header h3 { margin: 0; color: var(--snow-text, #fff); font-size: 1.1em; }
.sidebar-header p { margin: 5px 0 6px 0; color: var(--snow-text-muted, #a9b1d6); font-size: 0.78em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.global-version-select,
input[type="text"].global-version-select,
select.global-version-select {
	width: 100%;
	background: var(--snow-bg-input, #0a0a0f);
	border: 1px solid var(--snow-border, #292e42);
	color: var(--snow-text, #fff);
	padding: 9px 11px;
	border-radius: 8px;
	font-size: 0.86em;
	outline: none;
	font-weight: 600;
	box-sizing: border-box;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
select.global-version-select { cursor: pointer; font-family: 'Poppins', sans-serif; }
.global-version-select:focus,
input[type="text"].global-version-select:focus,
select.global-version-select:focus {
	border-color: var(--snow-accent, #a855f7);
	box-shadow: 0 0 0 2px var(--snow-accent-soft, rgba(168,85,247,0.18));
}

.ui-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: middle;
}

.generator-menu { padding: 15px; display: flex; flex-direction: column; gap: 10px; }

.gen-btn {
	background: #1a1b26; 
	border: 1px solid #292e42; 
	color: #a9b1d6; 
	padding: 10px 12px; /* RETTET: Lidt mindre luft indeni (var 12px 15px) */
	border-radius: 8px; 
	cursor: pointer; 
	text-align: left; 
	font-weight: bold; 
	font-size: 0.85em; /* Lidt mindre tekst */
	transition: all 0.2s ease; 
	display: flex; 
	align-items: center; 
	gap: 8px; /* Mindre mellemrum mellem ikon og tekst */
}
.gen-btn:hover { background: #24283b; color: white; border-color: #a855f7; }
.gen-btn.ai-btn { background: rgba(16, 185, 129, 0.05); border-color: #10b981; color: #10b981; }
.gen-btn.ai-btn:hover { background: #10b981; color: white; }

.gen-form { display: none; padding: 20px; border-top: 1px solid #292e42; flex-grow: 1; }
.gen-form.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.form-group { margin-bottom: 15px; }
.form-row { display: flex; gap: 10px; margin-bottom: 15px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
label { display: flex; align-items: center; color: #a9b1d6; font-size: 0.75em; font-weight: bold; text-transform: uppercase; margin-bottom: 6px; letter-spacing: 1px; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
	width: 100%; background: #0a0a0f; border: 1px solid #292e42; color: white; padding: 10px;
	border-radius: 8px; font-size: 0.9em; outline: none; box-sizing: border-box; font-family: monospace; transition: 0.2s ease;
}
input:focus, textarea:focus, select:focus { border-color: #a855f7; }

.btn-insert {
	background: #a855f7; color: white; border: none; padding: 12px; border-radius: 8px;
	font-weight: bold; cursor: pointer; width: 100%; margin-top: 10px; transition: 0.2s ease;
}
.btn-insert:hover { background: #9333ea; }
.btn-insert:disabled { background: #565f89; cursor: not-allowed; }

.tooltip {
	display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
	background: #2d2b3b; color: #a9b1d6; border-radius: 50%; font-size: 0.7em; margin-left: 6px; cursor: help; position: relative; font-family: sans-serif;
}
.tooltip .tooltip-text {
	visibility: hidden; width: 250px; background-color: #1a1a24; color: #fff; text-align: center; border-radius: 8px;
	padding: 12px; position: absolute; z-index: 100; bottom: 150%; left: 50%; margin-left: -125px; border: 1px solid #a855f7;
	opacity: 0; transition: opacity 0.3s; font-size: 1.1em; font-weight: normal; text-transform: none; pointer-events: none; line-height: 1.4;
}
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* ==========================================
   5. EDITOR OMRÅDE (HØJRE SIDE)
   ========================================== */
.ide-main {
	flex-grow: 1; display: flex; flex-direction: column; position: relative; min-width: 0; min-height: 0; overflow: hidden;
}

/* --- TOPBAR & TABS --- */
.ide-topbar {
	background: #16161e; 
	border-bottom: 1px solid #292e42;
	display: flex;
	justify-content: space-between;
	align-items: center !important;
	height: 48px !important; /* Låst højde for hele toppen */
	padding: 0;
	z-index: 5;
}

.ide-tabs-wrapper { display: flex; flex-grow: 1; overflow: hidden; height: 100% !important; background: #121219; }
.ide-tabs-bar { display: flex; overflow-x: auto; flex-grow: 1; height: 100%; }
.ide-tabs-bar::-webkit-scrollbar { height: 2px; }
.ide-tabs-bar::-webkit-scrollbar-thumb { background: #a855f7; }

.ide-tab {
	height: 100% !important;
	padding: 0 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #16161e; /* Mørkere end editoren */
	border-right: 1px solid #292e42;
	color: #565f89;
	font-size: 0.9em;
	font-family: monospace;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 120px;
	max-width: 200px;
	white-space: nowrap;
	box-sizing: border-box;
}
.ide-tab:hover { background: #1a1b26; color: #a9b1d6; }

/* DEN AKTIVE FANE: Smelter sammen med editorens farve (#1a1b26) */
.ide-tab.active {
	background: #1a1b26; 
	color: white;
	box-shadow: inset 0 3px 0 #a855f7; /* Streg i toppen i stedet for bunden */
	border-bottom: 1px solid #1a1b26; /* Fjerner kanten ned mod koden */
}
.ide-tab.dirty .tab-name::after { content: '●'; color: #f59e0b; margin-left: 6px; font-size: 1.2em; line-height: 0.5; vertical-align: middle; }

.close-tab { color: #f43f5e; font-weight: bold; font-size: 1.2em; cursor: pointer; margin-left: auto; padding-left: 5px; opacity: 0.7; }
.close-tab:hover { color: #e11d48; opacity: 1; }

.add-tab-btn {
	height: 48px !important; width: 48px !important; margin: 0 !important; border-radius: 0 !important;
	background: #16161e; border: none; border-left: 1px solid #292e42; border-right: 1px solid #292e42;
	color: #a9b1d6; font-size: 1.5em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; box-sizing: border-box;
}
.add-tab-btn:hover { background: #1a1b26; color: white; }

/* --- KNAPPER ØVERST TIL HØJRE (CENTRERET!) --- */
.ide-actions {
	display: flex !important;
	align-items: center !important; /* Dette er tricket der tvinger alt på midten! */
	height: 100% !important;
	gap: 8px !important; /* Styrer afstanden mellem knapper, INGEN MARGINS! */
	padding: 0 15px !important;
	background: transparent;
	box-sizing: border-box;
}

.dropdown-container {
	display: flex !important;
	align-items: center !important;
	height: 100% !important;
}

.btn-action {
	background: #1a1b26;
	border: 1px solid #292e42;
	color: white;
	height: 32px !important; /* Låst højde for alle knapper */
	padding: 0 14px !important;
	border-radius: 6px !important;
	cursor: pointer;
	font-size: 0.85em;
	font-weight: bold;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px;
	transition: all 0.2s ease;
	white-space: nowrap;
	box-sizing: border-box !important;
	margin: 0 !important; /* Ingen margins der ødelægger flexbox! */
}
.btn-action:hover { background: #24283b; border-color: #a855f7; }
.btn-action.save { background: rgba(16, 185, 129, 0.1); color: #10b981; border-color: #10b981; }
.btn-action.save:hover { background: #10b981; color: white; }
.btn-action.logout { 
	background: transparent; 
	color: #f43f5e; 
	border-color: #f43f5e; 
	text-decoration: none !important; /* NYT: Fjerner stregen */
}
.btn-action.logout:hover { 
	background: #f43f5e; 
	color: white; 
}

.icon-btn {
	background: #1a1b26;
	border: 1px solid #292e42;
	color: #a9b1d6;
	height: 32px !important;
	width: 32px !important;
	padding: 0 !important;
	border-radius: 6px !important;
	cursor: pointer;
	font-size: 1.1em;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.2s ease;
	flex-shrink: 0;
	box-sizing: border-box !important;
	margin: 0 !important;
}
.icon-btn:hover { background: #24283b; color: white; border-color: #a855f7; }

/* --- SØG & ERSTAT --- */
.search-replace-bar {
	display: none; background: #16161e; border-bottom: 1px solid #292e42; padding: 10px 15px;
	align-items: center; gap: 10px; animation: slideDown 0.2s ease-out; flex-wrap: nowrap;
}
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.search-replace-bar input[type="text"] { width: 200px; height: 34px; padding: 0 10px; font-size: 0.85em; border-radius: 6px; margin: 0; background: #0a0a0f; border: 1px solid #292e42; color: white; box-sizing: border-box; }
.sr-btn { background: #1a1b26; border: 1px solid #292e42; color: white; height: 34px; padding: 0 15px; border-radius: 6px; cursor: pointer; font-size: 0.85em; font-weight: bold; transition: 0.2s; margin: 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.sr-btn:hover { border-color: #a855f7; }
.sr-checkbox { display: flex; align-items: center; gap: 8px; color: #a9b1d6; font-size: 0.85em; cursor: pointer; font-weight: bold; height: 34px; margin: 0; }
.close-sr { background: transparent; border: none; color: #f43f5e; font-size: 1.4em; cursor: pointer; margin: 0 0 0 auto !important; font-weight: bold; padding: 0 !important; width: 30px !important; height: 30px !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 4px; }
.close-sr:hover { background: rgba(244, 63, 94, 0.1); }

/* --- CODEMIRROR CONTAINER --- */
.editor-container {
	flex-grow: 1; margin: 0; border: none; border-radius: 0;
	background: #1a1b26; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; box-shadow: none;
}

.CodeMirror {
	font-family: 'Consolas', 'Courier New', monospace; font-size: 14px;
	background: #1a1b26 !important; /* Ren Tokyo Night baggrund */
	color: #FFFFFF; height: 100% !important; width: 100% !important;
}

.CodeMirror-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.CodeMirror-scroll::-webkit-scrollbar-thumb { background: #292e42; border-radius: 6px; border: 3px solid #1a1b26; }
.CodeMirror-scroll::-webkit-scrollbar-thumb:hover { background: #414868; }

.CodeMirror-gutters { background: #16161e !important; border-right: 1px solid #292e42 !important; }
.CodeMirror-linenumber { color: #565f89; }
.CodeMirror-cursor { border-left: 2px solid #a855f7; }
.CodeMirror-selected { background: rgba(168, 85, 247, 0.3) !important; }

/* Folding & Hints */
.CodeMirror-foldmarker { color: #a855f7; text-shadow: none; font-family: monospace; padding: 0 4px; cursor: pointer; }
.CodeMirror-foldgutter { width: 16px; }
.CodeMirror-foldgutter-open:after { content: "▼"; color: #565f89; font-size: 0.8em; }
.CodeMirror-foldgutter-folded:after { content: "▶"; color: #a855f7; font-size: 0.8em; }

.CodeMirror-lint-tooltip { background: #16161e; border: 1px solid #f43f5e; color: white; font-family: 'Poppins', sans-serif; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.6); z-index: 100000; }
.CodeMirror-hints { background: #16161e; border: 1px solid #292e42; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.7); color: #a9b1d6; font-family: 'Consolas', monospace; z-index: 100000; padding: 5px 0; max-height: 250px; overflow-y: auto; }
.CodeMirror-hints::-webkit-scrollbar { width: 6px; }
.CodeMirror-hints::-webkit-scrollbar-thumb { background: #414868; border-radius: 3px; }
.CodeMirror-hint { padding: 8px 15px; border-radius: 0; color: #a9b1d6; font-size: 0.9em; line-height: 1.3; }
.CodeMirror-hint-active { background: rgba(168, 85, 247, 0.2); color: #fff; border-left: 2px solid #a855f7; }
.sk-hint-var { color: #38bdf8 !important; font-weight: bold; } 
.sk-hint-core { color: #f59e0b !important; font-weight: bold; } 

/* Hover Tooltip */
.sk-hover-tooltip { position: fixed; display: none; background: #16161e; border: 1px solid #a855f7; color: white; padding: 15px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); font-family: 'Poppins', sans-serif; z-index: 100001; pointer-events: none; max-width: 400px; line-height: 1.5; }
.sk-hover-tooltip code { color: #F2FF5E; font-family: 'Consolas', monospace; display: block; margin: 10px 0; background: #0a0a0f; padding: 8px; border-radius: 6px; border: 1px solid #292e42; word-wrap: break-word; }

/* Skript Farver */
.cm-sk-comment { color: #626a8f; font-style: italic; }
.cm-sk-number { color: #3AE86A; }
.cm-sk-string { color: #F2FF5E; }
.cm-sk-variable { color: #98EFF9; font-weight: bold; }
.cm-sk-option { color: #F75C68; }
.cm-sk-localvar { color: #8e95b5; }
.cm-sk-globalvar { color: #5A7D9A; }
.cm-sk-keyword1 { color: #0080FF; font-weight: bold; } 
.cm-sk-keyword2 { color: #DB2D4A; } 
.cm-sk-keyword3 { color: #a855f7; font-weight: bold; } 
.cm-sk-keyword4 { color: #8080FF; }
.cm-sk-keyword7 { color: #0A888A; } 
.cm-sk-keyword8 { color: #E080D5; }

/* Standard Config/JSON/YAML/Properties Dark Theme (Tokyo Night) */
.CodeMirror .cm-atom { color: #bb9af7; font-weight: bold; }
.CodeMirror .cm-number { color: #ff9e64; }
.CodeMirror .cm-property { color: #7aa2f7; }
.CodeMirror .cm-string { color: #9ece6a; }
.CodeMirror .cm-string-2 { color: #73daca; }
.CodeMirror .cm-keyword { color: #bb9af7; font-weight: bold; }
.CodeMirror .cm-def { color: #7dcfff; }
.CodeMirror .cm-variable { color: #c0caf5; }
.CodeMirror .cm-variable-2 { color: #e0af68; }
.CodeMirror .cm-comment { color: #626a8f; font-style: italic; }
.CodeMirror .cm-meta { color: #2ac3de; }
.CodeMirror .cm-tag { color: #f7768e; }
.CodeMirror .cm-attribute { color: #bb9af7; }
.CodeMirror .cm-operator { color: #89ddff; }
.CodeMirror .cm-error { color: #f43f5e; text-decoration: underline wavy #f43f5e; }

/* Skjul Skript-specifikke værktøjer i almindelig Config/Tekst-mode */
body.plain-editor-mode .skript-only { display: none !important; }

/* ==========================================
   6. INDSTILLINGER DROPDOWN (Poleret Design)
   ========================================== */
.settings-dropdown {
	display: none; position: absolute; right: 0; top: 44px;
	background-color: #16161e;
	min-width: 265px; box-shadow: 0px 18px 40px rgba(0,0,0,0.8);
	border: 1px solid #292e42; border-radius: 10px; z-index: 10000; overflow: hidden;
	padding: 4px 0;
}
.settings-dropdown.show { display: block; animation: slideDownDrop 0.18s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideDownDrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.dropdown-section { display: flex; flex-direction: column; border-bottom: 1px solid #24283b; padding: 6px 6px; gap: 2px; }
.dropdown-section:last-child { border-bottom: none; }
.dropdown-section > span { font-size: 0.65em; color: #565f89; text-transform: uppercase; font-weight: 700; padding: 4px 10px 4px; letter-spacing: 1px; }

.settings-dropdown .dropdown-item {
	background: transparent; border: none; color: #c0caf5; padding: 8px 10px; text-align: left;
	font-size: 0.85em; cursor: pointer; width: 100%; transition: background 0.15s, color 0.15s;
	font-family: 'Poppins', sans-serif; font-weight: 600; border-radius: 6px;
	text-decoration: none; display: flex; align-items: center; gap: 8px; box-sizing: border-box;
}
.settings-dropdown .dropdown-item:hover { background-color: #24283b; color: #fff; }
.settings-dropdown .dropdown-item.accent-green { color: #10b981; }
.settings-dropdown .dropdown-item.accent-green:hover { background-color: rgba(16, 185, 129, 0.12); color: #34d399; }
.settings-dropdown .dropdown-item.accent-cyan { color: #38bdf8; }
.settings-dropdown .dropdown-item.accent-cyan:hover { background-color: rgba(56, 189, 248, 0.12); color: #7dd3fc; }
.kbd-hint { margin-left: auto; font-size: 0.72em; color: #565f89; background: #0f1018; border: 1px solid #292e42; padding: 1px 6px; border-radius: 4px; font-family: monospace; }

.dropdown-font-row {
	display: flex; align-items: center; justify-content: space-between;
	padding: 6px 10px; font-size: 0.85em; font-weight: 600; color: #c0caf5;
}
.font-stepper { display: inline-flex; align-items: center; gap: 6px; background: #0f1018; border: 1px solid #292e42; border-radius: 6px; padding: 2px 4px; }
.font-stepper button { background: transparent; border: none; color: #a9b1d6; width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.95em; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.font-stepper button:hover { background: #24283b; color: #fff; }
.font-stepper span { font-family: monospace; font-size: 0.85em; min-width: 34px; text-align: center; color: #fff; }

/* Smuk Toggle Switch */
label.toggle-switch { display: flex; align-items: center; padding: 7px 10px; cursor: pointer; color: #c0caf5; font-size: 0.85em; font-weight: 600; text-transform: none; letter-spacing: normal; margin-bottom: 0; transition: 0.15s; border-radius: 6px; }
label.toggle-switch:hover { background-color: #24283b; color: white; }
.toggle-switch input { display: none; }
.toggle-switch .slider { position: relative; display: inline-block; width: 34px; height: 18px; background-color: #1a1b26; border-radius: 34px; margin-right: 12px; transition: 0.3s; flex-shrink: 0; border: 1px solid #414868; }
.toggle-switch .slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 2px; bottom: 2px; background-color: #a9b1d6; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .slider { background-color: #10b981; border-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.toggle-switch input:checked + .slider:before { transform: translateX(16px); background-color: white; }

/* Inline Tab Renaming */
.inline-rename-input { background: #0a0a0f; border: none; border-bottom: 2px solid #a855f7; color: white; font-family: monospace; font-size: 1em; font-weight: bold; outline: none; padding: 2px 4px; margin: 0; text-align: center; border-radius: 2px; }
.inline-rename-input::selection { background: #a855f7; color: white; }

/* ==========================================
   7. MODALS (Popups)
   ========================================== */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content {
	background-color: #16161e; margin: 2% auto; border: 1px solid #292e42; width: 95%; max-width: 1600px; height: 90vh;
	border-radius: 12px; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.8); color: white;
}
.modal-content.small { width: 600px; height: auto; max-height: 85vh; margin: 5% auto; }
.modal-header { padding: 20px; background: #1a1b26; border-bottom: 1px solid #292e42; border-radius: 12px 12px 0 0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 1.2em; }
.modal-body { flex-grow: 1; display: flex; flex-direction: column; padding: 25px; overflow: hidden; }
.modal-footer { padding: 20px 25px; background: #1a1b26; border-top: 1px solid #292e42; border-radius: 0 0 12px 12px; display: flex; justify-content: flex-end; gap: 15px; }

/* Diff View (AI Sammenligning) */
#mergeViewContainer { flex-grow: 1; border: 1px solid #292e42; border-radius: 8px; background: #1a1b26; position: relative; overflow: hidden; }
.CodeMirror-merge { position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: flex; flex-direction: row; height: 100% !important; width: 100% !important; }
.CodeMirror-merge-pane { flex: 1; position: relative; height: 100%; min-width: 0; }
.CodeMirror-merge-pane .CodeMirror { position: absolute !important; top: 0; left: 0; right: 0; bottom: 0; height: 100% !important; width: 100% !important; }
.diff-header-row { display: flex; justify-content: space-between; margin-bottom: 10px; padding: 0 10px; }
.diff-header-row h4 { margin: 0; font-size: 1.1em; width: 50%; }

.CodeMirror-merge-l-chunk { background: rgba(244, 63, 94, 0.1) !important; }
.CodeMirror-merge-l-chunk-start { border-top: 1px solid rgba(244, 63, 94, 0.4) !important; }
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid rgba(244, 63, 94, 0.4) !important; }
.CodeMirror-merge-r-chunk { background: rgba(16, 185, 129, 0.1) !important; }
.CodeMirror-merge-r-chunk-start { border-top: 1px solid rgba(16, 185, 129, 0.4) !important; }
.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid rgba(16, 185, 129, 0.4) !important; }
.CodeMirror-merge-l-inserted, .CodeMirror-merge-l-deleted { background-image: none !important; background-color: rgba(244, 63, 94, 0.35) !important; }
.CodeMirror-merge-r-inserted, .CodeMirror-merge-r-deleted { background-image: none !important; background-color: rgba(16, 185, 129, 0.35) !important; }
.CodeMirror-merge-gap { background-color: #1a1b26 !important; border-color: #292e42 !important; }

/* Historik Liste */
.history-item { display: flex; justify-content: space-between; align-items: center; background: #1a1b26; padding: 15px; border: 1px solid #292e42; border-radius: 8px; transition: 0.2s; margin-bottom: 10px; }
.history-item:hover { border-color: #a855f7; transform: translateX(5px); }
.history-item-title { font-weight: bold; font-size: 0.95em; color: white; display: block; margin-bottom: 4px; }
.history-item-size { font-size: 0.8em; color: #565f89; }

/* ==========================================
   8. MINECRAFT COLOR TOOLBOX
   ========================================== */
.mc-color-toolbox { position: fixed; display: none; background: #16161e; border: 1px solid #a855f7; border-radius: 12px; padding: 15px; box-shadow: 0 15px 40px rgba(0,0,0,0.8); z-index: 999999; font-family: 'Poppins', sans-serif; width: 340px; color: white; }
.mc-toolbox-header { font-size: 0.8em; font-weight: bold; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; color: #a9b1d6; text-transform: uppercase; letter-spacing: 1px; }
.mc-toolbox-preview-container { background: #0a0a0f; border: 1px solid #292e42; border-radius: 8px; padding: 12px; margin-bottom: 15px; }
.mc-toolbox-preview-label { font-size: 0.65em; color: #565f89; text-transform: uppercase; font-weight: bold; margin-bottom: 6px; letter-spacing: 0.5px; }
.mc-toolbox-preview { font-family: 'Consolas', monospace; font-size: 0.9em; min-height: 22px; word-break: break-all; line-height: 1.4; }
.mc-color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 10px; }
.mc-color-btn { background: #1a1b26; border: 1px solid #292e42; color: white; height: 34px; text-align: center; border-radius: 6px; cursor: pointer; font-family: monospace; font-weight: bold; font-size: 0.85em; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.mc-color-btn:hover { border-color: #a855f7; background: #24283b; transform: scale(1.05); }
.mc-format-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mc-format-row .mc-color-btn { font-size: 0.7em; }

/* ==========================================
   9. GUI BUILDER (Minecraft Menu)
   ========================================== */
#guiBuilderPanel { background: #16161e; border-bottom: 1px solid #292e42; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.gui-builder-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #292e42; padding-bottom: 15px; }
.gui-builder-header h3 { margin: 0; color: #a855f7; }
.gui-settings { display: flex; gap: 15px; align-items: center; }
.gui-settings label { color: #a9b1d6; font-size: 0.85em; }
.gui-settings input, .gui-settings select { background: #0a0a0f; border: 1px solid #292e42; color: white; padding: 6px 12px; border-radius: 6px; font-family: monospace; }
.gui-builder-workspace { display: flex; gap: 25px; flex-wrap: wrap; align-items: flex-start; }

/* Værktøjskassen */
.gui-toolbox { display: flex; flex-direction: column; gap: 10px; background: #1a1b26; border: 1px solid #292e42; border-radius: 8px; padding: 12px; width: 230px; flex: 0 0 auto; }
#itemSearch { width: 100%; background: #0a0a0f; border: 1px solid #292e42; color: white; padding: 10px; border-radius: 6px; box-sizing: border-box; }
.gui-item-results { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; max-height: 220px; overflow-y: auto; padding-right: 5px; }
.gui-item-drag { width: 34px; height: 34px; cursor: grab; background: #16161e; border-radius: 6px; padding: 3px; transition: 0.2s; border: 1px solid transparent; }
.gui-item-drag:hover { border-color: #a855f7; }

/* Inspektøren */
.gui-inspector { background: #1a1b26; border: 1px solid #292e42; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 10px; width: 300px; height: fit-content; flex: 0 0 auto; }
.gui-inspector-header { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #292e42; padding-bottom: 10px; margin-bottom: 5px; }
.gui-inspector-header img { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; background: #16161e; border-radius: 6px; padding: 4px; }
.gui-inspector-header h4 { margin: 0; color: #fff; font-size: 1em; }
.gui-inspector-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inspector-group { display: flex; flex-direction: column; gap: 4px; }
.inspector-group.full-width { grid-column: span 2; }
.inspector-group label { font-size: 0.7em; color: #a9b1d6; font-weight: bold; }
.inspector-group input, .inspector-group textarea { background: #0a0a0f; border: 1px solid #292e42; color: white; padding: 8px; border-radius: 6px; font-family: monospace; font-size: 0.85em; transition: 0.2s; }
.inspector-group input:focus, .inspector-group textarea:focus { border-color: #a855f7; }

.gui-preview-box { background: #100010; border: 2px solid #2a006f; border-radius: 4px; padding: 10px 15px; display: flex; flex-direction: column; gap: 6px; width: 240px; height: fit-content; flex: 0 0 auto; box-shadow: 4px 4px 10px rgba(0,0,0,0.8); font-family: 'Consolas', monospace; word-break: break-word; }
.preview-title { font-size: 1.05em; color: #FFFFFF; font-weight: bold; }
.preview-lore { font-size: 0.95em; color: #AAAAAA; line-height: 1.4; }

/* Selve Minecraft Kisten */
.gui-chest-container { background: #c6c6c6; border: 2px solid #555555; border-radius: 4px; padding: 10px; display: flex; flex-direction: column; box-shadow: inset 2px 2px 0px #ffffff, inset -2px -2px 0px #555555, 0 10px 30px rgba(0,0,0,0.5); flex: 0 0 auto; align-self: flex-start; width: fit-content; user-select: none; }
.gui-chest-title { width: 100%; text-align: left; color: #404040; font-family: 'Consolas', monospace; font-weight: bold; margin-bottom: 8px; padding-left: 4px; font-size: 1.1em; }
.gui-chest-grid { display: grid; grid-template-columns: repeat(9, 38px); gap: 2px; background: #c6c6c6; }
.gui-slot { width: 38px; height: 38px; background: #8b8b8b; box-shadow: inset 2px 2px 0px #373737, inset -2px -2px 0px #ffffff; display: flex; justify-content: center; align-items: center; position: relative; }
.gui-slot img { width: 34px; height: 34px; cursor: grab; }
.gui-slot img:active { cursor: grabbing; }
.gui-slot.selected { box-shadow: inset 0 0 15px #a855f7, inset 2px 2px 0px #373737, inset -2px -2px 0px #ffffff; }
.gui-slot-num { position: absolute; bottom: 2px; right: 3px; font-size: 0.6em; color: rgba(255,255,255,0.5); font-family: monospace; }

/* ==========================================
   10. MOBIL OPTIMERING (Responsive Design)
   ========================================== */
@media (max-width: 900px) {
	.ide-topbar { flex-wrap: wrap; height: auto !important; }
	.ide-tabs-wrapper { width: 100%; border-bottom: 1px solid #292e42; }
	.ide-tabs-bar { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 5px 0; }
	.ide-tab { flex: 0 0 auto; min-width: 140px; }
	.ide-actions { width: 100%; justify-content: space-between; padding: 10px !important; }
	.ide-actions .btn-action { padding: 0 10px; }
	
	.ide-sidebar { position: absolute; z-index: 1000; width: 100%; height: 100vh; max-width: 100%; }
	
	.search-replace-bar { flex-wrap: wrap; height: auto; justify-content: center; }
	.search-replace-bar input[type="text"] { width: 45%; flex-grow: 1; }
}

@media (max-height: 600px) and (orientation: landscape) {
	.ide-actions { padding: 5px !important; }
	.ide-actions .btn-action, .icon-btn { height: 30px !important; font-size: 0.8em !important; }
	.ide-tab { height: 34px !important; font-size: 0.85em !important; }
	.add-tab-btn { height: 34px !important; width: 35px !important; }
}

/* ==========================================
   11. TOAST NOTIFIKATIONER, OUTLINE & MULTI-SØG
   ========================================== */
#toastContainer {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 1000000;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 380px;
	pointer-events: none;
}
.toast-item {
	background: #16161e;
	border: 1px solid #292e42;
	border-left: 4px solid #3b82f6;
	color: #fff;
	padding: 12px 16px;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.7);
	font-size: 0.88em;
	line-height: 1.4;
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	animation: toastSlideIn 0.25s ease-out;
	white-space: pre-line;
}
.toast-item.success { border-left-color: #10b981; }
.toast-item.error { border-left-color: #f43f5e; }
.toast-item.warning { border-left-color: #f59e0b; }
.toast-close {
	background: transparent;
	border: none;
	color: #a9b1d6;
	cursor: pointer;
	font-size: 1.1em;
	margin-left: auto;
	padding: 0 2px;
	line-height: 1;
}
.toast-close:hover { color: #fff; }
@keyframes toastSlideIn {
	from { opacity: 0; transform: translateX(20px); }
	to { opacity: 1; transform: translateX(0); }
}

.outline-panel {
	position: absolute;
	top: 48px;
	right: 15px;
	width: 300px;
	max-height: 420px;
	background: #16161e;
	border: 1px solid #292e42;
	border-radius: 10px;
	box-shadow: 0 15px 35px rgba(0,0,0,0.8);
	z-index: 9999;
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.outline-header {
	padding: 10px 14px;
	background: #1a1b26;
	border-bottom: 1px solid #292e42;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.85em;
	font-weight: bold;
	color: #a855f7;
}
.outline-list {
	overflow-y: auto;
	max-height: 360px;
	padding: 6px;
}
.outline-item {
	padding: 7px 10px;
	border-radius: 6px;
	cursor: pointer;
	font-family: monospace;
	font-size: 0.82em;
	color: #a9b1d6;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	transition: 0.15s;
}
.outline-item:hover { background: #24283b; color: #fff; }
.outline-badge {
	font-size: 0.72em;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: bold;
	text-transform: uppercase;
	flex-shrink: 0;
}
.outline-badge.cmd { background: rgba(59,130,246,0.15); color: #3b82f6; }
.outline-badge.func { background: rgba(168,85,247,0.15); color: #a855f7; }
.outline-badge.event { background: rgba(16,185,129,0.15); color: #10b981; }

.sr-multi-results {
	display: none;
	background: #121219;
	border-bottom: 1px solid #292e42;
	max-height: 190px;
	overflow-y: auto;
	padding: 8px 15px;
	font-size: 0.82em;
}
.sr-multi-hit {
	padding: 5px 8px;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	gap: 10px;
	align-items: center;
	color: #a9b1d6;
	font-family: monospace;
}
.sr-multi-hit:hover { background: #24283b; color: #fff; }

/* ==========================================
   12. STATUSLINJE, SPLIT-SCREEN, VARS/PERMS & GUIDES
   ========================================== */
.editor-split-wrapper {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: row;
	overflow: hidden;
}
.editor-pane {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.split-pane {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: none;
	flex-direction: column;
	border-left: 2px solid #292e42;
	overflow: hidden;
}
.split-pane.active {
	display: flex;
}
.split-header {
	background: #16161e;
	border-bottom: 1px solid #292e42;
	padding: 5px 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.split-header select {
	width: auto;
	padding: 4px 8px;
	font-size: 0.8em;
	background: #0a0a0f;
	border: 1px solid #292e42;
	color: white;
	border-radius: 5px;
}
.split-editor-host {
	flex: 1;
	min-height: 0;
	position: relative;
	overflow: hidden;
}

.ide-statusbar {
	height: 28px;
	flex-shrink: 0;
	background: #121219;
	border-top: 1px solid #292e42;
	padding: 0 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 0.76em;
	font-family: monospace;
	color: #a9b1d6;
	user-select: none;
}
.status-group {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}
.status-item {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.status-clickable {
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 4px;
	transition: 0.15s;
}
.status-clickable:hover {
	background: #24283b;
	color: #fff;
}

/* Indryknings-guide & mellemrum-indikator */
.cm-indent-tab {
	box-shadow: inset 1px 0 0 rgba(168, 85, 247, 0.22);
}
.cm-indent-space {
	position: relative;
	box-shadow: inset 0 -1px 0 rgba(245, 158, 11, 0.25);
}
.cm-indent-space::after {
	content: "·";
	position: absolute;
	left: 0;
	right: 0;
	text-align: center;
	color: rgba(169, 177, 214, 0.35);
	pointer-events: none;
}

/* Variabel- & Permission-oversigt Panel */
.vars-perms-panel {
	position: absolute;
	top: 48px;
	right: 15px;
	width: 340px;
	max-height: 480px;
	background: #16161e;
	border: 1px solid #292e42;
	border-radius: 10px;
	box-shadow: 0 15px 35px rgba(0,0,0,0.8);
	z-index: 9999;
	display: none;
	flex-direction: column;
	overflow: hidden;
}
.vp-body {
	overflow-y: auto;
	max-height: 420px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.vp-section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #a9b1d6;
	font-weight: bold;
	border-bottom: 1px solid #292e42;
	padding-bottom: 5px;
	margin-bottom: 6px;
}
.vp-item {
	padding: 5px 8px;
	border-radius: 5px;
	cursor: pointer;
	font-family: monospace;
	font-size: 0.8em;
	color: #c0caf5;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	transition: 0.15s;
}
.vp-item:hover { background: #24283b; color: #fff; }
.vp-count {
	font-size: 0.75em;
	padding: 1px 6px;
	border-radius: 10px;
	background: #24283b;
	color: #a9b1d6;
	flex-shrink: 0;
}

/* Flytbare (Draggable) Flydende Paneler */
.floating-panel {
	position: fixed !important;
	z-index: 9999;
}
.drag-handle {
	cursor: move;
	user-select: none;
}

/* Kommandopalette (Ctrl+K) */
.cp-box {
	width: 92%;
	max-width: 560px;
	margin: 9vh auto 0;
	background: #16161e;
	border: 1px solid #a855f7;
	border-radius: 12px;
	box-shadow: 0 25px 60px rgba(0,0,0,0.85);
	overflow: hidden;
}
.cp-box input {
	border: none !important;
	border-bottom: 1px solid #292e42 !important;
	border-radius: 0 !important;
	padding: 14px 16px !important;
	font-size: 0.95em !important;
	background: #121219 !important;
}
.cp-results {
	max-height: 360px;
	overflow-y: auto;
	padding: 6px;
}
.cp-item {
	padding: 9px 12px;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	color: #c0caf5;
	font-size: 0.88em;
}
.cp-item:hover, .cp-item.active {
	background: rgba(168, 85, 247, 0.2);
	color: #fff;
}
.cp-tag {
	font-size: 0.72em;
	padding: 2px 7px;
	border-radius: 4px;
	background: #24283b;
	color: #a9b1d6;
	font-family: monospace;
}

/* Kompakt FTP Fil-handlingsmenu (sparer plads) */
.ftp-action-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}
.ftp-more-btn {
	background: transparent;
	border: 1px solid transparent;
	color: #a9b1d6;
	cursor: pointer;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 1em;
	line-height: 1.1;
}
.ftp-more-btn:hover {
	background: #24283b;
	border-color: #414868;
	color: #fff;
}
.ftp-more-menu {
	position: fixed;
	background: #16161e;
	border: 1px solid #414868;
	border-radius: 8px;
	box-shadow: 0 12px 30px rgba(0,0,0,0.85);
	z-index: 100002;
	min-width: 165px;
	padding: 4px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.ftp-more-menu button {
	background: transparent;
	border: none;
	color: #c0caf5;
	text-align: left;
	padding: 7px 10px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.82em;
	font-family: 'Poppins', sans-serif;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ftp-more-menu button:hover {
	background: #24283b;
	color: #fff;
}
.ftp-more-menu button.danger {
	color: #f43f5e;
}
.ftp-more-menu button.danger:hover {
	background: rgba(244, 63, 94, 0.15);
}


/* ==========================================
   TEMAER & ACCENT-FARVER (#6 + CUSTOM TEMAER)
   ========================================== */
:root {
	--snow-accent: #a855f7;
	--snow-accent-hover: #9333ea;
	--snow-accent-soft: rgba(168, 85, 247, 0.16);
	--snow-bg-editor: #1a1b26;
	--snow-bg-panel: #16161e;
	--snow-bg-tabsbar: #121219;
	--snow-bg-elevated: #24283b;
	--snow-bg-input: #0a0a0f;
	--snow-border: #292e42;
	--snow-text: #ffffff;
	--snow-text-muted: #a9b1d6;

	/* Skript Syntaks-farver */
	--snow-syn-comment: #626a8f;
	--snow-syn-number: #3AE86A;
	--snow-syn-string: #F2FF5E;
	--snow-syn-variable: #98EFF9;
	--snow-syn-option: #F75C68;
	--snow-syn-localvar: #8e95b5;
	--snow-syn-globalvar: #5A7D9A;
	--snow-syn-kw1: #0080FF;
	--snow-syn-kw2: #DB2D4A;
	--snow-syn-kw3: #a855f7;
	--snow-syn-kw4: #8080FF;
}

html[data-accent="purple"] { --snow-accent: #a855f7; --snow-accent-hover: #9333ea; --snow-accent-soft: rgba(168, 85, 247, 0.16); }
html[data-accent="blue"]   { --snow-accent: #3b82f6; --snow-accent-hover: #2563eb; --snow-accent-soft: rgba(59, 130, 246, 0.16); }
html[data-accent="green"]  { --snow-accent: #10b981; --snow-accent-hover: #059669; --snow-accent-soft: rgba(16, 185, 129, 0.16); }
html[data-accent="cyan"]   { --snow-accent: #06b6d4; --snow-accent-hover: #0891b2; --snow-accent-soft: rgba(6, 182, 212, 0.16); }
html[data-accent="amber"]  { --snow-accent: #f59e0b; --snow-accent-hover: #d97706; --snow-accent-soft: rgba(245, 158, 11, 0.16); }

html[data-theme="amoled"] {
	--snow-bg-editor: #000000;
	--snow-bg-panel: #09090d;
	--snow-bg-tabsbar: #050508;
	--snow-bg-elevated: #14141d;
	--snow-bg-input: #050508;
	--snow-border: #20202e;
	--snow-text: #ffffff;
	--snow-text-muted: #9ca3af;
}
html[data-theme="dracula"] {
	--snow-bg-editor: #282a36;
	--snow-bg-panel: #21222c;
	--snow-bg-tabsbar: #191a21;
	--snow-bg-elevated: #343746;
	--snow-bg-input: #191a21;
	--snow-border: #44475a;
	--snow-text: #f8f8f2;
	--snow-text-muted: #bd93f9;
	--snow-syn-comment: #6272a4;
	--snow-syn-string: #f1fa8c;
	--snow-syn-number: #bd93f9;
	--snow-syn-kw1: #8be9fd;
	--snow-syn-kw2: #ff79c6;
	--snow-syn-kw3: #ff79c6;
}
html[data-theme="nord"] {
	--snow-bg-editor: #2e3440;
	--snow-bg-panel: #242933;
	--snow-bg-tabsbar: #1f242d;
	--snow-bg-elevated: #3b4252;
	--snow-bg-input: #1e222a;
	--snow-border: #434c5e;
	--snow-text: #eceff4;
	--snow-text-muted: #d8dee9;
	--snow-syn-comment: #616e88;
	--snow-syn-string: #a3be8c;
	--snow-syn-number: #b48ead;
	--snow-syn-kw1: #88c0d0;
	--snow-syn-kw2: #81a1c1;
	--snow-syn-kw3: #b48ead;
}
html[data-theme="light"] {
	--snow-bg-editor: #ffffff;
	--snow-bg-panel: #f1f5f9;
	--snow-bg-tabsbar: #e2e8f0;
	--snow-bg-elevated: #e2e8f0;
	--snow-bg-input: #ffffff;
	--snow-border: #cbd5e1;
	--snow-text: #0f172a;
	--snow-text-muted: #475569;
	--snow-syn-comment: #64748b;
	--snow-syn-number: #15803d;
	--snow-syn-string: #b45309;
	--snow-syn-variable: #0284c7;
	--snow-syn-option: #dc2626;
	--snow-syn-localvar: #6d28d9;
	--snow-syn-globalvar: #0369a1;
	--snow-syn-kw1: #1d4ed8;
	--snow-syn-kw2: #be123c;
	--snow-syn-kw3: #7e22ce;
	--snow-syn-kw4: #4338ca;
}

/* --- KOMPLET TEMA-APPLIKATION PÅ ALLE FLADER I EDITOREN --- */
body.editor-page,
body.editor-page .ide-wrapper,
body.editor-page .editor-container,
body.editor-page .CodeMirror,
body.editor-page .ide-tab.active {
	background: var(--snow-bg-editor) !important;
	color: var(--snow-text) !important;
}

body.editor-page .ide-sidebar,
body.editor-page .ide-topbar,
body.editor-page .CodeMirror-gutters,
body.editor-page .ide-statusbar,
body.editor-page .settings-dropdown,
body.editor-page .floating-panel,
body.editor-page .modal-content,
body.editor-page .modal-header,
body.editor-page .modal-footer,
body.editor-page .ftp-more-menu,
body.editor-page .tab-context-menu,
body.editor-page .search-replace-bar,
body.editor-page .split-editor-header,
body.editor-page .outline-header,
body.editor-page .cp-box,
body.editor-page .CodeMirror-hints,
body.editor-page .sk-hover-tooltip {
	background: var(--snow-bg-panel) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text);
}

/* Faneblad-bjælke, inaktive faner & + / ☰ knapper */
body.editor-page .ide-tabs-wrapper,
body.editor-page .ide-tabs-bar {
	background: var(--snow-bg-tabsbar) !important;
}
body.editor-page .ide-tab {
	background: var(--snow-bg-panel) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text-muted) !important;
}
body.editor-page .ide-tab:hover {
	background: var(--snow-bg-elevated) !important;
	color: var(--snow-text) !important;
}
body.editor-page .ide-tab.active {
	background: var(--snow-bg-editor) !important;
	color: var(--snow-text) !important;
	box-shadow: inset 0 3px 0 var(--snow-accent) !important;
	border-bottom-color: var(--snow-bg-editor) !important;
}
body.editor-page .add-tab-btn {
	background: var(--snow-bg-panel) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text-muted) !important;
}
body.editor-page .add-tab-btn:hover {
	background: var(--snow-bg-elevated) !important;
	color: var(--snow-text) !important;
}

/* Knapper, inputs, dropdowns, steppere & badges */
body.editor-page .gen-btn,
body.editor-page .btn-action:not(.save):not(.logout),
body.editor-page .icon-btn,
body.editor-page .sr-btn {
	background: var(--snow-bg-input) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text) !important;
}
body.editor-page .gen-btn:hover,
body.editor-page .btn-action:not(.save):not(.logout):hover,
body.editor-page .icon-btn:hover,
body.editor-page .sr-btn:hover {
	background: var(--snow-bg-elevated) !important;
	border-color: var(--snow-accent) !important;
	color: var(--snow-text) !important;
}
body.editor-page .gen-btn.ai-btn {
	background: rgba(16, 185, 129, 0.08) !important;
	border-color: #10b981 !important;
	color: #10b981 !important;
}
body.editor-page .gen-btn.ai-btn:hover {
	background: #10b981 !important;
	color: #ffffff !important;
}

body.editor-page input[type="text"],
body.editor-page input[type="password"],
body.editor-page input[type="number"],
body.editor-page textarea,
body.editor-page select,
body.editor-page .global-version-select,
body.editor-page .cp-box input,
body.editor-page #ftpFileTree,
body.editor-page #ftpSavedList {
	background: var(--snow-bg-input) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text) !important;
}
body.editor-page .global-version-select {
	border-color: var(--snow-accent) !important;
}
body.editor-page input:focus,
body.editor-page textarea:focus,
body.editor-page select:focus {
	border-color: var(--snow-accent) !important;
}

body.editor-page .btn-insert {
	background: var(--snow-accent) !important;
	color: #ffffff !important;
}
body.editor-page .btn-insert:hover {
	background: var(--snow-accent-hover) !important;
}

/* Indstillinger-dropdown, stepper, kbd-hint & toggles */
body.editor-page .dropdown-section {
	border-color: var(--snow-border) !important;
}
body.editor-page .dropdown-section > span {
	color: var(--snow-text-muted) !important;
}
body.editor-page .dropdown-item,
body.editor-page .toggle-label,
body.editor-page .dropdown-font-row,
body.editor-page .outline-item,
body.editor-page .vp-item,
body.editor-page .cp-item,
body.editor-page .ftp-more-menu button:not(.danger),
body.editor-page .tab-context-menu button:not(.danger),
body.editor-page .tool-toggle-item,
body.editor-page .CodeMirror-hint {
	color: var(--snow-text) !important;
}
body.editor-page .dropdown-item:hover,
body.editor-page .outline-item:hover,
body.editor-page .vp-item:hover,
body.editor-page .ftp-more-menu button:not(.danger):hover,
body.editor-page .tab-context-menu button:not(.danger):hover,
body.editor-page .status-clickable:hover {
	background: var(--snow-bg-elevated) !important;
	color: var(--snow-text) !important;
}
body.editor-page .cp-item:hover,
body.editor-page .cp-item.active,
body.editor-page .CodeMirror-hint-active {
	background: var(--snow-accent-soft) !important;
	color: var(--snow-text) !important;
	border-color: var(--snow-accent) !important;
}
body.editor-page .font-stepper,
body.editor-page .kbd-hint,
body.editor-page .cp-tag,
body.editor-page .vp-count {
	background: var(--snow-bg-elevated) !important;
	border-color: var(--snow-border) !important;
	color: var(--snow-text) !important;
}
body.editor-page .font-stepper button {
	color: var(--snow-text) !important;
}
body.editor-page .font-stepper button:hover {
	background: var(--snow-accent-soft) !important;
}
body.editor-page .slider {
	background-color: var(--snow-border) !important;
}
body.editor-page input:checked + .slider {
	background-color: #10b981 !important;
}
body.editor-page .tool-toggle-item {
	background: var(--snow-bg-input) !important;
	border-color: var(--snow-border) !important;
}

/* Teksthierarki, headers & scrollbars */
body.editor-page .sidebar-header,
body.editor-page .gen-form,
body.editor-page .vp-section-title,
body.editor-page .tab-context-sep {
	border-color: var(--snow-border) !important;
}
body.editor-page .sidebar-header h3,
body.editor-page .modal-header h3,
body.editor-page .gen-form h4,
body.editor-page .outline-header span {
	color: var(--snow-text) !important;
}
body.editor-page .sidebar-header p,
body.editor-page label,
body.editor-page .ide-statusbar,
body.editor-page .CodeMirror-linenumber {
	color: var(--snow-text-muted) !important;
}
body.editor-page .CodeMirror-cursor {
	border-left-color: var(--snow-accent) !important;
}
body.editor-page .CodeMirror-selected {
	background: var(--snow-accent-soft) !important;
}
body.editor-page .ide-tabs-bar::-webkit-scrollbar-thumb {
	background: var(--snow-accent) !important;
}

/* Skript Syntaks-farver drevet af CSS-variabler (virker i ALLE temaer + Custom!) */
body.editor-page .cm-sk-comment   { color: var(--snow-syn-comment) !important; }
body.editor-page .cm-sk-number    { color: var(--snow-syn-number) !important; }
body.editor-page .cm-sk-string    { color: var(--snow-syn-string) !important; }
body.editor-page .cm-sk-variable  { color: var(--snow-syn-variable) !important; }
body.editor-page .cm-sk-option    { color: var(--snow-syn-option) !important; }
body.editor-page .cm-sk-localvar  { color: var(--snow-syn-localvar) !important; }
body.editor-page .cm-sk-globalvar { color: var(--snow-syn-globalvar) !important; }
body.editor-page .cm-sk-keyword1  { color: var(--snow-syn-kw1) !important; }
body.editor-page .cm-sk-keyword2  { color: var(--snow-syn-kw2) !important; }
body.editor-page .cm-sk-keyword3  { color: var(--snow-syn-kw3) !important; }
body.editor-page .cm-sk-keyword4  { color: var(--snow-syn-kw4) !important; }

/* Custom Tema Kort i Tilpasning-modalen */
.custom-theme-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
	margin-bottom: 16px;
}
.custom-theme-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 8px;
	background: var(--snow-bg-input);
	border: 1px solid var(--snow-border);
	cursor: pointer;
	transition: 0.15s;
}
.custom-theme-card:hover,
.custom-theme-card.active {
	border-color: var(--snow-accent);
	box-shadow: 0 0 0 2px var(--snow-accent-soft);
}
.ct-swatch-bar {
	display: inline-flex;
	gap: 3px;
	align-items: center;
}
.ct-swatch {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	border: 1px solid rgba(128,128,128,0.35);
	display: inline-block;
}

/* ==========================================
   SIDEBAR COLLAPSE & RESIZER (#8)
   ========================================== */
.ide-sidebar.collapsed {
	display: none !important;
}
.sidebar-resizer {
	width: 5px;
	flex: 0 0 5px;
	cursor: col-resize;
	background: transparent;
	transition: background 0.15s;
	z-index: 15;
}
.sidebar-resizer:hover,
.sidebar-resizer.resizing {
	background: var(--snow-accent);
}
.sidebar-resizer.hidden {
	display: none !important;
}

/* ==========================================
   DRAG & DROP OVERLAY (#12)
   ========================================== */
.editor-drop-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(10, 10, 20, 0.72);
	backdrop-filter: blur(4px);
	z-index: 100010;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.editor-drop-overlay.show {
	display: flex;
}
.editor-drop-card {
	border: 2px dashed var(--snow-accent);
	background: rgba(22, 22, 30, 0.94);
	border-radius: 16px;
	padding: 36px 52px;
	text-align: center;
	color: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* ==========================================
   FANE HØJREKLIK-MENU & DRAG-REORDER (#13)
   ========================================== */
.ide-tab[draggable="true"] {
	cursor: pointer;
}
.ide-tab.drag-over-left {
	box-shadow: inset 3px 0 0 var(--snow-accent);
}
.ide-tab.drag-over-right {
	box-shadow: inset -3px 0 0 var(--snow-accent);
}
.tab-context-menu {
	display: none;
	position: fixed;
	z-index: 100008;
	min-width: 190px;
	background: #16161e;
	border: 1px solid #414868;
	border-radius: 8px;
	padding: 5px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85);
	flex-direction: column;
	gap: 2px;
}
.tab-context-menu.show {
	display: flex;
}
.tab-context-menu button {
	background: transparent;
	border: none;
	color: #c0caf5;
	text-align: left;
	padding: 7px 11px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.83em;
	font-family: 'Poppins', sans-serif;
	display: flex;
	align-items: center;
	gap: 8px;
}
.tab-context-menu button:hover {
	background: #24283b;
	color: #fff;
}
.tab-context-menu button.danger {
	color: #f43f5e;
}
.tab-context-menu button.danger:hover {
	background: rgba(244, 63, 94, 0.16);
}
.tab-context-sep {
	height: 1px;
	background: #292e42;
	margin: 4px 2px;
}

/* ==========================================
   TILPASNING MODAL (TEMAER, ACCENTS, VÆRKTØJER)
   ========================================== */
.theme-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 8px;
	margin-bottom: 16px;
}
.theme-card {
	border: 2px solid #292e42;
	border-radius: 8px;
	padding: 10px 8px;
	text-align: center;
	cursor: pointer;
	font-size: 0.8em;
	font-weight: 600;
	transition: 0.15s;
}
.theme-card.active {
	border-color: var(--snow-accent);
	box-shadow: 0 0 0 2px var(--snow-accent-soft);
}
.accent-dots {
	display: flex;
	gap: 10px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}
.accent-dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s;
}
.accent-dot:hover { transform: scale(1.1); }
.accent-dot.active {
	border-color: #ffffff;
	box-shadow: 0 0 0 3px var(--snow-accent-soft);
}
.tool-toggle-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.tool-toggle-item {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid #292e42;
	padding: 8px 10px;
	border-radius: 7px;
	cursor: pointer;
	font-size: 0.82em;
	color: #c0caf5;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	margin: 0;
}
.tool-toggle-item input { width: auto; margin: 0; }

/* ==========================================
   QUICK-FIX PILL & STATUSLINJE RET-KNAP
   ========================================== */
.skript-quickfix-pill {
	position: fixed;
	z-index: 100020;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px;
	border-radius: 9px;
	background: var(--snow-bg-elevated, #1f2335);
	border: 1px solid var(--snow-border, #292e42);
	color: var(--snow-text, #c0caf5);
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
	user-select: none;
	white-space: nowrap;
}
.qf-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	border-radius: 6px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--snow-text, #c0caf5);
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.qf-action-btn.qf-apply {
	background: rgba(16, 185, 129, 0.14);
	border-color: rgba(16, 185, 129, 0.5);
	color: #10b981;
}
.qf-action-btn.qf-apply:hover {
	background: rgba(16, 185, 129, 0.26);
	border-color: #34d399;
}
.qf-action-btn.qf-apply strong {
	font-weight: 700;
}
.qf-action-btn.qf-ignore {
	background: rgba(148, 163, 184, 0.1);
	border-color: rgba(148, 163, 184, 0.3);
	color: var(--snow-text-muted, #a9b1d6);
}
.qf-action-btn.qf-ignore:hover {
	background: rgba(148, 163, 184, 0.22);
	color: var(--snow-text, #ffffff);
}
.status-fix-btn,
.status-ignore-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 1px 8px;
	height: 20px;
	border-radius: 999px;
	font-family: 'Poppins', sans-serif;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}
.status-fix-btn {
	border: 1px solid rgba(16, 185, 129, 0.55);
	background: rgba(16, 185, 129, 0.14);
	color: #10b981;
}
.status-fix-btn:hover {
	background: rgba(16, 185, 129, 0.28);
	border-color: #34d399;
}
.status-ignore-btn {
	border: 1px solid rgba(148, 163, 184, 0.4);
	background: rgba(148, 163, 184, 0.1);
	color: var(--snow-text-muted, #a9b1d6);
}
.status-ignore-btn:hover {
	background: rgba(148, 163, 184, 0.22);
	color: var(--snow-text, #ffffff);
	border-color: rgba(148, 163, 184, 0.65);
}
html[data-theme="light"] .skript-quickfix-pill {
	background: #ffffff;
	color: #1e293b;
	border-color: #cbd5e1;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .qf-action-btn.qf-apply,
html[data-theme="light"] .status-fix-btn {
	color: #047857;
}
html[data-theme="light"] .qf-action-btn.qf-ignore,
html[data-theme="light"] .status-ignore-btn {
	color: #475569;
	border-color: #cbd5e1;
	background: #f1f5f9;
}
html[data-theme="light"] .qf-action-btn.qf-ignore:hover,
html[data-theme="light"] .status-ignore-btn:hover {
	background: #e2e8f0;
	color: #0f172a;
}

/* ==========================================
   AKTIV LINJE-FREMHÆVNING (CodeMirror active-line #15)
   ========================================== */
.CodeMirror-activeline-background {
	background: rgba(255, 255, 255, 0.035) !important;
}
.CodeMirror-activeline-gutter {
	background: rgba(255, 255, 255, 0.04) !important;
}
.CodeMirror-activeline .CodeMirror-linenumber {
	color: var(--snow-accent, #a855f7) !important;
	font-weight: 700;
}
html[data-theme="light"] .CodeMirror-activeline-background {
	background: rgba(15, 23, 42, 0.045) !important;
}
html[data-theme="light"] .CodeMirror-activeline-gutter {
	background: rgba(15, 23, 42, 0.055) !important;
}

.dropdown-item.danger {
	color: #f43f5e !important;
}
.dropdown-item.danger:hover {
	background: rgba(244, 63, 94, 0.14) !important;
	color: #fb7185 !important;
}

/* ==========================================
   AI KODE-CHAT DOCK I BUNDEN (Codespaces-stil)
   ========================================== */
.ai-chat-dock {
	flex: 0 0 auto;
	height: 290px;
	min-height: 170px;
	max-height: 68vh;
	background: var(--snow-bg-panel, #16161e);
	border-top: 1px solid var(--snow-border, #292e42);
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 6;
}
.ai-chat-resizer {
	height: 5px;
	cursor: ns-resize;
	background: transparent;
	position: absolute;
	top: -3px;
	left: 0;
	right: 0;
	z-index: 8;
	transition: background 0.15s ease;
}
.ai-chat-resizer:hover,
.ai-chat-resizer.dragging {
	background: var(--snow-accent, #a855f7);
}
.ai-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 12px;
	background: var(--snow-bg-tabsbar, #121219);
	border-bottom: 1px solid var(--snow-border, #292e42);
	flex-shrink: 0;
	flex-wrap: wrap;
}
.ai-chat-title-wrap {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}
.ai-chat-title {
	font-size: 0.82em;
	font-weight: 800;
	color: var(--snow-text, #fff);
	letter-spacing: 0.2px;
}
.ai-chat-file-pill {
	font-family: monospace;
	font-size: 0.76em;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--snow-accent-soft, rgba(168,85,247,0.16));
	color: var(--snow-accent, #a855f7);
	border: 1px solid var(--snow-accent, rgba(168,85,247,0.35));
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ai-chat-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.ai-chat-select {
	width: auto !important;
	padding: 4px 8px !important;
	height: 27px;
	font-size: 0.76em !important;
	border-radius: 6px !important;
	background: var(--snow-bg-input, #0a0a0f) !important;
	border: 1px solid var(--snow-border, #292e42) !important;
	color: var(--snow-text, #fff) !important;
	font-family: 'Poppins', sans-serif !important;
}
.ai-chat-model-select {
	max-width: 220px;
}
.ai-chat-ctx-toggle {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.74em;
	color: var(--snow-text-muted, #a9b1d6);
	cursor: pointer;
	margin: 0;
	padding: 3px 7px;
	border-radius: 6px;
	border: 1px solid var(--snow-border, #292e42);
	background: var(--snow-bg-input, #0a0a0f);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
}
.ai-chat-ctx-toggle input {
	width: auto;
	margin: 0;
}
.ai-chat-hdr-btn {
	background: transparent;
	border: 1px solid var(--snow-border, #292e42);
	color: var(--snow-text-muted, #a9b1d6);
	border-radius: 6px;
	height: 27px;
	padding: 0 8px;
	cursor: pointer;
	font-size: 0.8em;
	transition: 0.15s;
}
.ai-chat-hdr-btn:hover {
	background: var(--snow-bg-elevated, #24283b);
	color: var(--snow-text, #fff);
	border-color: var(--snow-accent, #a855f7);
}
.ai-chat-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
}
.ai-chat-empty {
	margin: auto;
	text-align: center;
	color: var(--snow-text-muted, #787c99);
	font-size: 0.84em;
	max-width: 480px;
	line-height: 1.55;
}
.ai-chat-msg {
	display: flex;
	flex-direction: column;
	max-width: 88%;
	padding: 9px 12px;
	border-radius: 10px;
	font-size: 0.84em;
	line-height: 1.5;
	word-break: break-word;
}
.ai-chat-msg.user {
	align-self: flex-end;
	background: var(--snow-accent-soft, rgba(168,85,247,0.18));
	border: 1px solid var(--snow-accent, rgba(168,85,247,0.45));
	color: var(--snow-text, #fff);
}
.ai-chat-msg.assistant {
	align-self: flex-start;
	background: var(--snow-bg-editor, #1a1b26);
	border: 1px solid var(--snow-border, #292e42);
	color: var(--snow-text, #c0caf5);
}
.ai-chat-msg-meta {
	font-size: 0.72em;
	color: var(--snow-text-muted, #787c99);
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
}
.ai-chat-code-card {
	margin: 8px 0 4px 0;
	border: 1px solid var(--snow-border, #292e42);
	border-radius: 8px;
	overflow: hidden;
	background: var(--snow-bg-input, #0a0a0f);
}
.ai-chat-code-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 5px 9px;
	background: var(--snow-bg-tabsbar, #121219);
	border-bottom: 1px solid var(--snow-border, #292e42);
	font-size: 0.78em;
	flex-wrap: wrap;
}
.ai-chat-code-actions {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
}
.ai-chat-code-btn {
	background: var(--snow-bg-elevated, #24283b);
	border: 1px solid var(--snow-border, #292e42);
	color: var(--snow-text, #c0caf5);
	padding: 2px 8px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 600;
	font-family: 'Poppins', sans-serif;
	transition: 0.14s;
}
.ai-chat-code-btn:hover {
	border-color: var(--snow-accent, #a855f7);
	color: #fff;
}
.ai-chat-code-btn.primary {
	background: rgba(16, 185, 129, 0.14);
	border-color: #10b981;
	color: #10b981;
}
.ai-chat-code-btn.primary:hover {
	background: #10b981;
	color: #fff;
}
.ai-chat-code-pre {
	margin: 0;
	padding: 10px 12px;
	overflow-x: auto;
	font-family: 'Consolas', monospace;
	font-size: 0.92em;
	line-height: 1.45;
	color: var(--snow-text, #c0caf5);
	max-height: 220px;
}
.ai-chat-inline-code {
	font-family: 'Consolas', monospace;
	background: var(--snow-bg-input, rgba(0,0,0,0.35));
	border: 1px solid var(--snow-border, #292e42);
	padding: 1px 5px;
	border-radius: 4px;
	font-size: 0.92em;
}
.ai-chat-input-bar {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 8px 12px;
	border-top: 1px solid var(--snow-border, #292e42);
	background: var(--snow-bg-tabsbar, #121219);
	flex-shrink: 0;
}
.ai-chat-input-bar textarea {
	flex: 1;
	resize: none;
	min-height: 36px;
	max-height: 110px;
	padding: 8px 11px !important;
	font-family: 'Poppins', sans-serif !important;
	font-size: 0.85em !important;
	line-height: 1.4;
}
.ai-chat-autorun-toggle:has(input:checked) {
	border-color: #f59e0b;
	color: #f59e0b;
	background: rgba(245, 158, 11, 0.12);
}
.ai-action-card {
	margin: 8px 0 4px 0;
	border: 1px solid rgba(16, 185, 129, 0.45);
	border-radius: 9px;
	overflow: hidden;
	background: var(--snow-bg-input, #0a0a0f);
}
.ai-action-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 11px;
	background: rgba(16, 185, 129, 0.1);
	border-bottom: 1px solid var(--snow-border, #292e42);
	font-size: 0.82em;
	font-weight: 700;
	color: #10b981;
	flex-wrap: wrap;
}
.ai-action-steps {
	padding: 8px 11px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.ai-action-step {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.84em;
	color: var(--snow-text, #c0caf5);
}
.ai-action-step-idx {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--snow-bg-elevated, #24283b);
	border: 1px solid var(--snow-border, #292e42);
	font-size: 0.78em;
	font-weight: 700;
	flex-shrink: 0;
}
.ai-action-log {
	padding: 8px 11px;
	border-top: 1px solid var(--snow-border, #292e42);
	font-size: 0.8em;
	line-height: 1.5;
	color: var(--snow-text-muted, #a9b1d6);
	display: none;
	flex-direction: column;
	gap: 3px;
}
.ai-chat-msg.system-result {
	align-self: stretch;
	max-width: 100%;
	background: var(--snow-bg-input, #0a0a0f);
	border: 1px solid var(--snow-border, #292e42);
	font-size: 0.82em;
}
.ai-chat-msg.system-result.ok {
	border-color: rgba(16, 185, 129, 0.55);
}
.ai-chat-msg.system-result.err {
	border-color: rgba(244, 63, 94, 0.55);
}

/* Animerede 3 hoppende prikker i AI Kode-Chat */
.ai-chat-typing {
	min-width: 96px;
}
.ai-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 2px 3px 2px;
}
.ai-typing-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--snow-accent, #a855f7);
	opacity: 0.45;
	animation: snowTypingBounce 1.25s infinite ease-in-out;
}
.ai-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes snowTypingBounce {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.38; }
	40% { transform: translateY(-5px); opacity: 1; }
}

/* Tydelig vandret scrollbar i CodeMirror når linjeombrydning er fra */
.CodeMirror-hscrollbar::-webkit-scrollbar { height: 10px; }
.CodeMirror-hscrollbar::-webkit-scrollbar-thumb {
	background: var(--snow-border, #292e42);
	border-radius: 5px;
}
.CodeMirror-hscrollbar::-webkit-scrollbar-thumb:hover {
	background: var(--snow-accent, #a855f7);
}
