/* RealFeed shared form controls. Native select semantics, progressively enhanced
   with browser-rendered popovers where appearance: base-select is supported.
   Keep this stylesheet after page themes. No replacement widgets or scripts. */
:root {
  --rf-select-ink: #183b56;
  --rf-select-muted: #5f7890;
  --rf-select-line: #cbdde9;
  --rf-select-blue: #246cc8;
  --rf-select-surface: #ffffff;
  --rf-select-hover: #eef7fd;
  --rf-select-selected: #e6f5f2;
}

html body select {
  box-sizing: border-box;
  max-inline-size: 100%;
  min-block-size: 40px;
  border: 1px solid var(--rf-select-line);
  border-radius: 12px;
  background-color: var(--rf-select-surface);
  color: var(--rf-select-ink);
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  padding: 9px 12px;
  box-shadow: 0 1px 2px #173f5c05;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

/* A consistent closed field remains available on browsers with native pickers. */
html body select:not([multiple]):not([size]),
html body select[size="0"]:not([multiple]),
html body select[size="1"]:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235f7890' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 16px;
  background-repeat: no-repeat;
  cursor: pointer;
}
html[dir="rtl"] body select:not([multiple]):not([size]),
html[dir="rtl"] body select[size="0"]:not([multiple]),
html[dir="rtl"] body select[size="1"]:not([multiple]) { background-position: left 12px center; }

html body select:enabled:hover { border-color: #84b6d6; background-color: #f8fcff; }
html body select:focus-visible { outline: 3px solid #2c80cf42; outline-offset: 2px; border-color: var(--rf-select-blue); box-shadow: 0 0 0 1px #fff; }
html body select:disabled { cursor: not-allowed; opacity: .62; background-color: #f1f5f8; color: #687d8e; box-shadow: none; }
html body select:user-invalid { border-color: #c96060; }
html body select[multiple], html body select[size]:not([size="0"]):not([size="1"]) { padding: 6px; }

@supports (appearance: base-select) {
  html body select:not([multiple]):not([size]),
  html body select[size="0"]:not([multiple]),
  html body select[size="1"]:not([multiple]),
  html body select:not([multiple]):not([size])::picker(select),
  html body select[size="0"]:not([multiple])::picker(select),
  html body select[size="1"]:not([multiple])::picker(select) { appearance: base-select; }

  html body select:not([multiple]):not([size]),
  html body select[size="0"]:not([multiple]),
  html body select[size="1"]:not([multiple]) {
    background-image: none;
    padding-inline-end: 12px;
    align-items: center;
    gap: 16px;
  }
  html body select::picker-icon {
    content: "";
    inline-size: 7px;
    block-size: 7px;
    flex: 0 0 7px;
    border: solid var(--rf-select-muted);
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(45deg);
    margin-inline-start: auto;
    margin-block-start: -3px;
    transition: rotate 140ms ease;
  }
  html body select:open { border-color: #65a4d5; background-color: #f8fcff; }
  html body select:open::picker-icon { rotate: 180deg; }

  html body select::picker(select) {
    box-sizing: border-box;
    border: 1px solid #d8e7f0;
    border-radius: 15px;
    padding: 6px;
    margin-block: 7px;
    background: var(--rf-select-surface);
    color: var(--rf-select-ink);
    font-family: inherit;
    font-size: max(13px, 1em);
    line-height: 1.4;
    box-shadow: 0 16px 44px #0c345329, 0 3px 10px #0c34530d;
    max-block-size: min(340px, 60dvh);
    max-inline-size: calc(100vw - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #94a3b829 transparent;
  }
  html body select option {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    min-block-size: 40px;
    padding: 10px 12px;
    margin: 2px 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--rf-select-ink);
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  html body select option:checked { background: var(--rf-select-selected); color: #146754; font-weight: 650; }
  html body select option:enabled:hover,
  html body select option:enabled:focus { background: var(--rf-select-hover); color: #145a92; outline: none; }
  html body select option:checked:hover,
  html body select option:checked:focus { background: #d9efe9; color: #125d4e; }
  html body select option:disabled { color: #8a9ba8; background: transparent; cursor: not-allowed; }
  html body select option::checkmark { color: #1d8470; order: 1; margin-inline-start: auto; font-size: 14px; }
  html body select optgroup { padding: 6px 0; color: var(--rf-select-muted); font-size: .88em; font-weight: 650; }
  html body select optgroup + optgroup { border-top: 1px solid #e6eef4; }
  html body select optgroup option { font-size: 1.12em; }
}

@media (pointer: coarse) {
  html body select { min-block-size: 44px; }
  html body select option { min-block-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html body select, html body select::picker-icon { transition: none; }
}
@media (forced-colors: active) {
  html body select, html body select::picker(select) { border-color: ButtonText; box-shadow: none; }
  html body select:focus-visible { outline: 2px solid Highlight; }
  html body select option:checked { color: HighlightText; background: Highlight; }
  html body select option:enabled:hover, html body select option:enabled:focus { outline: 2px solid Highlight; outline-offset: -2px; }
}
