/**
 * css/dropdowns.css: senior-friendly dropdowns, site-wide. Loaded LAST (layouts/head.php), after every page stylesheet, so it only has to out-rank them.
 * The rules, for every <select> and every custom dropdown (the search filter pills and their panels, the nav mega panels and the mobile menu, the typeahead
 * lists, the comps filter panel, the /saved frequency menus). The SEARCH controls are the exception to the 44-48px rule below: the filter row is one 40px control
 * height with 15px text, panel rows are 36px with 16px option text (still iOS-safe), and the pagination footer is in css/search.css:
 *   - text at least 16px (option and label text 17px; secondary text 16px), the site font (inherited: Montserrat)
 *   - tap targets at least 44px tall (selects and pill buttons 48px), 8px or more between stacked options
 *   - dark text on white (#12233D, 15:1), control borders at 3:1 or better (#7B889C), a visible 3px focus ring
 * Specificity: ":not(#d)" adds one ID of weight so these win over any single-class rule in the older files without !important (font-size on <select> is
 * the exception: css/mobile.css forces 16px !important on phones). Nothing here sets a fixed width, so nothing can push a page wider than the screen: panels
 * keep their max-width, text wraps (overflow-wrap) and the toolbars already wrap.
 */

/* ---- <select>, everywhere ---- */
select:not(#d) {
  box-sizing: border-box;
  min-height: 48px;
  padding: 10px 36px 10px 12px;
  font-family: inherit;
  font-size: 17px !important;
  line-height: 1.3;
  color: #12233D;
  background-color: #FFFFFF;
  border: 1px solid #7B889C;
  border-radius: 8px;
  cursor: pointer;
  max-width: 100%;
  text-overflow: ellipsis;
}

select:not(#d):focus-visible {
  outline: 3px solid #1E40AF;
  outline-offset: 2px;
}

select:not(#d):disabled {
  color: #4B5A70;
  background-color: #F3F5F8;
  cursor: default;
}

/* the open list: option text 17px with room to tap (honored by Chrome, Edge and Firefox; Safari and phones draw their own native picker, which is large already) */
select:not(#d) option {
  padding: 10px 12px;
  font-family: inherit;
  font-size: 17px;
  color: #12233D;
  background-color: #FFFFFF;
}

/* labels that belong to a select or a filter field */
.sr-field label,
.lf-field label,
.aff-field label,
.nc-field label,
.ef-label,
.comps-filter-group-title,
.sr-filter-pill-group-title {
  font-size: 16px;
  line-height: 1.35;
}

.sr-field label,
.comps-filter-group-title,
.sr-filter-pill-group-title {
  color: #4B5A70;
}

.sr-field { gap: 6px; }

