@import "driver.css";
html {
  height: 100%;
}
body {
  margin: 0;
  color: black;
  font-family: sans-serif;
}
#wrapper {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  width: 100%;
  height: 100%;
}
#canvas-wrapper {
  flex-grow: 1;
}
#canvas-wrapper canvas {
  width: 100%;
  height: 100%;
}
#modal-overlay {
  width: 100%;
  height: 100%;
}
.selector-window {
  position: absolute;
  box-sizing: border-box;
  left: -420px;
  top: 0px;
  width: 420px;
  height: 100%;
  background-color: rgba(206, 45, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px;
  z-index: 2000;
  transition: left 0.2s;
}
.selector-window .title-bar {
  display: flex;
  border-bottom: 1px solid white;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.selector-window .title-bar .title-text {
  flex-grow: 1;
  line-height: 22px;
  font-weight: bold;
  color: white;
}
#delete-overlay-backing {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  display: none;
}
input[type=radio] {
  display: none;
}
.control-section {
  display: flex;
  margin-bottom: 10px;
  font-size: small;
  font-weight: bold;
}
.control-section > div.control-title {
  transform: rotate(180deg);
  writing-mode: vertical-lr;
  text-align: center;
  background-color: #ff6135;
  color: white;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  padding: 5px;
}
.control-section > div:nth-child(2) {
  flex-grow: 1;
  background-color: white;
  padding: 7px;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
  border: 1px solid #ffdfd7;
}
.control-section > div:nth-child(2) .icon {
  width: 38px;
  height: 38px;
}
.control-section > div:nth-child(2) .button {
  display: inline-block;
  padding: 5px;
}
.slider-wrapper {
  position: relative;
}
.slider-wrapper .slider-marker {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: #f0f0f0;
  top: 20px;
  border-radius: 50%;
  left: 50px;
  opacity: 0.2;
}
.slider-wrapper input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
  height: 40px;
}
.slider-wrapper input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
}
.slider-wrapper input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: #ff8968;
  border: none;
  cursor: pointer;
  margin-top: -13px;
}
.slider-wrapper input[type=range]::-webkit-slider-thumb:active {
  background-color: red;
}
.slider-wrapper input[type=range]::-moz-range-thumb {
  -webkit-appearance: none;
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: #ff8968;
  border: none;
  cursor: pointer;
  margin-top: -13px;
}
.slider-wrapper input[type=range]::-webkit-slider-runnable-track {
  height: 5px;
  background-color: #ce2d00;
  border-radius: 2.5px;
  margin-left: 20px;
  margin-right: 20px;
}
.slider-wrapper input[type=range]::-moz-range-track {
  height: 5px;
  background-color: #ce2d00;
  border-radius: 2.5px;
  margin-left: 20px;
  margin-right: 20px;
}
.slider-wrapper div {
  text-align: center;
  font-size: small;
  color: #808080;
  position: relative;
  top: -8px;
}
#color-bar {
  text-align: center;
}
#rotations-wrapper {
  text-align: center;
}
#rotations-wrapper > div {
  position: relative;
  display: inline-block;
  margin: 5px 10px;
  border: 1px solid transparent;
  padding: 5px;
  border-radius: 5px;
}
#rotations-wrapper > div:hover {
  border: 1px solid #ffdfd7;
}
#rotations-wrapper > div:active {
  box-shadow: inset 2px 2px 3px rgba(236, 236, 236, 0.8);
  left: 1px;
  top: 1px;
}
.color-button {
  width: 50px;
  height: 50px;
  display: inline-block;
  margin: 15px 3px;
  border-radius: 50%;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}
