/* Creative Tools Design System - That One.App */
/* Visual creation and design inspiration tools */
/* Extends Calculator, Utilities, Trackers, Decision Tools, and Health Tools Design Systems */

/* Import the base design systems */
@import url('./health-tools-design-system.css');

/* ===== CREATIVE-SPECIFIC VARIABLES ===== */
:root {
  /* Creative Primary Colors */
  --creative-primary: #8B5CF6;      /* Purple for creativity */
  --creative-secondary: #EC4899;    /* Pink for inspiration */
  --creative-accent: #F59E0B;       /* Orange for energy */
  --creative-success: #10B981;      /* Green for generated content */
  
  /* Design Tool Colors */
  --design-canvas: #FFFFFF;         /* Pure white for canvas */
  --design-grid: #F3F4F6;          /* Light gray for grids */
  --design-selection: #3B82F6;     /* Blue for selections */
  --design-guide: #10B981;         /* Green for guides */
  --design-border: #E5E7EB;        /* Gray for borders */
  --design-shadow: rgba(0, 0, 0, 0.1); /* Subtle shadow */
  
  /* Color Harmony Colors */
  --harmony-primary: #EF4444;       /* Red */
  --harmony-secondary: #F97316;     /* Orange */
  --harmony-tertiary: #EAB308;      /* Yellow */
  --harmony-quaternary: #22C55E;    /* Green */
  --harmony-quinary: #3B82F6;       /* Blue */
  --harmony-senary: #8B5CF6;        /* Purple */
  --harmony-wheel-bg: #F9FAFB;      /* Light background for color wheel */
  
  /* Typography Colors */
  --typo-heading: #1F2937;          /* Dark gray for headings */
  --typo-body: #4B5563;             /* Medium gray for body */
  --typo-accent: #7C3AED;           /* Purple for accents */
  --typo-secondary: #6B7280;        /* Light gray for secondary */
  --typo-preview-bg: #F9FAFB;       /* Background for typography previews */
  
  /* Social Media Brand Colors */
  --social-instagram: #E4405F;
  --social-facebook: #1877F2;
  --social-twitter: #1DA1F2;
  --social-linkedin: #0A66C2;
  --social-pinterest: #BD081C;
  --social-tiktok: #000000;
  --social-youtube: #FF0000;
  --social-snapchat: #FFFC00;
  
  /* Export and Format Colors */
  --export-png: #10B981;            /* Green for PNG */
  --export-svg: #3B82F6;            /* Blue for SVG */
  --export-pdf: #EF4444;            /* Red for PDF */
  --export-css: #8B5CF6;            /* Purple for CSS */
  --export-html: #F59E0B;           /* Orange for HTML */
  --export-json: #06B6D4;           /* Cyan for JSON */
  
  /* Creative Component Sizing */
  --creative-canvas-size: 400px;
  --creative-palette-size: 60px;
  --creative-swatch-size: 40px;
  --creative-template-width: 280px;
  --creative-template-height: 200px;
  --creative-preview-size: 320px;
  
  /* Creative Animations */
  --creative-hover-duration: 200ms;
  --creative-generation-duration: 800ms;
  --creative-preview-duration: 300ms;
  
  /* Creative Spacing */
  --creative-grid-gap: 1.5rem;
  --creative-panel-padding: 1.5rem;
  --creative-toolbar-height: 60px;
}

/* ===== BASE CREATIVE CONTAINER ===== */
.creative-tool {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-md);
  background: var(--cloud);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
}

.creative-tool__title {
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-lg) 0;
  text-align: center;
}

.creative-tool__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin: 0 0 var(--space-xl) 0;
  text-align: center;
}

/* ===== CREATIVE SECTIONS ===== */
.creative-section {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--creative-panel-padding);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: var(--border-width) solid rgba(91, 158, 191, 0.1);
}

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

.creative-section__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.creative-section__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-lg) 0;
}

/* ===== COLOR PICKER COMPONENTS ===== */

/* Color Picker Input */
.creative-color-picker {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.creative-color-input {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--creative-hover-duration);
}

.creative-color-input:hover {
  transform: scale(1.05);
}

.creative-color-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: var(--breeze);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  border: 1px solid var(--design-border);
  min-width: 100px;
}

/* Color Harmony Selector */
.creative-color-harmony-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.creative-harmony-option {
  padding: var(--space-md);
  border: 2px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all var(--creative-hover-duration);
}

