/* demo — kaart in ctxr-stijl (nov 2026). Hoort bij theme/static/js/map.js.
 * Kleuren uit ctxr-skin.css (--ctxr-*); geel alleen voor de primaire actie
 * en de stromende routelijn. */
.cm-map { font-family: var(--font-body); }
.cm-map .leaflet-control { font: inherit; }

/* Categorieën: kleur + lijnicoon */
.cm-cat--museum     { --cm-c: #5e1e43; }
.cm-cat--cafe       { --cm-c: #a2476f; }
.cm-cat--winkel     { --cm-c: #2e0f22; }
.cm-cat--supermarkt { --cm-c: #8f6f84; }
.cm-cat--pin        { --cm-c: #7a2c59; }

/* Markers */
.cm-marker {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%; box-sizing: border-box;
	border-radius: 50%; background: var(--cm-c, #5e1e43); color: #fff;
	border: 2px solid #fff; box-shadow: 0 2px 8px rgba(46,15,34,.28);
	transition: transform .15s ease;
}
.leaflet-marker-icon:hover .cm-marker { transform: scale(1.1); }
.cm-marker--big { border-width: 3px; box-shadow: 0 0 0 5px rgba(255,222,23,.55), 0 3px 12px rgba(46,15,34,.35); }
.cm-marker--dim { opacity: .8; border-width: 1.5px; }
.cm-marker--num { font-weight: 700; font-size: 13px; }
.cm-cluster {
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%;
	background: var(--ctxr-paper, #fbf7f9); color: var(--ctxr-wine, #5e1e43);
	border: 3px solid var(--ctxr-wine, #5e1e43); font-weight: 700; font-size: 14px;
	box-shadow: 0 0 0 4px rgba(94,30,67,.18), 0 2px 8px rgba(46,15,34,.25);
}
.cm-area {
	display: inline-block; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
	background: var(--ctxr-wine, #5e1e43); color: #fff; font-size: 12px; font-weight: 600;
	box-shadow: 0 2px 8px rgba(46,15,34,.25);
}
.cm-home {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	border-radius: 50%; background: var(--ctxr-signal, #ffde17); color: var(--ctxr-ink, #2e0f22);
	border: 2px solid var(--ctxr-ink, #2e0f22);
}
.cm-pop-in { animation: cm-pop-in .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes cm-pop-in { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Mijn locatie */
.cm-me { fill: #2a6fdb; fill-opacity: 1; stroke: #fff; }
.cm-me-acc { fill: #2a6fdb; fill-opacity: .12; stroke: #2a6fdb; }

/* Routelijnen: wijnrode basis, gele stroom */
.cm-line { stroke: var(--ctxr-wine, #5e1e43); stroke-opacity: .9; fill: none; }
.cm-line--dashed { stroke-dasharray: 8 8; stroke-opacity: .7; }
.cm-line-flow {
	stroke: var(--ctxr-signal, #ffde17); fill: none; stroke-dasharray: 2 14;
	animation: cm-flow 1.1s linear infinite;
}
@keyframes cm-flow { to { stroke-dashoffset: -16; } }

/* Popups */
.cm-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 24px rgba(46,15,34,.2); }
.cm-popup .leaflet-popup-content { margin: 0; width: auto !important; min-width: 230px; }
.cm-popup .leaflet-popup-close-button { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); top: 4px; right: 4px; }
.cm-pop + .cm-pop { border-top: 1px solid var(--ctxr-line, #e2d2db); }
.cm-pop-img { display: block; width: 100%; height: 130px; object-fit: cover; }
.cm-pop-band { display: flex; align-items: center; justify-content: center; height: 64px; background: var(--cm-c); color: #fff; }
.cm-pop-body { display: grid; gap: 4px; padding: 12px 14px 14px; color: var(--ctxr-ink, #2e0f22); }
.cm-pop-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cm-c, var(--ctxr-rose, #8f6f84)); }
.cm-pop-num { font-size: 12px; color: var(--ctxr-rose, #8f6f84); font-weight: 600; }
.cm-pop-name { font-size: 16px; font-weight: 700; line-height: 1.25; }
.cm-pop-adr { font-size: 12.5px; color: var(--ctxr-rose, #8f6f84); }
.cm-pop-desc { margin: 2px 0 0 !important; font-size: 13.5px; line-height: 1.45; color: #4a2a3c; }
.cm-pop-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }

/* Knoppen in de kaart */
.cm-map .cm-btn {
	display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px;
	border: 1px solid var(--ctxr-wine, #5e1e43); background: #fff; color: var(--ctxr-wine, #5e1e43);
	font: 600 12.5px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
}
.cm-map .cm-btn:hover { background: var(--ctxr-blush, #f1e6ec); }
.cm-map .cm-btn--primary { background: var(--ctxr-signal, #ffde17); border-color: var(--ctxr-signal, #ffde17); color: var(--ctxr-ink, #2e0f22); }
.cm-map .cm-btn--primary:hover { background: var(--ctxr-signal, #ffde17); filter: brightness(.96); }
.cm-map .cm-link { flex-basis: 100%; font-size: 12.5px; font-weight: 600; color: var(--ctxr-wine, #5e1e43); }
.cm-map .cm-btn:focus-visible, .cm-map button:focus-visible, .cm-map .cm-link:focus-visible { outline: 2px solid var(--ctxr-wine, #5e1e43); outline-offset: 2px; }

/* Legenda */
.cm-legend {
	background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(46,15,34,.18);
	min-width: 190px; max-width: 240px; overflow: hidden; color: var(--ctxr-ink, #2e0f22);
}
.cm-legend-head {
	display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px;
	padding: 10px 12px; border: 0; background: var(--ctxr-wine, #5e1e43); color: #fff;
	font: 700 13px var(--font-body); cursor: pointer; text-align: left;
}
.cm-legend-head::after { content: '▾'; transition: transform .2s; }
.cm-legend-head[aria-expanded="false"]::after { transform: rotate(-90deg); }
.cm-legend-list { list-style: none; margin: 0; padding: 6px; }
.cm-legend-list li { margin: 0; }
.cm-legend-list label { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.cm-legend-list label:hover { background: var(--ctxr-blush, #f1e6ec); }
.cm-legend-list input { accent-color: var(--ctxr-wine, #5e1e43); margin: 0; }
.cm-legend-ico { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--cm-c); color: #fff; flex: none; }
.cm-legend-ico--routes { background: linear-gradient(90deg, var(--ctxr-wine, #5e1e43) 0 30%, var(--ctxr-signal, #ffde17) 30% 50%, var(--ctxr-wine, #5e1e43) 50% 80%, var(--ctxr-signal, #ffde17) 80%); border-radius: 4px; height: 6px; }
.cm-legend-ico--areas { background: var(--ctxr-wine, #5e1e43); border-radius: 999px; height: 12px; }
.cm-legend-name { flex: 1; }
.cm-legend-n { font-size: 12px; color: var(--ctxr-rose, #8f6f84); font-weight: 600; }
.cm-legend-extra { border-top: 1px solid var(--ctxr-line, #e2d2db); margin-top: 4px !important; padding-top: 4px; }
.cm-legend-list input:not(:checked) ~ .cm-legend-ico { opacity: .35; }

/* Routeplanner */
.cm-nav {
	display: grid; gap: 8px; width: 260px; max-width: calc(100vw - 40px); padding: 12px;
	background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(46,15,34,.18);
	color: var(--ctxr-ink, #2e0f22);
}
.cm-nav[hidden] { display: none; }
.cm-nav-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.cm-nav-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.cm-nav-close { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ctxr-rose, #8f6f84); cursor: pointer; padding: 0 2px; }
.cm-seg { display: flex; gap: 4px; padding: 3px; background: var(--ctxr-blush, #f1e6ec); border-radius: 999px; }
.cm-seg button {
	flex: 1; border: 0; background: none; padding: 6px 8px; border-radius: 999px; cursor: pointer;
	font: 600 12.5px var(--font-body); color: var(--ctxr-wine, #5e1e43); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cm-seg button[aria-pressed="true"] { background: var(--ctxr-wine, #5e1e43); color: #fff; }
.cm-nav-stats { font-size: 15px; font-weight: 700; min-height: 1.2em; }
.cm-nav .cm-btn { justify-content: center; }

/* Melding */
.cm-toast {
	position: absolute; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%);
	background: var(--ctxr-ink, #2e0f22); color: #fff; padding: 8px 14px; border-radius: 999px;
	font: 500 14px var(--font-body); box-shadow: 0 2px 10px rgba(0,0,0,.3); max-width: 90%; text-align: center;
}

/* Bedieningsknoppen */
.cm-map .leaflet-bar a { color: var(--ctxr-wine, #5e1e43); }
.cm-map .leaflet-bar a.cm-fs-link, .cm-locate a { display: flex; align-items: center; justify-content: center; }
.cm-locate a { width: 30px; height: 30px; }

/* Schermvullend */
.cm-fs {
	position: fixed !important; inset: 0 !important; width: 100% !important; height: 100vh !important; height: 100dvh !important;
	max-width: none !important; max-height: none !important; margin: 0 !important; border-radius: 0 !important; z-index: 2147483000 !important;
}
html.cm-fs-open, html.cm-fs-open body { overflow: hidden !important; }

@media (max-width: 700px) {
	.cm-legend { min-width: 0; }
	.cm-nav { width: 230px; }
}
@media (prefers-reduced-motion: reduce) {
	.cm-line-flow { animation: none; stroke-dasharray: none; stroke-opacity: .35; }
	.cm-pop-in { animation: none; }
	.cm-marker { transition: none; }
}
