/* vacui-shared.css - Global styles for vacui.dev */
/* Note: Also requires a palette from the palette subdirectory */

/* Base reset and typography */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

h2 {
  color: var(--secondary-color);
  font-size: 1.1rem;
  margin: 1.5rem 0 .5rem 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: color .2s ease;
  user-select: none;
}
h2:hover { color: var(--primary-color); }

input {
    accent-color: var(--accent-color);
}

button {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--outline-color);
    background: var(--secondary-color);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: var(--primary-gradient);
    color: var(--on-primary);
}

button.active {
    background: var(--primary-color);
    color: var(--on-primary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* Minimal palette control system */
.palette-controls {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  z-index: 1000;
}

.palette-toggle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--window-color);
  border: 1px solid var(--outline-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 8px;
  color: var(--text-color);
  transition: all 0.2s ease;
  user-select: none;
}

.palette-toggle:hover {
  transform: scale(1.2);
  background: var(--primary-color);
  color: var(--on-primary);
}

.palette-toggle.active {
  background: var(--primary-color);
  color: var(--on-primary);
}

.palette-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.palette-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.palette-btn {
  background: var(--window-color);
  color: var(--text-color);
  border: 1px solid var(--outline-color);
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  min-width: 60px;
  text-align: center;
}

.palette-btn:hover {
  background: var(--primary-color);
  color: var(--on-primary);
  transform: translateX(-2px);
}

.palette-btn.active {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: var(--primary-color);
}

/* Color indicator dots */
.color-indicator {
  display: flex;
  gap: 4px;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--outline-color);
  transition: transform 0.2s ease;
}

.color-dot:hover {
  transform: scale(1.3);
}

/* Common utility classes */
.highlight-primary { color: var(--primary-color); }
.highlight-secondary { color: var(--secondary-color); }
.highlight-tertiary { color: var(--tertiary-color); }
.highlight-accent { color: var(--accent-color); }

.bg-primary { background-color: var(--primary-color); color: var(--on-primary); }
.bg-secondary { background-color: var(--secondary-color); color: var(--on-secondary); }
.bg-window { background-color: var(--window-color); color: var(--on-window); }

/* Common button styles */
.btn {
  background: var(--window-color);
  color: var(--text-color);
  border: 1px solid var(--outline-color);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--primary-color);
  color: var(--on-primary);
}

.btn-primary {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: var(--primary-color);
}

/* Common card/panel styles */
.card {
  background-color: var(--window-color);
  border: 1px solid var(--outline-color);
  border-radius: 8px;
  padding: 1.5rem;
  color: var(--on-window);
}

/* Typography helpers */
.text-large { font-size: 1.25rem; }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: 'Courier New', monospace; }

.back-link {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: var(--window-color);
    color: var(--text-color);
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--outline-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.back-link:hover {
    background: var(--primary-color);
    color: var(--on-primary);
    transform: translateX(-2px);
    text-decoration: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
  .palette-controls {
    bottom: 10px;
    left: 10px;
  }
  
  .palette-btn {
    font-size: 0.65rem;
    padding: 5px 8px;
    min-width: 50px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  body { transition: none; }
  .palette-btn { transition: none; }
  .color-dot { transition: none; }
}