.measurement-input { position: relative; flex: 1 1 0%; min-width: 0; width: 100%; }
.measurement-input > input { width: 100%; }
.measurement-input-history { position: absolute; top: calc(100% + 9px); left: 0; width: 100%; z-index: 50; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; background: #fff; color: #111827; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 4px 16px rgb(0 0 0 / 10%); font-size: 14px; line-height: 20px; }
.measurement-input-history[hidden] { display: none; }
.measurement-input-history.opens-above { top: auto; bottom: calc(100% + 9px); }
.measurement-input-history-row { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f3f4f6; }
.measurement-input-history-row:last-child { border-bottom: 0; }
.measurement-input-history-row:hover { background: #eff6ff; }
.measurement-input-history-row:has([aria-selected="true"]) { background: #dbeafe; }
.measurement-input-history-choice { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 0; text-align: left; font: inherit; background: transparent; border: 0; cursor: pointer; }
.measurement-input-history-choice > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.measurement-input-history-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: #dbeafe; color: #3b82f6; font-size: 12px; }
.measurement-input-history-remove { flex-shrink: 0; margin-left: 8px; padding: 4px; border: 0; border-radius: 50%; font: inherit; color: #9ca3af; background: transparent; cursor: pointer; transition: color .15s, background-color .15s; }
.measurement-input-history-remove:hover { color: #ef4444; background: #fee2e2; }
.measurement-input-history button:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.measurement-input-history-empty { padding: 12px 16px; color: #6b7280; font-style: italic; }
@media (prefers-reduced-motion: no-preference) {
    .measurement-input-history:not([hidden]) { animation: measurement-history-open .15s ease-in-out; }
}
@keyframes measurement-history-open {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
