/* ==========================================================================
   Component: Scale Pill (locked Pattern 9)
   The universal Spacing pill used in Common Settings 2 on every Element
   editor. Drives `element.bottom_margin`. Promoted verbatim from the
   Pattern 21 q-and-a-finals locked mockup.

     • .scale-pill          — base trigger
     • .scale-pill__hint    — uppercase tertiary "Spacing" label
     • .scale-pill__label   — current resolved scale (None/Sm/Md/Lg/XL)
     • .scale-pill__caret   — trailing chevron
   ========================================================================== */

.scale-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  background: var(--surface-base);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-full);
}

/* Form-submitting variant: native <select> overlays the pill, transparent
   so the visible chrome stays canonical. Confined to the pill via the
   `.scale-pill select` descendant selector (so .ee-common-settings__overlay
   inside the pill is now properly clipped to the pill's box). */
.scale-pill select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
}

.scale-pill__hint {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.scale-pill__label {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.scale-pill__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.scale-pill__caret .material-symbols-rounded {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1;
}
