/* vietnamese */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/dosis/v27/HhyJU5sn9vOmLxNkIwRSjTVNWLEJ0LQl1BMCbKsUPqjmG8Q.woff) format('woff');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/dosis/v27/HhyJU5sn9vOmLxNkIwRSjTVNWLEJ0LQl1RMCbKsUPqjmG8Q.woff) format('woff');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Dosis';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/dosis/v27/HhyJU5sn9vOmLxNkIwRSjTVNWLEJ0LQl2xMCbKsUPqjm.woff) format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent-color: #6F17E3;
  --background-color: #FDCF73;
  --primary-text-color: #1A0535;
}

body {
  padding: 1rem;
  font-family: sans-serif;
}

#canvas {
  width: fit-content;
  overflow: auto;
}

.padded-multiline { 
  line-height: 1.4; 
  padding: 2px 0; 
  max-width: 440px;
  position: relative;
  font-family: "Dosis";
  text-transform: uppercase;
  padding-right: 2em;
  overflow: visible;
}

.padded-multiline::before {
  content:"";
  top:0;
  left:0;
  bottom:0;
  width: 10%;
  height: 100%;
  position: absolute;
  z-index: -1;
  border-radius: .3em 0 0 .3em;
}


.padded-multiline span { 
  display: inline;
  padding: 0.22em 0.6em 0.3em 0.5em;
  border-radius: .3em;

  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.background-back {
  background-color: var(--background-color);
  color: var(--primary-text-color); 
}


.accent-back {
  background-color: var(--accent-color);
  color: #fff; 
}


/* Controls */

.button {
  margin-top: 1em;
  display: inline-block;
  max-width: 300px;
  padding: 10px 20px;
  border-radius: 8px; 
  background-color: black;
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.button:hover {
  background-color: var(--accent-color);
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: left;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 5px;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  margin-top: 0;
}

.slider-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

label {
  font-size: 1.2rem;
  margin-right: 10px;
}

input[type=range] {
  width: 200px;
  height: 10px;
  -webkit-appearance: none;
  background-color: #ddd;
  outline: none;
  border-radius: 5px;
  margin-right: 10px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #0077ff;
  cursor: pointer;
}

/* Color selector */

.color-selector {
  display: flex;
  gap: .5em;
  justify-content: left;
  align-items: center;
  margin-top: 20px;
}

.color-patch {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid black;
  cursor: pointer;
}

.color1 {
  background-color: var(--accent-color);
}

.color2 {
  background-color: var(--background-color);
}

input[type="radio"] {
  display: none;
}

input[type="radio"]:checked + .color-patch {
  outline: 2px solid black;
}