/* Own drop-down (select.js) in the look of the design system: field with indigo arrow, white list with rounded rows.
   The native <select> stays underneath (invisible) and keeps the size the page's CSS gives it. */
.ui-select { display: inline-grid; position: relative; vertical-align: middle; max-width: 100%; min-width: 0; }
.ui-select.is-full { display: grid; width: 100%; }
.ui-select > * { grid-area: 1 / 1; }
.ui-select > .ui-select-native { opacity: 0; pointer-events: none; min-width: 0; }

.ui-select .ui-select-button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 100%;
  min-height: 0; min-width: 0; margin: 0; padding-top: 0; padding-bottom: 0; padding-right: 14px; text-align: left; line-height: 1.3;
  font-family: var(--font-text, inherit); font-weight: 400; letter-spacing: normal; color: var(--ink, #221b14); background: var(--ui-bg, #fff);
  border: var(--ui-line-width, 1.5px) solid var(--ui-line, #aebdd0); box-shadow: none; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ui-select .ui-select-button:hover { background: var(--ui-bg, #fff); border-color: var(--dghk-slate, #484d60); }
.ui-select .ui-select-button:focus-visible, .ui-select.is-open .ui-select-button { outline: none; border-color: var(--action, #5250a5);
  box-shadow: 0 0 0 4px rgba(82, 80, 165, .18); }
.ui-select .ui-select-button:disabled { background: var(--soft, #f4f7fb); border-color: var(--line, #d6dfea); color: var(--dghk-slate, #484d60);
  cursor: default; opacity: 1; }
.ui-select.is-invalid .ui-select-button { border-color: var(--error, #a00020); }
.ui-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-select-arrow { flex: none; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--action, #5250a5);
  border-bottom: 2px solid var(--action, #5250a5); transform: rotate(45deg); transition: transform .15s; }
.ui-select.is-open .ui-select-arrow { transform: rotate(-135deg); margin-top: 4px; }
.ui-select-button:disabled .ui-select-arrow { border-color: #aebdd0; }

.ui-select-popup { position: fixed; z-index: 1000; display: flex; flex-direction: column; max-width: min(520px, calc(100vw - 16px));
  background: var(--paper, #fff); border: 1.5px solid var(--line, #d6dfea); border-radius: 12px; box-shadow: 0 14px 36px rgba(34, 27, 20, .16);
  font: 15px/1.35 var(--font-text, system-ui, sans-serif); color: var(--ink, #221b14); overflow: hidden; }
.ui-select-popup .ui-select-search { flex: none; margin: 8px 8px 2px; min-height: 40px; width: auto; padding: 6px 10px; font: inherit;
  border: 1.5px solid #aebdd0; border-radius: 8px; background: var(--paper, #fff); color: inherit; }
.ui-select-popup .ui-select-search:focus { outline: none; border-color: var(--action, #5250a5); box-shadow: 0 0 0 3px rgba(82, 80, 165, .18); }
.ui-select-popup ul { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1 1 auto; outline: none; overscroll-behavior: contain; }
.ui-select-popup li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.ui-select-popup li.is-active { background: var(--action-tint, #efeefa); }
.ui-select-popup li[aria-selected=true] { font-weight: 700; color: var(--action, #5250a5); }
.ui-select-popup li[aria-selected=true]::after { content: "✓"; margin-left: auto; padding-left: 12px; }
.ui-select-popup li.is-placeholder { color: var(--dghk-slate, #484d60); }
.ui-select-popup li[aria-disabled=true] { opacity: .45; cursor: default; }
.ui-select-popup .ui-select-none { color: var(--dghk-slate, #484d60); cursor: default; }
@media (pointer: coarse) { .ui-select-popup li { padding: 12px 14px; } }        /* finger-sized rows on touch screens */
@media (prefers-reduced-motion: reduce) { .ui-select-button, .ui-select-arrow { transition: none !important; } }
