/* Windows XP (Luna Blue) theme overrides.
   Loaded unconditionally alongside win98.css; everything here is scoped
   under html.win98-theme-xp so it only applies when that class is present
   (toggled via the `theme` setting in _data/desktop.yml). Most components
   re-skin automatically through the --w98-* custom properties redefined
   below; the rest are explicit structural overrides (rounded corners,
   gradients, taskbar/start button shape) that don't follow from a
   simple color swap. */

html.win98-theme-xp {
  --w98-face: #ece9d8;
  --w98-face-light: #ffffff;
  --w98-face-dark: #aca899;
  --w98-face-darker: #716f64;
  --w98-titlebar-active-1: #0a246a;
  --w98-titlebar-active-2: #3d95ff;
  --w98-titlebar-inactive-1: #7a95c0;
  --w98-titlebar-inactive-2: #c0d2ec;
  --w98-desktop-bg: #5a8edc;
  --w98-link: #0000ee;
}

/* ---------- desktop background ---------- */
/* A stylised sky + rolling-hills + clouds scene evoking XP's default
   look, without reproducing the actual "Bliss" photograph. */

html.win98-theme-xp body.win98-desktop-body,
html.win98-theme-xp body.win98-page {
  background-image:
    radial-gradient(50px 18px at 12% 14%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.95) 55%, transparent 75%),
    radial-gradient(75px 24px at 35% 8%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.92) 55%, transparent 75%),
    radial-gradient(55px 20px at 60% 13%, rgba(255,255,255,0.88) 0%, rgba(255,255,255,0.88) 55%, transparent 75%),
    radial-gradient(45px 16px at 84% 19%, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.8) 55%, transparent 75%),
    radial-gradient(170% 32% at 68% 100%, #4fae35 0%, #4fae35 62%, transparent 63%),
    radial-gradient(190% 38% at 22% 100%, #235f1b 0%, #235f1b 68%, transparent 69%),
    linear-gradient(180deg, #1a53c4 0%, #3a80dd 32%, #7fbdee 64%, #d7f0fa 100%);
  background-repeat: no-repeat;
  background-size: auto;
  background-color: #1a53c4;
}

/* ---------- generic buttons / bevels ---------- */

html.win98-theme-xp .win98-raised,
html.win98-theme-xp .win98-btn,
html.win98-theme-xp .win98-toolbar-btn,
html.win98-theme-xp .win98-addressbar-go {
  border-radius: 3px;
  background: linear-gradient(180deg, #ffffff, #ece9d8 55%, #d9d5c1);
  border: 1px solid #9c9a8d;
  box-shadow: none;
}

html.win98-theme-xp .win98-btn:active,
html.win98-theme-xp .win98-toolbar-btn:not(:disabled):hover,
html.win98-theme-xp .win98-toolbar-btn.win98-toolbar-btn--action {
  background: linear-gradient(180deg, #fff2cf, #ffd15c 55%, #f5a623);
  border-color: #c98a1a;
  box-shadow: none;
}

html.win98-theme-xp .win98-toolbar-btn:not(:disabled):active {
  background: linear-gradient(180deg, #f5a623, #ffd15c);
  box-shadow: none;
}

html.win98-theme-xp .win98-sunken {
  border-radius: 3px;
  background: #ffffff;
  border: 1px solid #9c9a8d;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}

/* ---------- desktop icons ---------- */

html.win98-theme-xp .win98-icon.selected {
  border: none;
  border-radius: 4px;
  background: rgba(49, 106, 197, 0.35);
  outline: 1px solid rgba(49, 106, 197, 0.65);
}

html.win98-theme-xp .win98-icon.selected .win98-icon-label {
  background: rgba(49, 106, 197, 0.85);
  outline: none;
  border-radius: 2px;
}

/* ---------- windows ---------- */

html.win98-theme-xp .win98-window,
html.win98-theme-xp .win98-standalone-window {
  border: 2px solid #0a3fc4;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

html.win98-theme-xp .win98-window.maximized {
  border-radius: 0;
  border-width: 0;
}

html.win98-theme-xp .win98-titlebar {
  position: relative;
  height: 26px;
  padding: 3px 4px 3px 6px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  background: linear-gradient(180deg, #9db8dd 0%, #7a95c0 10%, #8fa9ce 45%, #7a95c0 90%, #6c86b3 100%);
}

html.win98-theme-xp .win98-titlebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 32%, transparent 46%);
  pointer-events: none;
}

html.win98-theme-xp .win98-standalone-window .win98-titlebar {
  height: 30px;
}

html.win98-theme-xp .win98-window.active .win98-titlebar,
html.win98-theme-xp .win98-titlebar.active {
  background: linear-gradient(180deg, #4a9bff 0%, #0a246a 14%, #163e8f 45%, #0f2e75 90%, #0a246a 100%);
}

html.win98-theme-xp .win98-titlebar-text {
  position: relative;
  z-index: 1;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

html.win98-theme-xp .win98-titlebar-icon,
html.win98-theme-xp .win98-titlebar-buttons {
  position: relative;
  z-index: 1;
}

html.win98-theme-xp .win98-title-btn {
  width: 21px;
  height: 19px;
  border-radius: 3px;
  border: 1px solid #1b3f7a;
  background: linear-gradient(180deg, #8fb4ea, #4a76c9 55%, #2f59ac);
  color: #ffffff;
  box-shadow: none;
}

html.win98-theme-xp .win98-standalone-window .win98-title-btn {
  width: 24px;
  height: 21px;
}

html.win98-theme-xp .win98-titlebar-buttons .win98-title-btn:last-child {
  background: linear-gradient(180deg, #f5877a, #d1352a 55%, #a91f16);
  border-color: #7a1710;
}

/* ---------- taskbar ---------- */

html.win98-theme-xp .win98-taskbar {
  background: linear-gradient(180deg, #2a86e8 0%, #1c62c8 50%, #1450b0 100%);
  border-top: 1px solid #6fb0ff;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
}

html.win98-theme-xp .win98-start-btn {
  border-radius: 0 14px 14px 0;
  padding-right: 14px;
  background: linear-gradient(180deg, #6fce4e, #3e9e28 45%, #2f7f1c);
  border: 1px solid #1f5c10;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

html.win98-theme-xp .win98-start-btn.pressed {
  background: linear-gradient(180deg, #2f7f1c, #3e9e28 55%, #6fce4e);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

html.win98-theme-xp .win98-taskbar-sep {
  border-color: transparent;
}

html.win98-theme-xp .win98-taskbar-btn {
  border-radius: 3px;
  background: linear-gradient(180deg, #5b9eee, #2f74d6);
  border: 1px solid #163f82;
  color: #ffffff;
}

html.win98-theme-xp .win98-taskbar-btn.active {
  background: linear-gradient(180deg, #1c4d95, #2b64b8);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  border-color: #0d3160;
}

html.win98-theme-xp .win98-clock {
  background: linear-gradient(180deg, #1c62c8, #2a86e8);
  border-left: 1px solid #0d3a7a;
  border-radius: 3px 0 0 3px;
  color: #ffffff;
}

/* ---------- start menu ---------- */

html.win98-theme-xp .win98-start-menu {
  flex-direction: column;
  width: 220px;
  padding: 0;
  border: 2px solid #0a246a;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

html.win98-theme-xp .win98-start-menu-side {
  width: auto;
  height: 44px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #3d8bf5, #0a246a);
  display: flex;
  align-items: center;
  padding: 0 10px;
}

html.win98-theme-xp .win98-start-menu-side span {
  position: static;
  transform: none;
  writing-mode: horizontal-tb;
  font-size: 13px;
  letter-spacing: 0;
}

html.win98-theme-xp .win98-start-menu-items {
  background: #ffffff;
  padding: 4px;
}

html.win98-theme-xp .win98-start-menu-item:hover {
  background: linear-gradient(180deg, #7fb4ff, #3d7fe0);
  border-radius: 3px;
  color: #ffffff;
}

/* ---------- explorer file list ---------- */

html.win98-theme-xp .win98-explorer-table tr:hover td {
  background: #316ac5;
}

html.win98-theme-xp .win98-explorer-table th {
  border-radius: 0;
}

/* ---------- scrollbars ---------- */

html.win98-theme-xp .win98-window-body::-webkit-scrollbar-thumb,
html.win98-theme-xp.win98-embedded ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e4edfb, #b8cbe8);
  border-color: #8fa6cc;
}
