/* ---------- Gothic A1 (primary UI font) ---------- */
/* unicode-range excludes U+2026 (HORIZONTAL ELLIPSIS) so the browser
   falls back to the next font for that glyph — Gothic A1's ellipsis
   renders as scattered/floating dots instead of three baseline dots. */
@font-face {
	font-family: 'Gothic A1';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/gothic-a1-v8-latin-regular.woff2') format('woff2');
	unicode-range: U+0000-2025, U+2027-10FFFF;
}
@font-face {
	font-family: 'Gothic A1';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/gothic-a1-v8-latin-600.woff') format('woff');
	unicode-range: U+0000-2025, U+2027-10FFFF;
}
@font-face {
	font-family: 'Gothic A1';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/gothic-a1-v8-latin-700.woff2') format('woff2');
	unicode-range: U+0000-2025, U+2027-10FFFF;
}

:root {
	--brikk-primary: #4338ca;
	--brikk-primary-hover: #3730a3;
	--brikk-text: #14142b;
	--brikk-text-muted: #6b6b80;
	--brikk-border: #e6e6ee;
	--brikk-bg: #ffffff;
	--brikk-bg-soft: #f7f7fb;
	--brikk-bg-bubble-user: #4338ca;
	--brikk-bg-bubble-assistant: #f1f1f7;
	--brikk-radius: 16px;
	--brikk-radius-sm: 10px;
	--brikk-shadow: 0 4px 14px rgba(20, 20, 43, 0.06);
	--brikk-sidebar-width: 280px;
}

body.brikk-ai-fullbleed {
	margin: 0;
	background: var(--brikk-bg);
}
body.brikk-ai-shell {
	margin: 0;
	font-family: 'Gothic A1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--brikk-text);
	background: var(--brikk-bg);
	overflow: hidden;
}

#brikk-ai-root {
	font-family: 'Gothic A1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--brikk-text);
	height: 100dvh;
	width: 100vw;
	display: flex;
	overflow: hidden;
	box-sizing: border-box;
}

/* ---------- Login ---------- */
#brikk-ai-root.brikk-ai--login {
	display: grid;
	grid-template-rows: auto 1fr auto;
	align-items: stretch;
	justify-items: stretch;
	height: 100dvh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	color: #ffffff;
	background:
		radial-gradient(120% 80% at 50% 40%, rgba(120, 70, 200, 0.25) 0%, rgba(40, 10, 70, 0) 60%),
		radial-gradient(80% 60% at 85% 90%, rgba(190, 60, 140, 0.22) 0%, rgba(20, 10, 40, 0) 60%),
		radial-gradient(60% 60% at 10% 10%, rgba(40, 30, 80, 0.4) 0%, rgba(10, 5, 25, 0) 70%),
		#0b0617;
	padding: 24px 36px;
	font-family: 'Gothic A1', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body.admin-bar #brikk-ai-root.brikk-ai--login { height: calc(100dvh - 32px); }
@media (max-width: 782px) {
	body.admin-bar #brikk-ai-root.brikk-ai--login { height: calc(100dvh - 46px); }
}

.brikk-ai__login-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brikk-ai__login-wordmark {
	display: inline-flex;
	align-items: center;
}
.brikk-ai__login-logo {
	display: block;
	height: 28px;
	width: auto;
	filter: brightness(0) invert(1);
}
.brikk-ai__login-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	letter-spacing: 0.3px;
	font-feature-settings: "tnum";
}
.brikk-ai__login-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3ddc84;
	box-shadow: 0 0 8px rgba(61, 220, 132, 0.7);
}

.brikk-ai__login-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 0;
}
.brikk-ai__login-card {
	width: 100%;
	max-width: 380px;
	padding: 32px 36px 28px;
	border-radius: 22px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.02) inset,
		0 40px 80px rgba(0, 0, 0, 0.45),
		0 0 80px rgba(120, 70, 220, 0.12);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	text-align: center;
	color: #ffffff;
}

