/* Filtros del workspace. Presentación de los controles canónicos, sin estado paralelo. */
html.qv-workspace #mobileAjustesOverlay { --qwf-control-height: 36px; color: var(--qvw-editor-ink); }
html.qv-workspace #mobileAjustesOverlay :is(.qf-card, .filter-disclosure) {
  border: 1px solid var(--qvw-editor-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}
html.qv-workspace #mobileAjustesOverlay .qf-card { padding: 16px; }
html.qv-workspace #mobileAjustesOverlay .qf-card-heading {
  gap: 10px;
  margin-bottom: 14px;
  color: var(--qvw-editor-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}
html.qv-workspace #mobileAjustesOverlay .qf-card-icon {
  width: 25px; height: 25px; flex-basis: 25px; border-radius: 8px;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, white);
}
html.qv-workspace #mobileAjustesOverlay .qf-card-icon svg { width: 16px; height: 16px; stroke-width: 1.8; }
html.qv-workspace #mobileAjustesOverlay :is(.qf-price-unit, .qf-coverage-row > label, .qf-money-field > span, .filter-match > label, .filter-price-min > summary) {
  color: var(--qvw-editor-muted); font-size: 12px; font-weight: 400;
}
html.qv-workspace #mobileAjustesOverlay :is(.qf-search, .qf-money-field, .qf-select-trigger) {
  box-sizing: border-box; height: var(--qwf-control-height); min-height: var(--qwf-control-height);
  border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; box-shadow: none;
  color: var(--qvw-editor-ink); font-size: 12px; font-weight: 400;
}
html.qv-workspace #mobileAjustesOverlay :is(.qf-search input, .qf-money-field input) {
  color: var(--qvw-editor-ink); font-size: 12px; font-weight: 400;
  font-variant-numeric: proportional-nums; letter-spacing: normal;
}
html.qv-workspace #mobileAjustesOverlay :is(.qf-search input, .qf-money-field input)::placeholder { color: #68788d; font-size: 12px; }
html.qv-workspace #mobileAjustesOverlay .qf-select-trigger.is-active { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, white); background: color-mix(in srgb, var(--brand) 5%, white); }
html.qv-workspace #mobileAjustesOverlay .qf-price-endpoints { color: var(--qvw-editor-muted); font-size: 11px; }
html.qv-workspace #mobileAjustesOverlay .qf-region { padding: 10px 16px; gap: 8px; }
html.qv-workspace #mobileAjustesOverlay .qf-region-label { color: var(--qvw-editor-muted); font-size: 12px; gap: 8px; }
html.qv-workspace #mobileAjustesOverlay .qf-region .qf-select-trigger { border-color: transparent; background: transparent; padding-inline: 4px; }
html.qv-workspace #mobileAjustesOverlay .filter-disclosure > summary { padding: 14px 16px; gap: 10px; color: var(--qvw-editor-muted); font-size: 12px; font-weight: 500; }
html.qv-workspace #mobileAjustesOverlay :is(.qf-region-label svg, .qf-disclosure-icon) { width: 18px; height: 18px; color: var(--qvw-editor-muted); stroke-width: 1.8; }
html.qv-workspace #mobileAjustesOverlay .qf-subsection { padding: 14px 16px; }
html.qv-workspace #mobileAjustesOverlay .qf-subsection .label-select { color: var(--qvw-editor-muted); font-size: 12px; font-weight: 500; }
/* Una fila de moneda dentro de Presupuesto; sin otra tarjeta ni fondo decorativo. */
html.qv-workspace #mobileAjustesOverlay .qvw-currency-slot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; margin: 14px 0 0; padding: 12px 0 0;
  border: 0; border-top: 1px solid var(--qvw-editor-border);
  border-radius: 0; background: transparent; box-shadow: none;
}
html.qv-workspace #mobileAjustesOverlay .qvw-currency-slot .label-select {
  display: block; width: auto; margin: 0; padding: 0; background: transparent;
  color: var(--qvw-editor-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
html.qv-workspace #mobileAjustesOverlay .qvw-currency-slot .label-select::after { display: none; }
html.qv-workspace #mobileAjustesOverlay :is(.qf-search, .qf-money-field):focus-within { box-shadow: none; }
html.qv-workspace[data-qvw-keyboard="true"] #mobileAjustesOverlay :is(.qf-search, .qf-money-field):focus-within { border: 2px solid var(--brand); padding-inline: 11px; }
html.qv-workspace[data-qvw-keyboard="true"] #mobileAjustesOverlay .qf-select-trigger:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
html.qv-workspace #mobileAjustesOverlay .qf-money-field:has(input[aria-invalid="true"]) { border: 2px solid var(--error); padding-inline: 11px; }
@media (hover: hover) {
  html.qv-workspace #mobileAjustesOverlay :is(.qf-search, .qf-money-field, .qf-select-trigger):hover { border-color: #9caec3; }
  html.qv-workspace #mobileAjustesOverlay .filter-disclosure > summary:hover { background: #f8fafd; color: var(--qvw-editor-ink); }
}
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html.qv-workspace #mobileAjustesOverlay { --qwf-control-height: 44px; }
  html.qv-workspace #mobileAjustesOverlay :is(.qf-search input, .qf-money-field input) { font-size: 16px; }
}

