/* ============================================================================
   flower_arranging.css

   Layout styling for the flower_arranging creative workspace.

   This stylesheet defines:
   - the planting-area workspace dimensions
   - stacking of the background image and shared editing canvas
   - planter-specific taller layouts
   - some older flower thumbnail/slider-related styles retained from earlier UI work

   The main interactive editing behaviour is provided by the shared toolbar and
   THCanvasShapes JavaScript systems.
   ============================================================================ */
/* Layout container for canvas and background image */
.responsive-flower-area {
  width: 90vw;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Height is set by THWorkspaceSizer in flower_arranging.js.
   The fallback here is used only if JavaScript is unavailable. */
.flower-area-wrapper {
  position: relative;
  height: 60vh;
  width: 100%;
  overflow: hidden;
}

/* Layers */
#backgroundImage,
#thShapesCanvas,
#penCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#backgroundImage { z-index: 0; }

/* ✅ overlay for toolbar shapes/click/layer */
#thShapesCanvas {
  z-index: 2;
  /* leave pointer events enabled so shape/click/layer can work */
  pointer-events: auto;
}

/* Pen stroke layer — sits above flowers so drawn lines stay visible.
   Starts with pointer-events: none so the shapes canvas below handles
   stamping and selection; JS flips this to "auto" when pen mode is active. */
#penCanvas {
  z-index: 3;
  pointer-events: none;
  /* Allow native pinch-zoom in pen mode; single-finger strokes still
     reach JS (same pattern as the other pen apps). */
  touch-action: pinch-zoom;
}

/* Canvas sizing */
.responsive-flower-area canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* tall-planter height is also set by THWorkspaceSizer in flower_arranging.js */
.tall-planter {}

/* General page styling */
body {
  overflow-x: hidden;
}

html, body {
  height: 100%;
}

/* Thumbnail grid and flower selection */
.flower-grid-container {
  max-width: 700px;
  margin: 0 auto;
}

.flower-cell {
  text-align: center;
  margin: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flower-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s;
}

.flower-thumbnail:hover {
  transform: scale(1.1);
}

.slider-wrapper {
  width: 260px;
}

#resizeSliderContainer .form-range {
  margin: 0;
}

.tick-slider {
  width: 100%;
  margin-bottom: 0.5rem;
}

@media (max-width: 400px) {
  .slider-wrapper {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .slider-wrapper { width: 180px; }
}
