/*                  FONTS                    */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;500;900&display=swap');

/*                    GENERAL                     */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}


body {
  background-color: #ededed;
}

/* aside {
  height: 100vh;
} */

/* main {
  height: 100vh;
} */

.fadeIn {
  animation: fade 0.5s ease-in-out;
}

@keyframes fade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Buttons hover */
.main-btn:hover {
  background-color: #f16362;
}

/*                    HEADER                      */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  background-color: #fdfdfd;
  max-width: 1200px;
  width: 100%;
  height: 60px;

  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* -------- LOGO -------- */

.logo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 20px;
  text-decoration: none;
  cursor: pointer;
}

.logo img {
  width: 60px;
}

.logo p {
  font-weight: bold;
  color: #d12222;
}

/* -------- NAV -------- */

/* nav {
} */

nav ul {
  display: flex;
  align-items: center;
}

nav ul li {
  list-style: none;
}

nav ul li:last-child {
  padding-right: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #d12222;
  padding: 10px;

}

nav ul li a:hover,
#log-out-btn:hover {

  position: relative;
  top: 1px;
  color: #a00606;
  box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: inset 0px 0px 2px 0px rgba(0, 0, 0, 0.75);
}

#log-out-btn {
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0);
  border: 0px;
  text-decoration: none;
  color: #d12222;
  padding: 10px;
}




/*                      MAIN                      */

main {
  max-width: 1200px;
  margin: 0 auto;
}

/* -------- BG IMAGE -------- */

.stats {
  width: 100%;
  background-color: #f7f7f7;
}

/* -------- LATEST REPORT -------- */

.latest-report {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin: 0 auto;
  padding-top: 50px;
  width: 80%;

  color: #fff;
}

.stats-cards {
  width: 100%;
  height: 100%;
  margin: 0.5rem;
}

.country {
  display: grid;
  column-gap: 2rem;
}

.name {

  grid-column: 1 / span 3;

  border-bottom: 1px solid #ff7675;
  color: #ff7675;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}


.change-country,
.change-global {
  cursor: pointer;

  padding: 0.5rem;
  width: fit-content;
  border: 1px solid #f3f2f2;
  border-radius: 8px;
  background-color: #ff7675;
  color: #ffffff;

}

.title,
.country-1-title,
.country-2-title {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #ffc8c8;
  font-weight: bold;
  color: #7e6c6c;
  font-size: 1.3rem;
}

.total-cases .value,
.deaths .value,
.country-1-value,
.country-2-value {
  color: #7e6c6c;
  font-size: 1.5rem;
  font-weight: bold;
}

.total-cases,
.deaths,
.global {
  height: 150px;
  background-color: #fdfdfd;
  padding: 1rem;
  border: 1px solid #7e6c6c;
  border-radius: 8px;
  box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  -webkit-box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  -moz-box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  overflow: hidden;
}

.global .value {
  color: #7e6c6c;
  font-size: 1rem;
}

.total-cases .new-value,
.deaths .new-value,
.country-1-new-value,
.country-2-new-value {
  color: red;
}

/* -------- CHART -------- */

.chart {
  width: 80%;
  height: 70vh;
  min-height: 500px;

  margin: 0 auto;
  padding: 50px 0;
}

/* -------- SEARCH COUNTRY -------- */

.search-country {
  position: relative;
  top: 40px;
  right: 201px;
}

.search-box,
.search-box1,
.search-box2 {
  position: absolute;
  background-color: #e3605f;

  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 400px;
  height: 30px;
  z-index: 1;
}

#search-input,
#search-input1,
#search-input2 {
  width: 360px;
  height: 25px;

  border: none;
  background-color: #f3f2f2;
  color: #000;

  padding-left: 15px;

  font-size: 1.1rem;
}

.close,
.close1,
.close2 {
  width: 20px;
  padding: 5px;
  cursor: pointer;
}

.country-list,
.country-list1,
.country-list2 {
  display: flex;

  position: absolute;
  top: 30px;

  width: 400px;
  height: 400px;

  background-color: #ff7675;
  opacity: 0.9;

  overflow-y: scroll;
}

.country-list ul,
.country-list1 ul,
.country-list2 ul {
  width: 100%;
}

.country-list ul li,
.country-list1 ul li,
.country-list2 ul li {
  list-style: none;
  cursor: pointer;
  padding: 10px;
  color: rgb(0, 0, 0);
}

.country-list ul li:hover {
  border-left: 1px solid #fff;
  background-color: #f3f2f2;
}

/* SCROLL BAR */

/* width */
::-webkit-scrollbar {
  width: 20px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #727171;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #4a4a4a;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #ee8b8b;
}


/*         Compare Section              */

.compare-countries {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;

  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  background-color: #f7f7f7;
}

.compare-countries>h1 {
  position: relative;
  flex-basis: 100%;
  text-align: center;
  color: #ff7675;
  background-color: #fdfdfd;

  padding: 1rem;
  font-size: 2.2rem;
  font-weight: bold;
}

.country1,
.country2 {
  flex-basis: 45%;
  padding: 1rem;
  height: 500px;
  /* box-shadow: 0px 0px 2px 1px rgb(255 118 117 / 34%);
  -webkit-box-shadow: 0px 0px 2px 1px rgb(255 118 117 / 34%);
  -moz-box-shadow: 0px 0px 2px 1px rgb(255 118 117 / 34%); */
  overflow: hidden;

  width: 100%;
}

