/* Shared native-control treatment. Loaded last so module colors remain authoritative. */
html body[data-theme] select:not([multiple]):not([size]),
html body[data-theme] select:not([multiple])[size="1"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238b8d9b' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 10px 6px !important;
  background-position: right 11px center !important;
  padding-right: 32px !important;
}

/* Calendar/month and compact filter controls stay narrow; do not change width/height. */
.pb-calendar-time select:not([multiple]):not([size]),
.pb-calendar-time select:not([multiple])[size="1"],
.nr-dates-head select:not([multiple]):not([size]),
.nr-dates-head select:not([multiple])[size="1"],
.cl-source-actions select:not([multiple]):not([size]),
.cl-source-actions select:not([multiple])[size="1"] {
  padding-left: 4px !important;
  padding-right: 24px !important;
}

html[data-theme="light"] select:not([multiple]):not([size]),
html[data-theme="light"] select:not([multiple])[size="1"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23475569' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important;
}

/* Keep controls readable when a module supplies its own dark/light fill. */
body[data-theme="light"] select:not([multiple]):not([size]),
body[data-theme="light"] select:not([multiple])[size="1"] {
  background-color: #f8fafc;
}
body[data-theme="light"] select:not([multiple]):not([size]):focus,
body[data-theme="light"] select:not([multiple])[size="1"]:focus {
  background-color: #ffffff;
}

/* Module selectors with an ID or an older !important shorthand need equal-or-higher
   specificity so their fill cannot erase this arrow. */
body[data-theme] #mpRoot select:not([multiple]):not([size]),
body[data-theme] #mpRoot select:not([multiple])[size="1"],
body[data-theme] #ptRoot select:not([multiple]):not([size]),
body[data-theme] #ptRoot select:not([multiple])[size="1"],
body[data-theme] .tkp select:not([multiple]):not([size]),
body[data-theme] .tkp select:not([multiple])[size="1"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238b8d9b' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: 10px 6px !important;
  background-position: right 11px center !important;
  padding-right: 32px !important;
}
body[data-theme="light"] #mpRoot select:not([multiple]):not([size]),
body[data-theme="light"] #mpRoot select:not([multiple])[size="1"],
body[data-theme="light"] #ptRoot select:not([multiple]):not([size]),
body[data-theme="light"] #ptRoot select:not([multiple])[size="1"],
body[data-theme="light"] .tkp select:not([multiple]):not([size]),
body[data-theme="light"] .tkp select:not([multiple])[size="1"],
body[data-theme="light"] #symdBatchCountSelect,
body[data-theme="light"] #symdRatioSelect,
body[data-theme="light"] #symdResolutionSelect {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23475569' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") !important;
}
html body[data-theme="light"] #symdBatchCountSelect,
html body[data-theme="light"] #symdRatioSelect,
html body[data-theme="light"] #symdResolutionSelect {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-repeat: no-repeat !important;
  background-size: 10px 6px !important;
  background-position: right 11px center !important;
  padding-right: 32px !important;
}
