/* Material Design 3 App Bar (Shared Component) */

.app-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  background: #131315;
  border-bottom: 1px solid #2e2c30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
}

.app-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-bar-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #e5dfd5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: color 150ms ease;
}

.app-bar-menu-btn:hover {
  color: #ffffff;
}

.app-bar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5dfd5;
  text-decoration: none;
  transition: color 150ms ease;
}

.app-bar-logo:hover {
  color: #ffffff;
}

.app-bar-logo span {
  font-size: 12px;
  color: #a19d95;
}

.app-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-bar-section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffdea5;
  background: #1d1c1f;
  padding: 4px 12px;
  border: 1px solid #2e2c30;
  border-radius: 2px;
}

.app-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-bar-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #e5dfd5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: color 150ms ease;
}

.app-bar-search-btn:hover {
  color: #ffffff;
}

/* Telemetry Bar (below app bar) */
.telemetry-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
  background: #0e0e10;
  border-bottom: 1px solid #2e2c30;
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a19d95;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.telemetry-bar-left {
  flex: 1;
}

.telemetry-bar-right {
  white-space: nowrap;
}

.telemetry-stat {
  color: #ffdea5;
  font-weight: 500;
}

/* Account for app bar + telemetry in page layout */
body.has-app-bar {
  padding-top: 112px; /* 56px app bar + 56px telemetry */
}

/* Drawer overlay */
.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.nav-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .app-bar {
    padding: 0 12px;
  }

  .app-bar-logo {
    font-size: 12px;
  }

  .app-bar-section-label {
    font-size: 10px;
    padding: 3px 10px;
  }

  .telemetry-bar {
    padding: 8px 12px;
    font-size: 10px;
    flex-direction: column;
    gap: 8px;
  }

  .telemetry-bar-left,
  .telemetry-bar-right {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-bar-menu-btn,
  .app-bar-logo,
  .app-bar-search-btn,
  .nav-drawer-backdrop {
    transition: none;
  }
}
