/* VoiceNote titlebar component: the only source of titlebar styles. */
.titlebar {
  position: relative;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  height: 46px;
  border-bottom: 1px solid var(--app-border);
  background: rgb(var(--theme-surface-rgb) / .94);
}
.titlebar__left {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.titlebar__brand-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.titlebar__brand {
  display: grid;
  width: auto;
  height: 100%;
  align-content: center;
  justify-items: start;
  gap: 2px;
  flex: 0 0 auto;
  padding: 0 8px 0 16px;
  color: var(--app-text);
  font: 700 10px/1.1 var(--font-ui, system-ui, sans-serif);
  letter-spacing: .11em;
  text-decoration: none;
  cursor: pointer;
}
.titlebar__mic-indicator {
  display: grid;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 24%, #b3bdcc 0, #7f8b9c 34%, #4c596c 72%, #313b4c 100%);
  box-shadow: inset -1px -1px 2px rgb(0 0 0 / .52), inset 1px 1px 1px rgb(255 255 255 / .28), 0 0 0 1px rgb(0 0 0 / .22), 0 1px 3px rgb(0 0 0 / .38);
}
.titlebar__mic-indicator > span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9ba8b9;
  box-shadow: 0 0 2px rgb(202 216 236 / .5);
}
.titlebar__mic-indicator[data-state="granted"] {
  border-color: rgb(205 255 229 / .56);
  background: radial-gradient(circle at 32% 24%, #c4ffe1 0, #58d99b 34%, #168454 72%, #0c4e35 100%);
  box-shadow: inset -1px -1px 2px rgb(0 0 0 / .48), inset 1px 1px 1px rgb(255 255 255 / .42), 0 0 0 1px rgb(0 0 0 / .22), 0 1px 3px rgb(0 0 0 / .35), 0 0 8px rgb(60 218 143 / .42);
}
.titlebar__mic-indicator[data-state="granted"] > span { background: #eafff3; box-shadow: 0 0 3px #eafff3; }
.titlebar__mic-indicator[data-state="denied"] {
  border-color: rgb(255 213 217 / .54);
  background: radial-gradient(circle at 32% 24%, #ffc4c8 0, #ea6470 34%, #a92737 72%, #641520 100%);
  box-shadow: inset -1px -1px 2px rgb(0 0 0 / .5), inset 1px 1px 1px rgb(255 255 255 / .42), 0 0 0 1px rgb(0 0 0 / .22), 0 1px 3px rgb(0 0 0 / .35), 0 0 8px rgb(223 70 84 / .38);
}
.titlebar__mic-indicator[data-state="denied"] > span { background: #fff0f1; box-shadow: 0 0 3px #fff0f1; }
.titlebar__brand-lockup { display: grid; justify-items: start; gap: 2px; white-space: nowrap; }
.titlebar__brand-lockup strong { color: var(--app-text); font: 800 15px/1 var(--font-ui, system-ui, sans-serif); letter-spacing: .11em; }
.titlebar__brand-lockup small { color: var(--app-muted); font: 600 7px/1 var(--font-ui, system-ui, sans-serif); letter-spacing: .15em; }
.titlebar__actions { display: none !important; }
.voice-debug { display: none !important; }
.window-button { min-width: 42px; border: 0; border-left: 1px solid rgb(var(--theme-accent-rgb) / .2); background: transparent; color: var(--app-muted); cursor: pointer; }
.window-button:hover { background: var(--app-surface-strong); color: var(--app-text); }
.window-button--close:hover { background: #c43d52; color: #fff; }

/* Desktop: brand remains anchored to the left. */
html[data-device-kind="desktop"] .titlebar__left { justify-content: flex-start; }

/* Mobile and tablet: the brand is centered in the titlebar panel. */
html[data-device-kind="mobile"] .titlebar,
html[data-device-kind="tablet"] .titlebar {
  min-height: 46px;
  height: 46px;
  border-bottom-color: rgb(var(--theme-accent-rgb) / .38);
  background: rgb(var(--theme-surface-strong-rgb, 20 29 45) / .94);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
html[data-device-kind="mobile"] .titlebar__left,
html[data-device-kind="tablet"] .titlebar__left {
  position: absolute;
  inset: 0;
  justify-content: center;
  width: 100%;
}
html[data-device-kind="mobile"] .titlebar__brand,
html[data-device-kind="tablet"] .titlebar__brand {
  justify-items: center;
  padding: 0 8px;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: .11em;
  text-align: center;
}
html[data-device-kind="mobile"] .titlebar__brand-lockup,
html[data-device-kind="tablet"] .titlebar__brand-lockup {
  justify-items: center;
}
