body {
    margin: 0;
    overflow: hidden;
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    /* height: 100vh; */
    /* margin: 0;
    background-color: #f4f4f4; */
}

.container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.split {
    display: flex;
    width: 100%;
    height: 100vh;
}

.pane {
    flex: 1; /* Equal initial size for panes */
    position: relative; /* Ensure canvases are positioned correctly */
    overflow: hidden;
}

#splitter {
    width: 5px;
    cursor: col-resize;
    background-color: #ccc;
    z-index: 10;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.palette {
    position: absolute; /* or 'fixed' if you want it to stay in place during scrolling */
    top: 50px;          /* Adjust the top and left values to position the palette */
    left: 10px;
    display: grid;
    grid-template-columns: repeat(5, 50px);
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.2); /* Slightly opaque background for visibility */
    padding: 10px;
    border: 1px solid black;
    z-index: 10;        /* Higher z-index than the canvas */
}
.pattern {
  width: 70px;
  height: 70px;
  border: 1px solid black;
  cursor: pointer;
  background-color: rgba(4, 142, 255, 0.274); /* Slightly opaque background for visibility */
}
.pattern.selected {
  border: 3px solid red;
}
.palette canvas {
    position: static; /* Default positioning within the grid */
    width: auto; /* Let the grid control the size */
    height: auto;
}

/* https://getcssscan.com/css-buttons-examples */
button {
    /* position: absolute; or 'fixed' if you want it to stay in place during scrolling */
    /* top: 10px;          Adjust the top and left values to position the palette */
    z-index: 20;        /* Higher z-index than the canvas */

    background-color: #EA4C89;
    border-radius: 8px;
    border-style: none;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-block;
    font-family: "Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    height: 40px;
    line-height: 20px;
    list-style: none;
    margin: 0;
    outline: none;
    padding: 10px 16px;
    
    position: relative;
    /* top: 5px; */

    text-align: center;
    text-decoration: none;
    transition: color 100ms;
    vertical-align: baseline;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* Optional: Style for disabled buttons */
button:disabled {
  background-color: grey;
  color: white;
  cursor: not-allowed;
}

/* Style for Clear Hatch button */
.btn-hatch {
  background-color: #EA4C89; /* Pink */
  color: white;
}

/* Style for Clear Sketch button */
.btn-sketch {
  background-color: #007BFF; /* Blue */
  color: white;
}

/* Hover effect */
.btn-hatch:hover {
  background-color: #D43F77;
}

.btn-sketch:hover {
  background-color: #0056b3;
}

label {
    font-family: "Haas Grot Text R Web", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    /* background-color: lightgrey; */
    color: #EA4C89;
}

#sketchCanvasLeft {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3; /* Ensure it's on top */
}

#bs-drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Below sketch canvas */
}

/* When sketchCanvasLeft is disabled, allow events to pass through */
#sketchCanvasLeft.disabled {
    pointer-events: none;
    z-index: 0; /* Move behind */
}

/* https://getcssscan.com/css-checkboxes-examples */
.checkbox-wrapper-5 .check {
    --size: 40px;
    position: relative;
    background: linear-gradient(90deg, #f19af3, #f099b5);
    line-height: 0;
    perspective: 400px;
    font-size: var(--size);
  }

  .checkbox-wrapper-5 .check input[type="checkbox"],
  .checkbox-wrapper-5 .check label,
  .checkbox-wrapper-5 .check label::before,
  .checkbox-wrapper-5 .check label::after,
  .checkbox-wrapper-5 .check {
    appearance: none;
    /* display: inline-block; */
    border-radius: var(--size);
    border: 0;
    transition: .35s ease-in-out;
    box-sizing: border-box;
    cursor: pointer;
  }

  .checkbox-wrapper-5 .check label {
    width: calc(2.2 * var(--size));
    height: var(--size);
    background: #d7d7d7;
    overflow: hidden;
    display: inline-block;
  }

  .checkbox-wrapper-5 .check input[type="checkbox"] {
    position: absolute;
    z-index: 1;
    width: calc(.8 * var(--size));
    height: calc(.8 * var(--size));
    top: calc(.1 * var(--size));
    left: calc(.1 * var(--size));
    background: linear-gradient(45deg, #dedede, #ffffff);
    box-shadow: 0 6px 7px rgba(0,0,0,0.3);
    outline: none;
    margin: 0;
  }

  .checkbox-wrapper-5 .check input[type="checkbox"]:checked {
    left: calc(1.3 * var(--size));
  }

  .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label {
    background: transparent;
  }

  .checkbox-wrapper-5 .check label::before,
  .checkbox-wrapper-5 .check label::after {
    content: "· ·";
    position: absolute;
    overflow: hidden;
    left: calc(.15 * var(--size));
    top: calc(.5 * var(--size));
    height: var(--size);
    letter-spacing: calc(-0.04 * var(--size));
    color: #9b9b9b;
    font-family: "Times New Roman", serif;
    z-index: 2;
    font-size: calc(.6 * var(--size));
    border-radius: 0;
    transform-origin: 0 0 calc(-0.5 * var(--size));
    backface-visibility: hidden;
  }

  .checkbox-wrapper-5 .check label::after {
    content: "●";
    top: calc(.65 * var(--size));
    left: calc(.2 * var(--size));
    height: calc(.1 * var(--size));
    width: calc(.35 * var(--size));
    font-size: calc(.2 * var(--size));
    transform-origin: 0 0 calc(-0.4 * var(--size));
  }

  .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::before,
  .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::after {
    left: calc(1.55 * var(--size));
    top: calc(.4 * var(--size));
    line-height: calc(.1 * var(--size));
    transform: rotateY(360deg);
  }

  .checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::after {
    height: calc(.16 * var(--size));
    top: calc(.55 * var(--size));
    left: calc(1.6 * var(--size));
    font-size: calc(.6 * var(--size));
    line-height: 0;
  }

  .checkable-button {
    display: inline-block;
    cursor: pointer;
    border: 2px solid #007bff;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: white;
    color: #007bff;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
  }

  /* Hide the actual checkbox */
  .checkable-button input {
    display: none;
  }

  /* Change style when checked */
  .checkable-button input:checked + span {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
  }

  .checkable-button-hatch {
    display: inline-block;
    cursor: pointer;
    border: 2px solid #EA4C89;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: white;
    color: #EA4C89;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
  }

  /* Hide the actual checkbox */
  .checkable-button-hatch input {
    display: none;
  }

  /* Change style when checked */
  .checkable-button-hatch input:checked + span {
    background-color: #EA4C89;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
  }

  /* Separator Line */
  .separator {
    height: 40px;  /* Adjust height as needed */
    width: 2px;
    background-color: #ccc; /* Light grey */
    margin: 0 10px; /* Space around the line */
  }