.brikk-ai__login-orb {
	position: relative;
	width: 150px;
	height: 150px;
	margin: 8px auto 28px;
	isolation: isolate;
}
.brikk-ai__login-orb::before {
	content: "";
	position: absolute;
	inset: -22%;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 50%, rgba(140, 90, 240, 0.28) 0%, rgba(140, 90, 240, 0.08) 40%, rgba(140, 90, 240, 0) 70%),
		radial-gradient(circle at 70% 80%, rgba(230, 100, 180, 0.18) 0%, rgba(230, 100, 180, 0) 60%);
	filter: blur(14px);
	z-index: -1;
	animation: brikk-orb-halo 4.5s ease-in-out infinite;
}
.brikk-ai__login-orb-shape {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
	background: radial-gradient(circle at 50% 50%, #6b32c4 0%, #4f1eaa 45%, #2e0e7a 80%, #1c0858 100%);
	box-shadow:
		0 0 70px rgba(120, 70, 220, 0.45),
		0 30px 60px rgba(20, 5, 50, 0.55);
	animation: brikk-orb-pulse 4.5s ease-in-out infinite;
	transform-origin: center;
}

.brikk-ai__login-orb-layer {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	will-change: transform, opacity;
	mix-blend-mode: screen;
}

/* Slow-rotating iridescent shimmer — gives the surface a living "energy" feel */
.brikk-ai__login-orb-layer--shimmer {
	inset: -10%;
	border-radius: 50%;
	background: conic-gradient(
		from 0deg,
		rgba(120, 80, 220, 0) 0deg,
		rgba(180, 120, 255, 0.35) 60deg,
		rgba(240, 130, 200, 0.3) 130deg,
		rgba(120, 80, 220, 0) 200deg,
		rgba(140, 200, 255, 0.25) 270deg,
		rgba(200, 130, 255, 0.35) 330deg,
		rgba(120, 80, 220, 0) 360deg
	);
	filter: blur(18px);
	opacity: 0.7;
	mix-blend-mode: screen;
	animation: brikk-orb-spin 28s linear infinite;
}

/* Big soft lavender lit core, slowly drifts */
.brikk-ai__login-orb-layer--core {
	width: 78%;
	height: 78%;
	left: 11%;
	top: 5%;
	background: radial-gradient(circle at 50% 50%,
		rgba(245, 230, 255, 0.95) 0%,
		rgba(205, 175, 255, 0.65) 22%,
		rgba(160, 110, 240, 0.25) 50%,
		rgba(120, 70, 220, 0) 75%);
	filter: blur(14px);
	animation: brikk-orb-core 11s ease-in-out infinite;
}

/* Magenta sub-surface accent */
.brikk-ai__login-orb-layer--magenta {
	width: 70%;
	height: 70%;
	left: 30%;
	top: 40%;
	background: radial-gradient(circle at 50% 50%,
		rgba(255, 130, 200, 0.75) 0%,
		rgba(220, 90, 170, 0.4) 30%,
		rgba(180, 60, 150, 0) 65%);
	filter: blur(16px);
	animation: brikk-orb-magenta 13s ease-in-out infinite;
}

/* Cool cyan/blue accent for color depth */
.brikk-ai__login-orb-layer--cyan {
	width: 55%;
	height: 55%;
	left: -5%;
	top: 35%;
	background: radial-gradient(circle at 50% 50%,
		rgba(120, 200, 255, 0.55) 0%,
		rgba(100, 150, 240, 0.25) 35%,
		rgba(80, 100, 220, 0) 70%);
	filter: blur(18px);
	animation: brikk-orb-cyan 17s ease-in-out infinite;
}

/* Tight specular highlight that pulses subtly */
.brikk-ai__login-orb-layer--specular {
	width: 32%;
	height: 22%;
	left: 30%;
	top: 18%;
	background: radial-gradient(ellipse at 50% 50%,
		rgba(255, 255, 255, 0.85) 0%,
		rgba(255, 240, 255, 0.4) 35%,
		rgba(255, 220, 255, 0) 70%);
	transform: rotate(-22deg);
	filter: blur(3px);
	mix-blend-mode: screen;
	animation: brikk-orb-specular 7s ease-in-out infinite;
}

/* Fresnel rim — bright inner edge ring, gives 3D sphere depth */
.brikk-ai__login-orb-rim {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(circle at 50% 50%,
		rgba(0, 0, 0, 0) 78%,
		rgba(190, 140, 255, 0.35) 90%,
		rgba(140, 90, 240, 0.55) 96%,
		rgba(80, 30, 160, 0.4) 100%);
	mix-blend-mode: screen;
}

.brikk-ai__login-orb-shadow {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 50%,
		rgba(0, 0, 0, 0) 58%,
		rgba(12, 4, 35, 0.55) 82%,
		rgba(8, 2, 25, 0.85) 96%,
		rgba(5, 1, 18, 0.95) 100%);
	pointer-events: none;
}

