/* The theme owns the controls, type, colours and spacing around each shortcode.
   Zero-specificity defaults let Elementor's field, button and focus styles win. */
:where([data-etfinder-ui] input, [data-etfinder-ui] button, [data-etfinder-ui] select) { font:inherit; }
:where([data-etfinder-ui] :focus-visible) { outline:2px solid Highlight; outline-offset:2px; }
:where([data-etfinder-ui] button, [data-etfinder-ui] summary) { cursor:pointer; }
:where([data-etfinder-ui]) { min-inline-size:0; max-inline-size:100%; }

:where(.etf-mini[data-etfinder-ui]) {
  display:inline-flex;
  position:relative;
  align-items:center;
  gap:.25em;
  margin:0;
  vertical-align:middle;
}
:where(.etf-mini[data-etfinder-ui] button) { padding:.3em .55em; }
:where([data-etfinder-ui]) .etf-entry { position:relative; flex:1 1 auto; min-inline-size:0; }
/* In a narrow header the suggestions can use the space under the icon as well. */
.etf-mini[data-etfinder-ui] .etf-entry { position:static; }
:where([data-etfinder-ui]) .etf-entry input { box-sizing:border-box; width:100%; min-width:0; }
:where([data-etfinder-ui]) .etf-search-icon {
  box-sizing:border-box;
  display:inline-block;
  position:relative;
  width:.8em;
  height:.8em;
  border:1.5px solid currentColor;
  border-radius:50%;
  margin-inline-end:.22em;
  vertical-align:.04em;
}
:where([data-etfinder-ui]) .etf-search-icon::after {
  content:"";
  position:absolute;
  width:.42em;
  height:1.5px;
  top:85%;
  left:85%;
  background:currentColor;
  transform:rotate(45deg);
  transform-origin:left center;
}

/* Use native popup colours so the suggestions stay legible on light or dark headers. */
:where([data-etfinder-ui]) .etf-suggestions {
  box-sizing:border-box;
  position:absolute;
  z-index:1000;
  inset-inline-start:0;
  top:100%;
  width:100%;
  max-height:16em;
  overflow:auto;
  margin:.15em 0 0;
  padding:.15em;
  border:1px solid GrayText;
  background:Field;
  color:FieldText;
  text-align:start;
  white-space:normal;
}
:where([data-etfinder-ui]) .etf-suggestions [role=option] { padding:.4em .5em; cursor:pointer; overflow-wrap:anywhere; }
:where([data-etfinder-ui]) .etf-suggestions :is([role=option]:hover,[aria-selected=true]) { background:Highlight; color:HighlightText; }
:where([data-etfinder-ui]) [hidden] { display:none !important; }

:where([data-etfinder-ui]) .etf-label { display:block; margin-block-end:.35em; }
:where([data-etfinder-ui]) .etf-bar { display:flex; align-items:center; gap:.4em; }
:where(.etf-prompt[data-etfinder-ui]) { box-sizing:border-box; inline-size:100%; }
:where(.etf-prompt[data-etfinder-ui]) .etf-bar { flex-wrap:wrap; }
:where(.etf-prompt[data-etfinder-ui]) .etf-entry { flex-basis:min(100%,16em); }
:where(.etf-prompt[data-etfinder-ui]) .etf-examples { display:flex; flex-wrap:wrap; gap:.4em; margin-block-start:.5em; }
.etf-prompt[data-etfinder-ui] .etf-examples > button {
  box-sizing:border-box;
  max-inline-size:100%;
  padding:.3em .85em;
  border-radius:999px;
  font-size:.875em;
  line-height:1.4;
  white-space:normal;
  overflow-wrap:anywhere;
}
:where([data-etfinder-ui]) .etf-form>details { display:inline-block; vertical-align:top; margin:.5em 1em 0 0; }
:where([data-etfinder-ui]) .etf-form>details[open] { display:block; }
:where([data-etfinder-ui]) .etf-filters { display:flex; flex-wrap:wrap; gap:.7em; margin-block-start:.5em; }
:where([data-etfinder-ui]) .etf-filters label { display:grid; gap:.25em; max-width:100%; }
:where([data-etfinder-ui]) .etf-filters select { min-width:0; max-width:100%; }
:where([data-etfinder-ui]) :is(.etf-status,.etf-output):empty { display:none; }
:where([data-etfinder-ui]) .etf-status { margin-block:.75em; }
:where([data-etfinder-ui]) .etf-output h3 { margin-block:1em .5em; }
:where([data-etfinder-ui]) .etf-cards { display:grid; grid-template-columns:minmax(0,1fr); gap:.75em; }
:where([data-etfinder-ui]) .etf-card { display:flex; align-items:flex-start; gap:1em; padding-block:.65em; }
:where([data-etfinder-ui]) .etf-card + .etf-card { border-block-start:1px solid; border-color:color-mix(in srgb, currentColor 18%, transparent); }
:where([data-etfinder-ui]) .etf-card-body { min-width:0; overflow-wrap:anywhere; }
:where([data-etfinder-ui]) .etf-card h4 { margin:0; }
:where([data-etfinder-ui]) .etf-card p { margin:.35em 0; }
:where([data-etfinder-ui]) .etf-thumbnail { flex:0 0 112px; width:112px; height:112px; }
:where([data-etfinder-ui]) .etf-thumbnail img { display:block; width:100%; height:100%; object-fit:contain; }
:where([data-etfinder-ui]) :is(.etf-vote,.etf-pages,.etf-member) { display:flex; align-items:baseline; gap:.5em; flex-wrap:wrap; margin-block-start:.7em; }
:where([data-etfinder-ui]) .etf-vote [aria-pressed=true] { text-decoration:underline; font-weight:bolder; }
:where([data-etfinder-ui]) .etf-member details[open] { flex:1 1 100%; }
:where([data-etfinder-ui]) .etf-member ul { padding:0; list-style:none; margin:.4em 0; }
:where([data-etfinder-ui]) .etf-member li { display:flex; align-items:baseline; gap:.5em; margin:.3em 0; overflow-wrap:anywhere; }
:where([data-etfinder-ui]) .etf-rerun { min-width:0; text-align:start; }

:where(main.etf-results-page) { box-sizing:border-box; max-width:72rem; margin:2rem auto; padding-inline:clamp(.5rem,2vw,1.5rem); }
@media(max-width:600px) {
  :where([data-etfinder-ui]) .etf-card { gap:.6em; }
  :where([data-etfinder-ui]) .etf-thumbnail { flex-basis:48px; width:48px; height:48px; }
}
