/* EMII Component CSS — Select / Picker Core v5.28 */
.emii-select-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.emii-native-select-source {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.emii-select-trigger {
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  border-radius: 15px;
  background: rgba(242,242,247,.88);
  color: var(--emii-text);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: right;
  cursor: pointer;
  font: inherit;
}

.emii-select-trigger:focus-visible {
  outline: 3px solid rgba(0,122,255,.22);
  outline-offset: 2px;
}

.emii-select-trigger[disabled],
.emii-select-picker[aria-disabled="true"] .emii-select-trigger {
  opacity: .55;
  cursor: not-allowed;
}

.emii-select-value {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 800;
}

.emii-select-value.is-placeholder,
.emii-select-trigger.is-placeholder .emii-select-value {
  color: var(--emii-muted);
  font-weight: 700;
}

.emii-select-chevron {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(120,120,128,.12);
  color: var(--emii-muted);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), background .2s, color .2s;
}

.emii-select-picker.is-open .emii-select-chevron {
  transform: rotate(180deg);
  background: rgba(0,122,255,.12);
  color: var(--emii-blue);
}

.emii-select-popover,
.emii-select-sheet {
  color: var(--emii-text);
}

.emii-select-popover {
  display: none;
  position: fixed;
  top: var(--emii-layer-top, 0px);
  left: var(--emii-layer-left, 0px);
  width: var(--emii-layer-width, min(340px, calc(100vw - 24px)));
  max-height: var(--emii-layer-max-height, min(420px, 62vh));
  z-index: 9015;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--emii-shadow);
}

.emii-select-popover.is-open {
  display: grid;
}

.emii-select-sheet {
  padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0px));
}

.emii-select-header {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--emii-line);
}

.emii-select-popover .emii-select-header {
  grid-template-columns: minmax(0,1fr);
}

.emii-select-header strong {
  display: block;
  font-size: 13px;
  font-weight: 950;
}

.emii-select-header span {
  display: block;
  color: var(--emii-muted);
  font-size: 11px;
  margin-top: 3px;
}

.emii-select-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--emii-line);
}

.emii-select-search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(120,120,128,.12);
  color: var(--emii-text);
  font: inherit;
}

.emii-select-list {
  display: grid;
  max-height: min(360px, 54vh);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
}

.emii-select-sheet .emii-select-list {
  max-height: min(420px, 58vh);
  padding: 8px 0;
}

.emii-select-option {
  min-height: 50px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--emii-text);
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  text-align: right;
  cursor: pointer;
  font: inherit;
}

.emii-select-option:hover,
.emii-select-option:focus-visible,
.emii-select-option.is-selected {
  background: rgba(0,122,255,.10);
  outline: 0;
}

.emii-select-option.is-disabled,
.emii-select-option[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed;
}

.emii-select-icon {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(120,120,128,.12);
}

.emii-select-option-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.emii-select-option-text b {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 900;
}

.emii-select-option-text small {
  min-width: 0;
  color: var(--emii-muted);
  font-size: 11px;
  line-height: 1.5;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.emii-select-check {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--emii-blue);
  font-weight: 950;
}

.emii-select-heading {
  padding: 10px 11px 6px;
  color: var(--emii-muted);
  font-size: 11px;
  font-weight: 950;
}

.emii-select-separator {
  height: 1px;
  margin: 6px 8px;
  background: var(--emii-line);
}

.emii-select-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--emii-muted);
  font-size: 12px;
  font-weight: 800;
}

.emii-select-footer {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 10px;
  padding: 10px 12px 4px;
  border-top: 1px solid var(--emii-line);
}

.emii-field.is-invalid .emii-select-trigger,
.emii-select-picker.is-invalid .emii-select-trigger {
  box-shadow: 0 0 0 2px rgba(255,59,48,.20);
}

[data-theme="dark"] .emii-select-trigger,
[data-theme="dark"] .emii-select-popover {
  background: rgba(28,28,30,.88);
  border-color: rgba(255,255,255,.10);
}

[data-theme="dark"] .emii-select-search input,
[data-theme="dark"] .emii-select-icon,
[data-theme="dark"] .emii-select-chevron {
  background: rgba(255,255,255,.08);
}

@media (max-width: 920px) {
  .emii-select-trigger {
    min-height: 46px;
    border-radius: 16px;
  }

  .emii-select-sheet {
    border-radius: 28px 28px 0 0;
  }

  .emii-select-option {
    min-height: 56px;
    border-radius: 16px;
  }
}