@keyframes brikk-orb-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}
@keyframes brikk-orb-core {
	0%   { transform: translate(0, 0) scale(1); }
	25%  { transform: translate(6%, -3%) scale(1.06); }
	50%  { transform: translate(3%, 5%) scale(0.96); }
	75%  { transform: translate(-5%, 2%) scale(1.03); }
	100% { transform: translate(0, 0) scale(1); }
}
@keyframes brikk-orb-magenta {
	0%   { transform: translate(0, 0) scale(1); opacity: 0.9; }
	33%  { transform: translate(-9%, -7%) scale(1.12); opacity: 1; }
	66%  { transform: translate(7%, 9%) scale(0.88); opacity: 0.7; }
	100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
}
@keyframes brikk-orb-cyan {
	0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
	40%  { transform: translate(15%, -5%) scale(1.15); opacity: 0.75; }
	70%  { transform: translate(8%, 12%) scale(0.92); opacity: 0.4; }
	100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}
@keyframes brikk-orb-specular {
	0%, 100% { opacity: 0.85; transform: rotate(-22deg) scale(1); }
	50%      { opacity: 1;    transform: rotate(-22deg) scale(1.08); }
}
@keyframes brikk-orb-halo {
	0%, 100% { opacity: 0.7; transform: scale(0.96); }
	50%      { opacity: 1;   transform: scale(1.1); }
}
@keyframes brikk-orb-pulse {
	0%, 100% {
		transform: scale(1);
		box-shadow:
			0 0 50px rgba(120, 70, 220, 0.35),
			0 30px 60px rgba(20, 5, 50, 0.55);
	}
	50% {
		transform: scale(1.05);
		box-shadow:
			0 0 110px rgba(150, 90, 240, 0.7),
			0 0 40px rgba(200, 130, 255, 0.4),
			0 30px 60px rgba(20, 5, 50, 0.55);
	}
}

@media (prefers-reduced-motion: reduce) {
	.brikk-ai__login-orb::before,
	.brikk-ai__login-orb-layer { animation: none; }
}

.brikk-ai__login-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
	letter-spacing: 2.5px;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 14px;
}
.brikk-ai__login-eyebrow-brand { font-weight: 700; color: #ffffff; }
.brikk-ai__login-eyebrow-sep { color: rgba(255, 255, 255, 0.3); }
.brikk-ai__login-eyebrow-label { color: rgba(255, 255, 255, 0.55); font-weight: 500; }

.brikk-ai__login-title {
	font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-weight: 500;
	font-size: 32px;
	line-height: 1.15;
	margin: 0 0 10px;
	color: #ffffff;
}
.brikk-ai__login-sub {
	color: rgba(255, 255, 255, 0.65);
	font-size: 14px;
	margin: 0 0 26px;
}
.brikk-ai__login-error {
	background: rgba(255, 90, 90, 0.08);
	color: #ffb3b3;
	border: 1px solid rgba(255, 90, 90, 0.25);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13px;
	margin-bottom: 16px;
	text-align: left;
}

.brikk-ai__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	justify-content: center;
	width: 100%;
	padding: 13px 16px;
	border-radius: 14px;
	border: 1px solid transparent;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.05s ease, border-color 0.15s ease;
	box-sizing: border-box;
}
.brikk-ai__btn:active { transform: scale(0.99); }
.brikk-ai__btn--google {
	background: #ffffff;
	color: #14142b;
}
.brikk-ai__btn--google:hover { background: #f3f3f8; }
.brikk-ai__btn--google svg { flex: 0 0 18px; }
.brikk-ai__btn--email {
	background: rgba(255, 255, 255, 0.04);
	color: #ffffff;
	border-color: rgba(255, 255, 255, 0.08);
	margin-top: 4px;
}
.brikk-ai__btn--email:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.16);
}

.brikk-ai__login-sep {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0;
	color: rgba(255, 255, 255, 0.4);
	font-size: 11px;
	letter-spacing: 2px;
}
.brikk-ai__login-sep::before,
.brikk-ai__login-sep::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0) 100%);
}