/* Isapres: sección siempre visible y selección en filas, sin chips anidados. */
html.qv-workspace #mobileAjustesOverlay .qvw-insurers-summary {
  min-width: 0; margin-left: auto; color: var(--qvw-editor-muted);
  font-size: 12px; font-weight: 400; text-align: right; overflow-wrap: anywhere;
}

/* Secciones permanentes y controles múltiples: la misma jerarquía y casillas. */
html.qv-workspace #mobileAjustesOverlay .qvw-filter-section { min-width: 0; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-section .qf-card-heading { flex-wrap: wrap; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-summary {
  min-width: 0; max-width: 100%; margin-left: auto; color: var(--qvw-editor-muted);
  font-size: 12px; font-weight: 400; text-align: right; overflow-wrap: anywhere;
}
html.qv-workspace #mobileAjustesOverlay .qvw-regions > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; list-style: none; cursor: pointer; }
html.qv-workspace #mobileAjustesOverlay .qvw-regions > summary::-webkit-details-marker { display: none; }
html.qv-workspace #mobileAjustesOverlay .qvw-regions > summary svg { flex: 0 0 16px; width: 16px; height: 16px; }
html.qv-workspace #mobileAjustesOverlay .qvw-regions[open] > summary svg { transform: rotate(180deg); }
html.qv-workspace #mobileAjustesOverlay .qvw-regions-body { padding-top: 12px; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-help { margin: 0 0 6px; color: var(--qvw-editor-muted); font-size: 12px; line-height: 1.5; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-reset {
  min-height: var(--qwf-control-height); margin: 0 0 6px; padding: 0 4px; border: 0; border-radius: 5px; background: transparent;
  color: var(--brand); font: 500 12px/1.4 var(--ff-sans, "Inter", system-ui, sans-serif); cursor: pointer;
}
html.qv-workspace #mobileAjustesOverlay .qvw-filter-reset:disabled { color: var(--qvw-editor-muted); cursor: default; }
html.qv-workspace #mobileAjustesOverlay .qvw-regions-list { max-height: 290px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
html.qv-workspace #mobileAjustesOverlay .qvw-region-group { min-width: 0; margin: 0; padding: 0; border: 0; }
html.qv-workspace #mobileAjustesOverlay .qvw-region-group + .qvw-region-group { margin-top: 10px; }
html.qv-workspace #mobileAjustesOverlay .qvw-region-group legend { padding: 4px 0; color: var(--qvw-editor-muted); font-size: 11px; font-weight: 500; }
html.qv-workspace #mobileAjustesOverlay :is(.qvw-plan-types,.qvw-region-group) .qvw-filter-choice + .qvw-filter-choice { border-top: 1px solid var(--qv-divider, var(--separator)); }
html.qv-workspace #mobileAjustesOverlay .qvw-types-all { font-weight: 500; }