#pattern-widget {
  position: relative;
  width: 380px;
  height: 380px;
  box-sizing: border-box;
  margin: 10px;
  background-color: #ff8968;
}
#pattern-widget .pattern-preview {
  aspect-ratio: 1;
  position: absolute;
  box-sizing: border-box;
  transition: width 0.2s, height 0.2s;
}
#pattern-widget .pattern-preview canvas {
  width: 100%;
  height: 100%;
}
#pattern-widget .pattern-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  position: absolute;
  z-index: 1000;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
  transition: left 0.2s, top 0.2s;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-color: rgba(255, 137, 104, 0.6);
}
#pattern-widget #add-pattern-button {
  background-image: url("../images/add.svg");
  background-color: #66842a;
}
#pattern-widget #delete-pattern-button {
  background-image: url("../images/remove.svg");
  background-color: #b3372a;
}
#pattern-widget #delete-overlay {
  position: absolute;
  background-color: rgba(255, 0, 0, 0.7);
  border: 3px solid red;
  box-sizing: border-box;
  z-index: 500;
  display: none;
}
#pattern-widget #delete-overlay::before {
  position: absolute;
  content: "Tap again to delete!";
  font-size: 18px;
  width: 190px;
  height: 190px;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  padding: 70px 5px 5px;
}
#pattern-widget #pattern-cursor {
  position: absolute;
  box-sizing: border-box;
  border: 3px solid #ff8968;
  z-index: 1000;
  transition: width 0.2s, height 0.2s, top 0.2s, left 0.2s;
}
#control-panel {
  margin: 10px;
  background-color: #ffffff;
}
.carousel .carousel-button {
  display: none;
}
.carousel .carousel-dots {
  display: none;
}
#preview-tab:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3);
}
#preview-tab {
  cursor: pointer;
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: 24px 40px;
  padding: 8px;
  box-sizing: border-box;
  background-color: #eee2df;
  border: 2px solid #a66b5b;
  border-radius: 5px;
  width: 400px;
  margin-left: 10px;
  margin-right: 10px;
  color: #221613;
}
#preview-tab img {
  width: 64px;
  height: 64px;
  grid-column: 1;
  grid-row: 1 / 3;
  opacity: 0.6;
}
#preview-tab #name {
  grid-column: 2;
  grid-row: 2;
  font-weight: bold;
}
#preview-tab #description {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.9em;
}
#preview-tab div {
  font-size: 20px;
  box-sizing: border-box;
  margin-left: 10px;
  line-height: 42px;
}
.selector-tab {
  width: 195px;
  vertical-align: top;
  display: inline-flex;
  padding: 5px;
  cursor: pointer;
  box-sizing: border-box;
}
.selector-tab .selector-preview {
  width: 64px;
  height: 64px;
  display: inline-block;
  border-radius: 5px;
  grid-row: 1 / 2;
  margin-right: 5px;
}
.selector-tab .selector-description {
  display: inline-block;
  padding-top: 5px;
  padding-bottom: 5px;
  vertical-align: top;
}
.selector-tab .selector-description span {
  display: block;
  color: #f0f0f0;
}
.selector-tab .selector-description span:first-child {
  font-weight: bold;
}
.selector-tab .selector-description span:last-child {
  font-size: smaller;
}
.selector-tab:hover {
  background-color: #ff3902;
  border-radius: 5px;
}
#tools-wrapper {
  background-color: #ffffff;
}
#tools-wrapper .pattern-button {
  width: 48px;
  height: 48px;
}
#tools-wrapper #pattern-widget.state-0 {
  height: 400px;
  width: 400px;
}
#tools-wrapper #pattern-widget.state-0 .pattern-preview:nth-child(1) {
  width: 400px;
  left: 0;
  top: 0;
}
#tools-wrapper #pattern-widget.state-0 #add-pattern-button {
  left: 342px;
  top: 10px;
}
#tools-wrapper #pattern-widget.state-0 #delete-pattern-button {
  display: none;
}
#tools-wrapper #pattern-widget.state-0 #pattern-cursor {
  width: 400px;
  height: 400px;
}
#tools-wrapper #pattern-widget.state-1 {
  height: 400px;
  width: 400px;
}
#tools-wrapper #pattern-widget.state-1 .pattern-preview {
  width: 200px;
}
#tools-wrapper #pattern-widget.state-1 #delete-overlay {
  width: 200px;
  left: 200px;
  height: 200px;
  top: 0px;
}
#tools-wrapper #pattern-widget.state-1 #delete-overlay::before {
  width: 200px;
  height: 200px;
}
#tools-wrapper #pattern-widget.state-1 #add-pattern-button {
  left: 342px;
  top: 10px;
}
#tools-wrapper #pattern-widget.state-1 #delete-pattern-button {
  top: 10px;
  left: 284px;
}
#tools-wrapper #pattern-widget.state-1 .pattern-preview:nth-child(2) {
  left: 200px;
}
#tools-wrapper #pattern-widget.state-1 #pattern-cursor {
  width: 200px;
  height: 200px;
}
#tools-wrapper #pattern-widget.state-2 {
  width: 400px;
  height: 400px;
}
#tools-wrapper #pattern-widget.state-2 .pattern-preview {
  width: 200px;
}
#tools-wrapper #pattern-widget.state-2 #add-pattern-button {
  display: none;
}
#tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(2) {
  left: 200px;
}
#tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(3) {
  left: 0px;
  top: 200px;
}
#tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(4) {
  left: 200px;
  top: 200px;
}
#tools-wrapper #pattern-widget.state-2 #pattern-cursor {
  width: 200px;
  height: 200px;
}
#tools-wrapper #pattern-widget.state-2 #delete-pattern-button {
  left: 342px;
  top: 210px;
}
#tools-wrapper #pattern-widget.state-2 #delete-overlay {
  width: 400px;
  left: 0;
  height: 200px;
  top: 200px;
}
#tools-wrapper #pattern-widget.state-2 #delete-overlay::before {
  width: 400px;
  height: 200px;
}
@media screen and (max-width: 697px) {
  #tools-wrapper .pattern-button {
    width: 32.4px;
    height: 32.4px;
  }
  #tools-wrapper #pattern-widget.state-0 {
    height: 270px;
    width: 270px;
  }
  #tools-wrapper #pattern-widget.state-0 .pattern-preview:nth-child(1) {
    width: 270px;
    left: 0;
    top: 0;
  }
  #tools-wrapper #pattern-widget.state-0 #add-pattern-button {
    left: 230.85px;
    top: 6.75px;
  }
  #tools-wrapper #pattern-widget.state-0 #delete-pattern-button {
    display: none;
  }
  #tools-wrapper #pattern-widget.state-0 #pattern-cursor {
    width: 270px;
    height: 270px;
  }
  #tools-wrapper #pattern-widget.state-1 {
    height: 270px;
    width: 270px;
  }
  #tools-wrapper #pattern-widget.state-1 .pattern-preview {
    width: 135px;
  }
  #tools-wrapper #pattern-widget.state-1 #delete-overlay {
    width: 135px;
    left: 135px;
    height: 135px;
    top: 0px;
  }
  #tools-wrapper #pattern-widget.state-1 #delete-overlay::before {
    width: 135px;
    height: 135px;
  }
  #tools-wrapper #pattern-widget.state-1 #add-pattern-button {
    left: 230.85px;
    top: 6.75px;
  }
  #tools-wrapper #pattern-widget.state-1 #delete-pattern-button {
    top: 6.75px;
    left: 191.7px;
  }
  #tools-wrapper #pattern-widget.state-1 .pattern-preview:nth-child(2) {
    left: 135px;
  }
  #tools-wrapper #pattern-widget.state-1 #pattern-cursor {
    width: 135px;
    height: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 {
    width: 270px;
    height: 270px;
  }
  #tools-wrapper #pattern-widget.state-2 .pattern-preview {
    width: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 #add-pattern-button {
    display: none;
  }
  #tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(2) {
    left: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(3) {
    left: 0px;
    top: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 .pattern-preview:nth-child(4) {
    left: 135px;
    top: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 #pattern-cursor {
    width: 135px;
    height: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 #delete-pattern-button {
    left: 230.85px;
    top: 141.75px;
  }
  #tools-wrapper #pattern-widget.state-2 #delete-overlay {
    width: 270px;
    left: 0;
    height: 135px;
    top: 135px;
  }
  #tools-wrapper #pattern-widget.state-2 #delete-overlay::before {
    width: 270px;
    height: 135px;
  }
}
#mobile-toolbar-wrapper {
  display: none;
}
@media screen and (max-width: 697px) {
  #wrapper {
    flex-direction: column-reverse;
  }
  #pattern-editor-container #pattern-editor-wrapper #save-button-wrapper {
    background-color: #e6e6e6;
    width: 100%;
    position: relative;
    padding: 15px;
    top: 0;
    left: 0;
  }
  #pattern-editor-container #pattern-editor-wrapper #save-button-wrapper button {
    font-size: 18px;
    width: 100%;
  }
  #preview-tab {
    width: calc(100% - 20px);
    box-sizing: border-box;
    height: 74px;
    grid-column: 2;
  }
  #preview-tab > img {
    height: 54px;
    width: 54px;
  }
  #preview-tab > div {
    line-height: 25px;
    margin: 0;
  }
  #pattern-widget {
    margin-left: auto;
    margin-right: auto;
  }
  #pattern-widget #add-pattern-button::before {
    font-size: smaller;
    padding: 0;
  }
  #pattern-widget #delete-overlay::before {
    font-size: smaller;
  }
  #tools-wrapper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  #canvas-wrapper {
    flex-shrink: 0;
    flex-grow: 1;
    height: unset;
  }
  #control-panel {
    text-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
    vertical-align: top;
    grid-column-start: 1;
    grid-column-end: 3;
    margin-top: 7px;
    margin-bottom: 7px;
  }
  .control-section {
    margin-bottom: 10px;
    width: 100%;
    height: 80px;
  }
  .control-section div.control-title {
    display: none;
  }
  .control-section > div:nth-child(2) {
    background-color: transparent;
    padding: 0;
    border: none;
  }
  input[type=radio] + .control-section {
    display: none;
  }
  input[type=radio]:checked + .control-section {
    display: flex;
  }
  #mobile-toolbar-wrapper {
    display: block;
    min-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 3px #b3b3b3;
    background-color: #e6e6e6;
  }
  #mobile-toolbar {
    display: flex;
    text-align: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  #mobile-toolbar > label {
    display: block;
    padding: 15px;
    flex-grow: 1;
    color: #666;
    font-weight: bold;
    background-color: transparent;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    position: relative;
    top: -2px;
  }
  #mobile-toolbar > label.selected {
    color: black;
    background-color: #ffffff;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
  }
  #properties-wrapper {
    height: 80px;
  }
  input[type="range"] {
    padding: 0;
    margin: 0;
  }
  .carousel {
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
  }
  .carousel .carousel-button {
    z-index: 1000;
    display: inline-block;
    background-color: white;
  }
  .carousel .carousel-button img {
    margin-top: 19px;
    padding: 12px;
    width: 18px;
    background-color: #ff8968;
    height: 18px;
    border-radius: 50%;
  }
  .carousel .carousel-item {
    transition: left 0.6s;
  }
  .carousel .carousel-dots {
    text-align: center;
    display: block;
  }
  .carousel .carousel-dots > div.carousel-dot {
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid #ccc;
    display: inline-block;
    margin-left: 7px;
    margin-right: 7px;
    transition: background-color 0.6s;
  }
  .carousel .carousel-dots > div.active-dot {
    background-color: #ccc;
  }
  .carousel > * {
    position: absolute;
  }
}
/* Driver.js custom augmentation styles: ~50% larger text/buttons & mobile friendly touch targets */
.driver-popover {
  border-radius: 12px;
  min-width: 360px;
  max-width: 450px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}
