/* Phase 48 — Global shell search overlay + login-bar field */

.uc-login-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.uc-login-bar__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}

.uc-login-bar__after-hours {
  color: var(--uc-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.uc-login-bar__after-hours:empty {
  display: none;
}

.uc-login-bar__presence {
  font-size: 12px;
  font-weight: 700;
}

.uc-login-bar__search {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 420px;
}

.uc-login-bar__search[hidden] {
  display: none !important;
}

.uc-shell-search__input,
.uc-shell-search-overlay__field {
  appearance: none;
  -webkit-appearance: none;
}

/*
 * Shell search chrome is always-dark (hangs off the black login-bar).
 * Theme remaps paint every `input` with --uc-text (paper ink on Classic/Street/
 * Concrete), so lock field ink + autofill past those rules for all themes.
 */
html body[data-uc-theme] input.uc-shell-search__input,
html body[data-uc-theme] input.uc-shell-search-overlay__field {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: var(--uc-gold, #facc15) !important;
  background-color: transparent !important;
}

html body[data-uc-theme] input.uc-shell-search__input::placeholder,
html body[data-uc-theme] input.uc-shell-search-overlay__field::placeholder {
  color: color-mix(in srgb, #f8fafc 55%, transparent) !important;
  -webkit-text-fill-color: color-mix(in srgb, #f8fafc 55%, transparent) !important;
  opacity: 1;
}

html body[data-uc-theme] input.uc-shell-search__input:-webkit-autofill,
html body[data-uc-theme] input.uc-shell-search__input:-webkit-autofill:hover,
html body[data-uc-theme] input.uc-shell-search__input:-webkit-autofill:focus,
html body[data-uc-theme] input.uc-shell-search-overlay__field:-webkit-autofill,
html body[data-uc-theme] input.uc-shell-search-overlay__field:-webkit-autofill:hover,
html body[data-uc-theme] input.uc-shell-search-overlay__field:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: var(--uc-gold, #facc15) !important;
  box-shadow: 0 0 0 1000px #111827 inset !important;
  transition: background-color 99999s ease-in-out 0s;
}

.uc-shell-search__input::-webkit-search-decoration,
.uc-shell-search__input::-webkit-search-cancel-button,
.uc-shell-search-overlay__field::-webkit-search-decoration,
.uc-shell-search-overlay__field::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.uc-shell-search__input {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--uc-gold) 28%, transparent);
  background: transparent;
  color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 2px 6px;
  outline: none;
  border-radius: 0;
  caret-color: var(--uc-gold);
}

.uc-shell-search__input::placeholder {
  color: color-mix(in srgb, #f8fafc 55%, transparent);
  font-weight: 500;
}

.uc-shell-search__input:focus {
  border-bottom-color: var(--uc-gold);
  box-shadow: 0 1px 0 var(--uc-gold);
}

.uc-app-topbar__search {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--uc-gold);
  cursor: pointer;
}

.uc-app-topbar__search[hidden] {
  display: none !important;
}

.uc-app-topbar__search:focus-visible {
  outline: 2px solid var(--uc-gold);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .uc-app-topbar__search:not([hidden]) {
    display: inline-flex;
  }
}

.uc-shell-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 12060;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top, 0px)) 12px max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  color-scheme: dark;
}

.uc-shell-search-overlay.is-open {
  display: flex;
}

.uc-shell-search-overlay[hidden] {
  display: none !important;
}

.uc-shell-search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #0a0909 72%, transparent);
  cursor: pointer;
}

.uc-shell-search-overlay__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: min(78vh, 680px);
  margin-top: 8px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--uc-gold, #facc15) 42%, #111);
  border-radius: var(--uc-dna-card-radius, 14px);
  /* Fixed dark panel — do not inherit theme surface/paper tokens. */
  background: #111827;
  color: #f8fafc;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px color-mix(in srgb, var(--uc-gold, #facc15) 22%, transparent);
  color-scheme: dark;
}

.uc-shell-search-overlay__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 12px 10px 14px;
  background: #111827;
  border-bottom: 1px solid color-mix(in srgb, var(--uc-gold, #facc15) 28%, transparent);
  box-shadow: inset 0 -2px 0 var(--uc-gold, #facc15);
}

.uc-shell-search-overlay__glyph {
  display: inline-flex;
  color: var(--uc-gold);
  flex: 0 0 auto;
}

.uc-shell-search-overlay__field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  -webkit-text-fill-color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
  outline: none;
  caret-color: var(--uc-gold);
}

.uc-shell-search-overlay__field::placeholder {
  color: color-mix(in srgb, #f8fafc 55%, transparent);
  font-weight: 500;
}

.uc-shell-search-overlay__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 2px solid color-mix(in srgb, var(--uc-gold) 40%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--uc-gold);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.uc-shell-search-overlay__close:hover,
.uc-shell-search-overlay__close:focus-visible {
  background: color-mix(in srgb, var(--uc-gold) 16%, transparent);
  outline: none;
}

.uc-shell-search-overlay__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 8px 12px;
}

.uc-shell-search__status {
  padding: 18px 14px;
  color: color-mix(in srgb, #f8fafc 70%, transparent);
  font-size: 13px;
  font-weight: 600;
}

.uc-shell-search__section {
  padding: 2px 0 10px;
}

.uc-shell-search__section-label {
  padding: 10px 12px 6px;
  color: var(--uc-gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.uc-shell-search__row {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
  box-shadow: inset 3px 0 0 transparent;
}

.uc-shell-search__row:hover {
  background: color-mix(in srgb, var(--uc-gold) 8%, transparent);
}

.uc-shell-search__row.is-active {
  background: color-mix(in srgb, var(--uc-gold) 14%, transparent);
  box-shadow: inset 3px 0 0 var(--uc-gold);
}

.uc-shell-search__row-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.uc-shell-search__row[data-kind="people"] .uc-shell-search__row-title {
  color: var(--uc-gold);
}

.uc-shell-search__row-sub {
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, #f8fafc 58%, transparent);
}

.uc-shell-search__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 8px;
}

.uc-shell-search__clear {
  border: 0;
  background: transparent;
  color: var(--uc-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 8px;
  white-space: nowrap;
}

.uc-shell-search__clear:hover,
.uc-shell-search__clear:focus-visible {
  text-decoration: underline;
  outline: none;
}

.uc-shell-search__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 8px;
}

.uc-shell-search__more {
  border: 0;
  background: transparent;
  color: var(--uc-gold);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 0;
}

@media (max-width: 767px) {
  .uc-shell-search-overlay {
    padding: 0;
    align-items: stretch;
  }

  .uc-shell-search-overlay__panel {
    width: 100%;
    max-height: none;
    height: 100%;
    margin: 0;
    border-radius: 0;
    border-width: 0;
  }

  .uc-shell-search-overlay__body {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
}