.creative-harmony-option:hover {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-harmony-option.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.1);
  color: var(--creative-primary);
}

.creative-harmony-option__title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 4px;
}

.creative-harmony-option__description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* Color Grid Display */
.creative-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--creative-palette-size), 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.creative-color-swatch {
  width: var(--creative-palette-size);
  height: var(--creative-palette-size);
  border-radius: var(--border-radius);
  cursor: pointer;
  position: relative;
  transition: all var(--creative-hover-duration);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}

.creative-color-swatch:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.creative-color-swatch.selected {
  border-color: var(--design-selection);
  transform: scale(1.05);
}

.creative-color-swatch__label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Swatch Picker for Generated Palettes */
.creative-swatch-picker {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin: var(--space-md) 0;
}

.creative-swatch-picker .creative-color-swatch {
  width: var(--creative-swatch-size);
  height: var(--creative-swatch-size);
}

/* ===== TYPOGRAPHY COMPONENTS ===== */

/* Font Selector */
.creative-font-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.creative-font-option {
  padding: var(--space-lg);
  border: 2px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  transition: all var(--creative-hover-duration);
  text-align: center;
}

.creative-font-option:hover {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-font-option.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.1);
}

.creative-font-option__preview {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--typo-heading);
  margin-bottom: var(--space-sm);
}

.creative-font-option__name {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* Font Preview Area */
.creative-font-preview {
  background: var(--typo-preview-bg);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  margin: var(--space-lg) 0;
  text-align: center;
}

.creative-font-preview__heading {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--typo-heading);
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.creative-font-preview__body {
  font-size: var(--text-base);
  color: var(--typo-body);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* Typography Grid */
.creative-typography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--creative-grid-gap);
  margin: var(--space-lg) 0;
}

.creative-typography-showcase {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 1px solid var(--design-border);
  cursor: pointer;
  transition: all var(--creative-hover-duration);
}

.creative-typography-showcase:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.creative-typography-showcase__heading {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--typo-heading);
}

.creative-typography-showcase__body {
  font-size: var(--text-base);
  color: var(--typo-body);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}

.creative-typography-showcase__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  border-top: 1px solid var(--design-border);
  padding-top: var(--space-sm);
}

/* Text Controls */
.creative-text-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  margin: var(--space-md) 0;
}

.creative-text-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.creative-text-control__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 60px;
}

.creative-text-control__input {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--design-border);
  border-radius: var(--border-radius);
  font-size: var(--text-sm);
  min-width: 80px;
}

/* ===== TEMPLATE COMPONENTS ===== */

/* Template Gallery */
.creative-template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--creative-template-width), 1fr));
  gap: var(--creative-grid-gap);
  margin: var(--space-lg) 0;
}

.creative-template-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--creative-hover-duration);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.creative-template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--creative-primary);
}

.creative-template-card.selected {
  border-color: var(--creative-primary);
  box-shadow: var(--shadow-lg);
}

.creative-template-card__preview {
  width: 100%;
  height: var(--creative-template-height);
  background: var(--design-grid);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.creative-template-card__meta {
  padding: var(--space-md);
}

.creative-template-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.creative-template-card__description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.creative-template-card__category {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: rgba(139, 92, 246, 0.9);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Template Category Filter */
.creative-category-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
  justify-content: center;
}

.creative-category-option {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--design-border);
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: var(--text-sm);
  transition: all var(--creative-hover-duration);
}

.creative-category-option:hover {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-category-option.active {
  background: var(--creative-primary);
  color: white;
  border-color: var(--creative-primary);
}

/* ===== CANVAS AND CREATION COMPONENTS ===== */

/* Creation Canvas */
.creative-canvas {
  width: 100%;
  max-width: var(--creative-canvas-size);
  height: var(--creative-canvas-size);
  background: var(--design-canvas);
  border: 2px dashed var(--design-border);
  border-radius: var(--border-radius);
  margin: 0 auto var(--space-lg);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}

.creative-canvas.active {
  border-color: var(--creative-primary);
  border-style: solid;
}

.creative-canvas__content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-md);
}

.creative-canvas__placeholder {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
}

/* Creative Toolbar */
.creative-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--breeze);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
  height: var(--creative-toolbar-height);
}

.creative-toolbar__group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.creative-toolbar__separator {
  width: 1px;
  height: 24px;
  background: var(--design-border);
  margin: 0 var(--space-sm);
}

