/* Color Picker Component Styles */

.color-picker-container {
  /* Base container styles */
}

.palette-option {
  position: relative;
  transition: all 0.2s ease-in-out;
}

.palette-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.palette-option.selected-palette {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #EFF6FF;
}

.palette-option.selected-palette::after {
  content: '✓';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #3B82F6;
  color: white;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Color input enhancements */
.color-picker-container input[type="color"] {
  border: 2px solid #e2e8f0;
  transition: border-color 0.2s ease-in-out;
}

.color-picker-container input[type="color"]:hover {
  border-color: #cbd5e1;
}

.color-picker-container input[type="color"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Smooth transitions for showing/hiding sections */
.custom-colors-section {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.custom-colors-section.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Category headers */
.color-picker-container h5 {
  color: #64748b;
  letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .palette-option {
    padding: 0.5rem;
  }
  
  .palette-option p {
    font-size: 0.625rem;
  }
  
  .color-picker-container .grid {
    gap: 0.5rem;
  }
}

/* Animation for palette selection */
@keyframes pulse-selection {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.palette-option.selected-palette {
  animation: pulse-selection 0.6s ease-out;
}

/* Toggle button styles */
.color-picker-container button[data-action*="toggleCustomColors"],
.color-picker-container button[data-action*="showPalettes"] {
  position: relative;
  transition: all 0.2s ease-in-out;
}

.color-picker-container button[data-action*="toggleCustomColors"]:hover,
.color-picker-container button[data-action*="showPalettes"]:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

/* Color preview circles enhancement */
.palette-option .flex > div {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
}

.palette-option:hover .flex > div {
  transform: scale(1.1);
}

/* Loading state (if needed) */
.color-picker-container.loading {
  opacity: 0.6;
  pointer-events: none;
}

.color-picker-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}