/* Unified search is desktop-only; the mobile search field keeps its original place. */
@media (min-width: 761px) {
  body.desktop-session .brand { flex: 0 0 auto; margin-right: 0; }
  body.desktop-session .desktop-global-search {
    position: relative; display: flex; flex: 1 1 420px; align-items: center;
    width: 100%; min-width: 160px; max-width: 520px; height: 40px;
    margin: 0 auto; border: 1px solid #e3e6f0; border-radius: 11px;
    background: #f8f9fc; color: #717991;
  }
  body.desktop-session .desktop-global-search:focus-within {
    border-color: #a79cf9; background: white; box-shadow: 0 0 0 3px #7060ed18;
  }
  body.desktop-session .desktop-global-search > svg {
    flex: 0 0 18px; width: 18px; height: 18px; margin-left: 13px;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
  }
  body.desktop-session .desktop-global-search input {
    flex: 1; min-width: 0; height: 100%; padding: 0 11px;
    border: 0; outline: 0; background: transparent; color: #283047;
    font-size: .82rem;
  }
  body.desktop-session .desktop-global-search input:focus { box-shadow: none; }
  body.desktop-session .desktop-global-search input::placeholder { color: #9299aa; }
  body.desktop-session .desktop-global-search input::-webkit-search-cancel-button { display: none; }
  body.desktop-session .desktop-global-search-clear {
    flex: 0 0 28px; width: 28px; height: 28px; margin-right: 5px;
    padding: 0; border: 0; border-radius: 7px; background: transparent;
    color: #8b92a5; cursor: pointer; font-size: 20px; line-height: 1;
  }
  body.desktop-session .desktop-global-search-clear:hover { background: #efedff; color: #554ddd; }
  body.desktop-session .desktop-global-search-results {
    position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%;
    width: min(560px, calc(100vw - 36px)); max-height: min(590px, calc(100dvh - 90px));
    padding: 8px; overflow: auto; transform: translateX(-50%);
    border: 1px solid #e5e7f0; border-radius: 13px; background: white;
    box-shadow: 0 16px 38px rgb(34 38 82 / 17%);
  }
  body.desktop-session .desktop-search-scope { display: flex; gap: 5px; padding: 4px 5px 8px; border-bottom: 1px solid #e9eaf1; }
  body.desktop-session .desktop-search-scope button {
    padding: 6px 9px; border: 0; border-radius: 7px; background: transparent;
    color: #737b90; font: inherit; font-size: .73rem; cursor: pointer;
  }
  body.desktop-session .desktop-search-scope button[aria-pressed="true"] { background: #efedff; color: #5149c6; font-weight: 700; }
  body.desktop-session .desktop-search-heading {
    padding: 9px 10px 6px; color: #8b91a4; font-size: .68rem;
    font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  }
  body.desktop-session .desktop-search-result,
  body.desktop-session .desktop-search-more {
    display: flex; gap: 8px; align-items: flex-start; width: 100%;
    padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
    color: #32394c; cursor: pointer; text-align: left;
  }
  body.desktop-session .desktop-search-result { flex-direction: column; gap: 3px; }
  body.desktop-session .desktop-search-result strong { max-width: 100%; overflow: hidden; font-size: .81rem; text-overflow: ellipsis; white-space: nowrap; }
  body.desktop-session .desktop-search-result span { display: -webkit-box; overflow: hidden; color: #858c9e; font-size: .73rem; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  body.desktop-session .desktop-search-result:hover,
  body.desktop-session .desktop-search-result.is-active,
  body.desktop-session .desktop-search-more:hover { background: #f3f1ff; }
  body.desktop-session .desktop-search-more { color: #554ddd; font-size: .77rem; font-weight: 650; }
  body.desktop-session .desktop-search-empty { padding: 10px; margin: 0; color: #838a9c; font-size: .78rem; line-height: 1.5; }
  body.desktop-session #inbound-view .conversation-search-field { display: none; }
  body.desktop-session #desktop-contact-search-chip {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    min-width: 0; padding: 7px 9px; border-radius: 8px;
    background: #f0edff; color: #554ddd; font-size: .73rem;
  }
  body.desktop-session #desktop-contact-search-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.desktop-session #desktop-contact-search-chip button {
    padding: 0 4px; border: 0; background: transparent;
    color: inherit; cursor: pointer; font-size: 17px;
  }
}

@media (min-width: 761px) and (max-width: 1000px) {
  body.desktop-session .topbar { gap: 8px; padding-inline: 12px; }
  body.desktop-session .brand strong { font-size: .82rem; }
  body.desktop-session .live-indicator { max-width: 118px; padding-inline: 4px; }
  body.desktop-session .desktop-global-search { flex-basis: 260px; }
}