.creative-tool-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--creative-hover-duration);
}

.creative-tool-button:hover {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-tool-button.active {
  background: var(--creative-primary);
  color: white;
  border-color: var(--creative-primary);
}

/* Layer Controls */
.creative-layer-controls {
  background: var(--breeze);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.creative-layer-controls__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.creative-layer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm);
  background: white;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--creative-hover-duration);
}

.creative-layer-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

.creative-layer-item.active {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--creative-primary);
}

/* ===== LIVE PREVIEW COMPONENTS ===== */

/* Live Preview Area */
.creative-live-preview {
  background: var(--design-canvas);
  border: 1px solid var(--design-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  min-height: var(--creative-preview-size);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.creative-live-preview__content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--creative-preview-duration);
}

.creative-live-preview.generating {
  background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
              linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
              linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
              linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  animation: creative-loading 1s linear infinite;
}

@keyframes creative-loading {
  0% { background-position: 0 0, 0 10px, 10px -10px, -10px 0px; }
  100% { background-position: 20px 20px, 20px 30px, 30px 10px, 10px 20px; }
}

/* Generation Results */
.creative-generation-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.creative-result-card {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 1px solid var(--design-border);
  cursor: pointer;
  transition: all var(--creative-hover-duration);
}

.creative-result-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.creative-result-card.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-result-card__preview {
  width: 100%;
  height: 120px;
  background: var(--design-grid);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.creative-result-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.creative-result-card__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ===== SOCIAL MEDIA COMPONENTS ===== */

/* Post Preview */
.creative-post-preview {
  max-width: 400px;
  margin: 0 auto;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--design-border);
}

.creative-post-preview__header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--design-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.creative-post-preview__platform {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
}

.creative-post-preview__platform--instagram {
  background: var(--social-instagram);
}

.creative-post-preview__platform--facebook {
  background: var(--social-facebook);
}

.creative-post-preview__platform--twitter {
  background: var(--social-twitter);
}

.creative-post-preview__content {
  aspect-ratio: 1 / 1;
  background: var(--design-grid);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.creative-post-preview__footer {
  padding: var(--space-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Size Selector */
.creative-size-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.creative-size-option {
  padding: var(--space-md);
  border: 2px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all var(--creative-hover-duration);
}

.creative-size-option:hover {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.05);
}

.creative-size-option.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.1);
}

.creative-size-option__title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.creative-size-option__dimensions {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Format Grid */
.creative-format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.creative-format-option {
  padding: var(--space-lg);
  border: 2px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all var(--creative-hover-duration);
}

.creative-format-option:hover {
  border-color: var(--creative-primary);
  transform: translateY(-2px);
}

.creative-format-option.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.1);
}

.creative-format-option__icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.creative-format-option__title {
  font-weight: 600;
  font-size: var(--text-sm);
}

/* ===== EXPORT COMPONENTS ===== */

/* Export Options */
.creative-export-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.creative-export-button {
  padding: var(--space-lg);
  border: 2px solid var(--design-border);
  border-radius: var(--border-radius);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all var(--creative-hover-duration);
  text-decoration: none;
  color: inherit;
}

.creative-export-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.creative-export-button--png {
  border-color: var(--export-png);
  color: var(--export-png);
}

.creative-export-button--svg {
  border-color: var(--export-svg);
  color: var(--export-svg);
}

.creative-export-button--pdf {
  border-color: var(--export-pdf);
  color: var(--export-pdf);
}

.creative-export-button--css {
  border-color: var(--export-css);
  color: var(--export-css);
}

.creative-export-button--html {
  border-color: var(--export-html);
  color: var(--export-html);
}

.creative-export-button__icon {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.creative-export-button__title {
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.creative-export-button__description {
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* Download Grid */
.creative-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.creative-download-option {
  background: var(--breeze);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--creative-hover-duration);
  border: 2px solid transparent;
}

.creative-download-option:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--creative-primary);
}

.creative-download-option__size {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--creative-primary);
  margin-bottom: var(--space-sm);
}

.creative-download-option__format {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.creative-download-option__description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* ===== GRADIENT AND PATTERN COMPONENTS ===== */

/* Gradient Preview */
.creative-gradient-preview {
  width: 100%;
  height: 200px;
  border-radius: var(--border-radius);
  margin: var(--space-lg) 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--design-border);
}

.creative-gradient-preview__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: var(--space-md);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--text-sm);
}

