/* Isolated styles; does not change the existing header. */
#ha-modern-header .ha-search { position: relative; }
#ha-modern-header .ha-ms-results {
  position: absolute; top: calc(100% + 9px); left: 0;
  width: max(100%, 290px); max-width: min(390px, calc(100vw - 36px));
  max-height: 360px; overflow-y: auto; z-index: 99999;
  background: #fff; border: 1px solid #e7e7e7; border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0,0,0,.12); padding: 6px;
  text-align: left;
}
#ha-modern-header .ha-ms-results[hidden] { display: none !important; }
#ha-modern-header .ha-ms-option {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 11px 12px; border-radius: 9px; text-decoration: none !important;
  line-height: 1.4; gap: 3px; background: #fff;
}
#ha-modern-header .ha-ms-option:hover,
#ha-modern-header .ha-ms-option:focus-visible { background: #f5f5f5; }
#ha-modern-header .ha-ms-option strong { font-size: 13px; font-weight: 600; color: #171717; }
#ha-modern-header .ha-ms-option small { font-size: 11px; font-weight: 400; color: #777; }
#ha-modern-header .ha-ms-message { padding: 12px; font-size: 12px; color: #555; cursor: pointer; }
@media(max-width:1100px) {
  #ha-modern-header .ha-mobile-search .ha-ms-results { width: 100%; max-width: none; }
}
