/**
 * Conversor de Cores - Estilos
 */

/* Color preview */
.color-preview-container {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.color-preview {
  flex: 1;
  min-height: 150px;
  border-radius: var(--radius);
  border: 2px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}

.color-preview-text {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

.color-picker-wrapper {
  position: relative;
}

.color-picker-input {
  width: 100%;
  height: 150px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
}

.color-picker-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker-input::-webkit-color-swatch {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
}

/* Format inputs */
.color-formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.format-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
}

.format-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.format-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.format-copy-btn {
  padding: 0.375rem 0.75rem;
  background: var(--gray-100);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.format-copy-btn:hover {
  background: var(--gray-200);
}

.format-copy-btn.copied {
  background: #10b981;
  color: white;
}

.format-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.format-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* RGB/HSL sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-label {
  width: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.slider-input {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--gray-200);
  border-radius: 4px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.slider-input.red {
  background: linear-gradient(to right, #000, #f00);
}
.slider-input.green {
  background: linear-gradient(to right, #000, #0f0);
}
.slider-input.blue {
  background: linear-gradient(to right, #000, #00f);
}

.slider-value {
  width: 50px;
  padding: 0.375rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.875rem;
  text-align: center;
}

/* Quick colors */
.quick-colors {
  margin-top: 1.5rem;
}

.quick-colors-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.quick-colors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-color {
  width: 36px;
  height: 36px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.quick-color:hover {
  transform: scale(1.1);
  border-color: var(--gray-400);
}

/* Responsive */
@media (max-width: 640px) {
  .color-preview-container {
    flex-direction: column;
  }

  .color-formats {
    grid-template-columns: 1fr;
  }
}