.brikk-ai__login-legal {
	margin: 18px 0 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
	line-height: 1.6;
}
.brikk-ai__login-legal a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.brikk-ai__login-legal a:hover { color: #ffffff; }

.brikk-ai__login-foot {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}
.brikk-ai__login-foot a {
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
}
.brikk-ai__login-foot a:hover { color: #ffffff; }
.brikk-ai__login-foot-sep { color: rgba(255, 255, 255, 0.25); }
.brikk-ai__login-lang { display: inline-flex; gap: 6px; align-items: center; }
.brikk-ai__login-lang span { color: rgba(255, 255, 255, 0.25); }

@media (max-width: 540px) {
	#brikk-ai-root.brikk-ai--login {
		height: auto;
		min-height: 100dvh;
		grid-template-rows: auto auto auto;
		padding: 20px;
	}
	.brikk-ai__login-main { align-items: flex-start; padding: 16px 0; }
	.brikk-ai__login-card { padding: 28px 22px 24px; border-radius: 18px; }
	.brikk-ai__login-title { font-size: 26px; }
	.brikk-ai__login-orb { width: 108px; height: 108px; }
	.brikk-ai__login-foot { justify-content: center; }
}

/* ---------- App shell (dark, front-page vibe) ---------- */
body.brikk-ai-shell.brikk-ai-fullbleed {
	background: #0b0617;
}
#brikk-ai-root.brikk-ai {
	background:
		radial-gradient(120% 80% at 50% 0%, rgba(120, 70, 200, 0.22) 0%, rgba(40, 10, 70, 0) 60%),
		radial-gradient(80% 60% at 90% 90%, rgba(190, 60, 140, 0.18) 0%, rgba(20, 10, 40, 0) 60%),
		radial-gradient(60% 60% at 0% 30%, rgba(40, 30, 80, 0.4) 0%, rgba(10, 5, 25, 0) 70%),
		#0b0617;
	color: #ffffff;
}
.brikk-ai__app {
	display: grid;
	grid-template-columns: var(--brikk-sidebar-width) 1fr;
	width: 100%;
	height: 100dvh;
	min-height: 0;
	color: #ffffff;
}
body.admin-bar .brikk-ai__app { height: calc(100dvh - 32px); }
@media (max-width: 782px) {
	body.admin-bar .brikk-ai__app { height: calc(100dvh - 46px); }
}

