/* --------------------------------------------------------------------------
   Top Bar
   -------------------------------------------------------------------------- */
.top-bar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  gap: 20px;
  flex-shrink: 0;
}

.top-bar button,
.top-bar input,
.top-bar .device-group,
.top-bar .tools-dropdown-menu {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 200px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand h1 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--graphite-dark);
  position: relative;
  display: inline-block;
  /* Strong dropshadow in light mode (inverse of dark mode) */
  filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.95)) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 2px 2px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .brand h1 {
  /* Strong dropshadow in dark mode */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 2px 2px rgba(0, 0, 0, 0.15);
}

/* Two red record dots inside "looper" representing twin rec buttons / eyes */
.logo-o {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.logo-o::after {
  content: '';
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.17em;
  height: 0.17em;
  background-color: var(--pencil-red, #bd3a33);
  border-radius: 50%;
  pointer-events: none;
}

[data-theme="dark"] .logo-o::after {
  background-color: var(--pencil-red, #e04a42);
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--graphite-medium);
  background: none;
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0 2px;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1.4;
  margin-left: 2px;
  align-self: center;
  /* Soft 1px dropshadow in light mode (inverse of dark mode) */
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.75));
}

[data-theme="dark"] .version-badge {
  /* Soft 1px dropshadow in dark mode */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.75);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7));
}

.version-badge:hover {
  background: none;
  border: none;
  color: var(--graphite-dark);
  text-decoration: underline;
}

/* Header Play Bar & Pro Controls Row (Below logo & button line) */
.header-playback-bar {
  position: absolute;
  top: 74px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 35;
  pointer-events: auto;
}

.btn-header-play {
  position: relative;
  top: auto;
  left: auto;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--graphite-dark);
  border: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  z-index: 35;
  pointer-events: auto;
}

.btn-header-play:disabled,
.btn-header-play.is-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

/* Header Pro Row */
.header-pro-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pro Row Actions (Mute All & Select) */
.btn-pro-row-action {
  height: 35px !important;
  border-radius: 999px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.78rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Select Dropdown hover & click behavior */
.select-dropdown-wrap {
  position: relative;
}

.select-dropdown-wrap:hover:not(.is-closed) .select-dropdown-menu,
.select-dropdown-wrap.is-open .select-dropdown-menu {
  display: flex !important;
}

.select-dropdown-wrap.is-closed .select-dropdown-menu {
  display: none !important;
}

.select-dropdown-wrap .select-dropdown-menu {
  top: calc(100% + 2px);
  min-width: 120px;
}

/* Invisible bridge so mouse moving from button to dropdown never loses hover */
.select-dropdown-wrap .select-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  pointer-events: auto;
}

.tools-dropdown-item.is-disabled {
  opacity: 0.38 !important;
  pointer-events: none !important;
  cursor: default !important;
}

#latency-badge-val .latency-unit {
  font-weight: 400;
}
