/* =========================================================================
   Searchable dropdowns (js/desi-select.js): the field shows a magnifier and a
   chevron like the item field; the list that opens has its own search box.
   ========================================================================= */
select.dsel {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 44px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='16' viewBox='0 0 34 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4.6' fill='none' stroke='%232563eb' stroke-width='1.8'/%3E%3Cpath d='M10 10l3.6 3.6' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M19.5 1.5v13' stroke='%23cbd5e1' stroke-width='1'/%3E%3Cpath d='M24 6l3.5 3.5L31 6' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 8px center !important;
	background-size: 34px 16px !important;
	cursor: pointer;
	text-overflow: ellipsis;
}
select.dsel:disabled {
	cursor: not-allowed;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='16' viewBox='0 0 34 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4.6' fill='none' stroke='%2394a3b8' stroke-width='1.8'/%3E%3Cpath d='M10 10l3.6 3.6' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M19.5 1.5v13' stroke='%23e2e8f0' stroke-width='1'/%3E%3Cpath d='M24 6l3.5 3.5L31 6' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
select.dsel.dsel-open { border-color: #2563eb !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
select.dsel::-ms-expand { display: none; }

/* in a grid cell there is less room: a smaller pair of icons */
td select.dsel, .cell select.dsel, select.dsel.cell {
	padding-right: 36px !important;
	background-position: right 5px center !important;
	background-size: 28px 13px !important;
}

/* a narrow field (a rate, a unit) keeps its room for the value: the chevron alone,
   and the search window is opened from the list's own button */
select.dsel.dsel-narrow {
	padding-right: 20px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath d='M1.5 6l3.5 3.5L8.5 6' fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
	background-position: right 6px center !important;
	background-size: 10px 16px !important;
}

/* a text box with suggestions: free typing, and a magnifier that opens the search window */
input.dsel-in {
	padding-right: 34px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4.6' fill='none' stroke='%232563eb' stroke-width='1.8'/%3E%3Cpath d='M10 10l3.6 3.6' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	background-size: 15px 15px !important;
}
input.dsel-in.dsel-narrow { padding-right: 24px !important; background-position: right 5px center !important; background-size: 13px 13px !important; }
input.dsel-in.dsel-hot { cursor: pointer; }
input.dsel-in::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }

/* ── the list under the field ─────────────────────────────────────────── */
.dsel-panel {
	position: fixed; z-index: 4100; display: none; flex-direction: column;
	max-height: 340px; min-width: 240px;
	background: #fff; color: #0f172a;
	border: 1px solid #cbd5e1; border-radius: 10px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
	font-size: 13.5px; overflow: hidden;
}
.dsel-panel.open { display: flex; }
.dsel-top { display: flex; align-items: center; gap: 6px; padding: 7px; border-bottom: 1px solid #e5e7eb; background: #f8fafc; }
.dsel-find { position: relative; flex: 1 1 auto; min-width: 0; }
.dsel-find > i { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #2563eb; font-size: 12px; pointer-events: none; }
.dsel-search {
	width: 100%; height: 32px; box-sizing: border-box;
	padding: 0 10px 0 28px; border: 1px solid #cbd5e1; border-radius: 7px;
	font: inherit; color: inherit; background: #fff; outline: none;
}
.dsel-search:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.dsel-more {
	flex: 0 0 auto; width: 32px; height: 32px; border-radius: 7px;
	border: 1px solid #cbd5e1; background: #fff; color: #2563eb; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
}
.dsel-more:hover { background: #eff6ff; border-color: #93c5fd; }

.dsel-list { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; flex: 1 1 auto; }
.dsel-list li {
	padding: 7px 12px; cursor: pointer; line-height: 1.35;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dsel-list li.act { background: #dbeafe; box-shadow: inset 3px 0 0 #2563eb; }
.dsel-list li[aria-selected="true"] { font-weight: 600; color: #1d4ed8; }
.dsel-list li.off { color: #94a3b8; cursor: not-allowed; }
.dsel-list li.grp {
	cursor: default; padding: 8px 12px 3px; font-size: 11px; font-weight: 700;
	letter-spacing: .05em; text-transform: uppercase; color: #64748b;
}
.dsel-list li.none { cursor: default; color: #64748b; font-style: italic; }
.dsel-list mark { background: #fef08a; color: inherit; padding: 0; border-radius: 2px; }
