@import url('https://fonts.googleapis.com/css2?family=Azeret+Mono:ital,wght@0,100..900;1,100..900&family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

html, body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight:300;
  line-height:1;
  background-color: rgb(233, 233, 233);
}

label{
  font-size:0.8em;
  padding-bottom:0.8em;
}

a:link {
  color: rgb(0, 0, 0);
  margin-bottom:5px;
  text-decoration: none;
  display: flex;
  align-items: center;
}

a, a:visited {
    color: rgb(0, 0, 0); /* Replace with your desired color */
}

a:hover{
  color: rgb(255, 255, 255);
  background-color:black;
  transition: .2s all ease-in;
}

#navigation a + a {
  border-left: 3px solid rgb(0, 0, 0);
  padding: 10px;
  margin-left: 1px;
}

canvas {
  display: block;
  border: 1px solid #ccc;
  background: white;
}

#navigation{
  padding: 25px;
  text-align: center;
  position: fixed;
  display:flex;
  gap:40px;
  height: 1px;
  width:225px;
  top: 30px;
  left: 30px;
  background-color:rgb(255, 255, 255);
  border: 3px solid black;
  z-index: 10;
  font-weight:400;
}

/* When hovering the navigation container, make the whole nav black and links white */
#navigation:hover {
  background-color: rgb(0, 0, 0);
  transition: background-color .2s ease-in;
}

#navigation:hover a {
  color: rgb(255, 255, 255);
}

#instructions{
  color: rgb(8, 8, 8);
  padding: 0px;
  width:15vw;
  font-size:20px;
  line-height: 0.75;
  margin: right 200vw;
  text-align: left;
}

#prompt{
  font-size:40px;
  font-style: thin;
  line-height:1;
  margin-bottom:8vh;
}

#container {
  display: flex;
  gap: 30px;
  padding-top:30px;
  padding-left:30px;
  justify-content: left;
  align-items: flex-start;
}

#editor-section, #preview-section {
  display: flex;
  margin-left: 4vw;
  margin-top: 5vh;
  flex-direction: column;
  align-items: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 120px 20px 20px;
  width: 100vw;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flip-card-back {
  background-color: #000000;
  color: #ffffff;
  transform: rotateY(180deg);
  padding: 24px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: center;
  text-align: center;
}


.text {
  font-size: 1em;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 40px;
}

.namelocation {
  font-size: 0.75em;
  padding-bottom: 10px;
  float: bottom;
}

#editor-section h2, #preview-section h2 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #000000;
}

#saveBtn {
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: rgb(255, 255, 255);
  border: 3px solid black;
  cursor: pointer;
}

#saveBtn:hover {
 background-color:black;
 color:white;
  transition: .2s all ease-in;
}


/* pop up */

input {
    border: 1px solid rgb(0, 0, 0);
    padding: 10px;
}

#popup{
    display: none;
}
.popup-container{
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    z-index: 1000;
    top: 0px;
    left: 0px;
}

.popup{
    background-color: #ffffff;
    padding: 2em;
    justify-content: left;
    overflow: auto;
     gap:10vw;
}

#popup-preview-container {
    display: flex;
    justify-content: left;
    flex: 1;
    padding-left: 1em;
    padding-right:1em;
    margin: 20px 0;
}

#popup-preview {
    border: 2px solid #ccc;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* pop up close button*/

.close-popup{
    display: flex;
     height: 1em;
     font-size:2vw;
    justify-content: flex-end;
}

.popup > h2{
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}
.popup > p{
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.popup-btn{
    display: inline-block;
    height:1.2em;
    width:10em;
    font-size:16px;
    text-decoration: none;
    border: 2px solid;
    padding: 15px 15px;
    margin: 200px 0px;
    font-weight:400;
    transition: .2s all ease-in;
}
.popup-btn:hover{
    background-color: rgb(0, 0, 0);
    color: #fff;
}

.form {
  display: flex;
  flex-direction: column; 
  padding-left:2em;
}

#large-input {
  width: 400px;
  height: 50px;
}

/* quilt gallery */

.gallery {
  display: grid;
  /* Creates 6 equal columns that adjust to screen size */
  grid-template-columns: repeat(5, 1fr); 
  gap: 0px; /* Space between the squares */
  padding: 0px;
}

.square {
  aspect-ratio: 1 / 1; /* Forces the div to be a perfect square */
  overflow: hidden;
}

.square img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crops image to fill the square perfectly */
  display: block;
}