/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* 2. Remove default margin */
  *:not(dialog) {
    margin: 0;
  }
  
  /* 3. Enable keyword animations */
  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
    }
  }
  
  body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
  }
  
  /* 6. Improve media defaults */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  
  /* 7. Inherit fonts for form controls */
  input, button, textarea, select {
    font: inherit;
  }
  
  /* 8. Avoid text overflows */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  
  /* 9. Improve line wrapping */
  p {
    text-wrap: pretty;
  }
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }
  
  /*
    10. Create a root stacking context
  */
  #root, #__next {
    isolation: isolate;
  }

/* custom css */
body{
    background-color: rgb(35, 38, 64);
    color: aliceblue;
    padding: 1rem;
}
h1{
    text-align: center;
    margin: 1rem;
    text-transform: uppercase;
}

.card-container{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 5rem;
    margin: 1rem;
    border: 1px solid black;
    background-color: cornsilk;
}

.book-card{
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.311);   
    border: 1px solid black;
    color: black;
    background-color: rgb(255, 234, 176);
    padding: 1rem;
    display: grid;
    grid-template-columns:  1fr;
    gap: 1rem;
    max-width: 400px;
    border-radius: 15px;
}

.btn-div{
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 0.3rem;
    padding: 0 2rem;
}

.book-title{
    font-size: 2rem;
    justify-self: center;
}

.book-author{
    font-size: 1.2rem;
    justify-self: center;
}

.book-published-date{
    color: aliceblue;
    font-style: italic;
    border-radius: 100px;
    background-color: rgb(66, 77, 76);
    text-shadow: 1px 1px 0px rgb(252, 233, 224);
    padding: 0.5rem 1rem;
    width: fit-content;
    height: fit-content;
    justify-self: center;
}

.cta-div{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.read{
    color: wheat;
    background-color: green;
}

dialog{
  background-color: rgb(133, 204, 226);
}
form{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: start;

}

.input-form > div {
  display: grid;
}

.input-form > div:nth-child(4){
  grid-template-columns: repeat(2 , 1fr);
  gap: 1rem;
  justify-items: start;
}

.input-form > div > label{
  font-weight: bold;
}

.invalid{
    border: 1px solid red;
}

.valid{
    border: 1px solid green;
}

span.valid{
  display: none;
}

span{
  min-height: 0.8rem;
  font-size: 0.8rem;
}