@import "basis-styling.css";
main {
  padding-left: 10%;
  padding-right: 10%;
  height: fit-content;
  display: flex;
  flex-direction: row;
  gap: 1vh;
  justify-content: center;
  align-items: flex-start; /* zorgt dat beide secties netjes uitlijnen bovenaan */
}

header {
  background-color: transparent;
  z-index: 9998;
}
#image-section,
#side-bar-outer-container {
  width: 50%;
  height: fit-content;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 2vh;
  padding: 0 1%;
}

#image-section {
  align-items: flex-end;
}

#side-bar-outer-container {
  align-items: flex-start;
}
#image-outer-container {
  position: relative;
  height: fit-content;
  width: fit-content;
  overflow: hidden;
  padding: 20px;
  background: #a1bdd930;
  box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff53;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  animation: bounceIn 1s ease-in-out;
  gap: 3vh;
}

#image-container {
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: 10px;
  display: block;
}

#grid-container {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  grid-template-rows: repeat(30, 1fr);
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* laat klikken door tenzij je interactiviteit wil */
}

#grid-container div {
  border: 1px red solid;
  width: 100%;
  height: 100%;
  cursor: pointer;
  pointer-events: auto; /* activeert klikken op individuele cellen */
}

#grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  grid-auto-rows: 1fr; /* automatische hoogte */
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* standaard niet klikbaar, wordt geactiveerd op cellen */
}
.grid-cell {
  aspect-ratio: 1 / 1;
  width: 100%; /* wordt door grid-template-columns bepaald */
  background-color: transparent;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  pointer-events: auto;
  border-radius: 50px;
  padding: 0;
}
.grid-cell:hover {
  background-color: rgba(16, 12, 70, 0.1);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

#popup {
  position: absolute; /* <-- essentieel voor positionering */
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: fit-content;
  height: fit-content;
  overflow: hidden;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.3vh;
  gap: 1.3vh;
  font-family: "sf pro", sans-serif;
  font-size: 1rem;
  color: #2a3a42;
  border-radius: 3.9vh;
  box-shadow: 0 0.52vh 3.9vh rgba(0, 0, 0, 0.5),
    1.04vh 1.04vh 2.08vh rgba(144, 144, 144, 0.5),
    -1.04vh -1.04vh 2.08vh rgba(255, 255, 255, 0.48);
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: rgba(224, 224, 224, 0.39);
  border: 0.13vh solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  @extend .glass;
}

#popup.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#definitievak {
  padding-left: 2vh;
  padding-right: 2vh;
  height: 4.5vh;
  border-radius: 50px;
  font-size: 1.5vh;
  border: none;
  background-color: rgba(255, 255, 255, 0.175);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15);
  border-bottom: 1.3px solid rgba(255, 255, 255, 0.352);
  outline: none;
}

.grid-cell .pin {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#sidebar-section,
#outer-container-head {
  width: 40vh;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 1vh;
  padding: 3vh;
  background: #a1bdd930;
  box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff53;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
}

#ondertitel {
  font-weight: bold;
  font-size: 2.5vh;
  font-family: "atrament";
}

#text-field {
  display: flex;
  flex-direction: column;
  padding: 0 10%;
  min-height: 20vh;
  max-height: 38.5vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  box-sizing: border-box;
}

#text-field span {
  font-size: 2vh;
  font-weight: 300;
  cursor: pointer;
  text-decoration: none;
  transition: text-decoration 0.3s ease-in-out, transform 0.2s ease-in-out;
}

#text-field span:hover {
  text-decoration: line-through;
  transform: scale(1.1);
}

#button-container {
  height: fit-content;
  width: 100%;
  display: flex;
  justify-content: center;
}
#create-set {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6em;

  height: 100%;
  padding: 0.4em 2em;

  font-family: "atrament", sans-serif;
  font-weight: normal;
  font-size: 1.8vh;
  color: #2a3a42;

  border-radius: 50px;

  background: #006aff5d;
  box-shadow: 5px 5px 10px #768fb231, -5px -5px 10px #a0c1f03d;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform-origin: center;
  transition: 0.3s ease-out;
  border-image-slice: 1;
  border-radius: 50px;
  filter: drop-shadow(3px 3px 6px #35557138)
    drop-shadow(-3px -3px 6px #ffffff4a);
}

#hoofdtitel {
  font-size: 3vh;
  font-weight: 800;
  color: #2a3a42;
  font-family: "atrament";
}

#hoofd-input-outer-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5vh;
}

.inputveld-kaarten {
  padding-left: 2vh;
  padding-right: 2vh;
  height: 4.5vh;
  border-radius: 50px;
  font-size: 1.5vh;
  border: none;
  background-color: rgba(255, 255, 255, 0.175);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15);
  border-bottom: 1.3px solid rgba(255, 255, 255, 0.352);
}

.inputveld-kaarten:focus {
  outline: none;
}

#onder-outer-hoofd-inputvelden {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 1vh;
}

.inner-hoofd-inputveld {
  width: 100%;
}

