/* var */
:root {
  --primary-color: rgb(248, 248, 248);
  --secondary-color-white: white;
  --button-color-blue: #359ff5;
  --button-color-red: #c7756e;
  --button-color-green: #57bd83;
  --button-color-orange: #f3ae18;
  --border-color-gray: #a0aec0;
}

/* reset all default elements */

html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  padding: 5px;
  text-decoration: none;
  background: #8eaccd;
}

:focus {
  outline: none;
}

/* base styles */

main {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.shape {
  background-color: var(--primary-color);
  padding: 30px;
  border-radius: 50px;
  border: none;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
    rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
}

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-content {
  background-color: var(--secondary-color-white);
  padding: 20px;
  color: black;
  border-radius: 20px;
  border: 1px solid var(--border-color-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-grow: 1;
}

.card-item {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
}

.card-item > button {
  background-color: var(--button-color-red);
  font-size: 15px;
  color: var(--secondary-color-white);
  padding: 5px;
  font-weight: bold;
  border: none;
  width: 100px;
  border-radius: 20px;
}

#buttonFinished {
  background-color: var(--button-color-green);
}

.card-button {
  display: flex;
  flex-direction: row;
  margin-top: 20px;
}

.card-button > button {
  background: none;
  border: none;
}

i {
  transition: color 0.3s ease;
}

i:hover {
  color: orange;
}

.card-item > h3,
p {
  margin: 0;
  padding: 0;
}

.card-image > img {
  width: 50%;
  border-radius: 10px;
  object-fit: cover;
}

input[type="text"],
input[type="number"] {
  margin-top: 5px;
  width: 100%;
  padding: 5px;
  border-radius: 10px;
  border-color: none;
  border-width: 0;
  gap: 20px;
  background-color: var(--secondary-color-white);
  border: 1px solid var(--border-color-gray);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px unset inset;
  transition: background-color 5000s ease-in-out 0s;
}

label {
  text-align: left;
}

#reading-books {
  width: 80%;
}

/* font styles */

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

h1 {
  font-size: 2rem;
  margin: 0;
}
h2 {
  font-size: 1.4rem;
  margin: 0;
}
h3 {
  font-size: 1.5rem;
  margin: 0;
}
p {
  font-size: 1rem;
  margin: 0;
}

h1,
h2,
label,
p {
  color: #333;
}

.empty-searchContent h6 {
  font-weight: bold;
}

#titleQuotes {
  font-weight: 400;
}

#readEmptyContent {
  font-weight: 300;
  font-size: 15px;
}

#finishEmptyContent {
  font-weight: 300;
  font-size: 15px;
}

/* mobile styles */

.container-form {
  display: flex;
  flex-direction: column;
}

.container-form header {
  text-align: center;
  margin-bottom: 20px;
}

.form-button {
  margin-top: 20px;
  text-align: center;
}

.form-button button {
  margin-top: 20px;
  padding: 5px;
  width: 100px;
  background-color: var(--button-color-blue);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 15px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.form-button > button:hover {
  background-color: #0056b3;
}

.container-editForm button {
  background-color: #27ae60;
}

.container-editForm button:hover {
  background-color: #1e8449;
}

.container-editForm button:last-child {
  background-color: #e74c3c;
}

.container-editForm button:last-child:hover {
  background-color: #c0392b;
}

.wrapper {
  font-size: 20px;
  text-align: center;
}

.container-editForm > h2 {
  text-align: center;
}

.container-editForm {
  display: none;
  background-color: #f7f7f7;
  margin: 10% auto;
  padding: 20px;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  border: 1px solid var(--border-color-gray);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#editBookForm {
  margin-top: 20px;
}

.modal-content {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.search-container {
  background-color: var(--secondary-color-white);
  display: flex;
  justify-content: space-between;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--border-color-gray);
}

.search-container > i {
  position: relative;
  right: 10px;
}

.search-container > input {
  width: 90%;
  border: none;
  outline: none;
  background-color: transparent;
}

.search-container > input::-webkit-search-cancel-button {
  background-color: transparent;
  visibility: hidden;
}

.search-container > button {
  background-color: transparent;
  border: none;
}

#clearSearchButton {
  background-color: var(--button-color-orange);
  transition: background-color 0.3s ease;
  padding: 5px;
  width: 100px;
  border: none;
  outline: none;
  color: white;
  border-radius: 20px;
  margin-top: 20px;
}

#clearSearchButton:hover {
  background-color: #c47c18;
}

.container-search {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.footer-container {
  text-align: center;
  font-weight: 100;
  padding: 20px;
}

.footer-container p {
  font-size: 13px;
}

/* Tablet Styles */

@media screen and (min-width: 620px) {
  .card-content {
    flex-direction: row;
    gap: 20px;
  }

  .card-item {
    align-items: unset;
    text-align: left;
    max-width: 80%;
  }

  .card-image > img {
    width: 120px;
  }

  .card-button {
    margin-top: unset;
  }
}

/* laptop styles */

@media screen and (min-width: 1024px) {
  body {
    height: 100%;
    margin-top: 70px;
  }
  h1 {
    font-size: 40px;
  }

  main {
    display: grid;
    place-content: center;
    grid-template-areas:
      "form form  search"
      "notread  read  search"
      "footer footer footer";
    grid-template-columns: repeat(auto-fit, 350px);
  }

  h2 {
    font-size: 25px;
  }

  .shape {
    padding: 25px;
  }

  .card-content {
    padding: 10px;
    gap: 10px;
    max-height: 10%;
  }

  .card-item > h3 {
    font-size: 15px;
  }

  .card-item {
    width: 800px;
  }

  .card-button {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .card-item > button {
    width: 100%;
    height: 100%;
    font-size: 10px;
  }

  .container-form {
    grid-area: form;
  }

  .container-search {
    grid-area: search;
  }

  .container-unfinished {
    grid-area: notread;
  }

  .container-finished {
    grid-area: read;
  }

  .container-searchResults {
    /* place-content: center; */
    height: 100%;
  }

  .empty-searchContent {
    height: 100%;
    place-content: center;
  }

  .footer-container {
    grid-area: footer;
  }
}

/* Dekstop */

@media screen and (min-width: 1200px) {
  body {
    height: max-content;
  }

  main {
    place-content: center;
    grid-template-columns: repeat(3, 400px);
  }
}