#selected-country1,
#selected-country2 {
  border-bottom: 1px solid #ff7675;
  color: #ff7675;
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.change-country1,
.change-country2 {
  cursor: pointer;
  padding: 0.5rem;
  width: fit-content;
  border: 1px solid #f3f2f2;
  border-radius: 8px;
  background-color: #ff7675;
  color: #ffffff;
  padding: 1rem;
}

.country-list1 li,
.country-list2 li {
  list-style: none;
}


.search-country1,
.search-country2 {
  position: relative;
  top: 10px;
}

.search-box1,
.search-box2 {
  position: absolute;
  background-color: #e3605f;

  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 400px;
  height: 30px;
  z-index: 1;
}

.search-input1,
.search-input2 {
  width: 360px;
  height: 25px;

  border: none;
  background-color: #f3f2f2;
  color: #000;

  padding-left: 15px;

  font-size: 1.1rem;
}

.country-1-total-cases,
.country-2-total-cases,
.country-1-deaths,
.country-2-deaths {
  height: 150px;
  background-color: #fdfdfd;
  padding: 1rem;
  margin: 1rem;

  border: 1px solid #7e6c6c;
  border-radius: 8px;
  box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  -webkit-box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  -moz-box-shadow: 0px 0px 2px 1px rgba(163, 162, 162, 0.34);
  overflow: hidden;
}

/* ------------------ SUMMARY ----------------- */

/* TABLE SUMMARY of ALL */
.section-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  background-color: #f7f7f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section-wrapper>h1 {
  width: 100%;
  text-align: center;
  color: #ff7675;
  background-color: #fdfdfd;

  padding: 1rem;
  font-size: 2.2rem;
  font-weight: bold;
}

/*table*/
#countries-stats {
  width: 98%;
  padding: 15px 0;
  margin: 10px 0;
  text-align: center;
  border-spacing: 0;

  background-color: #ff7675;
  border: 1px solid #6c6767;
  border-radius: 10px;
}

#thead-row {
  background-color: #ff7675;
  color: #fafafa;
  text-transform: uppercase;
}


th {
  cursor: pointer;
  padding: 15px 0;
  border: none;
  border-spacing: 0;

}

tr:nth-child(even) {
  background-color: #fafafa;


}

tr:nth-child(odd) {
  background-color: #ededed;
  /* #ffc8c8 */
  color: #242424;
}

tr td {
  padding: 15px 0;
}

.show-summary-btn {
  cursor: pointer;
  margin-top: 1rem;
  padding: 1rem;
  width: fit-content;

  border: 1px solid #f3f2f2;
  border-radius: 8px;
  background-color: #ff7675;
  color: #ffffff;
}

/* Table Sort */

[data-sort]:hover {
  cursor: pointer;
  color: #2e2222;
}

[data-dir="asc"]:after {
  content: ' ↗';
}

[data-dir="desc"]:after {
  content: ' ↘';
}



/* ----------------- ABOUT ------------------------- */

#about {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding-top: 2rem;
  background-color: #f7f7f7;
}

#about>h1 {
  width: 100%;
  text-align: center;
  color: #ff7675;
  background-color: #fdfdfd;
  padding: 1rem;
  font-size: 2.2rem;
  font-weight: bold;
}

#about p {
  padding: 1rem;
  display: inline-block;
  width: 100%;
  text-align: justify;
  font-size: 1rem;
}

/*                    FOOTER                      */

footer {
  max-width: 1200px;
  height: 60px;

  margin: 0 auto;
  background-color: #fdfdfd;

  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.footer-container {
  height: 100%;
  display: flex;
  justify-content: center;
}

.copyright {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.copyright p {
  font-weight: bold;
  color: #e3605f;
}

/* Back To Top Button */

.back-to-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  border-radius: 100%;
  background: #e3605f;
  padding: 0.5rem;
  border: none;
  cursor: pointer;
  opacity: 100%;
  transition: opacity 0.5s;
}

.back-to-top:hover {
  opacity: 60%;
}

.hidden {
  opacity: 0%;
}

.back-to-top-icon {
  width: 2rem;
  height: 2rem;
  color: #e8e8e8;
}


/*----------------------------------- MEDIA QUERIES ----------------------------------------------- */

/*      Screen width < 955px                 */

@media screen and (max-width: 955px) {

  .latest-report {
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .total-cases .value,
  .deaths .value,
  .global .value {
    flex-wrap: wrap;
  }

  .country,
  .total-cases,
  .global,
  .deaths {
    width: 80%;
    display: block;
  }

  .change-country,
  .change-global {
    width: 100%;
    margin-top: 0.5rem;
  }

  .search-country {
    width: 100%;
    top: 0;
    right: 0;
  }

  .country-list,
  .country-list1,
  .country-list2 {
    width: 100%;
  }

  .search-box,
  .search-box1,
  .search-box2,
  .search-input,
  .search-input1,
  .search-input2 {
    width: 100%;
  }
}


/*             SCREEN WIDTH < 600px               */

@media screen and (max-width: 600px) {
  .latest-report {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1rem;
  }

  .country,
  .total-cases,
  .global,
  .deaths {
    width: 100%;
    display: block;
  }

  .country1,
  .country2 {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-basis: auto;
  }

  #countries-stats {
    font-size: small;
  }

  header {
    height: fit-content;
  }

  nav ul {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
  }

  nav ul li {
    padding-top: 0.5rem;
  }

  nav ul li:hover {
    list-style: disc;
  }

  nav a {
    font-size: 1.2rem;
  }

  nav ul li a:hover,
  #log-out-btn:hover {
    color: #242424;
    box-shadow: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
  }

}

.hide {
  display: none;
}