.driver-popover .driver-popover-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  color: #1a1a1a;
  padding-right: 50px;
  box-sizing: border-box;
  word-wrap: break-word;
}
.driver-popover .driver-popover-description {
  font-size: 20px;
  line-height: 1.5;
  color: #4a4a4a;
  margin-top: 10px;
  margin-bottom: 20px;
}
.driver-popover .driver-popover-close-btn {
  font-size: 28px;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  top: 10px;
  right: 10px;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
}
.driver-popover .driver-popover-close-btn:hover, .driver-popover .driver-popover-close-btn:focus {
  background-color: rgba(0, 0, 0, 0.08);
  color: #000;
}
.driver-popover .driver-popover-footer {
  margin-top: 20px;
  gap: 12px;
}
.driver-popover .driver-popover-footer .driver-popover-progress-text {
  font-size: 18px;
  font-weight: 500;
  color: #666;
}
.driver-popover .driver-popover-footer .driver-popover-footer-btn {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 22px;
  min-height: 48px;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.driver-popover .driver-popover-footer .driver-popover-footer-btn:active {
  transform: scale(0.96);
}
.driver-popover .driver-popover-footer .driver-popover-next-btn {
  background-color: #2b7a4b;
  color: #ffffff;
  border: 1px solid #23653e;
  box-shadow: 0 3px 10px rgba(43, 122, 75, 0.3);
}
.driver-popover .driver-popover-footer .driver-popover-next-btn:hover, .driver-popover .driver-popover-footer .driver-popover-next-btn:focus {
  background-color: #23653e;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(43, 122, 75, 0.4);
}
.driver-popover .driver-popover-footer .driver-popover-prev-btn {
  background-color: #f0f0f0;
  color: #333333;
  border: 1px solid #ccc;
}
.driver-popover .driver-popover-footer .driver-popover-prev-btn:hover, .driver-popover .driver-popover-footer .driver-popover-prev-btn:focus {
  background-color: #e2e2e2;
  color: #111;
}
/* Mobile Responsiveness for Driver.js Popover */
@media screen and (max-width: 520px) {
  .driver-popover {
    min-width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    padding: 18px;
    border-radius: 14px;
    left: 16px !important;
    right: 16px !important;
  }
  .driver-popover .driver-popover-title {
    font-size: 22px;
  }
  .driver-popover .driver-popover-description {
    font-size: 17px;
    margin-top: 8px;
    margin-bottom: 16px;
  }
  .driver-popover .driver-popover-footer {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .driver-popover .driver-popover-footer .driver-popover-navigation-btns {
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }
  .driver-popover .driver-popover-footer .driver-popover-navigation-btns .driver-popover-footer-btn {
    flex: 1;
    text-align: center;
    padding: 14px 12px;
    min-height: 48px;
    font-size: 17px;
  }
}
#tools-wrapper button {
  box-sizing: border-box;
  width: calc(100% - 20px);
  margin: 10px 10px 0 10px;
}
