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

* {
  margin: 0;
  padding: 0;
}

::backdrop {
  background-color: #7eacc9;
  opacity: 0.4;
}

dialog:open {
  background-color: #fff;
  color: #242424;
  padding: 1rem 1.3rem;
  font-size: 1.1rem;
  margin: auto;
  height: 355px;
  width: 300px;
  border: none;
  border-radius: 10px;
  box-shadow: 5px 5px 5px rgba(163, 163, 163, 0.233);
}

.dialog-form p:nth-of-type(1),
.dialog-form div {
  font-size: 1.2rem;
  align-self: center;
}

.dialog-form button {
  font-size: 0.9rem;
  color: #fff;
  padding: 0.7rem;
  border: none;
  border-radius: 10px;
}

.dialog-form button:nth-of-type(1) {
  background-color: #2424247c;
}

.dialog-form button:nth-of-type(2) {
  background-color: #1f941f;
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-form input {
  font-size: 0.9rem;
  background-color: #e4e4e4;
  padding: 7px;
  border: 1px solid lightgray;
  border-radius: 10px;
}

.dialog-form input:hover,
.dialog-form input:focus {
  background-color: #ffe9ed;
  outline: none;
}

.dialog-form input[type='checkbox'] {
  height: 20px;
  vertical-align: bottom;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  background-color: #87cefa;
  color: #242424;
  display: grid;
  grid-template-rows: 120px 1fr;
}

header {
  display: flex;
  align-items: center;
  background-color: #fff;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  box-shadow: 5px 5px 5px rgba(163, 163, 163, 0.233);
}

header button {
  background-color: #1f941f;
  color: #fff;
  font-size: 1rem;
  padding: 1rem 0.8rem;
  border-radius: 10px;
  border: none;
  box-shadow: 5px 5px 5px rgba(163, 163, 163, 0.233);
}

header button:active,
header button:hover,
.dialog-form button:hover,
.dialog-form button:active {
  background-color: #87cefa;
}

.main-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, 200px);
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.main-content .no-books-message {
  font-size: 1.2rem;
  text-align: center;
  color: #fff;
}

.book-card {
  display: grid;
  grid-template-rows: max-content 1fr;
  padding: 0.8rem;
  background-color: #fff;
  color: #242424;
  width: 200px;
  height: 300px;
  font-style: italic;
  border-radius: 10px;
  box-shadow: 5px 5px 5px rgba(153, 153, 153, 0.404);
}

.book-card .remove-btn {
  background-color: transparent;
  justify-self: end;
  border: none;
  width: 1.2rem;
}

.remove-btn svg {
  fill: red;
}

.remove-btn svg:hover,
.remove-btn svg:focus {
  background-color: red;
  fill: #ffe9ed;
  border-radius: 10px;
}

.book-card h2 {
  text-align: center;
}

.book-card .info {
  display: flex;
  flex-direction: column;
}

.info p:last-of-type {
  display: inline-block;
}

.status-btn {
  padding: 0.5rem;
  margin-top: 10px;
  border-radius: 10px;
  border: none;
  background-color: rgb(255, 212, 219);
  font-size: 0.9rem;
}

.status-btn:hover,
.status-btn:active {
  background-color: #87cefa;
  color: #fff;
}
