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

:root {
  --white: #fff;
  --silver: #c3baba;
  --platinum: #e9e3e6;
  --dimGray: #736f72;
  --taupeGray: #9a8f97;
  --silverT: #b2b2b2;
  --skyBlue: #7dbbc3;
  --lightCyan: #dffdff;
  --blue: #b2cede;
}

html {
  font-size: 62.5%;
  font-family: "Roboto", sans-serif;
}

body {
  background: var(--taupeGray);
  display: grid;
  width: 100%;
  height: 100vh;
  grid-template-areas:
    "logIn logIn"
    "sideBar mainContent"
    "sideBar mainContent"
    "footer footer";
  grid-template-columns: minmax(300px, 1fr) 3fr;
  grid-template-rows: 50px 2fr 2fr 50px;
  gap: 1em;
  padding: 1em;
}

/* Login Section styles */

.logIn {
  grid-area: logIn;
  background-color: var(--platinum);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.welcome {
  font-size: 1.8em;
  font-weight: 500;
}

.logo {
  height: 5.25rem;
}

.user_login {
  display: flex;
}

.login_input {
  border: none;
  width: 12rem;
  margin-right: 1rem;
  border-radius: 10rem;
  text-align: center;
  font-size: 1.6rem;
  padding: 0.5rem 2rem;
  border: 1px solid var(--white);
  transition: all 0.3s;
}

.login_input:focus {
  outline: none;
  border: 1px solid #ccc;
}

.login_btn {
  border: none;
  cursor: pointer;
  background-color: var(--skyBlue);
  font-size: 2.2rem;
  color: inherit;
  transition: all 0.3s;
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 50%;
}

.login_btn:hover {
  background-color: var(--dimGray);
}

.sideBar {
  grid-area: sideBar;
  background-color: var(--blue);
  border-radius: 8px;
  padding: 1em;
}

.open-modal {
  /* background-color: var(--dimGray); */
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  margin-bottom: 1em;
}

.open-modal:hover {
  background-color: var(--dimGray);
}

.add {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  font-size: 1.8em;
  color: var(--white);
}

.add span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-align: center;
  align-content: center;
  background: var(--skyBlue);
}

.modal {
  width: 100%;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--white);
  position: relative;
  padding: 0.75em;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.modal:target {
  opacity: 1;
  pointer-events: auto;
}

.close-btn {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  border: none;
  font-size: 1.8em;
  padding: 4px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.modal-input {
  width: 100%;
  padding: 0.75em;
  margin-bottom: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1.6em;
}

select {
  width: 100%;
  padding: 1rem;
  font-size: 1.6rem;
  border-radius: 1rem;
  border: 2px solid var(--dimGray);
}

select option {
  padding: 1rem;
  background-color: var(--white);
}

.wrapper {
  display: flex;
  margin-top: 2em;
  justify-content: center;
}

.btn {
  width: 12ch;
  padding: 0.75rem;
  border-radius: 8px;
  background-color: var(--blue);
  cursor: pointer;
  font-size: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.books-count {
  background-color: var(--white);
  margin-top: 1em;
  border-radius: 8px;
  padding: 0.75em;
  font-size: 1.4em;
}

.books-count p {
  line-height: 1.4;
  text-transform: uppercase;
  font-weight: 500;
}

/* Main Content styles */

.mainContent {
  grid-area: mainContent;
  background-color: var(--silverT);
  border-radius: 8px;
  font-size: 1.6rem;
  display: grid;
  place-items: center;
}

table {
  table-layout: fixed;
  width: 100%;
  /* border: 3px solid purple; */
  border-collapse: collapse;
}

caption {
  font-family: "Rock Salt", cursive;
  font-size: 1.3rem;
}

thead th:nth-child(1) {
  width: 5%;
}

thead th:nth-child(2) {
  width: 25%;
}

thead th:nth-child(3) {
  width: 25%;
}

thead th:nth-child(4) {
  width: 15%;
}

thead th:nth-child(5) {
  width: 10%;
}

thead th:nth-child(6) {
  width: 10%;
}

thead th:nth-child(7) {
  width: 10%;
}

th,
td {
  padding: 0.5rem;
  text-align: center;
}

thead {
  background-color: var(--dimGray);
  color: var(--white);
}

tbody td {
  text-align: center;
}

tbody button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.8rem;
}

tbody tr:nth-child(even) {
  background-color: var(--platinum);
}

.footer {
  grid-area: footer;
  background-color: var(--platinum);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silverT);
}

footer p {
  font-size: 1.6rem;
  text-align: center;
}

@media (max-width: 768px) {
  body {
    grid-template-areas:
      "logIn"
      "mainContent"
      "sideBar"
      "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .open-modal {
    width: 80px;
    height: 80px;
  }

  .add {
    font-size: 1.4em;
  }
}
