@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap");

:root {
  font-size: 62.5%;

  --ff-primary: "Poppins", sans-serif;
  --text-color: #e1e1e6;

  --hue: 194;
  --primary-color: #092d38;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============== SCROLL BAR =================*/
/* Works on Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #4a808c;
}

/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
  position: absolute;
  width: 8px;
  right: 10px;
}

*::-webkit-scrollbar-thumb {
  background-color: #4a808c;
  border-radius: 20px;
  border: 3px solid #4a808c;
}
/* ============== SCROLL BAR =================*/

body {
  font-size: 1.6rem;
  color: var(--text-color);
  background-color: #000;
}

body * {
  font-family: var(--ff-primary);
}

button {
  border: none;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

#app {
  max-width: 80rem;
  margin-inline: auto;
  padding: 2rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-block: 4rem;
}

header h1 {
  height: 3.2rem;
  font-size: 2rem;
  text-transform: uppercase;
}

.search {
  display: flex;
  align-items: center;
}

.search input {
  height: 3.2rem;
  min-width: 36rem;
  border: none;
  border-right: none;
  border-radius: 0.4rem 0 0 0.4rem;
  padding-inline: 0.8rem;
  margin-right: 1.6rem;
  background-color: #06181c;
  color: #7c7c8a;
}

.search button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;

  color: #fff;
  font-weight: bold;

  height: 3.2rem;
  padding: 1.6rem;
  background-color: var(--primary-color);
  border-radius: 0.4rem;

  transition: filter 0.3s;
}

.search button:hover {
  filter: brightness(0.85);
}

.table-wrapper {
  max-height: 40rem;
  margin-top: 7rem;
  border: 1px solid var(--primary-color);
  border-radius: 1.2rem;

  overflow-x: hidden;
  overflow-y: scroll;
}

.table-wrapper.empty {
  max-height: initial;
  overflow-y: initial;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table.empty {
  min-height: 40rem;
}

table * {
  font-size: 1.4rem;
  color: var(--text-color);
}

table tfoot {
  height: 100%;
}

table tfoot td {
  width: 100%;
}

.empty.true {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
}

.empty.false {
  display: none;
}

table th {
  background-color: var(--primary-color);
  text-align: left;
  padding: 1.5rem;
}

table td {
  padding: 1.5rem;
  text-align: left;
}

tbody tr {
  border: 1px solid var(--primary-color);
}

table tr:nth-child(odd) {
  background-color: #030b0d;
}

table tr:nth-child(even) {
  background-color: #4a808c36;
}

td.user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

td.user img {
  width: 5rem;
  height: 5rem;

  object-fit: cover;
  border-radius: 50%;
}

td.user a {
  text-decoration: none;
}

td.user a p {
  font-weight: bold;
}

td .remove {
  background: none;
  cursor: pointer;
  color: tomato;

  transition: transform 0.2s;
}

@media (max-width: 760px) {
  header {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 3.2rem;
  }

  header .col-b {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .search input {
    min-width: initial;
    flex-grow: 1;
  }

  .table-wrapper {
    margin-top: 5rem;
  }
}

@media (max-width: 500px) {
  header .col-b span {
    display: none;
  }
}