/* Líneas: selección múltiple en el panel, sin portales ni una segunda lista de filtros. */
html.qv-workspace #mobileAjustesOverlay .qvw-lines { min-width: 0; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines summary::-webkit-details-marker { display: none; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines summary > svg { width: 16px; height: 16px; flex: 0 0 16px; color: #8b9bb0; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines details[open] > summary > svg { transform: rotate(180deg); }
html.qv-workspace #mobileAjustesOverlay .qvw-lines-body {
  min-width: 0;
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-help,
html.qv-workspace #mobileAjustesOverlay .qvw-lines-empty {
  margin: 0 0 10px; color: var(--qvw-editor-muted); font-size: 12px; line-height: 1.5;
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-empty { margin: 12px 0 0; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines-total { margin: 8px 0 0; color: var(--qvw-editor-muted); font-size: 11px; line-height: 1.4; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines-clear {
  flex: 0 0 28px; width: 28px; min-height: 28px; margin: 0 -6px 0 0; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--qvw-editor-muted); font-size: 20px; cursor: pointer;
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-search input::-webkit-search-cancel-button { appearance: none; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines-list {
  max-height: 290px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
html.qv-workspace #mobileAjustesOverlay :is(.qvw-lines-group + .qvw-lines-group,.qvw-line-row + .qvw-line-row) {
  border-top: 1px solid var(--qv-divider, var(--separator));
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-heading {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 0;
  color: var(--qvw-editor-ink); font-size: 12px; font-weight: 500; line-height: 1.4; list-style: none; cursor: pointer;
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-heading > span:first-child { min-width: 0; overflow-wrap: anywhere; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines-count { margin-left: auto; flex-shrink: 0; color: var(--qvw-editor-muted); font-size: 11px; font-weight: 400; }
html.qv-workspace #mobileAjustesOverlay .qvw-line-row { display: flex; align-items: center; gap: 6px; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice {
  position: relative; display: flex; align-items: center; flex: 1; gap: 10px; min-width: 0; min-height: 40px;
  margin: 0; padding: 8px 0; color: var(--qvw-editor-ink); font-size: 12px; font-weight: 400; line-height: 1.4; cursor: pointer;
}
html.qv-workspace #mobileAjustesOverlay .qvw-lines-all { margin-top: 6px; border-bottom: 1px solid var(--qv-divider, var(--separator)); font-weight: 500; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice input { position: absolute; width: 16px; height: 16px; margin: 0; opacity: 0; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-check {
  box-sizing: border-box; display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px;
  border: 1px solid #aebccd; border-radius: 4px; background: #fff; color: #fff; font-size: 12px; line-height: 1;
}
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice input:is(:checked,:indeterminate) + .qvw-filter-check { background: var(--brand); border-color: var(--brand); }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice input:checked + .qvw-filter-check::after { content: '✓'; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice input:indeterminate + .qvw-filter-check::after { content: '−'; }
html.qv-workspace #mobileAjustesOverlay .qvw-filter-choice:has(input:disabled) { opacity: .55; cursor: default; }
html.qv-workspace #mobileAjustesOverlay .qvw-line-name { min-width: 0; overflow-wrap: anywhere; }
html.qv-workspace #mobileAjustesOverlay .qvw-line-only {
  flex: 0 0 auto; min-height: 36px; margin: 0; padding: 6px 4px; border: 0; border-radius: 5px; background: transparent;
  color: var(--brand); font: 500 11px/1.4 var(--ff-sans, "Inter", system-ui, sans-serif); white-space: nowrap; cursor: pointer;
}
html.qv-workspace[data-qvw-keyboard="true"] #mobileAjustesOverlay .qvw-filter-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 5px; }
html.qv-workspace #mobileAjustesOverlay .qvw-lines [hidden] { display: none !important; }
@media (hover: hover) {
  html.qv-workspace #mobileAjustesOverlay :is(.qvw-line-row,.qvw-lines-all,.qvw-lines-heading):hover { background: #f8fafd; }
  html.qv-workspace #mobileAjustesOverlay :is(.qvw-line-only,.qvw-lines-clear):hover { background: color-mix(in srgb, var(--brand) 6%, white); }
}
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html.qv-workspace #mobileAjustesOverlay :is(.qvw-filter-choice,.qvw-line-only,.qvw-lines-heading,.qvw-lines-clear) { min-height: 44px; }
  html.qv-workspace #mobileAjustesOverlay :is(.qvw-filter-choice,.qvw-lines-heading) { font-size: 14px; }
  html.qv-workspace #mobileAjustesOverlay .qvw-lines-clear { width: 32px; flex-basis: 32px; }
}
html.qv-workspace #mobileAjustesOverlay .qvw-insurers .qf-subsection { padding: 0; border-top: 0; }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer { display: flex; flex-direction: column; gap: 0; }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  width: 100%; min-height: 38px; margin: 0; padding: 9px 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--qvw-editor-ink); font-size: 12px; font-weight: 400; text-align: left;
}
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip + .filtro-chip { border-top: 1px solid var(--qv-divider, var(--separator)); }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip[data-id="all"] { font-weight: 500; }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .chip-icon { display: none; }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip::before {
  content: ''; box-sizing: border-box; display: grid; place-items: center; flex: 0 0 16px;
  width: 16px; height: 16px; border: 1px solid #aebccd; border-radius: 4px;
  background: #fff; color: #fff; font-size: 12px; line-height: 1;
}
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer [aria-checked="true"]::before { content: '✓'; border-color: var(--brand); background: var(--brand); }
html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer [aria-checked="mixed"]::before { content: '−'; border-color: var(--brand); background: var(--brand); }
html.qv-workspace[data-qvw-keyboard="true"] #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip:focus-visible { outline-offset: -2px; border-radius: 5px; }
@media (hover: hover) {
  html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip:hover { background: #f8fafd; }
}
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  html.qv-workspace #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip { min-height: 44px; }
}

@media (min-width: 1025px) {
  html.qv-workspace.qvw-desktop #mobileAjustesOverlay #filtroIsapresContainer {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px;
  }
  html.qv-workspace.qvw-desktop #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  html.qv-workspace.qvw-desktop #mobileAjustesOverlay #filtroIsapresContainer .filtro-chip[data-id="all"] { grid-column: 1 / -1; }
}
