/*======= LAYOUT GLOBAL =====*/
.content-wrapper {
  padding-top: 20px;
}

.page-header {
  padding: 0px;
  margin-bottom: 20px;
}

.breadcrumb {
  a {
    text-decoration: none;
    color: #0dafe0;
  }

  span {
    color: #0a82b1;
  }

  p {
    color: #37505a;

    b {
      background-color: #0dafe0;
      animation: FakeCaret 1.7s ease infinite;
    }
  }
}

@keyframes FakeCaret {
  0%,
  50% {
    background-color: #0dafe0;
    color: black;
  }
  51%,
  99% {
    color: #37505a;
    background-color: transparent;
  }
}

/*======= RISO PALETTE =====*/

.color-cell {
  position: relative;
  transition: scale 0.3s ease;
}

.color-cell:hover {
  scale: 110%;
}

.color-cell::before {
  content: attr(data-colorcode);
  position: absolute;

  top: 0%;
  left: 50%;
  transform: translate(-50%, -100%);

  padding: 5px;

  font-size: 15px;
  color: white;
  background-color: #555555;

  pointer-events: none;
  display: none;
}

.color-cell:hover::before {
  display: block;
  z-index: 5;
}

.colors-wrapper {
  display: flex;
  width: 100%;

  margin-bottom: 20px;

  gap: 10px;
}

.color-selector-wrapper {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
}

.color-wrapper-right-side {
  flex: 1 1 70%;

  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 2px dashed blue;
  overflow: hidden;
}

.tab-wrapper {
  height: 30px;
  width: 100%;
  display: flex;

  border-bottom: 1px solid darkslategray;
}

.tab {
  flex: 1 1 50%;
  display: flex;

  align-content: center;
  justify-content: center;

  color: white;
}

.color-picker-wrapper {
  display: block;
}

.saturation-picker {
  position: relative;
  height: 200px;

  margin-bottom: 10px;

  user-select: none;

  background-image:
    linear-gradient(transparent, black),
    linear-gradient(to right, white, transparent);
}

.saturation-dot {
  position: absolute;

  width: 10px;
  height: 10px;
  border: 2px solid black;
  border-radius: 10px;

  left: 0px;
  top: 0px;

  transform: translate(-50%, -50%);

  pointer-events: none;
  user-select: none;
}

.hue-picker {
  position: relative;

  height: 20px;

  margin-bottom: 10px;

  background-image: linear-gradient(
    to right,
    #ff0000,
    #ffff00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
}

.hue-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid black;
  border-radius: 10px;

  left: 0px;
  top: 50%;

  transform: translate(-50%, -50%);
}

.riso-picker-wrapper {
  display: none;
}

.riso-picker {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;

  overflow: scroll;

  gap: 2px;
  width: 100%;

  height: 250px;
  padding: 5px;
}

.riso-color-button {
  width: 80px;
  height: 30px;
  font-size: 12px;
  color: white;

  line-height: 1;

  overflow: hidden;

  padding: 2px;
}

.color-button {
  padding: 10px;
  flex: 1 0 30%;
  min-width: 0px;

  color: white;
  overflow: hidden;
  text-wrap: nowrap;
}

.color-button-selected {
  padding: 10px;
  border: 4px solid white;
  flex: 1 0 30%;
  min-width: 0px;
  color: white;

  overflow: hidden;
  text-wrap: nowrap;
}

.palette-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

.one-color-wrapper {
  display: flex;
  flex-wrap: wrap;

  flex-direction: column;

  flex: 1 1 30%;

  justify-content: center;

  gap: 5px;

  margin-bottom: 20px;

  .swatch {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(2, 1fr);

    flex: 1 1 30%;

    max-width: 50%;

    .color-cell {
      aspect-ratio: 1;
    }

    .percent-cell {
      color: white;

      text-align: center;
    }
  }
}