.inner-hoofd-inputveld input {
  width: 100%;
}
select {
  width: 100%;
}

.custom-select {
  width: 100%;
  position: relative;
}

.custom-select select {
  padding-left: 2vh;
  padding-right: 4vh;
  height: 4.5vh;
  border-radius: 50px;
  font-size: 1.5vh;
  outline: none;
  border: none;
  background-color: rgba(213, 213, 213, 0.175);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15);
  border-bottom: 1.3px solid rgba(255, 255, 255, 0.352);
  appearance: none;
}

.custom-select::before,
.custom-select::after {
  --size: 0.3rem;
  content: "";
  position: absolute;
  right: 1rem;
  pointer-events: none;
}

.custom-select::before {
  border-left: var(--size) solid transparent;
  border-right: var(--size) solid transparent;
  border-bottom: var(--size) solid black;
  top: 40%;
}

.custom-select::after {
  border-left: var(--size) solid transparent;
  border-right: var(--size) solid transparent;
  border-top: var(--size) solid black;
  top: 55%;
}

.error-message {
  color: rgb(255, 94, 94);
  font-size: 0.8rem;
  height: 0.8rem;
  display: block;
  margin-bottom: 2vh;
  padding-left: 2vh;
  padding-top: 0.2vh;
}
.taal-alert {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #e1f1fd;
  padding: 1rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  font-family: "SF Pro", sans-serif;
  font-size: 1rem;
  color: #222;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transition: top 0.6s ease, opacity 0.6s ease;
  z-index: 9999;
}

.taal-alert.show {
  top: 20px;
  opacity: 1;
}

.taal-alert .alert-sluit {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #666;
  padding: 0 0.5rem;
}

#upload {
  position: relative;
  width: 300px;
  height: 300px;
  border: 1px dashed #6a8caf;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  color: #4a6fa5;
  font-family: "sf pro", sans-serif;
  font-size: 1.5rem;
  user-select: none;
  text-align: center;
  padding: 1.5rem;
}

#upload:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #4a6fa5;
}

#upload.dragover {
  background: #4a6fa5;
  border-color: #294b79;
  color: white;
}

#upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* iPhone en mobiele apparaten */
@media screen and (max-width: 768px) {
  main {
    padding-left: 5%;
    padding-right: 5%;
    padding-top: 10%;
    gap: 2.5vh;
    box-shadow: none;
    height: fit-content;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
  }

  #image-section {
    grid-area: 2 / 1 / 3 / 2;
  }

  #sidebar-section {
    grid-area: 1 / 1 / 2 / 2;
  }

  #image-section,
  #side-bar-outer-container {
    width: 100%;
    padding: 0;
  }

  #image-outer-container {
    width: 95vw;
    max-width: 95vw;
    padding: 3vw;
    border-radius: 20px;
  }

  #image-container {
    width: 100%;
    max-height: 50vh;
    border-radius: 15px;
  }

  .grid-cell {
    border-radius: 20px;
  }

  .grid-cell:hover {
    background-color: rgba(16, 12, 70, 0.2);
  }

  #popup {
    width: 85vw;
    max-width: 85vw;
    padding: 2vh;
    gap: 2vh;
    border-radius: 20px;
    font-size: 3vw;
    z-index: 10000;
  }

  #definitievak {
    width: 100%;
    height: 6vh;
    font-size: 3vw;
    padding: 0 3vw;
    border-radius: 3vh;
    min-height: 44px;
  }

  #outer-container-head {
    background-color: transparent;
    box-shadow: none;
    border: none;
  }

  main {
    padding-left: 5%;
    padding-right: 5%;
    padding-top: 10%;
    padding-bottom: 10%;
    gap: 2.5vh;
    box-shadow: none;
  }

  #hoofdtitel {
    font-size: 5vh;
  }

  .inputveld-kaarten {
    height: 6vh;
    border: 2px solid #2a3a4215;
    box-shadow: none;
  }

  #folder-select {
    height: 6vh;
    border: 2px solid #2a3a4215;
    box-shadow: none;
  }

  #create-set {
    font-size: 2vh;
    box-shadow: none;
    height: 6vh;
    background: #4f83ff;
    color: white;
    border: none;
  }

  #sidebar-section,
  #outer-container-head {
    width: 95vw;
    max-width: 95vw;
    padding: 4vw;
    border-radius: 20px;
  }

  #hoofdtitel {
    font-size: 5vh;
    text-align: center;
  }

  #ondertitel {
    font-size: 4vh;
    text-align: center;
  }

  #text-field {
    min-height: 15vh;
    max-height: 25vh;
    padding: 0 5%;
  }

  #text-field span {
    font-size: 3vh;
    line-height: 1.4;
  }

  .inputveld-kaarten {
    height: 6vh;
    font-size: 3vw;
    padding: 0 4vw;
    min-height: 44px;
  }

  #onder-outer-hoofd-inputvelden {
    flex-direction: column;
    gap: 2vh;
  }


  .taal-alert {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 75vw;
  }
}
