/* Windows XP Luna chrome. Native bitmaps are served locally; see ASSET-CREDITS.md. */
:root {
  --taskbar-height: 32px;
  --xp-taskbar: linear-gradient(#3888e9 0%, #4993e6 5%, #2257d5 18%, #2663e0 90%, #1941a5 100%);
  --start-border: url('/assets/xp/luna/start_button_border.png');
  --start-body: url('/assets/xp/luna/start_button_body.png');
  --start-hover-border: url('/assets/xp/luna/start_button_hover_border.png');
  --start-hover-body: url('/assets/xp/luna/start_button_hover_body.png');
  --start-press-border: url('/assets/xp/luna/start_button_press_border.png');
  --start-press-body: url('/assets/xp/luna/start_button_press_body.png');
  --task-border: url('/assets/xp/luna/taskband_button_border.png');
  --task-body: url('/assets/xp/luna/taskband_button_body.png');
  --task-hover-border: url('/assets/xp/luna/taskband_button_hover_border.png');
  --task-hover-body: url('/assets/xp/luna/taskband_button_hover_body.png');
  --task-press-border: url('/assets/xp/luna/taskband_button_press_border.png');
  --task-press-body: url('/assets/xp/luna/taskband_button_press_body.png');
  --task-press-hover-border: url('/assets/xp/luna/taskband_button_press_hover_border.png');
  --task-press-hover-body: url('/assets/xp/luna/taskband_button_press_hover_body.png');
  --tray-border: url('/assets/xp/luna/taskband_tray_horz.png');
  --tray-body: url('/assets/xp/luna/taskband_tray_horz_body.png');
}

body[data-accent=olive] {
  --xp-taskbar: linear-gradient(#e3e8c2, #bdca8c 9%, #a0b163 25%, #a8b96c 90%, #7e9250);
  --start-border: url('/assets/xp/luna/olive/start_button_border.png');
  --start-body: url('/assets/xp/luna/olive/start_button_body.png');
  --start-hover-border: url('/assets/xp/luna/olive/start_button_hover_border.png');
  --start-hover-body: url('/assets/xp/luna/olive/start_button_hover_body.png');
  --start-press-border: url('/assets/xp/luna/olive/start_button_press_border.png');
  --start-press-body: url('/assets/xp/luna/olive/start_button_press_body.png');
  --task-border: url('/assets/xp/luna/olive/taskband_button_border.png');
  --task-body: url('/assets/xp/luna/olive/taskband_button_body.png');
  --task-hover-border: url('/assets/xp/luna/olive/taskband_button_hover_border.png');
  --task-hover-body: url('/assets/xp/luna/olive/taskband_button_hover_body.png');
  --task-press-border: url('/assets/xp/luna/olive/taskband_button_press_border.png');
  --task-press-body: url('/assets/xp/luna/olive/taskband_button_press_body.png');
  --task-press-hover-border: url('/assets/xp/luna/olive/taskband_button_press_hover_border.png');
  --task-press-hover-body: url('/assets/xp/luna/olive/taskband_button_press_hover_body.png');
  --tray-border: url('/assets/xp/luna/olive/taskband_tray_horz.png');
  --tray-body: url('/assets/xp/luna/olive/taskband_tray_horz_body.png');
}

body[data-accent=silver] {
  --xp-taskbar: linear-gradient(#f8f9ff, #dedfeb 9%, #c5c9da 30%, #d6daeb 90%, #a2a9bf);
  --start-border: url('/assets/xp/luna/silver/start_button_border.png');
  --start-body: url('/assets/xp/luna/silver/start_button_body.png');
  --start-hover-border: url('/assets/xp/luna/silver/start_button_hover_border.png');
  --start-hover-body: url('/assets/xp/luna/silver/start_button_hover_body.png');
  --start-press-border: url('/assets/xp/luna/silver/start_button_press_border.png');
  --start-press-body: url('/assets/xp/luna/silver/start_button_press_body.png');
}

.icon { display: inline-block; width: 32px; height: 32px; flex: none; object-fit: contain; vertical-align: middle; }
button .icon { pointer-events: none; }
#desktop { bottom: var(--taskbar-height); background-image: url('/assets/xp/bliss-hd.jpg'); background-color: #3b6ea5; }
.wallpaper-swatch.hills { background-image: url('/assets/xp/bliss-hd.jpg'); }
.desktop-item { width: 75px; gap: 0; }
.desktop-item > button { width: 54px; height: 40px; padding: 4px 11px; border: 0; border-radius: 0; }
.desktop-item .icon { width: 32px; height: 32px; filter: none; }
.desktop-item > span { max-width: 75px; font: 11px/14px Tahoma, sans-serif; padding: 1px 3px; text-shadow: 1px 1px 1px #000; }
.desktop-item:hover > button, .desktop-item:focus-within > button { background: transparent; border: 0; }
.desktop-item:focus-within > span { background: #0b61ff; outline: 1px dotted #fff; outline-offset: -1px; }
.editing .desktop-item > button:hover { background: #316ac54d; }
.window-title .icon, .window-title img, .side-link .icon, .address-field .icon { width: 16px; height: 16px; }
.profile-avatar .icon { width: 32px; height: 32px; }
.about-footer .icon { width: 16px; height: 16px; }
.xp-window { box-shadow: 1px 1px 0 #00138c; }
.xp-window.inactive { box-shadow: 1px 1px 0 #637bb8; }
.xp-dialog { overflow: hidden; }
.dialog-body { min-width: 0; overflow-x: hidden; }
.titlebar { min-height: 29px; }
.window-menubar { height: 23px; }
.menu-item { padding: 3px 7px; }
.window-status { min-height: 21px; color: #444; }
.edit-entry { display: flex; align-items: center; gap: 5px; right: 12px; top: 12px; padding: 4px 8px; border: 1px solid #003c74; border-radius: 3px; background: linear-gradient(#fff, #ece9d8); color: #222; text-shadow: none; box-shadow: inset 0 0 0 1px #fff; font-size: 11px; }
.edit-entry:hover { background: linear-gradient(#fff, #fff0c2); }
.edit-entry img { flex: none; }

/* Match the reference's complete 32px bar; the 31px Start skin must fit inside it. */
.taskbar { height: var(--taskbar-height); gap: 0; padding: 0; background: var(--xp-taskbar); box-shadow: inset 0 1px #3168d5; border: 0; overflow: visible; }
/* The border's transparent opening is x=5..85, y=2..27; fit the body exactly. */
.start-button { position: relative; width: 99px; min-width: 99px; height: var(--taskbar-height); margin: 0; overflow: visible; padding: 0 10px 0 6px; align-self: stretch; align-items: center; justify-content: flex-start; gap: 4px; border: 0; border-radius: 0; box-shadow: none; background-color: transparent; background-image: var(--start-border), var(--start-body); background-position: 0 1px, 5px 3px; background-size: 99px 31px, 81px 26px; background-repeat: no-repeat; color: white; font: bold italic 20px/26px 'Trebuchet MS', Tahoma, sans-serif; text-shadow: 1px 1px 1px #174b19; }
.start-button:hover { filter: none; background-image: var(--start-hover-border), var(--start-hover-body); }
.start-button:active, .start-button[aria-expanded=true] { filter: none; background-image: var(--start-press-border), var(--start-press-body); }
.start-logo { display: block; width: 20px; height: 20px; flex: none; transform: none; filter: none; }
.start-button > span { display: block; flex: none; padding: 0 2px 1px 0; line-height: 26px; white-space: nowrap; }
.quick-launch { position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: 37px; height: 24px; margin: 0 6px 0 3px; border-right: 1px solid #1748b8; box-shadow: 1px 0 #5790eb; }
.quick-launch::before { content: ''; position: absolute; left: 1px; top: 5px; bottom: 5px; width: 2px; border-left: 1px solid #1548af; box-shadow: 1px 0 #6199ed; }
.show-desktop { display: grid; place-items: center; width: 23px; height: 22px; margin-left: 4px; padding: 2px; border: 1px solid transparent; border-radius: 2px; background: transparent; box-shadow: none; }
.show-desktop:hover { border-color: #a1c0f4 #1748af #1748af #a1c0f4; background: #ffffff18; }
.show-desktop:active { border-color: #1748af #a1c0f4 #a1c0f4 #1748af; }
.task-buttons { height: 100%; align-items: center; gap: 2px; padding-right: 6px; }
.task-button { flex: 0 1 160px; width: 160px; max-width: 160px; min-width: 44px; height: 26px; gap: 4px; border: 2px solid transparent; border-image: var(--task-border) 2 fill / 2px / 0 stretch; border-radius: 0; background: var(--task-body) center / 100% 100% no-repeat; background-clip: padding-box; box-shadow: none; color: white; padding: 0 6px; font: 11px/16px Tahoma, sans-serif; }
.task-button:hover { border-image-source: var(--task-hover-border); background-image: var(--task-hover-body); }
.task-button.active { border-image-source: var(--task-press-border); background-image: var(--task-press-body); box-shadow: none; font-weight: bold; }
.task-button.active:hover, .task-button:active { border-image-source: var(--task-press-hover-border); background-image: var(--task-press-hover-body); }
.task-button .icon { width: 16px; height: 16px; }
.system-tray { position: relative; isolation: isolate; align-self: stretch; display: flex; align-items: center; justify-content: flex-end; height: var(--taskbar-height); min-width: 126px; gap: 7px; padding: 0 10px 0 13px; border: 0; background: transparent; box-shadow: none; overflow: visible; color: #fff; font: 11px/16px Tahoma, sans-serif; }
/* The 17px skin has a 16px left edge and a 1px repeat column, no right edge.
   Reserving that column for the center also paints the top/bottom across the tray. */
.system-tray::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border: solid transparent; border-width: 4px 0 4px 16px; border-image: var(--tray-border) 4 0 4 16 fill / 4px 0 4px 16px / 0 stretch; }
.tray-icon { width: 16px; height: 16px; flex: none; }
#clock { display: block; flex: none; width: 48px; min-width: 48px; padding: 0; text-align: center; line-height: 18px; white-space: nowrap; overflow: visible; }
body[data-accent=olive] .task-button, body[data-accent=silver] .task-button { color: #111; }
body[data-accent=silver] .task-button { border-image: none; border: 1px solid #8d95a7; box-shadow: inset 1px 1px #f7f8ff; background: linear-gradient(#eff1fa, #b9c2d9); }
body[data-accent=silver] .task-button.active { background: #9ba8c3; box-shadow: inset 1px 1px #6c7893; }
body[data-accent=silver] .system-tray { border-image: none; border-left: 1px solid #7f8ba5; padding-left: 9px; background: linear-gradient(#e3e9fa, #a0aecb); color: #111; }
body[data-accent=silver] .system-tray::before { display: none; }

/* XP's Start menu uses two separate program and system columns. */
.start-menu { bottom: var(--taskbar-height); width: 384px; max-width: 100vw; border: 2px solid #1854c2; border-radius: 7px 7px 0 0; box-shadow: 2px 2px 0 #001b6e; }
.start-header { height: 63px; padding: 5px 7px; gap: 9px; border-bottom: 1px solid #e69a15; background: url('/assets/xp/luna/start_userpane_body.png') center / 100% 100% no-repeat; }
.start-header .profile-avatar { width: 48px; height: 48px; flex: none; border: 2px solid #e5efff; border-radius: 4px; background: linear-gradient(135deg, #d1defa, #7693ca); box-shadow: 1px 1px 2px #183d79; }
.start-header strong { font: bold 18px 'Trebuchet MS', Tahoma, sans-serif; }
.start-columns { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); background: white; }
.start-items { min-height: 236px; max-height: min(60dvh, 500px); padding: 6px 4px 8px; }
.start-item { gap: 7px; min-height: 46px; padding: 5px 4px; font: 11px/15px Tahoma, sans-serif; color: #111; }
.start-item .icon { width: 32px; height: 32px; }
.start-item span { overflow-wrap: anywhere; }
.start-places { background: #d3e5fa; border-left: 1px solid #95bdee; padding: 7px 5px 9px; }
.start-place { display: flex; align-items: center; width: 100%; min-height: 31px; gap: 6px; padding: 5px 3px; border: 0; background: transparent; text-align: left; color: #00136b; font: 11px/14px Tahoma, sans-serif; }
.start-place .icon { width: 16px; height: 16px; }
.start-place span { min-width: 0; overflow-wrap: anywhere; }
.start-place:nth-child(-n+4) { font-weight: bold; }
.start-item:hover, .start-place:hover { color: white; background: #316ac5; }
.start-separator { height: 1px; margin: 5px 4px; background: linear-gradient(90deg, transparent, #8ba6cf, transparent); }
.start-footer { min-height: 39px; padding: 5px 8px; border-top: 1px solid #abc9f0; background: url('/assets/xp/luna/start_logoffpane_body.png') center / 100% 100% no-repeat; }
.start-footer button { display: flex; align-items: center; gap: 6px; padding: 4px 7px; color: #fff; font-size: 11px; }
.start-footer button:hover { background: #ffffff26; }
.start-footer .icon { width: 16px; height: 16px; }
body[data-accent=olive] .start-header, body[data-accent=silver] .start-header { background: var(--title); }
body[data-accent=olive] .start-footer, body[data-accent=silver] .start-footer { background: var(--taskbar); }
.toast { bottom: calc(var(--taskbar-height) + 15px); }

@media (max-width: 700px) {
  .desktop-item { width: 75px; }
  .desktop-item > span { font-size: 11px; }
  .taskbar { height: var(--taskbar-height); }
  .start-button { width: 99px; min-width: 99px; gap: 4px; font-size: 20px; }
  .start-logo { width: 20px; height: 20px; }
  .quick-launch { display: none; }
  .task-buttons { margin-left: 3px; padding-right: 3px; }
  .task-button { min-width: 28px; padding: 0 3px; font-size: 11px; }
  .task-button .icon { width: 16px; height: 16px; }
  .system-tray { min-width: 94px; padding-right: 6px; gap: 4px; }
  .tray-icon:first-child { display: none; }
  .edit-entry { top: 12px; right: 12px; width: 26px; height: 26px; padding: 4px; font-size: 0; }
  .titlebar { min-height: 33px; }
  .start-menu { width: 384px; }
}
