/* ==========================================================================
   Component: Hero Pill Select (locked Pattern 16 — Option D Rich Dropdown)
   Pill trigger + custom themed dropdown for option pickers whose option
   labels don't fully self-explain. Each option carries an icon + name +
   1-line description. Replaces native <select> for Q/A settings like
   Org Level, Presentation Style, Grouping, color_mode, editing.permissions.
   Promoted verbatim from `pattern-16-hero-pill-select-locked.html`.

   Anatomy:
     .hps-trigger            (32px pill, --radius-full)
       .hps-trigger__icon    (14px leading accent icon)
       .hps-trigger__value   (current selected label, semibold)
       .hps-trigger__caret   (14px chevron)
     .hps-trigger--open      (focus ring while dropdown is open)

     .hps-rich-drop          (popover-positioned themed dropdown panel)
       .hps-rich-opt         (option row: 18px icon + (name + desc))
         .hps-rich-opt__icon
         .hps-rich-opt__name
         .hps-rich-opt__desc
       .hps-rich-opt--current (selected row tint)
   ========================================================================== */

.hps-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--surface-base);
  cursor: pointer;
  font-family: inherit;
}
.hps-trigger:hover { border-color: var(--accent-primary); }
.hps-trigger--open {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.hps-trigger__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
  line-height: 1;
}
.hps-trigger__icon .material-symbols-rounded {
  font-size: 14px;
  line-height: 1;
}

.hps-trigger__value {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.hps-trigger__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  margin-left: 2px;
  flex-shrink: 0;
  line-height: 1;
}
.hps-trigger__caret .material-symbols-rounded {
  font-size: 14px;
  line-height: 1;
}

/* Rich dropdown (popover-positioned by JS via helpers/popover_dropdown). */
.hps-rich-drop {
  margin: 0;
  padding: 4px;
  background: var(--surface-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: fixed;
  inset: unset;
}
.hps-rich-drop:not(:popover-open):not([data-open]) { display: none; }

.hps-rich-opt {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
}
.hps-rich-opt:hover { background: var(--surface-hover); }
.hps-rich-opt--current { background: var(--accent-subtle); }

.hps-rich-opt__icon {
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1px;
}
.hps-rich-opt__icon .material-symbols-rounded { font-size: 16px; }
.hps-rich-opt--current .hps-rich-opt__icon { color: var(--accent-primary); }

.hps-rich-opt__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: 1.3;
}
.hps-rich-opt--current .hps-rich-opt__name { color: var(--accent-primary); }

.hps-rich-opt__desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.35;
}
