/* Linux Mint "Zena" web recreation — Mint-Y theme system
   Palette sourced from linuxmint/mint-themes src/Mint-Y/gtk-3.0/sass/_colors.scss */

@font-face {
  font-family: 'Cantarell';
  src: url('../fonts/cantarell-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cantarell';
  src: url('../fonts/cantarell-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Ubuntu Mono';
  src: url('../fonts/ubuntu-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Ubuntu Mono';
  src: url('../fonts/ubuntu-mono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  /* Mint-Y light */
  --accent: #35a854;
  --accent-hover: #3fbe62;
  --accent-active: #2a8744;
  --accent-fg: #ffffff;
  --base: #ffffff;
  --bg: #f6f6f8;           /* lighten(#ebebed, 5%) ≈ */
  --header: #ebebed;
  --header-backdrop: #f2f2f4;
  --sidebar: #f0f0f2;
  --fg: rgba(0, 0, 0, 0.87);
  --fg-dim: rgba(0, 0, 0, 0.55);
  --text: #303030;
  --borders: #c9c9cc;
  --separator: #dfdfdf;
  --button-bg: linear-gradient(180deg, #fdfdfd 0%, #f2f2f4 100%);
  --button-bg-hover: linear-gradient(180deg, #ffffff 0%, #f7f7f9 100%);
  --button-bg-active: #e2e2e5;
  --button-border: #c0c0c4;
  --osd-bg: #404040;
  --osd-fg: #dbdbdb;
  --tooltip-bg: #212125;
  --tooltip-fg: #ffffff;
  --destructive: #f04a50;
  --suggested: #6db442;
  --link: #5294e2;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.22);
  --shadow-big: 0 12px 36px rgba(0, 0, 0, 0.36), 0 2px 8px rgba(0, 0, 0, 0.28);
  --panel-bg: #232327;
  --panel-fg: #e1e1e4;
  --win-radius: 8px;
  --titlebar-h: 30px;
  --font: 'Cantarell', 'Segoe UI', 'Ubuntu', system-ui, sans-serif;
  --mono: 'Ubuntu Mono', 'Menlo', 'Consolas', monospace;
}

body[data-theme='dark'] {
  --base: #333339;
  --bg: #313135;
  --header: #222226;
  --header-backdrop: #2a2a2e;
  --sidebar: #2b2b30;
  --fg: rgba(255, 255, 255, 0.87);
  --fg-dim: rgba(255, 255, 255, 0.52);
  --text: #dadada;
  --borders: #17171a;
  --separator: #262629;
  --button-bg: linear-gradient(180deg, #3c3c42 0%, #35353b 100%);
  --button-bg-hover: linear-gradient(180deg, #44444a 0%, #3c3c42 100%);
  --button-bg-active: #26262a;
  --button-border: #17171a;
  --osd-bg: #353535;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.55);
  --shadow-big: 0 12px 36px rgba(0, 0, 0, 0.65), 0 2px 8px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: #000;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-fg); }

button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: default; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { -webkit-user-drag: none; user-select: none; }
svg { display: block; }

.hidden { display: none !important; }

/* ---------- Mint-Y widgets ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 26px; padding: 2px 12px;
  border-radius: 4px;
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset;
  color: var(--fg);
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { background: var(--button-bg-hover); }
.btn:active, .btn.pressed { background: var(--button-bg-active); box-shadow: none; }
.btn:disabled { opacity: 0.5; }
.btn.suggested {
  background: linear-gradient(180deg, #7ac94b 0%, var(--suggested) 100%);
  border-color: #518a2f; color: #fff; font-weight: 700;
  text-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.btn.suggested:hover { background: linear-gradient(180deg, #86d456 0%, #77b949 100%); }
.btn.destructive {
  background: linear-gradient(180deg, #f3686d 0%, var(--destructive) 100%);
  border-color: #c03038; color: #fff; font-weight: 700;
}
.btn.destructive:hover { filter: brightness(1.08); }
.btn.flat { background: none; border-color: transparent; box-shadow: none; }
.btn.flat:hover { background: rgba(0,0,0,0.06); }
.btn img, .btn svg { width: 16px; height: 16px; }

.entry {
  min-height: 26px; padding: 2px 8px;
  background: var(--base);
  border: 1px solid var(--borders);
  border-radius: 4px;
  color: var(--text);
  outline: none;
}
.entry:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.entry::placeholder { color: var(--fg-dim); }

.check {
  width: 15px; height: 15px; border-radius: 3px;
  background: var(--base); border: 1px solid var(--borders);
  display: inline-block; position: relative; vertical-align: -2px; flex: none;
  cursor: default;
}
.check.checked { background: var(--accent); border-color: var(--accent-active); }
.check.checked::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.radio {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--base); border: 1px solid var(--borders);
  display: inline-block; position: relative; vertical-align: -2px; flex: none;
  cursor: default;
}
.radio.checked::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}

.switch {
  width: 40px; height: 22px; border-radius: 12px; position: relative; flex: none;
  background: #c6c6ca; border: 1px solid #ababaf; transition: background 0.15s;
  cursor: default;
}
body[data-theme='dark'] .switch { background: #26262a; border-color: #17171a; }
.switch::after {
  content: ''; position: absolute; top: 1px; left: 1px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.35);
  transition: left 0.18s ease;
}
.switch.on { background: var(--accent); border-color: var(--accent-active); }
.switch.on::after { left: 19px; }

/* scale / slider */
.scale {
  position: relative; height: 22px; display: flex; align-items: center; flex: 1;
  cursor: default;
}
.scale .trough {
  position: relative; height: 6px; width: 100%; border-radius: 3px;
  background: color-mix(in srgb, var(--text) 18%, var(--base));
  overflow: hidden;
}
.scale .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 40%;
  background: var(--accent); border-radius: 3px;
}
.scale .thumb {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 1px solid #9a9a9e;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%);
}
.scale.vertical { width: 22px; height: 120px; flex: none; }

/* scrollbars — Mint-Y slim overlay style */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text) 30%, var(--base));
  border-radius: 5px; border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 45%, var(--base)); background-clip: content-box; }
*::-webkit-scrollbar-corner { background: transparent; }

/* list rows */
.row-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 4px; user-select: none; }
.row-item.selected { background: var(--accent); color: var(--accent-fg); }
.row-item.selected .dim { color: color-mix(in srgb, var(--accent-fg) 75%, transparent); }

/* generic GTK frame/toolbar */
.toolbar {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  background: var(--header); border-bottom: 1px solid var(--separator);
}
.gtk-sep-h { height: 1px; background: var(--separator); margin: 4px 0; }
.dim { color: var(--fg-dim); }
.link { color: var(--link); cursor: default; text-decoration: underline dotted; }

/* focus ring like GTK focus outline */
.focusable:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