.sr-field input:not(#d),
.sr-field select:not(#d) {
  min-height: 40px;
  font-size: 16px !important;   /* 16px keeps iOS from zooming */
  padding-top: 6px;
  padding-bottom: 6px;
}

.sr-field input:not(#d) {
  box-sizing: border-box;
  border-color: #7B889C;
}

/* the market report's toolbar: the same 40px control height and 15px text as the search filter row */
.mw-filter select:not(#d),
.mw-filter input:not(#d) {
  height: 40px;
  font-size: 15px !important;
}

.mw-filters button:not(#d) {
  height: 40px;
  font-size: 15px;
}

.mw-filter label {
  font-size: 14px;
}

.ep-select:not(#d),
.ef-select:not(#d) {
  min-height: 48px;
}

.ef-control { gap: 8px 12px; margin: 12px 0; }
.ef-status { font-size: 15px; }

/* ---- search filter pills (the <details> buttons) and their floating panels ---- */
.sr-filter-pill summary:not(#d) {
  min-height: 40px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  border-color: #7B889C;
}

.sr-filter-pill summary:not(#d):focus-visible {
  outline: 3px solid #1E40AF;
  outline-offset: 2px;
}

.sr-filter-pill-panel:not(#d) {
  gap: 12px;
  padding: 12px 16px;
  max-width: min(420px, calc(100vw - 32px));
  border-color: #7B889C;
}

.sr-filter-pill-panel--checkboxes:not(#d),
.sr-filter-pill-group .sr-filter-pill-panel--checkboxes:not(#d) {
  gap: 0;
}

.sr-filter-pill-panel--grouped:not(#d) {
  max-width: min(460px, calc(100vw - 32px));
  gap: 20px;
}

.sr-checkbox-row:not(#d) {
  min-height: 36px;
  gap: 10px;
  font-size: 16px;
  line-height: 1.3;
  padding: 0 4px;
  border-radius: 6px;
}

.sr-checkbox-row:hover {
  background: #EAF0FF;
}

.sr-checkbox-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sr-checkbox-row:focus-within {
  outline: 3px solid #1E40AF;
  outline-offset: -1px;
}

/* the sort menu and its row of actions: the filter row's one 40px control height, 15px text (the second :not() out-ranks the global 17px !important above) */
.sr-filters-actions select:not(#d):not(#e) {
  min-height: 40px;
  height: 40px;
  min-width: 0;
  padding: 0 32px 0 12px;
  font-size: 15px !important;
  font-weight: 500;
}

.sr-filters-row button:not(#d) {
  min-height: 40px;
  font-size: 15px;
}

/* ("Per page" and the page buttons: css/search.css, the pagination footer) */

/* ---- typeahead lists (search box, home hero, /hoa-lookup, /home-value) ---- */
.ac-item:not(#d) {
  min-height: 48px;
  padding: 10px 14px;
}

.ac-item-label:not(#d) {
  font-size: 17px;
  line-height: 1.3;
}

.ac-item + .ac-item { border-top-color: #DCE1E8; }

.ac-panel:not(#d),
.hv-suggest-list:not(#d) {
  border-color: #7B889C;
  max-height: min(420px, 60vh);
}

.hv-suggest-list li:not(#d) {
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 17px;
  line-height: 1.3;
}

/* ---- comps: the filter panel and its select ---- */
.comps-checkbox-list:not(#d) { gap: 4px; }
.comps-filters:not(#d) { column-gap: 20px; row-gap: 28px; }
.comps-select:not(#d) { min-width: 0; width: 100%; }
.comps-filters-summary:not(#d) { min-height: 48px; font-size: 17px; }

/* ---- the nav mega panels (desktop hover menus) ---- */
.sn-mega-col-title:not(#d) { font-size: 16px; }
.sn-mega-item:not(#d) { padding: 10px 8px; min-height: 44px; box-sizing: border-box; }
.sn-mega-item + .sn-mega-item { margin-top: 4px; }
.sn-mega-item-title:not(#d) { font-size: 17px; line-height: 1.3; }
.sn-mega-item-desc:not(#d) { font-size: 16px; line-height: 1.4; }
.sn-mega-callout-body:not(#d),
.sn-mega-feature-desc:not(#d),
.sn-mega-card-text:not(#d) { font-size: 16px; }
.sn-mega-callout-link:not(#d),
.sn-mega-feature-link:not(#d),
.sn-mega-card-link:not(#d) { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; }   /* (text inside a whole-box link now: the box is the tap target) */
.sn-mega-feature-title:not(#d),
.sn-mega-callout-title:not(#d) { font-size: 17px; }
.sn-mega-card-eyebrow:not(#d) { font-size: 16px; }
.sn-mega-badge:not(#d) { font-size: 14px; }
.sn-mega-item:focus-visible,
.sn-mega-feature:focus-visible,
.sn-mega-callout:focus-visible,
.sn-mega-card:focus-visible,
.sn-nav-link:focus-visible { outline: 3px solid #1E40AF; outline-offset: 2px; }
.sn-mega-item-title,
.sn-mega-item-desc,
.sn-mega-feature-desc,
.sn-mega-callout-body { overflow-wrap: anywhere; }

/* ---- the mobile menu (hamburger panel) ---- */
.sn-nav-mobile-link:not(#d),
.sn-nav-mobile-phone:not(#d),
.sn-nav-mobile-sub summary:not(#d) { min-height: 48px; box-sizing: border-box; display: flex; align-items: center; font-size: 17px; }
.sn-nav-mobile-sub summary:not(#d) { justify-content: space-between; }
.sn-nav-mobile-sublist li + li:not(#d) { margin-top: 2px; }
.sn-nav-mobile-sublist a:not(#d) { min-height: 44px; box-sizing: border-box; padding: 8px 4px; font-size: 16px; color: #12233D; }
.sn-nav-mobile-sub summary::after { font-size: 24px; color: #12233D; }

/* ---- phones: keep every control inside a 360-390px screen ---- */
@media (max-width: 768px) {
  .sr-filters-actions select:not(#d) { width: 150px; min-width: 0; padding-left: 10px; padding-right: 30px; }
  .sr-sheet-open .sr-field select:not(#d),
  .sr-sheet-open .sr-field input:not(#d) { height: 44px; min-height: 44px; }
  .sr-sheet-open .sr-field label:not(#d) { font-size: 14px; }
  .sr-sheet-open .sr-checkbox-row:not(#d) { font-size: 16px; min-height: 40px; padding: 0; }
  .sr-sheet-open .sr-filter-pill summary:not(#d) { font-size: 17px; font-weight: 700; height: auto; min-height: 0; padding: 16px 0 8px; }
  .sr-filter-pill-panel:not(#d) { max-width: calc(100vw - 32px); }
  .mw-filter select:not(#d),
  .mw-filter input:not(#d) { height: 40px; }
  .comps-filters:not(#d) { grid-template-columns: 1fr; }
  .ef-control select { max-width: 100%; }
}
