/* Desktop skins for the Abyss shell.
 *
 * Desktops-page writes `body[data-desktop="<id>"]` after an apply succeeds
 * (os/os-desktop-skins.mjs). Each block re-tunes the accent, the window frame
 * and the titlebar so the shell reads like the desktop the visitor installed.
 *
 * Only paint is touched. The rail, the brand, the clock, the hint pill and the
 * wallpaper keep their positions, and windows keep their geometry.
 */

body[data-layout="os"][data-desktop] {
  --skin-radius: 14px;
  --skin-window-border: rgba(140, 175, 200, 0.4);
  --skin-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --skin-title-bg: linear-gradient(180deg, #25303c, #1a232c);
  --skin-title-color: #dbe7f0;
  --skin-title-spacing: 0.01em;
  --skin-font: inherit;
  --skin-title-weight: 600;
  --abyss-accent: var(--skin-accent, #60a5fa);
}

body[data-layout="os"][data-desktop] .os-window {
  border-radius: var(--skin-radius);
  border-color: var(--skin-window-border);
  box-shadow: var(--skin-shadow);
  font-family: var(--skin-font);
}

body[data-layout="os"][data-desktop] .os-window-titlebar {
  background: var(--skin-title-bg);
  color: var(--skin-title-color);
  border-bottom: 1px solid var(--skin-window-border);
}

body[data-layout="os"][data-desktop] .os-window-title,
body[data-layout="os"][data-desktop] .os-window-title * {
  color: inherit;
  letter-spacing: var(--skin-title-spacing);
  font-weight: var(--skin-title-weight);
}

body[data-layout="os"][data-desktop] .os-window-body {
  border-radius: 0 0 calc(var(--skin-radius) - 1px) calc(var(--skin-radius) - 1px);
}

/* ---------- KDE Plasma ---------- */

body[data-layout="os"][data-desktop="kde"] {
  --skin-accent: #3daee9;
  --skin-radius: 8px;
  --skin-window-border: rgba(96, 160, 200, 0.45);
  --skin-title-bg: linear-gradient(180deg, #2b3846, #1c252e);
  --skin-title-color: #dbe7f0;
  --skin-font: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}

/* ---------- GNOME ---------- */

body[data-layout="os"][data-desktop="gnome"] {
  --skin-accent: #3584e4;
  --skin-radius: 14px;
  --skin-window-border: rgba(255, 255, 255, 0.14);
  --skin-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --skin-title-bg: #2c2f33;
  --skin-title-color: #ffffff;
  --skin-title-spacing: 0.02em;
  --skin-title-weight: 700;
  --skin-font: "Cantarell", "Noto Sans", system-ui, sans-serif;
}

/* ---------- COSMIC ---------- */

body[data-layout="os"][data-desktop="cosmic"] {
  --skin-accent: #4a86e8;
  --skin-radius: 12px;
  --skin-window-border: rgba(120, 150, 220, 0.4);
  --skin-title-bg: #1f232b;
  --skin-title-color: #e9edf5;
}

/* ---------- Xfce ---------- */

body[data-layout="os"][data-desktop="xfce"] {
  --skin-accent: #2c7fb8;
  --skin-radius: 3px;
  --skin-window-border: rgba(150, 165, 175, 0.45);
  --skin-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  --skin-title-bg: linear-gradient(180deg, #56626c, #3a444c);
  --skin-title-color: #eef3f6;
  --skin-font: "DejaVu Sans", "Noto Sans", system-ui, sans-serif;
}

/* ---------- Cinnamon ---------- */

body[data-layout="os"][data-desktop="cinnamon"] {
  --skin-accent: #86c73f;
  --skin-radius: 6px;
  --skin-window-border: rgba(150, 200, 100, 0.35);
  --skin-title-bg: #2f3438;
  --skin-title-color: #e8f2e2;
}

/* ---------- Budgie ---------- */

body[data-layout="os"][data-desktop="budgie"] {
  --skin-accent: #5294e2;
  --skin-radius: 8px;
  --skin-window-border: rgba(130, 170, 220, 0.4);
  --skin-title-bg: linear-gradient(180deg, #33383d, #24282c);
  --skin-title-color: #eef2f6;
}

/* ---------- MATE ---------- */

body[data-layout="os"][data-desktop="mate"] {
  --skin-accent: #6f9d4b;
  --skin-radius: 4px;
  --skin-window-border: rgba(140, 170, 120, 0.4);
  --skin-title-bg: linear-gradient(180deg, #3c4137, #2a2e27);
  --skin-title-color: #e9eee2;
}

/* ---------- LXQt / LXDE ---------- */

body[data-layout="os"][data-desktop="lxqt"] {
  --skin-accent: #2b7fc4;
  --skin-radius: 3px;
  --skin-title-bg: #2b3138;
  --skin-title-color: #e6edf3;
}

body[data-layout="os"][data-desktop="lxde"] {
  --skin-accent: #5f8db5;
  --skin-radius: 2px;
  --skin-title-bg: linear-gradient(180deg, #4a555e, #333b42);
  --skin-title-color: #edf2f5;
}

/* ---------- Deepin ---------- */

body[data-layout="os"][data-desktop="deepin"] {
  --skin-accent: #2c74d9;
  --skin-radius: 12px;
  --skin-window-border: rgba(110, 150, 230, 0.4);
  --skin-shadow: 0 26px 70px rgba(0, 20, 60, 0.55);
  --skin-title-bg: #1c1f26;
  --skin-title-color: #f0f4fa;
}

/* ---------- Enlightenment ---------- */

body[data-layout="os"][data-desktop="enlightenment"] {
  --skin-accent: #7fbf3f;
  --skin-radius: 2px;
  --skin-title-bg: linear-gradient(180deg, #26301f, #161c13);
  --skin-title-color: #e8f3da;
}

/* ---------- Hyprland ---------- */

body[data-layout="os"][data-desktop="hyprland"] {
  --skin-accent: #cba6f7;
  --skin-radius: 12px;
  --skin-window-border: rgba(203, 166, 247, 0.45);
  --skin-shadow: 0 26px 70px rgba(30, 12, 50, 0.6), 0 0 0 1px rgba(203, 166, 247, 0.18);
  --skin-title-bg: linear-gradient(180deg, rgba(30, 30, 46, 0.96), rgba(24, 24, 37, 0.96));
  --skin-title-color: #e7dcff;
  --skin-title-spacing: 0.04em;
  --skin-font: "JetBrainsMono Nerd Font", "Noto Sans", system-ui, sans-serif;
}

/* ---------- Tiling window managers ---------- */

body[data-layout="os"][data-desktop="niri"],
body[data-layout="os"][data-desktop="sway"],
body[data-layout="os"][data-desktop="labwc"],
body[data-layout="os"][data-desktop="i3"],
body[data-layout="os"][data-desktop="bspwm"],
body[data-layout="os"][data-desktop="awesome"],
body[data-layout="os"][data-desktop="qtile"],
body[data-layout="os"][data-desktop="xmonad"] {
  --skin-accent: #9aa7b4;
  --skin-radius: 2px;
  --skin-window-border: rgba(154, 167, 180, 0.5);
  --skin-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  --skin-title-bg: #12161b;
  --skin-title-color: #c8d3dc;
  --skin-title-spacing: 0.06em;
  --skin-font: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}
