.customer-picker { position:relative; }
.customer-picker-field select { display:none; }
.customer-results { position:absolute; z-index:4; width:100%; max-height:280px; overflow-y:auto; margin-top:4px; padding:5px; background:#fff; border:1px solid #cfd5df; border-radius:9px; box-shadow:var(--shadow); }
.customer-result { display:flex; flex-direction:column; align-items:flex-start; width:100%; min-height:auto; padding:10px 12px; border:0; border-radius:6px; background:#fff; color:var(--ink); text-align:left; font-weight:400; }
.customer-result:hover,.customer-result.is-active { background:var(--brand-soft); color:var(--ink); }
.customer-result span { color:var(--muted); font-size:13px; }
/* Afmeldstatus in de klantenkiezer; de sterkere selector is nodig omdat
   `.customer-result span` anders kleur en grootte overneemt. */
.customer-result-badge { padding:2px 8px; border:1px solid #fecdca; border-radius:999px; background:#fef3f2; color:#b42318; font-size:11px; font-weight:750; white-space:nowrap; }
.customer-result .customer-result-badge { align-self:flex-start; margin:2px 0; color:#b42318; font-size:11px; }
.customer-selected-copy { display:flex; align-items:center; gap:8px; min-width:0; }
.customer-search-status { min-height:20px; color:var(--muted); font-size:13px; margin:7px 0 0; }
.customer-selected { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid #aabcfb; border-radius:8px; background:var(--brand-soft); }
.customer-selected-name { font-weight:700; }
.customer-clear { min-height:auto; padding:4px 8px; background:#fff; color:var(--brand-dark); border-color:#c7d7fe; font-size:12px; }
.quota-info { position:relative; display:inline-grid; place-items:center; width:17px; height:17px; min-height:17px; padding:0; border:1px solid #b8c2d1; border-radius:50%; background:#fff; color:var(--muted); font-size:11px; font-weight:800; line-height:1; cursor:help; }
.quota-info:hover,.quota-info:focus-visible { border-color:var(--brand); background:var(--brand-soft); color:var(--brand-dark); }
.quota-info::after { content:attr(data-tooltip); position:absolute; z-index:5; right:0; top:calc(100% + 8px); width:max-content; max-width:220px; padding:9px 10px; border:1px solid #c7d7fe; border-radius:8px; background:#172033; color:#fff; box-shadow:var(--shadow); font-size:12px; font-weight:500; line-height:1.4; text-align:left; white-space:normal; overflow-wrap:anywhere; opacity:0; visibility:hidden; transform:translateY(-3px); transition:opacity .15s,transform .15s,visibility .15s; pointer-events:none; }
.quota-info:hover::after,.quota-info:focus-visible::after { opacity:1; visibility:visible; transform:translateY(0); }

.markdown-editor { display:block; }
.markdown-editor .markdown-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:4px; margin-bottom:6px; padding:6px; border:1px solid #cfd5df; border-radius:8px 8px 0 0; background:#f8fafc; }
.markdown-editor .markdown-toolbar-btn { display:inline-flex; align-items:center; justify-content:center; min-height:30px; padding:3px 9px; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--ink); font-size:13px; font-weight:700; cursor:pointer; }
.markdown-editor .markdown-toolbar-btn:hover { background:#fff; border-color:#c8ced8; }
.markdown-editor .markdown-toolbar-btn:focus-visible { outline:3px solid #c7d7fe; outline-offset:1px; }
.markdown-editor .markdown-toolbar-btn[disabled] { opacity:.45; cursor:not-allowed; }
.markdown-editor .markdown-toolbar-sep { width:1px; height:20px; margin:0 4px; background:#d7dce5; }
.markdown-editor .markdown-toolbar-spacer { flex:1; }
.markdown-editor .markdown-toolbar-preview { color:var(--brand-dark); border-color:#c7d7fe; background:#fff; }
.markdown-editor .markdown-toolbar-preview:hover { background:var(--brand-soft); }
.markdown-editor .markdown-source textarea, .markdown-editor .markdown-source input { border-radius:0 0 8px 8px; margin:0; }
.markdown-editor .markdown-source textarea { min-height:120px; }
.markdown-editor .markdown-preview { padding:14px 16px; border:1px solid #cfd5df; border-radius:0 0 8px 8px; background:#fbfcff; font-size:14px; line-height:1.6; }
.markdown-editor .markdown-preview p { margin:0 0 10px; }
.markdown-editor .markdown-preview p:last-child { margin-bottom:0; }
.markdown-editor .markdown-preview a { color:var(--brand-dark); }
.markdown-editor .markdown-preview del { color:var(--muted); }
.markdown-editor .markdown-preview .markdown-preview-error { margin:0; padding:10px 14px; border:1px solid #fecdca; border-left:4px solid var(--danger); border-radius:9px; background:#fef3f2; color:#7a271a; font-size:13px; }
.markdown-editor .markdown-helptext { margin-top:6px; }

.search-combo { position:relative; display:flex; flex-direction:column; gap:8px; min-width:0; }
.search-combo-control { position:relative; display:flex; align-items:center; }
.search-combo-control input[type="search"] { height:44px; padding:0 42px 0 12px; }
.search-combo-toggle { position:absolute; right:5px; top:50%; display:grid; place-items:center; width:32px; height:32px; min-height:32px; padding:0; border:0; border-radius:7px; background:transparent; color:var(--muted); transform:translateY(-50%); cursor:pointer; }
.search-combo-toggle:hover { background:var(--brand-soft); color:var(--brand-dark); }
.search-combo-chevron { width:16px; height:16px; order:0; }
.search-combo.is-open .search-combo-chevron { transform:rotate(180deg); }
.search-combo-panel { min-width:0; padding:6px; border:1px solid #cfd5df; border-radius:10px; background:#fff; }
.search-combo--popover .search-combo-panel { position:absolute; z-index:40; top:calc(100% + 6px); left:0; right:0; max-height:min(340px,55vh); overflow-y:auto; border-radius:12px; box-shadow:0 18px 44px rgb(16 24 40 / 16%); }
.search-combo--inline .search-combo-panel { max-height:280px; overflow-y:auto; }
.search-combo-results { min-width:0; margin:0; }
.search-combo-result { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; width:100%; max-width:100%; min-width:0; min-height:auto; margin:0; padding:9px 10px; border:0; border-radius:8px; background:#fff; color:var(--ink); text-align:left; font-weight:400; font-size:14px; white-space:normal; overflow-wrap:anywhere; word-break:break-word; cursor:pointer; }
.search-combo-result + .search-combo-result { margin-top:2px; }
.search-combo-result:hover, .search-combo-result.is-active { background:var(--brand-soft); color:var(--ink); }
.search-combo-result.is-selected { background:var(--brand-soft); }
.search-combo-result-copy { display:flex; flex-direction:column; gap:1px; min-width:0; }
.search-combo-result strong { display:block; line-height:1.4; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.search-combo-result small { color:var(--muted); font-size:12.5px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.search-combo-result-tag { display:block; margin-top:4px; }
.search-combo-result-tag .status { font-size:11px; }
.search-combo-check { flex:0 0 auto; color:var(--brand); font-weight:800; line-height:1.4; }
.search-combo-group { margin:10px 0 3px; padding:0 10px; color:var(--muted); font-size:10.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }
.search-combo-group:first-child { margin-top:2px; }
.search-combo-result.is-child { width:calc(100% - 10px); margin-left:10px; padding-left:16px; border-left:2px solid var(--brand-soft); border-radius:0 8px 8px 0; }
.search-combo-result.is-child:hover, .search-combo-result.is-child.is-active, .search-combo-result.is-child.is-selected { border-left-color:var(--brand); }
#line-add-existing .search-combo-result,
#line-add-existing .search-combo-result strong,
#line-add-existing .search-combo-result small { white-space:normal !important; overflow-wrap:anywhere !important; word-break:break-word !important; }
.search-combo-status { margin:0; padding:10px 12px; color:var(--muted); font-size:13px; }
.search-combo-selected { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; padding:4px 8px 4px 12px; border:1px solid #c7d7fe; border-radius:9px; background:var(--brand-soft); }
.search-combo-selected-copy { display:flex; flex-wrap:wrap; align-items:baseline; gap:1px 8px; flex:1 1 auto; min-width:0; }
.search-combo-selected strong { flex:0 0 auto; font-size:14px; line-height:1.4; }
.search-combo-selected small { flex:0 1 auto; min-width:0; overflow:hidden; color:var(--muted); font-size:12.5px; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.search-combo-selected-actions { display:flex; align-items:center; gap:4px; flex:0 0 auto; }
.search-combo-edit { min-height:auto; padding:5px 10px; border:1px solid #c7d7fe; border-radius:7px; background:#fff; color:var(--brand-dark); font-size:12px; font-weight:700; cursor:pointer; }
.search-combo-edit:hover { border-color:var(--brand); background:var(--brand); color:#fff; }
.search-combo-clear { min-height:auto; padding:5px 6px; border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:600; text-decoration:underline; cursor:pointer; }
.search-combo-clear:hover { background:transparent; color:var(--danger); }
/* In een formulierveld is de keuze compacter dan in een pickervenster. */
.field .search-combo-selected strong { font-size:13px; }
.field .search-combo-selected small { font-size:12px; }
.field .search-combo-selected-tags .status { font-size:11px; }

.combobox { position:relative; }
.combobox .field { margin-bottom:0; }
.combobox-control { position:relative; }
.combobox-control input { padding-right:40px; }
.combobox-toggle { position:absolute; top:0; bottom:0; right:6px; margin:auto 0; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; min-height:0; padding:0; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; }
.combobox-toggle:hover { background:var(--brand-soft); color:var(--brand-dark); border-color:#c7d7fe; }
.combobox-toggle:active { transform:none; }
.combobox-toggle .icon { width:18px; height:18px; transition:transform .15s ease; }
.combobox-toggle[aria-expanded="true"] .icon { transform:rotate(180deg); }
.combobox-results { position:absolute; z-index:5; left:0; right:0; top:calc(100% + 4px); max-height:220px; overflow-y:auto; padding:6px; border:1px solid #cfd5df; border-radius:9px; background:#fff; box-shadow:var(--shadow); }
.combobox-result { display:flex; align-items:center; justify-content:flex-start; width:100%; min-height:36px; margin:0; padding:8px 12px; border:0; border-radius:6px; background:#fff; color:var(--ink); text-align:left; font-weight:400; cursor:pointer; }
.combobox-result + .combobox-result { margin-top:2px; }
.combobox-result:hover,.combobox-result.is-active { background:var(--brand-soft); color:var(--ink); }
.combobox-result.combobox-new { flex-direction:column; align-items:flex-start; justify-content:center; gap:1px; padding-top:9px; padding-bottom:9px; border-bottom:1px solid var(--line); border-radius:6px 6px 0 0; margin-bottom:4px; }
.combobox-result.combobox-new strong { font-weight:600; text-align:left; }
.combobox-result.combobox-new small { color:var(--muted); font-size:12px; text-align:left; }
