/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Reset default margin, padding, dan mengatur box-sizing ke border-box untuk konsistensi layout */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif; /* Menggunakan font Poppins sebagai font utama */
}

/* Styling untuk elemen body */
body{
  display: flex; /* Menggunakan flexbox untuk tata letak */
  align-items: center; /* Menyusun elemen secara vertikal di tengah */
  justify-content: center; /* Menyusun elemen secara horizontal di tengah */
  min-height: 100vh; /* Memastikan tinggi body minimal 100% viewport */
  background: #4A98F7; /* Warna latar belakang biru */
}

/* Styling container sebagai elemen utama aplikasi */
.container{
  display: flex;
  width: 100%;
  gap: 10px; /* Memberikan jarak antar elemen */
  padding: 10px;
  max-width: 1050px;
}

/* Styling untuk setiap section dalam aplikasi */
section{
  background: #fff; /* Warna latar belakang putih */
  border-radius: 7px; /* Membuat sudut elemen membulat */
}

/* Styling untuk bagian alat gambar */
.tools-board{
  width: 210px; /* Lebar tetap */
  padding: 15px 22px 0;
}

.tools-board .row{
  margin-bottom: 20px; /* Memberikan jarak antar baris */
}

.row .options{
  list-style: none; /* Menghilangkan bullet list */
  margin: 10px 0 0 5px;
}

.row .options .option{
  display: flex;
  cursor: pointer;
  align-items: center;
  margin-bottom: 10px;
}

/* Efek hover dan active pada ikon alat */
.option:is(:hover, .active) img{
  filter: invert(17%) sepia(98%) saturate(2479%) hue-rotate(346deg) brightness(94%) contrast(97%);
}

/* Styling teks dalam opsi alat */
.option span, .option label{
  color: #5A6168;
  cursor: pointer;
  padding-left: 10px;
}

.options :is(:hover, .active) :where(span, label){
  color: #4A98F7;
}

/* Styling untuk checkbox fill-color */
.option #fill-color{
  cursor: pointer;
  height: 14px;
  width: 14px;
}

/* Warna label berubah saat checkbox dicentang */
#fill-color:checked ~ label{
  color: #4A98F7;
}

/* Styling untuk slider ukuran alat */
.option #size-slider{
  width: 100%;
  height: 5px;
  margin-top: 10px;
}

/* Styling untuk pemilihan warna */
.colors .options{
  display: flex;
  justify-content: space-between;
}

.colors .option{
  height: 20px;
  width: 20px;
  border-radius: 50%;
  margin-top: 3px;
  position: relative;
}

/* Warna default yang tersedia */
.colors .option:nth-child(1){
  background-color: #fff;
  border: 1px solid #bfbfbf;
}

.colors .option:nth-child(2){
  background-color: #000;
}

.colors .option:nth-child(3){
  background-color: #E02020;
}

.colors .option:nth-child(4){
  background-color: #6DD400;
}

.colors .option:nth-child(5){
  background-color: #4A98F7;
}

/* Efek tanda pilih pada warna yang dipilih */
.colors .option.selected::before{
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  height: 12px;
  width: 12px;
  background: inherit;
  border-radius: inherit;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
}

/* Styling tambahan untuk warna putih yang dipilih */
.colors .option:first-child.selected::before{
  border-color: #ccc;
}

/* Styling untuk color picker */
.option #color-picker{
  opacity: 0;
  cursor: pointer;
}

/* Styling tombol di dalam tools-board */
.buttons button{
  width: 100%;
  color: #fff;
  border: none;
  outline: none;
  padding: 11px 0;
  font-size: 0.9rem;
  margin-bottom: 13px;
  background: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Styling tombol Clear Canvas */
.buttons .clear-canvas{
  color: #6C757D;
  border: 1px solid #6C757D;
  transition: all 0.3s ease;
}

.clear-canvas:hover{
  color: #fff;
  background: #6C757D;
}

/* Styling tombol Save Image */
.buttons .save-img{
  background: #4A98F7;
  border: 1px solid #4A98F7;
}

/* Styling untuk drawing board (tempat menggambar) */
.drawing-board{
  flex: 1;
  overflow: hidden;
}

.drawing-board canvas{
  width: 100%;
  height: 100%;
}