/* Keep typed values readable even when the parent theme styles focused inputs. */
body.dreadcue-site input:not([type=range]):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]):not([type=color]),
body.dreadcue-site :is(select,textarea),
body.dreadcue-site :is(select,textarea):is(:hover,:focus,:active) {
  color: #f4eeee;
  -webkit-text-fill-color: currentColor;
  caret-color: #f4eeee;
  background-color: #101113;
  color-scheme: dark;
}
body.dreadcue-site :is(input,textarea)::placeholder {
  color: #aba3a7;
  -webkit-text-fill-color: currentColor;
  opacity: 1;
}
body.dreadcue-site :is(input,textarea)::selection {
  color: #fff;
  background: #55565c;
}
body.dreadcue-site input:autofill {
  -webkit-text-fill-color: #f4eeee;
  caret-color: #f4eeee;
  box-shadow: 0 0 0 1000px #101113 inset;
}
body.dreadcue-site select option { color: #f4eeee; background: #141518; }
body.dreadcue-site select option:is(:hover,:focus,:checked) { color: #fff; background: #414247; }

/* Native accessible selects, with a theme-controlled picker in supporting browsers.
   Older browsers keep their native picker and its keyboard/mobile behavior. */
@supports (appearance: base-select) {
  body.dreadcue-site select:not([multiple]):not([size]),
  body.dreadcue-site select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }
  body.dreadcue-site select:not([multiple]):not([size]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-image: none;
    cursor: pointer;
  }
  body.dreadcue-site select::picker(select) {
    color: #f4eeee;
    background: #141518;
    border: 1px solid #4a4b50;
    border-radius: 8px;
    padding: 5px;
    margin-block: 5px;
    max-height: min(360px,60dvh);
    overflow-y: auto;
    box-shadow: 0 12px 28px #0008;
    font: inherit;
    color-scheme: dark;
  }
  body.dreadcue-site select::picker-icon { color: #bdb7ba; }
  body.dreadcue-site select option {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  body.dreadcue-site select option:checked { background: #2b2c30; }
  body.dreadcue-site select option:is(:hover,:focus) {
    background: #48494f;
    color: #fff;
    outline: none;
  }
  body.dreadcue-site select option:disabled { color: #aaa; cursor: not-allowed; }
  body.dreadcue-site select option::checkmark { color: #f4eeee; }
}

@media (forced-colors: active) {
  body.dreadcue-site :is(input,select,textarea) {
    -webkit-text-fill-color: currentColor;
    caret-color: auto;
  }
  body.dreadcue-site select option:is(:hover,:focus,:checked) {
    color: HighlightText;
    background: Highlight;
    forced-color-adjust: none;
  }
}