/* Pattern Preview */
.creative-pattern-preview {
  width: 100%;
  height: 200px;
  border-radius: var(--border-radius);
  margin: var(--space-lg) 0;
  border: 1px solid var(--design-border);
  background-repeat: repeat;
  background-size: 40px 40px;
}

/* CSS Code Display */
.creative-css-code {
  background: #1F2937;
  color: #F9FAFB;
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--text-sm);
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
}

.creative-css-code__copy {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: rgba(139, 92, 246, 0.8);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: background var(--creative-hover-duration);
}

.creative-css-code__copy:hover {
  background: var(--creative-primary);
}

/* ===== LOGO CREATION COMPONENTS ===== */

/* Icon Library */
.creative-icon-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: var(--space-md);
  max-height: 300px;
  overflow-y: auto;
  padding: var(--space-md);
  background: var(--breeze);
  border-radius: var(--border-radius);
  margin: var(--space-lg) 0;
}

.creative-icon-item {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--creative-hover-duration);
  border: 2px solid transparent;
}

.creative-icon-item:hover {
  transform: scale(1.05);
  border-color: var(--creative-primary);
}

.creative-icon-item.selected {
  border-color: var(--creative-primary);
  background: rgba(139, 92, 246, 0.1);
}

/* Logo Canvas */
.creative-logo-canvas {
  width: 100%;
  height: 300px;
  background: var(--design-canvas);
  border: 2px dashed var(--design-border);
  border-radius: var(--border-radius);
  margin: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.creative-logo-canvas.has-content {
  border-style: solid;
  border-color: var(--creative-primary);
}

/* Logo Variations */
.creative-logo-variations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.creative-logo-variation {
  background: white;
  border: 1px solid var(--design-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--creative-hover-duration);
}

.creative-logo-variation:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.creative-logo-variation__preview {
  width: 100%;
  height: 80px;
  background: var(--design-grid);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.creative-logo-variation__title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  .creative-tool {
    padding: var(--space-sm);
  }
  
  .creative-section {
    padding: var(--space-md);
  }
  
  .creative-color-grid {
    grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
  }
  
  .creative-template-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .creative-toolbar {
    flex-wrap: wrap;
    height: auto;
    padding: var(--space-sm);
  }
  
  .creative-toolbar__group {
    flex-wrap: wrap;
  }
  
  .creative-text-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .creative-export-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  
  .creative-icon-library {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: var(--space-sm);
  }
  
  .creative-css-code {
    font-size: var(--text-xs);
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .creative-color-swatch {
    border-width: 3px;
  }
  
  .creative-template-card {
    border-width: 3px;
  }
  
  .creative-export-button {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .creative-color-swatch,
  .creative-template-card,
  .creative-result-card,
  .creative-export-button {
    transition: none;
  }
  
  .creative-live-preview.generating {
    animation: none;
    background: var(--design-grid);
  }
}

/* Focus management for keyboard navigation */
.creative-color-swatch:focus,
.creative-template-card:focus,
.creative-export-button:focus,
.creative-tool-button:focus {
  outline: 2px solid var(--creative-primary);
  outline-offset: 2px;
}

/* ===== CREATIVE UTILITY CLASSES ===== */

/* Spacing utilities for creative components */
.creative-mt-sm { margin-top: var(--space-sm); }
.creative-mt-md { margin-top: var(--space-md); }
.creative-mt-lg { margin-top: var(--space-lg); }
.creative-mt-xl { margin-top: var(--space-xl); }

.creative-mb-sm { margin-bottom: var(--space-sm); }
.creative-mb-md { margin-bottom: var(--space-md); }
.creative-mb-lg { margin-bottom: var(--space-lg); }
.creative-mb-xl { margin-bottom: var(--space-xl); }

/* Creative state utilities */
.creative-generating { opacity: 0.7; pointer-events: none; }
.creative-loading { cursor: wait; }
.creative-success { border-color: var(--creative-success); }
.creative-error { border-color: var(--error); }

/* Creative alignment utilities */
.creative-center { text-align: center; }
.creative-left { text-align: left; }
.creative-right { text-align: right; }

/* Creative color utilities */
.creative-color-primary { color: var(--creative-primary); }
.creative-color-secondary { color: var(--creative-secondary); }
.creative-color-accent { color: var(--creative-accent); }
.creative-color-success { color: var(--creative-success); }