/* DMA select controls. Native values, validation and form semantics stay intact. */
select.dma-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

.dma-select-trigger {
  --dma-select-gold: #d4ae6d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #65715c;
  border-radius: 0;
  background: #141a14;
  color: #f5f1e7;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.dma-select-trigger:hover:not(:disabled) {
  background: #1d251c;
  border-color: #bda16f;
}

.dma-select-trigger:focus-visible,
.dma-select-trigger.is-open {
  outline: none;
  border-color: var(--dma-select-gold);
  box-shadow: inset 0 0 0 2px var(--dma-select-gold);
}

.dma-select-trigger[aria-invalid="true"] {
  border-color: #e9ad8d;
  box-shadow: inset 0 0 0 1px #e9ad8d;
}

.dma-select-trigger[aria-invalid="true"]:focus-visible {
  box-shadow: inset 0 0 0 2px #e9ad8d;
}

.dma-select-trigger:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.dma-select-value {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.dma-select-trigger.is-placeholder .dma-select-value {
  color: #bfc6b7;
}

.dma-select-chevron {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #d4ae6d;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.dma-select-trigger.is-open .dma-select-chevron {
  transform: rotate(180deg);
}

.dma-select-menu {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  display: grid;
  gap: 3px;
  padding: 7px;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border: 1px solid #a48a5c;
  border-radius: 0;
  background: #1b231b;
  color: #f5f1e7;
  font: inherit;
  font-family: Barlow, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #d4ae6d #1b231b;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
  -webkit-overflow-scrolling: touch;
}

.dma-select-menu::-webkit-scrollbar { width: 7px; }
.dma-select-menu::-webkit-scrollbar-track { background: #1b231b; }
.dma-select-menu::-webkit-scrollbar-thumb { background: #d4ae6d; }

.dma-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  overflow-wrap: anywhere;
  cursor: pointer;
  touch-action: manipulation;
}

.dma-select-option > span { min-width: 0; }
.dma-select-option > svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}

.dma-select-option[aria-selected="true"] > svg { visibility: visible; }
.dma-select-option[aria-selected="true"] { color: #ebc98f; }
.dma-select-option.is-active {
  background: #d4ae6d;
  color: #101411;
}

.dma-select-option[aria-disabled="true"] {
  opacity: .4;
  cursor: not-allowed;
}

.dma-select-menu--states {
  grid-template-columns: repeat(var(--dma-select-columns, 5), minmax(0, 1fr));
  gap: 4px;
}

.dma-select-menu--states .dma-select-option {
  justify-content: center;
  min-height: 46px;
  padding: 10px 4px;
  gap: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dma-select-menu--states .dma-select-option > svg { display: none; }
.dma-select-menu--states .dma-select-option:first-child {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-inline: 12px;
}

.dma-select-menu--states .dma-select-option[aria-selected="true"] {
  box-shadow: inset 0 -2px #d4ae6d;
  font-weight: 600;
}

.dma-select-menu--states .dma-select-option[aria-selected="true"].is-active {
  box-shadow: inset 0 -2px #101411;
}

.dma-select-empty {
  min-height: 46px;
  padding: 12px;
  color: #d5dcca;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .dma-select-trigger,
  .dma-select-chevron { transition: none; }
}

@media (forced-colors: active) {
  .dma-select-trigger,
  .dma-select-menu { clip-path: none; border: 1px solid ButtonText; }
  .dma-select-trigger:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
  .dma-select-option.is-active { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}

@media print {
  .dma-select-trigger,
  .dma-select-menu { display: none !important; }
  select.dma-select-native {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 1px solid currentColor !important;
  }
}
