/**
 * Editor styles for ItemCrafter
 * Styles related to the image and behavior editor interfaces
 */

/* Editor container */
.editor-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 100%;
  margin-bottom: 20px;
}

/* Editor tabs */
.editor-tabs {
  display: flex;
  border-bottom: 1px solid #444;
  margin-bottom: 15px;
}

.editor-tab {
  padding: 10px 15px;
  background-color: #333;
  color: #ddd;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.editor-tab.active {
  background-color: #6200ee;
  color: white;
}

.editor-tab:hover:not(.active) {
  background-color: #444;
}

/* Editor content */
.editor-content {
  display: none;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 4px;
}

.editor-content.active {
  display: block;
}

/* Image editor tools */
.image-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tool-button {
  padding: 8px 12px;
  background-color: #444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tool-button:hover {
  background-color: #555;
}

.tool-button.active {
  background-color: #6200ee;
}

/* Canvas container */
.canvas-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.editor-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background-color: transparent;
}

/* Color picker */
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}

.color-swatch {
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s;
}

.color-swatch.active {
  border-color: white;
  transform: scale(1.1);
}

/* Zoom controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.zoom-value {
  font-size: 14px;
  color: #ddd;
  min-width: 50px;
  text-align: center;
}

/* Save button */
.save-button {
  padding: 10px 15px;
  background-color: #6200ee;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.save-button:hover {
  background-color: #7722ff;
}

/* Custom properties editor */
.property-editor {
  margin-top: 15px;
}

.property-field {
  margin-bottom: 10px;
}

.property-field label {
  display: block;
  margin-bottom: 5px;
  color: #ddd;
  font-size: 14px;
}

.property-field input,
.property-field select,
.property-field textarea {
  width: 100%;
  padding: 8px;
  background-color: #333;
  color: white;
  border: 1px solid #444;
  border-radius: 4px;
}

.property-field textarea {
  min-height: 80px;
  font-family: monospace;
  resize: vertical;
}

/* Warning messages */
.editor-warning {
  padding: 10px;
  background-color: rgba(255, 187, 0, 0.15);
  border-left: 3px solid #ffbb00;
  color: #ffcc44;
  margin: 10px 0;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .image-editor-tools {
    justify-content: center;
  }
  
  .tool-button {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  .editor-tab {
    padding: 8px 12px;
    font-size: 14px;
  }
}