.two-colors-wrapper {
  display: flex;
  flex-wrap: wrap;

  flex: 1 1 60%;

  gap: 5px;

  margin-bottom: 20px;

  justify-content: center;

  .swatch {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);

    flex: 1 1 30%;

    max-width: 50%;

    aspect-ratio: 1;

    .color-cell {
      min-width: 0px;
    }

    .percent-cell {
      color: white;

      min-width: 0px;

      text-align: center;
      align-content: center;
    }
  }
}

.three-colors-wrapper {
  display: flex;

  flex: 0 0 100%;

  flex-wrap: wrap;

  margin: auto auto;

  justify-content: center;

  .swatch {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);

    aspect-ratio: 1;

    flex: 1 1 10%;

    margin-bottom: 10px;

    .color-cell {
      min-width: 0px;
    }

    .percent-cell {
      min-width: 0px;

      font-size: 10px;
    }
  }
}

.separator {
  width: 100%;
  border-top: 4px dashed #294a68;
  margin-bottom: 10px;
  margin-top: 10px;
}

.button-wrapper {
  display: flex;
  flex-wrap: wrap;

  gap: 10px;

  align-items: center;

  margin-bottom: 15px;
}

.import-button-wrapper {
  padding: 10px;
  border: 2px dashed #0d5f85;
  flex: 0 1 50%;

  align-items: center;

  button,
  label,
  input {
    display: block;
  }

  input[type="file"] {
    padding: 0px;
    height: 0px;
    opacity: 0;
  }
}

.layerize-button-wrapper {
  padding: 10px;
  border: 2px dashed #0d5f85;
  flex: 0 1 25%;
  gap: 10px;
  align-items: center;
  display: none;
  flex-wrap: nowrap;

  button {
    min-width: 0px;
    width: fit-content;
  }
}

/*======GESTION DES CANVAS ========*/

.layerize-canvas {
  display: none;
}

.display-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.layer-wrapper {
  justify-content: center;
  display: none;
  flex-direction: column;

  gap: 10px;
  min-height: 0px;
}

.layer-canvas-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;

  button {
    padding: 5px;

    background-color: #451b8c63;
    border: none;
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: "Alegreya";
    border-left: 6px solid #0dafe0;
    text-shadow:
      2px 0px 0px red,
      -2px 0px 0px blue;
  }

  button:hover {
    text-shadow: none;
    cursor: pointer;
  }
}

.layer-canvas {
  display: flex;
  width: auto;

  min-height: 0px;
  min-width: 0px;
}

.display-left-side {
  width: 50%;
}

.display-canvas {
  display: flex;
  flex-grow: 0;
  width: 100%;
  height: auto;
}

.renderer-canvas {
  display: none;
}

.function-button,
label[for="import-input"] {
  padding: 10px;
  padding-right: 20px;
  background-color: #451b8c63;
  border: none;
  color: white;
  font-size: 20px;
  font-weight: bold;
  font-family: "Alegreya";
  border-left: 6px solid #0dafe0;
  text-shadow:
    3px 0px 0px red,
    -3px 0px 0px blue;
}

.function-button:hover,
label[for="import-input"]:hover {
  padding-left: 20px;
  text-shadow:
    1px 0px 0px red,
    2px 0px 0px blue;
}

@media (max-width: 768px) {
  .colors-wrapper {
    flex-direction: column;
  }

  .color-selector-wrapper {
    flex-direction: row;
  }

  .one-color-wrapper {
    flex: 1 0 100%;

    flex-direction: row;
    .swatch {
      max-width: 45%;
    }
  }

  .two-colors-wrapper {
    justify-items: stretch;

    flex: 1 0 100%;

    .swatch {
      max-width: 80%;
    }
  }

  .three-colors-wrapper {
    max-width: 90%;
    .swatch {
      flex: 0 1 33%;
    }
  }

  .percent-cell {
    font-size: 8px;
    min-width: 0px;
  }

  .display-left-side {
    width: 100%;
  }

  .layer-wrapper {
    flex-direction: row;
    height: auto;
    width: 100%;
  }
}
