body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background: rgb(var(--kit-background));
  color: rgb(var(--kit-text));
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0.25rem;
}

.palette-section {
  margin-bottom: 2rem;
}

.palette-section h2 {
  margin-bottom: 1rem;
  color: rgb(var(--kit-text));
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.color-card {
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 8px;
  background: rgb(var(--kit-surface));
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.color-preview {
  height: 100px;
  width: 100%;
  padding: 1rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Add interactive state styles */
.color-preview.interactive {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.color-preview.interactive:hover {
  background: rgb(var(--kit-hover)) !important;
}

.color-preview.interactive.active {
  background: rgb(var(--kit-active)) !important;
}

.color-preview.light .foreground-preview {
  color: rgb(var(--kit-text-inverse));
}

.color-preview::after {
  content: 'Copied!';
  position: absolute;
  top: 8px;
  right: 8px;
  transform: none;
  left: auto;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.color-preview.copied::after {
  opacity: 1;
  animation: fadeOut 1.5s ease forwards;
}

.color-info {
  padding: 1rem;
}

.color-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.color-value {
  font-family: monospace;
  font-size: 0.875rem;
  color: rgb(var(--kit-text-600));
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.color-value:hover {
  opacity: 0.7;
}

.interactive-states {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.state-preview {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease;
  border: 1px solid rgb(var(--kit-border-light));
  box-sizing: border-box;
}

.state-preview .tooltip {
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.state-preview .tooltip .copy-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.state-preview .tooltip span {
  white-space: nowrap;
}

.state-preview:hover {
  transform: scale(1.1);
  border-color: rgb(var(--kit-border-strong));
}

.state-preview.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(var(--kit-surface-800));
  color: rgb(var(--kit-text-inverse));
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  width: max-content;
  opacity: 1;
  animation: fadeOut 1.5s ease forwards;
}

.state-preview:hover .tooltip {
  opacity: 1;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.utility-card {
  padding: 1rem;
  border: 1px solid rgb(var(--kit-border-strong));
  border-radius: 8px;
  background: rgb(var(--kit-surface));
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.shadow-preview {
  height: 60px;
  background: white;
  border-radius: 8px;
  margin-top: 0.5rem;
}

.foreground-preview {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent !important;
}

.foreground-preview span {
  position: absolute;
  transform-origin: center;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

/* Default state - show "Text" */
.foreground-preview span:first-child {
  opacity: 1;
  transform: translateY(0);
}

/* Hover state - show "Hover" */
.state-toggle:not(:checked) ~ .foreground-preview:hover span:first-child {
  opacity: 0;
  transform: translateY(-20px);
}

.state-toggle:not(:checked) ~ .foreground-preview:hover span:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
}

/* Active (checked) state - show "Active" */
.state-toggle:checked ~ .foreground-preview span:first-child,
.state-toggle:checked ~ .foreground-preview span:nth-child(2) {
  opacity: 0;
  transform: translateY(-20px);
}

.state-toggle:checked ~ .foreground-preview span:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
}

/* Background color states */
.state-toggle:not(:checked) ~ .foreground-preview:hover {
  background: rgb(var(--kit-hover)) !important;
}

.state-toggle:checked ~ .foreground-preview {
  background: rgb(var(--kit-active)) !important;
}

.foreground-preview span.exit {
  /* transform: translateY(-20px); */
  transform: scale(0.2);
  opacity: 0;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.example-card {
  border: 1px solid rgb(var(--kit-border-strong));
  border-radius: 8px;
  overflow: hidden;
  background: rgb(var(--kit-surface));
}

.example-header {
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgb(var(--kit-border-light));
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.example-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.surface-panel {
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.surface-panel:hover {
  transform: scale(1.02);
}

.surface-panel:active {
  transform: scale(0.98);
}

.surface-panel .tooltip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  top: 8px;
  right: 8px;
  transform: none;
  background: black;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.surface-panel:hover .tooltip {
  opacity: 0.9;
}

.surface-panel.copied .tooltip::after {
  content: 'Copied!';
  position: absolute;
  right: 0;
  background: black;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 1;
  animation: fadeOut 1.5s ease forwards;
}

.surface-panel[style*='text-inverse'],
.surface-panel[style*='foreground'] {
  --is-dark: 1;
}

.surface-panel::before {
  display: none;
}

.toggle-button {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
  background: rgb(var(--kit-surface));
  color: rgb(var(--kit-text));
  cursor: pointer;
  margin-left: auto;
}

.toggle-button:hover {
  background: rgb(var(--kit-surface-50));
}

.surface-panel.hidden {
  display: none;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Base styles for tooltips */
.tooltip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  background: black;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Copy icon styles */
.copy-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTIwLjgyOSAxMi44NjFjLjE3MS0uNDEzLjE3MS0uOTM4LjE3MS0xLjk4NnMwLTEuNTczLS4xNzEtMS45ODZhMi4yNSAyLjI1IDAgMCAwLTEuMjE4LTEuMjE4Y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DAtMS44OSAwLTIuMzcxLjI0NWEyLjI1IDIuMjUgMCAwIDAtLjk4NC45ODRDMyA0LjcwOSAzIDUuMzM5IDMgNi42djYuM2MwIDEuMjYgMCAxLjg5LjI0NSAyLjM3MWMuMjE2LjQyNC41Ni43NjguOTg0Ljk4NGMuNDguMjQ1IDEuMTExLjI0NSAyLjM3Mi4yNDVINy41Ii8+PC9zdmc+');
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-size: contain;
  background-color: currentColor;
}

/* Color preview specific tooltip */
.color-preview .tooltip {
  top: 8px;
  right: 8px;
}

.state-preview .tooltip {
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}

.surface-panel .tooltip {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

/* Hover states */
.color-preview:hover:not(.copied) .tooltip,
.state-preview:hover:not(.copied) .tooltip,
.surface-panel:hover:not(.copied) .tooltip {
  opacity: 0.9;
}

/* Copied states */
.copied .tooltip {
  display: none; /* Hide the regular tooltip */
}

.copied::after {
  content: 'Copied!';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgb(var(--kit-surface-800));
  color: rgb(var(--kit-text-inverse));
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0.9;
  animation: fadeOut 1.5s ease forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

/* Modern Toolbar Styles */
.palette-section:first-of-type {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(var(--kit-surface));
  border-bottom: 1px solid rgb(var(--kit-border-light));
  margin: 0;
  padding: 0.5rem;
}

/* Toolbar Container */
.controls-container {
  margin: 2rem 0;
  padding: 1rem;
  background: rgb(var(--kit-surface));
  border-radius: 8px;
  border: 1px solid rgb(var(--kit-border));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Update Controls Grid Layout */
.controls-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: -0.5rem;
}

/* Control Groups in Single Row */
.control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0.5rem;
}

.control-group:first-child {
  padding-left: 0.5rem;
}

.control-group:last-child {
  padding-right: 0.5rem;
}

/* Divider between groups */
.control-group:not(:last-child)::after {
  content: '';
  height: 24px;
  width: 1px;
  background: rgb(var(--kit-border-light));
  margin-left: 0.5rem;
}

/* Hide Group Headers */
.control-group h3 {
  display: none;
}

/* Compact Color Input Styles */
.color-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
}

.color-input label {
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
  opacity: 0.7;
}

.color-input input[type='color'] {
  /* -webkit-appearance: none; */
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-input input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input input[type='color']::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.color-input input[type='color']:hover {
  border-color: rgb(var(--kit-primary));
  transform: scale(1.05);
}

/* Update status control styles */
.status-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

/* Replace radio group with select styles */
.status-mode-select {
  height: 32px;
  padding: 1.25rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.5rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px; /* Space for the arrow */
}

.status-mode-select:hover {
  border-color: rgb(var(--kit-border-strong));
}

.status-mode-select:focus {
  outline: none;
  border-color: rgb(var(--kit-primary));
  box-shadow: 0 0 0 2px rgb(var(--kit-primary-50));
}

/* Remove old dropdown and radio styles */
.radio-group,
.dropdown-toggle {
  display: none;
}

/* Rest of the page styles */
.palette-section:not(:first-of-type) {
  margin-top: 2rem;
  /* padding: 2rem; */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .controls-container {
    height: auto;
  }
}

/* Toolbar Tooltips */
.color-input {
  position: relative;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: black;
  color: white;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: rgb(var(--kit-surface-800)) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
  opacity: 1;
}

/* Remove old label styles */
.color-input label {
  display: none;
}

/* Update color input styles for tooltip compatibility */
.color-input input[type='color'] {
  margin: 0;
}

/* Common Button Styles */
.button {
  height: 32px;
  padding: 0 1rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.button:hover {
  border-color: rgb(var(--kit-border-strong));
  background: rgb(var(--kit-surface-50));
}

.button:focus {
  outline: none;
  border-color: rgb(var(--kit-primary));
  box-shadow: 0 0 0 2px rgba(var(--kit-primary), 0.2);
}

.button.icon {
  padding: 6px;
}

/* Button Variants */
.button.primary {
  background: rgb(var(--kit-primary));
  color: rgb(var(--kit-primary-foreground));
  border: none;
}

.button.primary:hover {
  opacity: 0.9;
  background: rgb(var(--kit-primary));
}

.button.secondary {
  /* Uses default button styles */
}

/* Specific Button Positioning */
.save-button,
.import-button,
.export-button {
  margin-left: auto;
}

.import-button {
  margin-right: 0.5rem;
}

/* Toggle Direction Button */
.toggle-direction-button svg {
  stroke: rgb(var(--kit-text));
}

/* Dialog Styles */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dialog-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.dialog {
  position: relative;
  background: rgb(var(--kit-surface));
  border-radius: 8px;
  border: 1px solid rgb(var(--kit-border-light));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  padding: 1rem;
  border-bottom: 1px solid rgb(var(--kit-border-light));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  font-weight: 600;
  color: rgb(var(--kit-text));
}

.dialog-content {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.dialog-footer {
  padding: 1rem;
  border-top: 1px solid rgb(var(--kit-border-light));
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.css-variables {
  font-family: monospace;
  font-size: 0.875rem;
  background: rgb(var(--kit-surface-50));
  color: rgb(var(--kit-text));
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
  white-space: pre;
  overflow-x: auto;
}

.dialog-button {
  height: 32px;
  padding: 0 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dialog-button.primary {
  background: rgb(var(--kit-primary));
  color: rgb(var(--kit-primary-foreground));
  border: none;
}

.dialog-button.primary:hover {
  opacity: 0.9;
}

.dialog-button.secondary {
  background: rgb(var(--kit-surface));
  color: rgb(var(--kit-text));
  border: 1px solid rgb(var(--kit-border-light));
}

.dialog-button.secondary:hover {
  background: rgb(var(--kit-surface-50));
}

/* Add this class for when dialog is open */
body.dialog-open {
  overflow: hidden;
}

/* Hide the checkbox but keep it accessible */
.state-toggle {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Background color states on color-preview */
.state-toggle:not(:checked) ~ .color-preview:hover,
.color-preview:has(.state-toggle:not(:checked):hover) {
  background: rgb(var(--kit-hover)) !important;
}

.state-toggle:checked ~ .color-preview,
.color-preview:has(.state-toggle:checked) {
  background: rgb(var(--kit-active)) !important;
}

/* Scale direction select styles */
.toggle-direction-button,
.scale-direction-select,
.status-mode-select {
  height: 32px;
  padding: 0 2.5rem 0 1rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-direction-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
  padding-right: 1rem;
}

.toggle-direction-button:hover,
.scale-direction-select:hover,
.status-mode-select:hover {
  border-color: rgb(var(--kit-border-strong));
}

.toggle-direction-button:focus,
.scale-direction-select:focus,
.status-mode-select:focus {
  outline: none;
  border-color: rgb(var(--kit-primary));
  box-shadow: 0 0 0 2px rgba(var(--kit-primary), 0.2);
}

.theme-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  padding: 1rem;
  place-content: center;
}

.theme-item {
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theme-item:hover {
  transform: translateY(-2px);
}

.theme-preview {
  display: flex;
  gap: 0.5rem;
}

.theme-name {
  font-size: 1rem;
  font-weight: 500;
}

.theme-surface {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
  font-size: 0.875rem;
  text-align: center;
}

.loading,
.error {
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

.error {
  color: rgb(var(--kit-error));
}

.theme-preview-window {
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
  height: 166px;
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
}

.copyright a {
  color: rgb(var(--kit-primary));
  font-weight: 500;
  text-decoration: none;
}

.copyright a:hover {
  color: rgb(var(--kit-primary));
  text-decoration: underline;
}

/* Remove the old select styles */
.scale-direction-select {
  display: none;
}

/* Update toggle direction button styles */
.toggle-direction-button {
  height: 32px;
  padding: 0 1rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgb(var(--kit-text));
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-direction-button:hover {
  border-color: rgb(var(--kit-border-strong));
  background: rgb(var(--kit-surface-50));
}

.toggle-direction-button:focus {
  outline: none;
  border-color: rgb(var(--kit-primary));
  box-shadow: 0 0 0 2px rgba(var(--kit-primary), 0.2);
}

.modal-dialog {
  border: none;
  border-radius: 8px;
  padding: 0;
  background: rgb(var(--kit-surface));
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 600px;
  width: 90%;
}

.modal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.modal-dialog .dialog-content {
  padding: 1.5rem;
}

.modal-dialog h2 {
  margin: 0 0 1.5rem 0;
  color: rgb(var(--kit-text));
}

.modal-dialog .dialog-body {
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgb(var(--kit-text));
}

.input-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgb(var(--kit-border-strong));
  border-radius: 4px;
  font-size: 1rem;
  color: rgb(var(--kit-text));
  background: rgb(var(--kit-background));
  box-sizing: border-box;
  border-radius: 4px;
  outline: none;
}

.input-group input:focus {
  border-color: rgb(var(--kit-primary));
  box-shadow: 0 0 0 2px rgba(var(--kit-primary), 0.2);
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 8px;
  justify-content: center;
  /* max-width: fit-content; */
  /* margin: 0 auto; */
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border));
  cursor: pointer;
  transition: transform 0.2s;
}

.color-swatch:hover {
  transform: scale(1.1);
}

#websitePreview {
  border: 1px solid rgb(var(--kit-border));
  border-radius: 4px;
  overflow: hidden;
}

#websitePreview img {
  width: 100%;
  height: auto;
  display: block;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Color Picker Styles */
.color-picker-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  padding: 2rem;
  background: rgb(var(--kit-surface));
  border-radius: 8px;
  border: 1px solid rgb(var(--kit-border));
}

/* #picker {
  margin-right: 1rem;
} */

/* Color Swatches Styles */
.swatches-container {
  margin: 2rem 0;
  padding: 1rem;
  background: rgb(var(--kit-surface));
  border-radius: 8px;
  border: 1px solid rgb(var(--kit-border));
}

.swatches-container h3 {
  margin-bottom: 1rem;
  color: rgb(var(--kit-text));
}

.swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
  justify-content: center;
}

.color-swatch {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid rgb(var(--kit-border));
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: rgb(var(--kit-border-strong));
}

/* Color Picker Popover Styles */
.popover {
  position: absolute;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border));
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 8px;
  display: none;
}

.popover-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* #picker {
  width: 200px !important;
  height: 200px !important;
} */

.website-colors {
  border-top: 1px solid rgb(var(--kit-border-light));
  padding-top: 8px;
}

.swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 32px);
  gap: 4px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid rgb(var(--kit-border));
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: rgb(var(--kit-border-strong));
}

/* Update color input styles */
.color-input input[type='color'] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 4px;
  background: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.color-input input[type='color']::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input input[type='color']::-webkit-color-swatch {
  border: none;
  border-radius: 3px;
}

.color-input input[type='color']:hover {
  border-color: rgb(var(--kit-border-strong));
  transform: scale(1.05);
}

/* Website Color Dialog Styles */
.info-section {
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgb(var(--kit-surface-50));
  border-radius: 8px;
  border: 1px solid rgb(var(--kit-border-light));
}

.info-section p {
  margin: 0 0 1rem 0;
  color: rgb(var(--kit-text));
  font-size: 0.875rem;
  line-height: 1.5;
}

.example-section {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgb(var(--kit-border-light));
}

.example-image {
  position: relative;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.example-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
}

.example-swatches {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: rgb(var(--kit-surface));
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
}

.example-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgb(var(--kit-border-light));
}

.result-section {
  margin-top: 2rem;
}

.preview-section,
.extracted-colors-section {
  margin-bottom: 1.5rem;
}

.preview-section h3,
.extracted-colors-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: rgb(var(--kit-text));
}

.help-text {
  font-size: 0.875rem;
  color: rgb(var(--kit-text));
  opacity: 0.8;
  margin-bottom: 1rem;
}

#websitePreview {
  border: 1px solid rgb(var(--kit-border));
  border-radius: 8px;
  overflow: hidden;
  background: rgb(var(--kit-surface-50));
}

#websitePreview img {
  width: 100%;
  height: auto;
  display: block;
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.5rem;
  padding: 1rem;
  background: rgb(var(--kit-surface));
  border: 1px solid rgb(var(--kit-border-light));
  border-radius: 8px;
  justify-content: center;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(var(--kit-border-light));
}

.use-colors-button {
  background: rgb(var(--kit-primary)) !important;
  color: rgb(var(--kit-primary-foreground)) !important;
}

.dialog-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgb(var(--kit-surface-50));
  color: rgb(var(--kit-text-600));
  border: 1px solid rgb(var(--kit-border-light));
}

.dialog-button.primary:disabled {
  background: rgb(var(--kit-surface-50));
  color: rgb(var(--kit-disabled-text));
  border: 1px solid rgb(var(--kit-border-light));
}

/* Color swatches in step 2 */
#colorSwatches .color-swatch {
  cursor: default;
}

#colorSwatches .color-swatch:hover {
  transform: none;
  border-color: rgb(var(--kit-border));
}

/* Close button styles */
.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--kit-text-600));
  transition: color 0.2s ease;
}

.close-button:hover {
  color: rgb(var(--kit-text));
}

.close-button svg {
  width: 20px;
  height: 20px;
}
