/* menubar.css — menu bar, menu panels, popovers, control center, notifications */

#menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--menubar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 9px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  color: #1d1d1f;
  font-size: 13px;
  z-index: 8000;
  box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.14), 0 0.5px 2px rgba(0, 0, 0, 0.08);
}
#screen[data-appearance="dark"] #menubar { background: rgba(28, 28, 30, 0.48); color: #f5f5f7; }
#screen.no-translucency #menubar { background: rgba(246, 246, 248, 0.98); }
#screen.no-translucency[data-appearance="dark"] #menubar { background: rgba(40, 40, 44, 0.98); }

.mb-left, .mb-right { display: flex; align-items: center; gap: 1px; min-width: 0; }
.mb-left { flex-shrink: 1; overflow: hidden; }

.mb-title {
  height: var(--menubar-h);
  padding: 0 9px;
  display: flex; align-items: center;
  border-radius: 5px;
  color: inherit;
  font-size: 13px;
  white-space: nowrap;
}
.mb-title svg { display: block; }
.mb-apple svg { height: 15px; width: auto; }
.mb-appname { font-weight: 700; }
.mb-title:hover { background: rgba(0, 0, 0, 0.09); }
#screen[data-appearance="dark"] .mb-title:hover { background: rgba(255, 255, 255, 0.12); }
.mb-title.active { background: var(--accent); color: #fff; }

.mb-right .mb-extra {
  height: var(--menubar-h);
  min-width: 26px;
  padding: 0 7px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  color: inherit;
}
.mb-right .mb-extra svg { height: 17px; width: auto; }
.mb-batt-text { font-size: 12.5px; padding-right: 2px; }
.mb-right .mb-extra:hover { background: rgba(0, 0, 0, 0.09); }
#screen[data-appearance="dark"] .mb-right .mb-extra:hover { background: rgba(255, 255, 255, 0.12); }
.mb-right .mb-extra.active { background: var(--accent); color: #fff; }
.mb-clock { font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---------- menu panels ---------- */
#menu-layer { position: absolute; inset: 0; z-index: 9000; pointer-events: none; }
.menu-panel {
  position: absolute;
  pointer-events: auto;
  min-width: 200px;
  padding: 4px 0;
  background: var(--menu-bg);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  color: var(--menu-text);
  border: 0.5px solid var(--window-border);
  border-radius: var(--radius-menu);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.13s var(--ease-out-quart), opacity 0.13s ease;
}
.menu-panel.open { transform: scale(1); opacity: 1; }
.menu-panel.measuring { visibility: hidden; }

.menu-item {
  display: flex; align-items: center;
  padding: 2.5px 12px 2.5px 10px;
  min-height: 22px;
  cursor: default;
  gap: 2px;
}
.menu-item.hover { background: var(--accent); color: #fff; }
.menu-item.disabled { color: var(--text-tertiary); }
.menu-item.disabled.hover { background: transparent; }
.menu-check { width: 16px; flex: 0 0 16px; font-size: 12px; text-align: center; opacity: 0.9; }
.menu-label { flex: 1 1 auto; white-space: nowrap; }
.menu-shortcut { color: var(--text-tertiary); margin-left: 24px; font-size: 12.5px; }
.menu-item.hover .menu-shortcut { color: rgba(255, 255, 255, 0.75); }
.menu-arrow { margin-left: 14px; color: var(--text-tertiary); }
.menu-sep { height: 1px; margin: 5px 10px; background: var(--sep); }
.menu-header { padding: 4px 12px 2px; font-size: 11px; color: var(--text-tertiary); text-transform: none; }

/* ---------- popovers ---------- */
#popover-layer { position: absolute; inset: 0; z-index: 9100; pointer-events: none; }
.popover-panel {
  position: absolute;
  pointer-events: auto;
  background: var(--panel-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 0.5px solid var(--window-border);
  border-radius: var(--radius-popover);
  box-shadow: var(--shadow-panel);
  padding: 12px;
  color: var(--text);
  transform: scale(0.96) translateY(-4px);
  opacity: 0;
  transition: transform 0.16s var(--ease-out-quart), opacity 0.16s ease;
}
.popover-panel.open { transform: none; opacity: 1; }
.popover-panel.measuring { visibility: hidden; }

.cc-panel-inner { display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }
.cc-module { background: var(--fill); border-radius: 11px; padding: 9px; }
.cc-row-tiles { display: flex; gap: 10px; align-items: stretch; }
.cc-connect { flex: 1.4; display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.cc-side { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.cc-tile { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 9px; }
.cc-tile:not(.inert):hover { background: var(--fill); }
.cc-tile.small { flex-direction: column; gap: 3px; align-items: center; padding: 7px; }
.cc-side .cc-tile.small { flex: 1; }
.cc-tile-icon {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--text-tertiary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.cc-tile-icon.on { background: var(--accent); }
.cc-tile-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 11.5px; }
.cc-tile-text b { font-size: 12px; font-weight: 600; }
.cc-tile-sub { color: var(--text-secondary); }
.cc-tile.small .cc-tile-text { align-items: center; }

.cc-slider-module { padding: 10px 11px; }
.cc-slider-row { display: flex; align-items: center; gap: 9px; }
.cc-slider-icon { opacity: 0.75; display: flex; }
.cc-slider-track {
  position: relative; flex: 1;
  height: 22px;
  background: var(--fill);
  border-radius: 11px;
  cursor: pointer;
}
.cc-slider-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; border-radius: 11px; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.cc-slider-knob { position: absolute; top: 50%; width: 19px; height: 19px; transform: translate(-50%, -50%); background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

.cc-np { display: flex; align-items: center; gap: 9px; }
.cc-np-art { width: 34px; height: 34px; border-radius: 6px; background: linear-gradient(140deg, #fc5c7d, #6a82fb); flex: 0 0 34px; }
.cc-np-info { flex: 1; min-width: 0; }
.cc-np-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-np-artist { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-np-controls { display: flex; gap: 2px; }
.cc-np-btn { width: 26px; height: 24px; border-radius: 5px; display: flex; align-items: center; justify-content: center; }
.cc-np-btn:hover { background: var(--fill-strong); }

.cc-row-head { font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.cc-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px; gap: 8px; cursor: default; }
.cc-hint { font-size: 11px; color: var(--text-secondary); line-height: 1.4; margin-top: 4px; }

.sys-switch {
  width: 36px; height: 21px;
  border-radius: 10.5px;
  background: var(--fill-strong);
  position: relative;
  transition: background 0.18s ease;
  flex: 0 0 36px;
}
.sys-switch.on { background: var(--sys-green); }
.sys-switch-knob {
  position: absolute; top: 1.5px; left: 1.5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s var(--ease-spring);
}
.sys-switch.on .sys-switch-knob { transform: translateX(15px); }

/* battery popover */
.batt-big-row { display: flex; align-items: center; gap: 10px; padding: 4px 0 6px; }
.batt-big-row svg { width: 40px; height: auto; }
.batt-big-pct { font-size: 18px; font-weight: 600; }
.batt-big-sub { font-size: 11px; color: var(--text-secondary); }
.batt-slices { border-top: 0.5px solid var(--sep); margin-top: 6px; }
.batt-slice-row { display: flex; justify-content: space-between; padding: 6px 2px 2px; color: var(--accent); font-size: 12.5px; }

/* wifi popover */
.wifi-master { border-bottom: 0.5px solid var(--sep); }
.wifi-master-label { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.wifi-glyph { display: flex; align-items: center; }
.wifi-glyph svg { height: 15px; width: auto; }
.wifi-list { margin-top: 6px; display: flex; flex-direction: column; }
.wifi-net { display: flex; align-items: center; justify-content: space-between; padding: 5px 4px; border-radius: 6px; }
.wifi-net:hover { background: var(--fill); }
.wifi-name { display: flex; align-items: center; gap: 5px; }
.wifi-lock { opacity: 0.5; display: flex; }
.wifi-meta { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.wifi-bars { display: flex; align-items: flex-end; gap: 1.5px; }
.wifi-bars span { width: 3.5px; border-radius: 1px; background: var(--text-tertiary); }
.wifi-bars span:nth-child(1) { height: 4px; }
.wifi-bars span:nth-child(2) { height: 6.5px; }
.wifi-bars span:nth-child(3) { height: 9px; }
.wifi-bars span.on { background: var(--text); }
.wifi-net.current .wifi-name { font-weight: 600; }
.wifi-foot { display: flex; justify-content: space-between; padding: 7px 4px 1px; color: var(--accent); }

/* ---------- notification banners ---------- */
#notif-stack {
  position: absolute; top: 32px; right: 10px;
  display: flex; flex-direction: column; gap: 9px;
  z-index: 9300;
  pointer-events: none;
}
.notif-banner {
  pointer-events: auto;
  display: flex; gap: 10px; align-items: flex-start;
  width: 330px;
  padding: 11px 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 0.5px solid var(--window-border);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.42s var(--ease-macos), opacity 0.32s ease;
  cursor: default;
}
.notif-banner.shown { transform: none; opacity: 1; }
.notif-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; }
.notif-icon svg { width: 100%; height: 100%; border-radius: 8px; }
.notif-text { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; }
.notif-body { font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-close { width: 18px; height: 18px; border-radius: 50%; background: var(--fill-strong); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; }

/* ---------- notification center ---------- */
#notif-center {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 336px;
  padding: 14px 12px;
  z-index: 9200;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateX(105%);
  transition: transform 0.32s var(--ease-macos);
  overflow: hidden;
}
#notif-center.open { transform: none; }
.nc-notifs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 0 1 auto; }
.nc-section-title { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: 0 4px; }
.nc-clear { color: var(--accent); font-size: 12px; }
.nc-item {
  display: flex; gap: 10px;
  padding: 11px 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 0.5px solid var(--window-border);
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
.nc-item-text { flex: 1; min-width: 0; }
.nc-item-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.nc-item-time { font-size: 11.5px; color: var(--text-secondary); flex: 0 0 auto; }
.nc-item-body { font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-empty { text-align: center; color: var(--text-secondary); font-size: 13px; padding: 14px 0 6px; }
.nc-widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1 0 auto; align-content: start; }
.nc-widget {
  background: var(--panel-bg);
  backdrop-filter: blur(50px) saturate(1.8);
  -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 0.5px solid var(--window-border);
  border-radius: 18px;
  padding: 12px;
  color: var(--text);
}
.nc-clock-widget { display: flex; align-items: center; gap: 10px; }
.nc-clock-red { width: 74px; height: 74px; border-radius: 50%; background: var(--sys-red); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 74px; }
.nc-clock-day { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; }
.nc-clock-date { font-size: 26px; font-weight: 300; line-height: 1.05; }
.nc-clock-time { font-size: 34px; font-weight: 300; font-variant-numeric: tabular-nums; }
.nc-cal-widget { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.nc-widget-title { font-size: 11px; font-weight: 700; color: var(--sys-red); text-transform: uppercase; }
.nc-cal-date { font-size: 19px; font-weight: 600; }
.nc-cal-event { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding-top: 3px; }
.nc-cal-dot { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 7px; }
.nc-cal-time { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.nc-weather-widget { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nc-weather-city { font-size: 12px; font-weight: 600; }
.nc-weather-temp { font-size: 34px; font-weight: 200; }
.nc-weather-cond { font-size: 11.5px; color: var(--text-secondary); }
.nc-weather-hl { font-size: 11px; color: var(--text-secondary); }
.nc-screen-widget { display: flex; flex-direction: column; gap: 6px; }
.nc-screen-bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; flex: 1; }
.nc-screen-bars span { flex: 1; background: var(--sys-indigo); border-radius: 2px; min-height: 3px; }
.nc-screen-foot { font-size: 11px; color: var(--text-secondary); }
