/* css reset */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

#root, #__next {
  isolation: isolate;
}

/* main css */

nav {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid black;
    padding:1em 2em;
    position:sticky;
    top:0;
    background-color: white;
}

nav h1 {
  font-size: 32px;
}

nav button {
    display: flex;
    align-items: center;
    font-weight: bold;
    gap:1em;
    border-radius: 40px;
    padding: 0.5em 1em;
    border: 1px solid black;
    background-color: black;
    color:white;
    stroke:#FFFFFF;
}

nav button:hover{
    background-color: white;
    color:black;
    cursor: pointer;
    stroke:#000000;
}

dialog{
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1em;
  border: 0;
  border-radius: 10px;
  width: 400px;
}

dialog form {
  display: flex;
  flex-direction: column;
}

dialog .add {
  margin: 0 auto;
  margin-top: 1em;
  width: 50%;
  border-radius: 10px;
  border: solid 1px black;
  background: black;
  color: white;
}

dialog .close {
  border-radius: 10px;
  border: solid 1px black;
  background: black;
  stroke: #FFFFFF;
  color: white;
  display: flex;
  align-items: center;
}

dialog button:hover{
  background-color: white;
  color: black;
  cursor: pointer;
  stroke:#000000;
}

dialog button:active{
  background-color:lightgray;
  color:black;
}
dialog input,
dialog select {
  border: solid 1px black;
  border-radius: 4px;
}

form .close-container {
    display: flex;
    justify-content: end;
}

.cards-container {
  display: grid;
  padding: 1em 1em 0 1em;
  grid-template: 1fr 1fr/ 1fr 1fr 1fr 1fr;
  gap:1em;
}

.book-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid black;
  width: 100%;
  height: 300px;
  padding: 1em;
}

.book-card p{
  font-weight: 500;
}

.book-card .title{
  margin-bottom: -8px;
}

.book-card .author{
  opacity: 70%;
  margin-bottom: 1em;
}

.book-card .pages {
  font-size: 24px;
}
.book-card .button-container {
  display: flex;
  justify-content: center;
}

.book-card .status-selector {
  border: 0.5em solid #000000;
  border-left-width: 1em;
  border-right-width: 1em;
  background-color: black;
  color: white;
  font-weight: 600;
  width:200px;
}

@media screen and (max-width:1500px) {
  .cards-container{
    grid-template: 1fr 1fr/ 1fr 1fr 1fr
  }
}

@media screen and (max-width:1200px) {
  .cards-container{
    grid-template: 1fr 1fr/ 1fr 1fr
  }
}

@media screen and (max-width:700px) {
  .cards-container{
    grid-template: 1fr 1fr/ 1fr
  }
}