.h5p-coloring-book {
  font-family: Arial, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  color: #000; /* Ensure readable default text color */
}

.h5p-coloring-book-canvas-container {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: auto; /* Use auto to only show scrollbars when needed */
  max-width: 100%; /* Ensure the container doesn't exceed its parent's width */
}

canvas {
  max-width: 100%;
  height: auto;
  display: block; /* Remove extra space below the canvas */
}

.h5p-coloring-book-toolbar {
  display: flex;
  flex-direction: column; /* Stack rows vertically */
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 4px;
  color: #000; /* Ensure icons/text use black by default */
}

.h5p-coloring-book-toolbar-row {
  display: flex;
  flex-wrap: wrap; /* Allow items within a row to wrap if needed */
  gap: 10px; /* Gap between items in a row */
  align-items: center; /* Vertically align items in a row */
}

.h5p-coloring-book-download-button {
  margin-left: auto;
  padding: 5px;
}

.h5p-coloring-book-download-button svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.h5p-coloring-book-tool-button {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.h5p-coloring-book-tool-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #e0e0e0; /* Lighter background for disabled state */
}

.h5p-coloring-book-tool-button:hover {
  background: #f0f0f0;
}

.h5p-coloring-book-tool-button svg {
  width: 20px;
  height: 20px;
  display: block;
}

.h5p-coloring-book-tool-button.active {
  background: #007bff;
  color: #fff;
  border-color: #0056b3;
}

.h5p-coloring-book-tool-button.active svg {
  fill: #fff;
  stroke: #fff;
}

.h5p-coloring-book-color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.h5p-coloring-book-color-button {
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.h5p-coloring-book-color-button:hover {
  transform: scale(1.1);
}

.h5p-coloring-book-color-button.active {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #007bff;
}

.h5p-coloring-book-brush-size {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h5p-coloring-book-brush-size input[type="range"] {
  width: 100px;
}

.h5p-coloring-book-instructions {
  margin-bottom: 20px;
  padding: 10px;
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 4px;
  color: #000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .h5p-coloring-book {
    padding: 10px;
  }
  
  
  .h5p-coloring-book-color-palette {
    justify-content: center;
  }
}
