:root {
  --msx-livebar-height: 36px;
}

.msx-livebar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--msx-livebar-height);
  background: rgba(8, 15, 32, .96);
  border-bottom: 1px solid rgba(187, 200, 218, .14);
  color: #f7faff;
  font-family: 'Noto Sans Thai', 'Outfit', system-ui, sans-serif;
  backdrop-filter: blur(16px);
}

.msx-livebar-inner {
  width: min(1360px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.msx-livebar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f7faff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}

.msx-livebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #8995a9;
  box-shadow: 0 0 0 4px rgba(137, 149, 169, .12);
  flex: 0 0 auto;
}

.msx-livebar[data-overall="operational"] .msx-livebar-dot {
  background: #58e1c3;
  box-shadow: 0 0 0 4px rgba(88, 225, 195, .12);
}

.msx-livebar[data-overall="partial_maintenance"] .msx-livebar-dot,
.msx-livebar[data-overall="maintenance"] .msx-livebar-dot {
  background: #ffc94a;
}
.msx-livebar[data-overall="degraded"] .msx-livebar-dot,
.msx-livebar[data-overall="restricted"] .msx-livebar-dot {
  background: #ff7b72;
}

.msx-livebar-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #bbc8da;
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
}

.msx-livebar-service {
  overflow: hidden;
  text-overflow: ellipsis;
}

.msx-livebar-service strong {
  color: #f7faff;
  font-weight: 700;
}

.msx-livebar-sep {
  opacity: .38;
}
.msx-livebar-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.msx-livebar-links a {
  color: #bbc8da;
  text-decoration: none;
  font-size: .75rem;
  font-weight: 700;
}

.msx-livebar-links a:hover,
.msx-livebar-links a:focus-visible,
.msx-livebar-status:hover,
.msx-livebar-status:focus-visible {
  color: #62c5ff;
}

.msx-livebar a:focus-visible {
  outline: 2px solid rgba(98, 197, 255, .75);
  outline-offset: 2px;
  border-radius: 4px;
}

.msx-nav {
  top: var(--msx-livebar-height) !important;
}
.portal-nav {
  top: var(--msx-livebar-height) !important;
}

body:not(.msx-home) {
  padding-top: var(--msx-livebar-height);
}

@media (max-width: 760px) {
  :root { --msx-livebar-height: 42px; }
  .msx-livebar-inner { width: calc(100% - 20px); gap: 10px; }
  .msx-livebar-summary { font-size: .72rem; gap: 7px; }
  .msx-livebar-summary .msx-livebar-service:nth-of-type(2),
  .msx-livebar-summary .msx-livebar-sep:nth-of-type(2) { display: none; }
  .msx-livebar-links { gap: 10px; }
  .msx-livebar-links a:first-child { display: none; }
}

@media (max-width: 430px) {
  .msx-livebar-summary { display: none; }
  .msx-livebar-links { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .msx-livebar * { scroll-behavior: auto !important; }
}
