/* ==================== THEME BUILDER DEV TOOL ==================== */
/* Floating theme customization panel for development only */
/* Uses hardcoded monochrome styles to remain consistent while editing themes */

.theme-builder-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-builder-button:hover {
  transform: scale(1.1);
  background: #f5f5f5;
}

.theme-builder-button:active {
  transform: scale(0.95);
}

.theme-builder-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-height: 90vh;
  background: #ffffff;
  border: 3px solid #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.theme-builder-panel.open {
  display: flex;
}

.theme-builder-header {
  padding: 16px;
  background: #f5f5f5;
  border-bottom: 2px solid #1a1a1a;
  cursor: move;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
  user-select: none;
  border-radius: 12px 12px 0 0;
}

.theme-builder-header span {
  font-size: 14px;
  color: #1a1a1a;
}

.theme-builder-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #ffffff;
}

.theme-section {
  margin-bottom: 24px;
}

.theme-section:last-child {
  margin-bottom: 0;
}

.theme-section h3 {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: system-ui, -apple-system, sans-serif;
}

.theme-token-row {
  margin-bottom: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.theme-token-row:last-child {
  margin-bottom: 0;
}

.theme-token-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 4px;
  font-family: system-ui, -apple-system, sans-serif;
}

.token-label {
  display: block;
  font-weight: 600;
}

.token-description {
  display: block;
  font-size: 11px;
  color: #666666;
  margin-top: 2px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 400;
}

.token-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.token-input-group input[type="color"] {
  width: 40px;
  height: 32px;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}

.token-input-group input[type="text"].hex-input {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
}

.token-input-group input[type="text"].hex-input:focus {
  outline: none;
  border-color: #1a1a1a;
}

.font-picker {
  width: 100%;
  padding: 8px;
  font-size: 13px;
  font-family: system-ui, -apple-system, sans-serif;
  border: 2px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  margin-top: 8px;
}

.font-picker:focus {
  outline: none;
  border-color: #1a1a1a;
}

.custom-font-input {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  margin-top: 8px;
  display: none;
}

.custom-font-input.show {
  display: block;
}

.custom-font-input:focus {
  outline: none;
  border-color: #1a1a1a;
}

.theme-builder-actions {
  padding: 16px;
  border-top: 2px solid #e0e0e0;
  display: flex;
  gap: 8px;
  border-radius: 0 0 12px 12px;
  background: #f5f5f5;
}

.theme-builder-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 500;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-builder-actions button:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.theme-builder-actions button:active {
  transform: scale(0.95);
}

.theme-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1a1a1a;
  padding: 0;
  width: 24px;
  height: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-close-btn:hover {
  color: #666666;
}

/* Hide on mobile */
@media (max-width: 768px) {
  .theme-builder-button,
  .theme-builder-panel {
    display: none !important;
  }
}
