/* ==========================================================================
   controlpanel.css - the desktop Control Panel and the tray flyouts.

   Control Panel stayed a Win32 surface in Windows 8: light chrome, blue task
   links, hairline rules. Only the Networks flyout crossed over to the Modern
   language, which is why it looks like a charm pane and the other two don't.
   ========================================================================== */

/* --------------------------------------------------------------------------
   SHELL
   -------------------------------------------------------------------------- */
.window-body.is-flush { padding: 0; }

.cp {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
  color: #1a1a1a;
  font-size: 12px;
}

.cp-toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  background: #f0f0f0;
  border-bottom: 1px solid #dcdcdc;
}

.cp-nav-button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #2b6ca3;
  background: #e4eef7;
  flex: none;
}
.cp-nav-button:hover:not(:disabled) { background: #cfe3f5; }
.cp-nav-button:disabled { color: #b0b0b0; background: #ebebeb; pointer-events: none; }

.cp-crumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid #cfcfcf;
  overflow: hidden;
  white-space: nowrap;
}
.cp-crumb { font-size: 12px; color: #1a1a1a; padding: 0 2px; }
.cp-crumb:hover { color: #1a6fb5; text-decoration: underline; }
.cp-crumb.is-current { font-weight: 600; }
.cp-crumb-sep { color: #8a8a8a; }

.cp-search {
  width: 168px;
  height: 24px;
  flex: none;
  padding: 0 8px;
  border: 1px solid #cfcfcf;
  font-size: 12px;
  background: #fff;
}

.cp-main { flex: 1; display: flex; min-height: 0; }

/* --------------------------------------------------------------------------
   SIDEBAR
   -------------------------------------------------------------------------- */
.cp-side-host { flex: none; width: 188px; background: #f7f7f7; border-right: 1px solid #e4e4e4; overflow-y: auto; }
.cp-side { padding: 14px 0; }

.cp-side-home {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}
.cp-side-home:hover { color: #1a6fb5; text-decoration: underline; }

.cp-side-group { margin-top: 18px; }
.cp-side-title {
  padding: 0 16px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}
.cp-side-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 16px;
  font-size: 12px;
  color: #1a6fb5;
  line-height: 1.35;
}
.cp-side-link:hover { text-decoration: underline; color: #0d4d85; }

/* --------------------------------------------------------------------------
   CONTENT
   -------------------------------------------------------------------------- */
.cp-content {
  flex: 1;
  min-width: 0;
  padding: 18px 24px 28px;
  overflow-y: auto;
  user-select: text;
}

.cp-h1 {
  font-size: 17px;
  font-weight: 400;
  color: #0c3f6b;
  margin-bottom: 14px;
}
.cp-h2 {
  font-size: 13px;
  font-weight: 600;
  color: #0c3f6b;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
}
.cp-lead { font-size: 12px; line-height: 1.55; color: #444; margin-bottom: 12px; max-width: 620px; }
.cp-section { margin-bottom: 22px; }

.cp-link {
  display: block;
  text-align: left;
  font-size: 12px;
  color: #1a6fb5;
  padding: 2px 0;
  line-height: 1.45;
}
.cp-link:hover { text-decoration: underline; color: #0d4d85; }

.cp-note { font-size: 12px; color: #555; line-height: 1.5; margin: 6px 0; }
.cp-note.is-ok { color: #1a7a1a; }
.cp-note.is-warn { color: #b34700; }

/* -- home: category grid --------------------------------------------------- */
.cp-home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cp-viewby { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #444; flex: none; }

.cp-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 20px 32px;
  margin-top: 8px;
}
.cp-cat { display: flex; gap: 12px; align-items: flex-start; }
.cp-cat-icon { flex: none; color: #2b6ca3; }
.cp-cat-icon:hover { color: #1a5288; }
.cp-cat-title {
  display: block;
  text-align: left;
  font-size: 14px;
  color: #1a6fb5;
  margin-bottom: 3px;
}
.cp-cat-title:hover { text-decoration: underline; }
.cp-cat-tasks { display: flex; flex-direction: column; }

/* -- applet rows ----------------------------------------------------------- */
.cp-applet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid #f0f0f0;
}
.cp-applet:hover { background: #f4f9fd; }
.cp-applet-icon { flex: none; color: #2b6ca3; }
.cp-applet-title { display: block; font-size: 13px; color: #1a6fb5; }
.cp-applet:hover .cp-applet-title { text-decoration: underline; }
.cp-applet-desc { display: block; font-size: 12px; color: #666; margin-top: 2px; line-height: 1.4; }

/* -- property sheets ------------------------------------------------------- */
.cp-props { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 6px 22px; }
.cp-prop { display: contents; }
.cp-prop dt { font-size: 12px; color: #555; }
.cp-prop dd { font-size: 12px; color: #1a1a1a; }

/* -- status rows ----------------------------------------------------------- */
.cp-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.cp-status.is-ok { color: #1a1a1a; }
.cp-status.is-ok svg { color: #1a7a1a; }
.cp-status.is-warn svg { color: #d13438; }

/* -- controls -------------------------------------------------------------- */
.cp-button {
  padding: 5px 14px;
  font-size: 12px;
  background: #f0f0f0;
  border: 1px solid #b6b6b6;
  color: #1a1a1a;
  margin-right: 8px;
}
.cp-button:hover:not(:disabled) { background: #e5f1fb; border-color: #4a9ae0; }
.cp-button:disabled { opacity: 0.5; pointer-events: none; }
.cp-button.is-small { padding: 2px 9px; font-size: 11px; margin: 0; }
.cp-button-row { display: flex; gap: 0; margin-top: 10px; }

.cp-select {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  color: #1a1a1a;
  max-width: 280px;
}

.cp-input {
  width: 100%;
  max-width: 420px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  border: 1px solid #cfcfcf;
}

/* The Metro toggle is dark-on-light here, matching the Win32 surface. */
.cp-toggle { font-size: 12px; margin: 7px 0; display: flex; }
.cp-toggle .metro-toggle-track { flex: none; }

.cp-radios { display: flex; flex-direction: column; gap: 10px; }
.cp-radio { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; cursor: pointer; }
.cp-radio input { margin-top: 2px; accent-color: #2b6ca3; }
.cp-radio-label { display: block; }
.cp-radio-desc { display: block; color: #666; margin-top: 2px; line-height: 1.4; }

.cp-slider-row { display: flex; align-items: center; gap: 14px; max-width: 420px; }
.cp-slider-value { font-size: 12px; color: #444; min-width: 40px; font-variant-numeric: tabular-nums; }

/* -- tables ---------------------------------------------------------------- */
.cp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cp-table th {
  text-align: left;
  font-weight: 600;
  color: #444;
  padding: 6px 8px;
  border-bottom: 1px solid #cfcfcf;
  background: #f7f7f7;
}
.cp-table td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; color: #1a1a1a; }
.cp-table tr:hover td { background: #f4f9fd; }
.cp-prog-name { display: flex; align-items: center; gap: 7px; }
.cp-prog-name svg { color: #2b6ca3; flex: none; }

/* -- devices --------------------------------------------------------------- */
.cp-devices { display: flex; flex-wrap: wrap; gap: 16px; }
.cp-device {
  width: 116px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  border: 1px solid transparent;
}
.cp-device:hover { background: #f4f9fd; border-color: #cfe3f5; }
.cp-device svg { color: #2b6ca3; }
.cp-device-name { font-size: 12px; line-height: 1.3; }
.cp-device-sub { font-size: 11px; color: #777; }
.cp-device.is-default { background: #f0f7ff; border-color: #cfe3f5; }

/* -- network card ---------------------------------------------------------- */
.cp-net-card { border: 1px solid #e0e0e0; padding: 14px; background: #fbfbfb; margin-bottom: 12px; }
.cp-net-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cp-net-head svg { color: #2b6ca3; }
.cp-net-name { font-size: 13px; font-weight: 600; }
.cp-net-type { font-size: 12px; color: #666; }

/* -- misc page bits -------------------------------------------------------- */
.cp-update-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.cp-update-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: #1a7a1a; color: #fff; border-radius: 50%;
  flex: none;
}
.cp-update-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }

.cp-account { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cp-account-pic {
  width: 68px; height: 68px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 26px; font-weight: 300; font-family: var(--font-light);
  flex: none;
}
.cp-account-name { font-size: 15px; font-weight: 600; }
.cp-account-type { font-size: 12px; color: #666; margin-top: 2px; }

.cp-share-list { display: flex; flex-direction: column; }

.cp-auto-list { display: flex; flex-direction: column; gap: 9px; }
.cp-auto-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 480px; font-size: 12px; }

.cp-default-list { display: flex; flex-direction: column; }
.cp-default-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; max-width: 420px;
  padding: 7px 0; border-bottom: 1px solid #f0f0f0;
}
.cp-default-kind { font-size: 12px; color: #555; }
.cp-default-app { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cp-default-app svg { color: #2b6ca3; }

.cp-swatches { display: grid; grid-template-columns: repeat(10, 28px); gap: 6px; }
.cp-swatches .swatch { width: 28px; height: 28px; box-shadow: inset 0 0 0 0 #1a1a1a; }
.cp-swatches .swatch.is-active { box-shadow: inset 0 0 0 3px #1a1a1a; }

.cp-wallpapers { display: flex; gap: 10px; }
.cp-wallpaper { width: 92px; height: 58px; border: 2px solid transparent; }
.cp-wallpaper:nth-child(1) { background: linear-gradient(155deg, #17627e, #08222f); }
.cp-wallpaper:nth-child(2) { background: linear-gradient(155deg, #4a7a3a, #1d3318); }
.cp-wallpaper:nth-child(3) { background: linear-gradient(155deg, #b4426e, #3d1226); }
.cp-wallpaper:nth-child(4) { background: linear-gradient(155deg, #c96a1a, #33190a); }
.cp-wallpaper.is-active { border-color: #2b6ca3; }

.cp-fonts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.cp-font { width: 168px; padding: 12px; border: 1px solid #e0e0e0; background: #fbfbfb; }
.cp-font-sample { font-size: 20px; margin-bottom: 6px; color: #1a1a1a; }
.cp-font-name { font-size: 11px; color: #666; }

.cp-clock { text-align: center; padding: 18px 0 22px; }
.cp-clock-time {
  font-family: var(--font-light);
  font-weight: 200;
  font-size: 52px;
  line-height: 1;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}
.cp-clock-date { font-size: 14px; color: #555; margin-top: 6px; }

.cp-lang-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.cp-lang {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid #e8e8e8; background: #fbfbfb;
}
.cp-lang.is-primary { border-color: #cfe3f5; background: #f0f7ff; }
.cp-lang svg { color: #2b6ca3; flex: none; }
.cp-lang-name { font-size: 13px; }
.cp-lang-sub { font-size: 11px; color: #666; margin-top: 2px; }
.cp-lang-badge {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: #2b6ca3; background: #dceaf7;
  padding: 2px 8px;
}

/* ==========================================================================
   TRAY FLYOUTS
   ========================================================================== */

.tray-flyout {
  position: fixed;
  z-index: 260;
  animation: tray-in 160ms var(--ease-out) both;
}
@keyframes tray-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.tray-flyout.is-leaving { animation: tray-out 160ms var(--ease-in) both; }
@keyframes tray-out {
  to { opacity: 0; transform: translateY(12px); }
}

.tray-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: rgba(255, 255, 255, 0.88);
  transition: background-color 110ms linear, color 110ms linear;
}
.tray-button:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* --------------------------------------------------------------------------
   NETWORKS PANE - Modern styling, docked to the right edge
   -------------------------------------------------------------------------- */
.net-pane {
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  animation: net-in 200ms var(--ease-out) both;
}
@keyframes net-in {
  from { transform: translateX(100%); }
  to   { transform: none; }
}
.net-pane.is-leaving { animation: net-out 180ms var(--ease-in) both; }
@keyframes net-out {
  to { transform: translateX(100%); }
}

.net-header {
  padding: 22px 20px 16px;
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 25px;
}

.net-airplane {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.net-airplane-label { display: flex; align-items: center; gap: 11px; font-size: 15px; }

/* On the accent background the toggle needs light strokes, not dark. */
.metro-toggle-track.is-light { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.metro-toggle-track.is-light::after { background: #fff; }
.metro-toggle input:checked + .metro-toggle-track.is-light { background: #fff; box-shadow: inset 0 0 0 2px #fff; }
.metro-toggle input:checked + .metro-toggle-track.is-light::after { background: var(--accent); }

.net-section-title {
  padding: 16px 20px 8px;
  font-size: 15px;
  font-weight: 600;
}

.net-list { flex: 1; overflow-y: auto; padding: 0 12px; }

.net-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 8px;
  text-align: left;
  transition: background-color var(--dur-fast) var(--ease-std);
}
.net-item:hover { background: rgba(255, 255, 255, 0.16); }
.net-item.is-connected { background: rgba(255, 255, 255, 0.24); }
.net-item-text { flex: 1; min-width: 0; }
.net-item-name { display: block; font-size: 14px; }
.net-item-sub { display: block; font-size: 12px; opacity: 0.8; margin-top: 1px; }
.net-item-open { font-size: 11px; opacity: 0.75; }
.net-empty { padding: 14px 8px; font-size: 13px; opacity: 0.85; }

.net-footer { padding: 14px 20px 20px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.net-footer-link { font-size: 13px; color: #fff; }
.net-footer-link:hover { text-decoration: underline; }

/* Signal-strength bars. */
.sig { display: flex; align-items: flex-end; gap: 2px; height: 17px; flex: none; }
.sig i { width: 3px; background: currentColor; opacity: 0.32; }
.sig i.is-on { opacity: 1; }

/* --------------------------------------------------------------------------
   VOLUME FLYOUT

   Historically Windows 8 kept this as a light Win32 panel. This build styles
   it dark instead, to match the site's own chrome - same surface, border and
   entrance as the tray calendar, so the three tray flyouts read as one set.
   -------------------------------------------------------------------------- */
.vol-pane {
  width: 74px;
  padding: 11px 0 9px;
  background: rgba(28, 28, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.vol-device {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid transparent;
}
.vol-device:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.28); }

.vol-title { font-size: 11px; color: rgba(255, 255, 255, 0.72); }
.vol-rule { width: 56px; height: 1px; background: rgba(255, 255, 255, 0.16); }
.vol-value { font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; }

.vol-slider-wrap { height: 128px; display: grid; place-items: center; }

/* A vertical range input. `writing-mode: vertical-lr` is what orients it in
   current Chromium; the old `appearance: slider-vertical` is deliberately NOT
   used, because that keeps the native widget and silently discards the thumb
   styling below - which is what made this render as a stock blue slider. */
.vol-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  -webkit-appearance: none;
  appearance: none;
  width: 4px;
  height: 128px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}
/* The Windows slider thumb: a tall, narrow, flat rectangle. */
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 9px;
  background: #fff;
  border: 0;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb:hover { background: var(--accent-light); }
.vol-slider::-moz-range-thumb {
  width: 20px; height: 9px;
  background: #fff; border: 0; border-radius: 0;
  cursor: pointer;
}

.vol-mute {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
}
.vol-mute:hover { background: rgba(255, 255, 255, 0.16); }
.vol-mute.is-muted { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.55); }

.vol-mixer { font-size: 11px; color: var(--accent-light); }
.vol-mixer:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   BATTERY METER FLYOUT

   Dark to match the tray calendar and the rest of the site's chrome, with the
   charge percentage given the prominence it has in the modern flyout.
   -------------------------------------------------------------------------- */
.bat-pane {
  width: 276px;
  background: rgba(28, 28, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 15px;
}

.bat-head { display: flex; align-items: center; gap: 14px; padding-bottom: 13px; }

/* An upright battery that actually fills to the charge level. */
.bat-bar {
  position: relative;
  width: 19px;
  height: 33px;
  flex: none;
  border: 2px solid #fff;
  display: flex;
  align-items: flex-end;
  padding: 2px;
}
.bat-bar::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 3px;
  background: #fff;
}
.bat-bar i { display: block; width: 100%; background: #fff; }
/* Below 20% Windows turns the meter red. */
.bat-bar.is-low { border-color: #ff6b6b; }
.bat-bar.is-low::before { background: #ff6b6b; }
.bat-bar.is-low i { background: #ff6b6b; }

.bat-pct {
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 26px;
  line-height: 1.05;
  color: #fff;
}
.bat-time { font-size: 12px; color: rgba(255, 255, 255, 0.68); margin-top: 3px; }

.bat-rule { height: 1px; background: rgba(255, 255, 255, 0.16); margin: 0 -15px; }

.bat-plans { padding: 12px 0; }
.bat-plans-title { font-size: 12px; color: rgba(255, 255, 255, 0.68); margin-bottom: 8px; }
.bat-plan { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.bat-plan input { accent-color: var(--accent); }

.bat-footer { padding-top: 11px; display: flex; flex-direction: column; gap: 6px; }
.bat-link { text-align: left; font-size: 12px; color: var(--accent-light); }
.bat-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   METRO VOLUME OSD - top-left corner

   New in Windows 8, and the piece people actually remember: a dark vertical
   panel that slides in at the top-left on a hardware volume key. It outlived
   Windows 8 and was only replaced in Windows 11.
   -------------------------------------------------------------------------- */
.vol-osd {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 470;
  width: 62px;
  padding: 16px 0 14px;
  background: rgba(20, 20, 20, 0.94);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.vol-osd.is-visible { opacity: 1; transform: none; }

.vol-osd-value {
  font-family: var(--font-light);
  font-weight: 300;
  font-size: 19px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Fills upward from the bottom, like the real OSD. */
.vol-osd-track {
  width: 5px;
  height: 152px;
  background: rgba(255, 255, 255, 0.26);
  display: flex;
  align-items: flex-end;
}
.vol-osd-track i {
  display: block;
  width: 100%;
  background: #fff;
  transition: height 110ms var(--ease-out);
}

.vol-osd-icon { color: #fff; display: grid; place-items: center; }

/* Ease of Access ▸ "Always show focus outlines". */
body.force-focus :focus {
  outline: 2px dotted rgba(120, 190, 255, 0.95);
  outline-offset: 2px;
}
