/**
 * glass.css
 * ---------
 * The reusable "glass panel" visual language: translucent frosted-glass
 * surfaces with soft borders and shadow, used by the sidebar, controls
 * panel, and bottom bar. Any element that should look like a Figma-style
 * floating panel just needs class="glass-panel".
 */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--surface-void);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  -webkit-font-smoothing: antialiased;
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* ---- Buttons ---- */
button {
  font-family: var(--font-display);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

button:active {
  transform: scale(0.97);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.action-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border-strong);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.action-btn-quiet {
  background: transparent;
  color: var(--text-secondary);
}

.action-btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent-strong);
}

.action-btn-primary:hover {
  background: var(--accent-strong);
}

/* ---- Inputs shared look ---- */
input[type="text"],
input[type="search"],
input[type="number"],
select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border-strong);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface-app);
  box-shadow: 0 0 0 1px var(--glass-border-strong);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--surface-app);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* ---- Scrollbars (webkit) — thin, unobtrusive, matches dark studio look ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
