/* PartyLabs custom title bar. Loaded by every desktop page (desktop.html, kiosk.html);
   the bar is injected by assets/js/titlebar.js only inside the Tauri shell. */

:root {
  --tb-height: 36px;
  --tb-bg: var(--canvas, #e9e9eb);
  --tb-ink: var(--ink, #111111);
  --tb-muted: var(--muted, #71717a);
  --tb-hover: rgba(17, 17, 17, 0.07);
  --tb-active: rgba(17, 17, 17, 0.12);
  --tb-close: #c42b1c;
}

html.dark {
  --tb-bg: var(--canvas, #0b0b0c);
  --tb-ink: var(--ink, #f4f4f5);
  --tb-muted: var(--muted, #9a9aa3);
  --tb-hover: rgba(255, 255, 255, 0.08);
  --tb-active: rgba(255, 255, 255, 0.14);
}

html.has-pl-titlebar body {
  box-sizing: border-box;
  padding-top: var(--tb-height) !important;
}

html.has-pl-titlebar.pl-titlebar-hidden body {
  padding-top: 0 !important;
}

html.pl-titlebar-hidden .pl-titlebar {
  display: none;
}

.pl-titlebar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2147483000;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: var(--tb-height);
  background: var(--tb-bg);
  color: var(--tb-ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.pl-titlebar-brand {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--tb-muted);
}

.pl-titlebar-brand img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  pointer-events: none;
}

.pl-titlebar-brand span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pl-titlebar-controls {
  display: flex;
  align-items: stretch;
}

.pl-titlebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tb-ink);
  cursor: default;
  transition: background-color 120ms ease, color 120ms ease;
}

.pl-titlebar-btn svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  shape-rendering: geometricPrecision;
}

.pl-titlebar-btn:hover {
  background: var(--tb-hover);
}

.pl-titlebar-btn:active {
  background: var(--tb-active);
}

.pl-titlebar-btn--close:hover,
.pl-titlebar-btn--close:active {
  background: var(--tb-close);
  color: #ffffff;
}

.pl-titlebar-btn:focus-visible {
  outline: 2px solid var(--tb-ink);
  outline-offset: -2px;
}
