/* Driver contribution forms */

/* —— Searchable compact select —— */
select.ch-search-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.ch-search-select-wrap {
  position: relative;
  margin: 6px 0 14px;
}

.ch-map-timeline__select .ch-search-select-wrap {
  margin: 0;
  width: 100%;
}

.ch-search-select-wrap .description {
  margin-top: 6px;
  color: var(--dh-muted, rgba(60, 60, 67, 0.6));
  font-size: 0.8rem;
}

.ch-search-select__query {
  width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--dh-line, rgba(60, 60, 67, 0.12));
  background: var(--dh-input-bg, rgba(118, 118, 128, 0.12));
  color: var(--dh-sand, #1d1d1f);
  font: inherit;
  box-sizing: border-box;
}

/* Solid opaque panel so options stay readable over the form / dock. */
.ch-search-select__list {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  max-height: min(42vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--dh-line, rgba(60, 60, 67, 0.12));
  background: #ffffff;
  color: var(--dh-sand, #1d1d1f);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.dh-ui--night .ch-search-select__list {
  background: #122028;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.ch-search-select__list.is-open {
  display: block;
}

.ch-search-select__group {
  padding: 8px 12px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dh-amber, #ff9f0a);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 1;
}

body.dh-ui--night .ch-search-select__group {
  background: #122028;
}

.ch-search-select__option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--dh-hairline, rgba(60, 60, 67, 0.08));
  background: transparent;
  color: var(--dh-sand, #1d1d1f);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ch-search-select__option.is-active,
.ch-search-select__option:active {
  background: rgba(255, 159, 10, 0.14);
  color: var(--dh-amber, #ff9f0a);
}

/* —— Visibility radios: stacked rows, radio left / text right —— */
.ch-form .form-item-visibility > .form-radios {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 14px;
}

.ch-form .form-item-visibility .form-radios > .form-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--dh-line, rgba(60, 60, 67, 0.12));
  background: var(--dh-tile, #ffffff);
  box-sizing: border-box;
}

body.dh-ui--night .ch-form .form-item-visibility .form-radios > .form-item {
  background: rgba(255, 255, 255, 0.06);
}

.ch-form .form-item-visibility .form-radios input.form-radio,
.ch-form .form-item-visibility .form-radios input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--dh-amber, #ff9f0a);
  border: none;
  background: transparent;
  box-shadow: none;
}

.ch-form .form-item-visibility .form-radios label.option {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  color: var(--dh-sand, #1d1d1f);
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

.ch-form .form-item-visibility .form-radios > .form-item:has(input:checked) {
  border-color: rgba(255, 159, 10, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 159, 10, 0.22);
}

/* —— Native file picker (App WebView friendly) —— */
.ch-form .form-item-images,
.ch-form .form-item-screenshot {
  margin-bottom: 14px;
}

.ch-file-pick {
  position: relative;
  margin: 6px 0 0;
}

.ch-file-pick__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed var(--dh-line, rgba(60, 60, 67, 0.25));
  background: var(--dh-input-bg, rgba(118, 118, 128, 0.12));
  color: var(--dh-sand, #1d1d1f);
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.ch-file-pick__input {
  /* Keep in layout (not display:none) so WebView file chooser can open. */
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  font-size: 0;
}

.ch-file-pick__names {
  margin: 8px 0 0;
  color: var(--dh-muted, rgba(60, 60, 67, 0.6));
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-all;
}

.ch-form--hotspot .form-item-location-custom {
  margin-bottom: 0;
}