/* ---------- Sidebar ---------- */
.brikk-ai__sidebar {
	display: flex;
	flex-direction: column;
	border-right: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(10, 5, 24, 0.55);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	padding: 16px 12px calc(8px + env(safe-area-inset-bottom));
	gap: 12px;
	min-width: 0;
	min-height: 0;
}
.brikk-ai__sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 2px 6px 0;
}
.brikk-ai__sidebar-title {
	font-weight: 600;
	font-size: 11px;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 1.5px;
}
.brikk-ai__new {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 14px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	cursor: pointer;
	font-weight: 500;
	font-size: 14px;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.brikk-ai__new:hover {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
	border-color: rgba(255, 255, 255, 0.18);
}
.brikk-ai__convs {
	list-style: none;
	padding: 0;
	margin: 0;
	overflow-y: auto;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}
.brikk-ai__conv {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 10px;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.78);
	font-size: 14px;
	min-width: 0;
}
.brikk-ai__conv:hover { background: rgba(255, 255, 255, 0.05); }
.brikk-ai__conv.is-active {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}
.brikk-ai__conv-title {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.brikk-ai__conv-del {
	opacity: 0;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	padding: 0;
	border-radius: 6px;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.brikk-ai__conv-del svg {
	width: 14px;
	height: 14px;
	display: block;
}
.brikk-ai__conv:hover .brikk-ai__conv-del,
.brikk-ai__conv.is-active .brikk-ai__conv-del { opacity: 1; }
.brikk-ai__conv-del:hover { color: #ff8a8a; background: rgba(255, 100, 100, 0.12); }

/* Sidebar tabs (Samtaler / Påmindelser) */
.brikk-ai__sidebar-tabs {
	display: flex;
	gap: 4px;
	width: 100%;
	padding: 4px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 12px;
}
.brikk-ai__tab {
	flex: 1;
	appearance: none;
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, 0.6);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	padding: 7px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.brikk-ai__tab:hover { color: rgba(255, 255, 255, 0.85); }
.brikk-ai__tab.is-active {
	background: rgba(255, 255, 255, 0.10);
	color: #ffffff;
}

/* Reminders list */
.brikk-ai__reminders {
	list-style: none;
	padding: 0;
	margin: 0;
	overflow-y: auto;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}
.brikk-ai__reminder {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	min-width: 0;
	transition: background 0.15s ease;
}
.brikk-ai__reminder:hover { background: rgba(255, 255, 255, 0.05); }
.brikk-ai__reminder-text {
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.brikk-ai__reminder-time {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
}
.brikk-ai__reminders-empty {
	padding: 14px 12px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	line-height: 1.45;
}

/* Edit reminder modal */
.brikk-ai__modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 16px;
}
.brikk-ai__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.brikk-ai__modal-card {
	position: relative;
	z-index: 1;
	background: rgba(20, 12, 36, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 16px;
	padding: 22px;
	width: 100%;
	max-width: 440px;
	color: #ffffff;
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
	display: flex;
	flex-direction: column;
	gap: 14px;
	color-scheme: dark;
}
/* color-scheme: dark on the card already renders the native picker icon
   light; an extra filter: invert(1) here would flip it back to black. */
.brikk-ai__modal-card input::-webkit-calendar-picker-indicator,
.brikk-ai__modal-card input::-webkit-clear-button {
	opacity: 0.7;
	cursor: pointer;
}
.brikk-ai__modal-card input::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.brikk-ai__modal-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
}
.brikk-ai__modal-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	text-transform: uppercase;
	letter-spacing: 0.6px;
}
.brikk-ai__modal-input,
.brikk-ai__modal-textarea,
.brikk-ai .brikk-ai__modal-input,
.brikk-ai .brikk-ai__modal-textarea {
	font: inherit;
	font-size: 14px;
	color: #ffffff;
	-webkit-text-fill-color: #ffffff;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 10px;
	padding: 10px 12px;
	width: 100%;
	box-sizing: border-box;
	text-transform: none;
	letter-spacing: normal;
}
.brikk-ai__modal-textarea {
	resize: vertical;
	min-height: 70px;
}
.brikk-ai__modal-input::placeholder,
.brikk-ai__modal-textarea::placeholder {
	color: rgba(255, 255, 255, 0.45);
	-webkit-text-fill-color: rgba(255, 255, 255, 0.45);
	opacity: 1;
}
/* Defensive: browser autofill must not flip dark inputs to yellow-bg/black-text. */
.brikk-ai__modal-input:-webkit-autofill,
.brikk-ai__modal-textarea:-webkit-autofill,
textarea.brikk-ai__input:-webkit-autofill {
	-webkit-text-fill-color: #ffffff;
	-webkit-box-shadow: 0 0 0 1000px rgba(20, 12, 36, 0.96) inset;
	caret-color: #ffffff;
}
/* Defensive: selection inside the dark app must stay readable. */
#brikk-ai-root.brikk-ai ::selection,
#brikk-ai-root.brikk-ai--login ::selection,
.brikk-ai__modal-card ::selection {
	background: rgba(122, 74, 216, 0.55);
	color: #ffffff;
}
.brikk-ai__modal-input:focus,
.brikk-ai__modal-textarea:focus {
	outline: none;
	border-color: rgba(180, 130, 255, 0.5);
	background: rgba(255, 255, 255, 0.09);
}
.brikk-ai__modal-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-top: 4px;
}
.brikk-ai__btn--secondary,
.brikk-ai__btn--primary,
.brikk-ai__btn--danger {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	padding: 9px 14px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.brikk-ai__btn--secondary {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.10);
	color: rgba(255, 255, 255, 0.85);
}
.brikk-ai__btn--secondary:hover { background: rgba(255, 255, 255, 0.10); }
.brikk-ai__btn--primary {
	background: linear-gradient(135deg, #7a4ad8 0%, #5a26c4 100%);
	border: 1px solid rgba(180, 130, 255, 0.55);
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(90, 38, 196, 0.35);
}
.brikk-ai__btn--primary:hover { filter: brightness(1.08); }
.brikk-ai__btn--primary:disabled { opacity: 0.6; cursor: default; }
.brikk-ai__btn--danger {
	background: transparent;
	border: 1px solid rgba(255, 120, 120, 0.35);
	color: #ff8a8a;
	margin-right: auto;
}
.brikk-ai__btn--danger:hover { background: rgba(255, 100, 100, 0.12); }

.brikk-ai__user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
	margin: auto -12px calc(-8px - env(safe-area-inset-bottom));
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	font-size: 13px;
}
@media (max-width: 720px) {
	.brikk-ai__user {
		margin: auto -22px calc(-18px - env(safe-area-inset-bottom));
	}
}
.brikk-ai__avatar {
	width: 30px; height: 30px;
	border-radius: 50%;
	background: linear-gradient(135deg, #7a4ad8 0%, #c14db7 100%);
	color: #ffffff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 600;
	font-size: 12px;
	flex: 0 0 30px;
}
.brikk-ai__user-meta {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.6);
}
.brikk-ai__signout {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	font-size: 13px;
	text-decoration: none;
}
.brikk-ai__signout:hover { color: #ffffff; }

/* User menu (gear button + dropdown) */
.brikk-ai__user-menu {
	position: relative;
	flex: 0 0 auto;
}
.brikk-ai__user-menu-btn {
	appearance: none;
	background: none;
	border: 0;
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	flex: 0 0 32px;
	padding: 0;
	box-sizing: border-box;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.brikk-ai__user-menu-btn svg {
	width: 18px;
	height: 18px;
	color: inherit;
	fill: none;
	stroke: currentColor;
}
.brikk-ai__user-menu-btn svg * {
	fill: none;
	stroke: currentColor;
}
.brikk-ai__user-menu-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.brikk-ai__user-menu-btn[aria-expanded="true"] { color: #ffffff; background: rgba(255, 255, 255, 0.08); }
.brikk-ai__user-dropdown {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	min-width: 160px;
	background: rgba(20, 12, 36, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 10px;
	padding: 4px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
	display: none;
	z-index: 50;
}
.brikk-ai__user-dropdown.is-open { display: block; }
.brikk-ai__menu-item {
	appearance: none;
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, 0.85);
	font: inherit;
	font-size: 13px;
	padding: 8px 10px;
	border-radius: 7px;
	cursor: pointer;
	text-decoration: none;
	box-sizing: border-box;
}
.brikk-ai__menu-item:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }

.brikk-ai__modal-help {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.4;
}

/* ---------- Main column ---------- */
.brikk-ai__main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	position: relative;
}
.brikk-ai__topbar {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(10, 5, 24, 0.35);
}
.brikk-ai__menu {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 6px 10px;
	border-radius: 8px;
	cursor: pointer;
	color: #ffffff;
	font-size: 16px;
	line-height: 1;
}
.brikk-ai__topbar-title {
	font-weight: 600;
	font-size: 15px;
	color: #ffffff;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Messages ---------- */
.brikk-ai__messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px 18px 12px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	-webkit-overflow-scrolling: touch;
	min-height: 0;
}
.brikk-ai__messages-inner {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.brikk-ai__msg {
	display: flex;
	max-width: 92%;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.brikk-ai__msg--user { align-self: flex-end; }
.brikk-ai__msg--assistant { align-self: flex-start; }
.brikk-ai__bubble {
	padding: 12px 16px;
	border-radius: 18px;
	font-size: 15px;
	line-height: 1.55;
}
.brikk-ai__msg--user .brikk-ai__bubble {
	background: linear-gradient(135deg, #6e3fd6 0%, #4f23b3 100%);
	color: #ffffff;
	border-bottom-right-radius: 6px;
	box-shadow: 0 6px 20px rgba(80, 30, 180, 0.25);
}
.brikk-ai__msg--assistant .brikk-ai__bubble {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.92);
	border-bottom-left-radius: 6px;
}
.brikk-ai__thinking {
	color: rgba(255, 255, 255, 0.55);
	font-style: italic;
	padding: 8px 14px;
}

/* ---------- Empty / hero state ---------- */
.brikk-ai__hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	justify-content: safe center;
	gap: 22px;
	padding: 64px 20px 24px;
	text-align: center;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.brikk-ai__hero-title {
	margin: 0;
	font-size: 32px;
	font-weight: 600;
	letter-spacing: -0.5px;
	color: #ffffff;
}
.brikk-ai__hero-sub {
	margin: 0;
	color: rgba(255, 255, 255, 0.6);
	font-size: 15px;
	line-height: 1.5;
	max-width: 420px;
}
.brikk-ai__hero-hint {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.6);
	font-size: 12px;
	letter-spacing: 0.3px;
}

/* Interactive orb (push-to-talk button) */
.brikk-ai__orb-btn {
	appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	position: relative;
	width: min(200px, 30vh);
	height: min(200px, 30vh);
	display: block;
	flex-shrink: 0;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	transition: transform 0.15s ease;
}
.brikk-ai__orb-btn:active,
.brikk-ai__orb-btn.is-recording { transform: scale(0.97); }
.brikk-ai__orb-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 8px; border-radius: 50%; }
.brikk-ai__orb-btn.is-recording .brikk-ai__login-orb-shape {
	box-shadow:
		0 0 90px rgba(255, 80, 130, 0.7),
		0 30px 60px rgba(20, 5, 50, 0.55);
}
.brikk-ai__orb-btn.is-recording::after {
	content: "";
	position: absolute;
	inset: -14px;
	border-radius: 50%;
	border: 2px solid rgba(255, 100, 150, 0.65);
	animation: brikk-ai-ptt-pulse 1.1s ease-out infinite;
	pointer-events: none;
}
@keyframes brikk-ai-ptt-pulse {
	0%   { transform: scale(0.95); opacity: 0.9; }
	100% { transform: scale(1.18); opacity: 0; }
}

/* ---------- Composer (pill) ---------- */
.brikk-ai__composer-wrap {
	padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
	background: linear-gradient(180deg, rgba(11, 6, 23, 0) 0%, rgba(11, 6, 23, 0.6) 30%, rgba(11, 6, 23, 0.85) 100%);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 14px;
}
.brikk-ai__composer {
	flex: 1;
	min-width: 0;
	max-width: 760px;
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 8px 8px 8px 14px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 22px;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.brikk-ai__composer:focus-within {
	border-color: rgba(180, 130, 255, 0.4);
	background: rgba(255, 255, 255, 0.07);
}
textarea.brikk-ai__input {
	flex: 1;
	resize: none;
	max-height: 160px;
	min-height: 28px;
	border: 0;
	background: transparent;
	padding: 10px 4px;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: #ffffff;
	-webkit-text-fill-color: #ffffff;
	caret-color: #ffffff;
	outline: none;
	box-shadow: none;
}
textarea.brikk-ai__input::placeholder { color: rgba(255, 255, 255, 0.4); -webkit-text-fill-color: rgba(255, 255, 255, 0.4); }
.brikk-ai__icon-btn {
	width: 40px; height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.04);
	color: #ffffff;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	flex: 0 0 40px;
	font-size: 16px;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.brikk-ai__icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.brikk-ai__icon-btn--primary {
	background: linear-gradient(135deg, #7a4ad8 0%, #5a26c4 100%);
	border-color: rgba(255, 255, 255, 0.18);
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(90, 38, 196, 0.4);
}
.brikk-ai__icon-btn--primary:hover { filter: brightness(1.1); }
.brikk-ai__icon-btn--recording {
	background: linear-gradient(135deg, #ff5a8a 0%, #c1295e 100%);
	border-color: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	animation: brikk-ai-pulse 1.2s ease-in-out infinite;
}
.brikk-ai__icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Mic icon (transcribe-to-text) — always visible */
.brikk-ai__mic-icon {
	appearance: none;
	background: transparent;
	border: 0;
	padding: 8px;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	color: rgba(255, 255, 255, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.15s ease, color 0.15s ease;
}
.brikk-ai__mic-icon:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.brikk-ai__mic-icon.is-recording {
	color: #ff7a9a;
	background: rgba(255, 90, 130, 0.12);
}

/* Voice-mode orb (rightmost, when input is empty) AND send button — pixel-identical */
.brikk-ai__voice-orb,
.brikk-ai__send-btn {
	appearance: none;
	box-sizing: border-box;
	border: 0;
	padding: 0;
	margin: 0;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	flex: 0 0 36px;
	border-radius: 50%;
	background: #ffffff;
	color: #0b0617;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	line-height: 1;
	font-size: 0;
	box-shadow: none;
	transition: transform 0.1s ease, background 0.15s ease;
}
.brikk-ai__voice-orb:hover,
.brikk-ai__send-btn:hover { background: rgba(255, 255, 255, 0.88); }
.brikk-ai__voice-orb:active,
.brikk-ai__send-btn:active { transform: scale(0.96); }
.brikk-ai__voice-orb.is-recording {
	background: linear-gradient(135deg, #ff5a8a 0%, #c1295e 100%);
	color: #ffffff;
}

/* Toggle visibility: orb when empty, send when text */
.brikk-ai__composer .brikk-ai__send-btn { display: none; }
.brikk-ai__composer.has-text .brikk-ai__voice-orb { display: none; }
.brikk-ai__composer.has-text .brikk-ai__send-btn { display: flex; }

/* Mini orb voice button beside composer */
.brikk-ai__mic-orb {
	appearance: none;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	margin-bottom: 3px;
	display: block;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.15s ease;
}
.brikk-ai__mic-orb:hover { transform: scale(1.08); }
.brikk-ai__mic-orb:active,
.brikk-ai__mic-orb.is-recording { transform: scale(0.95); }

.brikk-ai__mic-orb-shape {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	overflow: hidden;
	background: radial-gradient(circle at 50% 45%, #6b32c4 0%, #4f1eaa 45%, #2e0e7a 80%, #1c0858 100%);
	box-shadow:
		0 0 24px rgba(120, 70, 220, 0.45),
		0 8px 20px rgba(20, 5, 50, 0.5);
}
.brikk-ai__mic-orb.is-recording .brikk-ai__mic-orb-shape {
	box-shadow:
		0 0 30px rgba(255, 80, 130, 0.6),
		0 8px 20px rgba(20, 5, 50, 0.5);
}
.brikk-ai__mic-orb.is-recording::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid rgba(255, 100, 150, 0.6);
	animation: brikk-ai-ptt-pulse 1.1s ease-out infinite;
	pointer-events: none;
}

.brikk-ai__mic-orb-layer {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	will-change: opacity;
	mix-blend-mode: screen;
}
.brikk-ai__mic-orb-layer--core {
	width: 70%;
	height: 70%;
	left: 15%;
	top: 10%;
	background: radial-gradient(circle at 50% 50%,
		rgba(245, 230, 255, 0.9) 0%,
		rgba(205, 175, 255, 0.55) 25%,
		rgba(160, 110, 240, 0.2) 55%,
		rgba(120, 70, 220, 0) 80%);
	filter: blur(4px);
}
.brikk-ai__mic-orb-layer--specular {
	width: 36%;
	height: 24%;
	left: 28%;
	top: 16%;
	background: radial-gradient(ellipse at 50% 50%,
		rgba(255, 255, 255, 0.85) 0%,
		rgba(255, 240, 255, 0.35) 40%,
		rgba(255, 220, 255, 0) 75%);
	transform: rotate(-18deg);
	filter: blur(1.5px);
}

@keyframes brikk-ai-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 138, 0.5); }
	50%      { box-shadow: 0 0 0 10px rgba(255, 90, 138, 0); }
}

/* ---------- Backdrop (mobile sidebar) ---------- */
.brikk-ai__backdrop {
	position: fixed; inset: 0; z-index: 25;
	background: rgba(5, 2, 15, 0.55);
	opacity: 0; pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.brikk-ai__app { grid-template-columns: 1fr; }
	.brikk-ai__sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		width: min(86%, 320px);
		z-index: 30;
		transform: translateX(-100%);
		transition: transform 0.22s ease;
		background: rgba(10, 5, 24, 0.92);
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
		padding: 26px 22px calc(18px + env(safe-area-inset-bottom));
	}
	.brikk-ai__app.is-sidebar-open .brikk-ai__sidebar { transform: translateX(0); }
	.brikk-ai__app.is-sidebar-open .brikk-ai__backdrop {
		opacity: 1; pointer-events: auto;
	}
	.brikk-ai__topbar { display: flex; }
	.brikk-ai__hero-title { font-size: 26px; }
	.brikk-ai__orb-btn { width: min(140px, 22vh); height: min(140px, 22vh); }
}
@media (max-width: 400px) {
	.brikk-ai__orb-btn { width: min(120px, 20vh); height: min(120px, 20vh); }
	.brikk-ai__hero { gap: 18px; }
}
