/* TOPBAR-01: one owned header layer, loaded after the historical theme sheets. */
.topbar.topbar-v1 {
  position:relative;
  display:grid; grid-template-columns:minmax(0,1fr) var(--topbar-search-width, min(44vw,660px)) minmax(0,1fr);
  align-items:center; column-gap:16px; min-height:60px; height:auto;
  padding:8px 20px; background:var(--card); border-bottom:1px solid var(--line);
  box-shadow:none; backdrop-filter:none;
}
.topbar.topbar-v1::before,.topbar.topbar-v1::after { content:none; }
.topbar-v1 > .tb-left { display:flex!important; width:max-content; justify-self:start; }
.topbar-v1 > .tb-center { position:relative; width:100%; min-width:0; }
.topbar-v1 > .tb-right { width:max-content; justify-self:end; gap:6px; }
.topbar-v1 .tb-brand { min-width:44px; min-height:44px; padding:0; }
.topbar-v1 .tb-brand-picture,.topbar-v1 .tb-brand-mark { width:34px; height:34px; flex-basis:34px; }
.topbar-v1 .topbar-command {
  display:block; width:100%; height:auto; min-height:44px; overflow:visible;
  border:0; border-radius:999px; background:none; box-shadow:none;
}
.topbar-v1 .topbar-command:focus-within { border:0; box-shadow:none; }
.topbar-v1 .topbar-command .topbar-island {
  display:grid; grid-template-columns:28px minmax(0,1fr) 28px; align-items:center;
  width:100%; min-height:44px; height:auto; padding:8px 12px;
  border:1px solid transparent; border-radius:999px;
  background:linear-gradient(var(--card-2),var(--card-2)) padding-box,
    linear-gradient(120deg in oklab,color-mix(in srgb,var(--accent) 60%,var(--card)),color-mix(in srgb,var(--accent-2) 22%,var(--card)),color-mix(in srgb,var(--accent) 46%,var(--card))) border-box;
  box-shadow:0 0 12px -3px color-mix(in srgb,var(--accent) 24%,transparent); color:var(--ink-2); gap:8px;
}
@media (hover:hover) {
  .topbar-v1 .topbar-command .topbar-island:hover { box-shadow:0 0 14px -3px color-mix(in srgb,var(--accent) 34%,transparent); }
}
.topbar-v1 .topbar-command .topbar-island:focus-visible {
  outline:2px solid var(--ink)!important; outline-offset:3px; box-shadow:none!important;
}
.topbar-v1 .topbar-island-mark { width:26px; height:26px; object-fit:contain; }
.topbar-v1 .topbar-command .topbar-island-ph {
  font-size:14px; font-weight:400; letter-spacing:0; text-align:center;
  color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.topbar-v1 .topbar-island-ph::after { content:none; }
.topbar-v1 .topbar-island-kbd { display:none; }
.topbar-v1 .tb-assistant-slot { position:absolute; inset-inline-start:calc(100% + 8px); top:50%; transform:translateY(-50%); display:flex; align-items:center; width:max-content; }
.topbar-v1 .tb-assistant-slot:empty { display:none; }
.topbar-v1 .orbit-ai-launcher {
  display:inline-flex; min-width:40px; min-height:40px; height:auto; width:auto;
  padding:8px 10px; border:1px solid var(--line); border-radius:999px;
  background:transparent; color:var(--ink-2); font-size:13px; font-weight:500;
}
.topbar-v1 .orbit-ai-launcher:hover { background:var(--card-2); }
.topbar-v1 .orbit-ai-launcher:focus-visible,.topbar-v1 .tb-icon-btn:focus-visible,
.topbar-v1 .tb-team:focus-visible,.topbar-v1 .tb-brand:focus-visible {
  outline:2px solid var(--ink); outline-offset:2px;
}
.topbar-v1 .tb-icon-btn { width:40px; height:40px; border-radius:10px; }
.topbar-v1 .tb-icon-btn:not(.on) { box-shadow:none; }
.topbar-v1 .tb-icon-btn:not(.on):not(.accent) { color:var(--ink-2); }
.topbar-v1 .tb-icon-btn.accent { background:var(--accent); }
.topbar-v1 .tb-icon-btn svg { transform:none; }
.topbar-v1 .tb-team { min-height:40px; border:0; background:transparent; }
.topbar-v1 .tb-more { display:none; position:relative; }
.topbar-v1 .tb-bell-dot { pointer-events:none; }
.topbar-v1 .tb-more .tb-bell-dot { display:none; right:-2px!important; top:-3px!important; }
.tb-menu-unread { margin-inline-start:auto; padding:2px 7px; border-radius:999px; background:var(--card-2); color:var(--ink); font-variant-numeric:tabular-nums; }
/* Keep the enabled voice action readable without changing the product palette. */
button[data-action-id="voice.commandor.ptt"]:not(:disabled) { color:#211b16; }
.voice-text-actions { display:flex; flex-wrap:wrap; gap:8px; margin-block:8px; }
.voice-text-actions button { min-height:40px; }
.voice-text-actions button:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
@media (max-width:1180px) {
  .topbar-v1 .tb-brand-name { display:none; }
  .topbar-v1 .orbit-ai-launcher span { display:none; }
  .topbar-v1 .orbit-ai-launcher { width:40px; padding:8px; }
}
@media (max-width:960px) {
  .topbar-v1 .tb-right > .tb-guide,.topbar-v1 .tb-right > .tb-calendar,
  .topbar-v1 .tb-right > .tb-quick { display:none!important; }
  .topbar-v1 .tb-more { display:inline-flex!important; }
}
@media (max-width:780px) {
  .topbar.topbar-v1 { column-gap:8px; padding:calc(8px + var(--safe-top)) 8px 8px; min-height:60px; }
  .topbar-v1 > .tb-right { gap:4px; }
  .topbar-v1 .tb-right > .tb-team { display:inline-flex!important; }
  .topbar-v1 .tb-right > .tb-voice.on { display:inline-flex!important; }
  .topbar-v1 .tb-icon-btn { width:44px; height:44px; }
  .topbar-v1 .tb-brand-picture,.topbar-v1 .tb-brand-mark { width:32px; height:32px; flex-basis:32px; }
}
@media (max-width:620px) {
  .topbar-v1 .tb-more .tb-bell-dot { display:grid; }
  .topbar-v1 .tb-right > .tb-bell,.topbar-v1 .tb-right > .tb-team,
  .topbar-v1 .tb-right > .tb-voice:not(.on) { display:none!important; }
  .topbar-v1 .orbit-ai-launcher { width:44px; min-height:44px; }
  .topbar-v1:has(.tb-voice.on) .tb-brand { visibility:hidden; }
  .topbar-v1 .tb-right > .tb-voice.on { position:absolute; inset-inline-start:8px; top:50%; transform:translateY(-50%); }
  .topbar-v1 .topbar-command .topbar-island { grid-template-columns:minmax(0,1fr); padding:8px; }
  .topbar-v1 .topbar-island-mark { display:none; }
  .topbar-v1 .topbar-command .topbar-island-ph { font-size:0; }
  .topbar-v1 .topbar-command .topbar-island-ph::after { content:'Поиск'; font-size:13px; }
}

/* Connections remain a native touch/trackpad scroller, with desktop controls. */
.cmdk-app-dock-controls { display:flex; align-items:center; gap:4px; }
.cmdk-app-dock-step { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; padding:0; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--ink); cursor:pointer; }
.cmdk-app-dock-step[aria-disabled="true"] { opacity:.4; cursor:default; }
.cmdk-app-dock-step:focus-visible,.cmdk-app-dock-track:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.cmdk-app-dock-track { cursor:grab; touch-action:pan-x pan-y pinch-zoom; }
.cmdk-app-dock-track.is-dragging { cursor:grabbing; scroll-snap-type:none; user-select:none; }
.cmdk-app-dock-track img { -webkit-user-drag:none; }
@media(max-width:620px) {
  .cmdk-app-dock-step { width:44px; height:44px; }
  .cmdk-app-dock-head { gap:4px; }
  .cmdk-app-dock-hint { display:none; }
  .cmdk-app-dock-all { padding-inline:6px; font-size:12px; }
}
@media (prefers-reduced-motion:reduce) {
  .topbar-v1 *, .topbar-v1 *::before, .topbar-v1 *::after { animation:none!important; transition:none!important; }
}
@media (forced-colors:active) {
  .topbar-v1 .topbar-command .topbar-island { border:1px solid ButtonText; }
}
