/* assets/css/base.css
 * Design tokens, resets, background wallpaper layers, and Adwaita range sliders.
 */

:root {
  --gnome-bg-dark: #242424;
  --gnome-panel: rgba(12, 12, 14, 0.86);
  --gnome-surface: rgba(255, 255, 255, 0.13);
  --gnome-surface-hover: rgba(255, 255, 255, 0.21);
  --gnome-border: rgba(255, 255, 255, 0.14);
  --gnome-accent: #3584e4;
  --gnome-accent-hover: #4a95eb;
  --gnome-danger: #e01b24;
  --gnome-danger-hover: #f6363f;
  --wallpaper-blur: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #1c1c1c;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Cantarell', sans-serif;
}

body.app-shell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hidden {
  display: none !important;
}

.icon-xs {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-md {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-lg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.icon-caret {
  width: 12px;
  height: 12px;
  opacity: 0.8;
  flex-shrink: 0;
}

.icon-muted {
  color: rgba(255, 255, 255, 0.6);
}

.text-blue { color: #62a0ea; }
.text-emerald { color: #57e389; }
.text-amber { color: #f8e45c; }

/* Background Wallpaper Layer */
#wallpaper-layer {
  position: fixed;
  inset: -40px;
  background-size: cover;
  background-position: center;
  transition: opacity 0.45s ease, filter 0.45s ease, transform 0.6s ease;
  z-index: 0;
}

body.theme-wallpaper #wallpaper-layer {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(90, 70, 150, 0.85), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(50, 110, 170, 0.85), transparent 55%),
    radial-gradient(circle at 50% 85%, rgba(140, 80, 120, 0.92), transparent 65%),
    linear-gradient(135deg, #1e2238 0%, #252a45 48%, #2a2338 100%);
  filter: blur(var(--wallpaper-blur, 28px)) brightness(0.76) saturate(1.15);
  opacity: 1;
}

body.theme-adwaita #wallpaper-layer {
  background: var(--gnome-bg-dark);
  filter: none;
  opacity: 1;
}

/* Vignette Overlay */
#vignette-layer {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.36) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Custom Scrollbar */
.gnome-scroll::-webkit-scrollbar {
  width: 6px;
}

.gnome-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.gnome-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

/* Adwaita Range Slider */
input[type="range"].adwaita-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  cursor: pointer;
}

input[type="range"].adwaita-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--gnome-accent);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

input[type="range"].adwaita-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--gnome-accent);
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}