/* AI-blok op het dashboard (handoff design_handoff_dashboard_ai_blok, 2 okt 2026). Tokens en de AI-kern komen uit
   ai-chat.css (wortel .aic). De kaart zelf is altijd donkerblauw; het chatpaneel volgt dag en nacht via de tokens. */

@property --mdai-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes mdaiAng { to { --mdai-ang: 360deg; } }
@keyframes mdaiDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, 34px) scale(1.18); } }

.mdai { position: relative; overflow: hidden; margin: 0 0 24px; border-radius: 20px; padding: 24px 40px 16px; color: #fff;
	background: linear-gradient(135deg, #0f2a54, #152a80 55%, #1a4a9c); box-shadow: 0 26px 50px -24px rgba(21, 42, 128, .7); font-family: var(--font-sans); line-height: 1.55; }

/* Bewegend licht achter de inhoud (decoratief). */
.mdai-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mdai-blob { position: absolute; border-radius: 50%; animation: mdaiDrift 14s ease-in-out infinite alternate; }
.mdai-blob--1 { width: 560px; height: 560px; left: -12%; top: -55%; background: radial-gradient(circle, rgba(91, 151, 255, .5), transparent 65%); }
.mdai-blob--2 { width: 480px; height: 480px; left: 60%; top: -5%; background: radial-gradient(circle, rgba(29, 101, 175, .6), transparent 65%); animation-duration: 17s; animation-delay: -4s; }
.mdai-blob--3 { width: 320px; height: 320px; left: 34%; top: 52%; background: radial-gradient(circle, rgba(255, 209, 102, .16), transparent 65%); animation-duration: 12s; animation-delay: -2s; }

/* Knop AI Centrum openen, rechtsboven en zwevend (telt niet mee voor de hoogte). */
.mdai .mdai-open { position: absolute; z-index: 1; top: 20px; right: 24px; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 15px 0 13px; border-radius: 9px;
	background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .38); color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-decoration: none;
	transition: background .15s var(--ease-standard), transform .15s var(--ease-standard); }
.mdai .mdai-open:hover { background: rgba(255, 255, 255, .22); color: #fff; transform: translateY(-1px); }
.mdai .mdai-open:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mdai-open svg { flex: none; }
.mdai-open__pijl { color: var(--accent-yellow, #ffd166); }

/* Kern, kop en chat in het midden. */
.mdai-midden { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mdai-kern { display: flex; }
.mdai-kern .aic-kern__ster svg { animation: aicBreath 4s ease-in-out infinite; }
.mdai-kern .aic-kern__ster::before { animation: aicKernAdem 4s ease-in-out infinite; }
.mdai .mdai-titel { margin: 14px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; color: #fff; }

.mdai-chat { position: relative; width: 100%; max-width: 700px; margin-top: 16px; text-align: left; }
.mdai-ring { position: absolute; inset: -2px; border-radius: 19px;
	background: conic-gradient(from var(--mdai-ang), rgba(91, 151, 255, .95), rgba(255, 209, 102, .95), rgba(255, 255, 255, .55), rgba(91, 151, 255, .95)); animation: mdaiAng 6s linear infinite; }
.mdai-paneel { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: 17px; overflow: hidden; box-shadow: 0 18px 40px -14px rgba(5, 10, 30, .6); color: var(--gray-darker); }

.mdai-berichten { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 12px; background: var(--body-bg); }
.mdai-ai { display: flex; gap: 12px; align-items: flex-end; max-width: 88%; }
.mdai-ai__inhoud { min-width: 0; }
.mdai-ai__naam { font-size: 12px; font-weight: 700; color: var(--gray-base); margin: 0 0 5px 14px; }
.mdai-bubbel { position: relative; background: var(--surface); border-radius: 18px 18px 18px 4px; padding: 10px 15px; font-size: 14px; line-height: 1.6; color: var(--gray-darker); text-wrap: pretty;
	box-shadow: 0 1px 2px rgba(23, 25, 28, .06), 0 8px 20px -6px rgba(23, 25, 28, .12); }
.mdai .mdai-bubbel p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--gray-darker); }
.mdai .mdai-bubbel p:last-child { margin: 0; }
.mdai-bubbel__staart { position: absolute; left: -8px; bottom: 0; fill: var(--surface); }

.mdai-vraag { display: flex; justify-content: flex-end; }
.mdai-vraag[hidden] { display: none; }
.mdai-vraag__bel { max-width: 80%; background: var(--b08); color: var(--sbt); border-radius: 14px 14px 4px 14px; padding: 9px 13px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.mdai-bezig { display: flex; align-items: center; gap: 12px; }
.mdai-bezig[hidden] { display: none; }
.mdai-lijnen { display: flex; flex-direction: column; gap: 5px; }
.mdai-lijn { position: relative; display: block; height: 2px; border-radius: 2px; overflow: hidden; background: linear-gradient(90deg, rgba(91, 151, 255, .5), rgba(91, 151, 255, 0)); }
.mdai-lijn:nth-child(1) { width: 80px; } .mdai-lijn:nth-child(2) { width: 58px; } .mdai-lijn:nth-child(3) { width: 70px; }
.mdai-lijn i { position: absolute; top: 0; bottom: 0; width: 32%; border-radius: 2px; background: linear-gradient(90deg, transparent, #5b97ff, #ffd166); animation: aicSlide 1.5s cubic-bezier(.4, 0, .2, 1) infinite; }
.mdai-lijn:nth-child(2) i { animation-delay: .35s; } .mdai-lijn:nth-child(3) i { animation-delay: .7s; }

/* Gekozen bijlagen boven de invoerregel. */
.mdai-bijlagen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 8px 12px 0; list-style: none; border-top: 1px solid var(--gray-lighter-4); }
.mdai-bijlagen[hidden] { display: none; }
.mdai-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--i1); border: 1px solid var(--gray-lighter-4);
	font-size: 12.5px; color: var(--gray-darker); }
.mdai-chip__naam { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdai-chip__weg { width: 22px; height: 22px; flex: none; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--gray-base); cursor: pointer; }
.mdai-chip__weg:hover { background: var(--b06); color: var(--brand-primary); }

.mdai-invoer { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px; border-top: 1px solid var(--gray-lighter-4); }
.mdai-bijlagen:not([hidden]) + .mdai-invoer { border-top: 0; }
.mdai-bestand { display: none; }
.mdai-clip { width: 44px; height: 44px; flex: none; margin: 0; padding: 0; border: none; border-radius: 11px; background: transparent; color: var(--gray-base); display: flex; align-items: center; justify-content: center; cursor: pointer;
	transition: background .15s var(--ease-standard), color .15s var(--ease-standard); }
.mdai-clip:hover { background: var(--b06); color: var(--brand-primary); }
.mdai .mdai-veld { flex: 1; min-width: 0; height: 44px; max-height: 132px; box-sizing: border-box; resize: none; margin: 0; border: none; outline: none; background: transparent; padding: 11px 4px;
	font-family: var(--font-sans); font-size: 16px; line-height: 22px; color: var(--gray-darker); box-shadow: none; }
.mdai .mdai-veld::placeholder { color: var(--gray-lighter); opacity: 1; }
.mdai-stuur { width: 44px; height: 44px; flex: none; margin: 0; padding: 0; border: none; border-radius: 12px; color: #fff; background: var(--bds); display: flex; align-items: center; justify-content: center; cursor: pointer;
	transition: background .15s var(--ease-standard); }
.mdai-stuur.is-klaar { background: var(--grad); }
.mdai .mdai-clip:focus-visible, .mdai .mdai-stuur:focus-visible, .mdai .mdai-chip__weg:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.mdai-paneel:focus-within .mdai-invoer { box-shadow: inset 0 0 0 2px var(--b12); }

/* Voorbeeldvragen. */
.mdai-vb { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mdai .mdai-pil { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 50px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
	color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .15s var(--ease-standard); }
.mdai .mdai-pil:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.mdai .mdai-pil:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Grijze balk met de EU-vlag, rand tot rand. */
.mdai-eu { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 18px -40px -16px; padding: 9px 40px; background: var(--i1);
	border-top: 1px solid var(--gray-lighter-4); font-size: 12.5px; color: var(--gray-base); }
.mdai-eu .aic-vlag { width: 39px; height: 26px; }
.mdai-eu b { font-weight: 700; color: var(--gray-darker); }
.mdai-melding { position: relative; margin: 10px 0 0; text-align: center; font-size: 13px; color: #fff; }

@media (max-width: 760px) {
	.mdai { padding: 64px 16px 16px; }
	.mdai .mdai-open { top: 14px; right: 14px; }
	.mdai .mdai-titel { font-size: 20px; }
	.mdai-ai { max-width: 100%; }
	.mdai-eu { margin: 16px -16px -16px; padding: 9px 16px; }
	.mdai .mdai-pil { white-space: normal; height: auto; min-height: 32px; padding: 6px 13px; }
}

@media (prefers-reduced-motion: reduce) {
	.mdai-blob, .mdai-ring, .mdai-kern .aic-kern__ster svg, .mdai-kern .aic-kern__ster::before { animation: none; }
}
