/* Image Tool Specific Styles */

.editor-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.preview-container {
  display: flex;
  flex-direction: column;
}

.preview-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: var(--gray-50);
  border-radius: 8px;
  padding: 20px;
}

.checkerboard-bg {
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkerboard-bg canvas {
  max-width: 100%;
  max-height: 280px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-info {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.controls-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-section {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 16px;
}

.control-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.control-group {
  margin-bottom: 12px;
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-label {
  display: block;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 8px;
  font-weight: 500;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.radio-option:hover {
  border-color: var(--primary);
}

.radio-option input:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.radio-option input[type="radio"] {
  accent-color: var(--primary);
}

.color-pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-picker {
  width: 48px;
  height: 36px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  padding: 2px;
}

.color-picker:hover {
  border-color: var(--primary);
}

.color-value {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 4px;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--gray-200);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.download-section {
  margin-top: 8px;
}

.download-section .btn {
  width: 100%;
}

.info-section {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow);
}

.info-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--gray-200);
}

.info-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.info-item p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .preview-wrapper {
    min-height: 200px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .radio-group {
    flex-direction: column;
  }

  .radio-option {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .editor-section {
    padding: 16px;
  }

  .control-section {
    padding: 12px;
  }

  .preview-wrapper {
    min-height: 150px;
    padding: 12px;
  }

  .checkerboard-bg {
    padding: 6px;
  }
}
