/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/

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

* {
  margin: 0;
}

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;
}

/* General */

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

button {
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  background-color: lightcoral;
  color: white;
}

button:hover,
button:focus {
  cursor: pointer;
  background-color: rgb(219, 52, 52);
}

/* Header */

header  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Main */

main {
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
  height: 100vh;
}

.book-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 300px));
  grid-template-rows: minmax(250px, 1fr);
  grid-auto-rows: minmax(250px, 1fr);
  gap: 1rem;
}

.book-container > div {
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid salmon;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  background-color: #fff;
}

.text-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-container > button {
  width: 100px;
}

/* Dialog */

dialog {
  border-radius: 15px;
  margin: 3rem auto;
  padding: 2rem;
  border: 1px solid salmon;
}

.dialog-title {
  text-align: center;
  margin-bottom: 1rem;
}

dialog > form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  /* align-items: center; */
  /* width: 300px */
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-row > input {
  border-radius: 5px;
  border: 1px solid gray;
}

.form-row.checkbox,
.form-row.btn {  
  flex-direction: row;
  gap: 1rem;
}

.form-row > button {
  width: 150px;
}
