@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body, html {
    height: 100%;
    width: 100%;
    background-color: #FAF9FA;
    font-family: 'Poppins';
}

/* scrollbar styling */

  /* width */
  ::-webkit-scrollbar {
    width: 10px;
  }
  
  /* Track */
  ::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: #888;
  }
  
  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

/* styling for header, and card items */

header {
    display: flex;
    justify-content: center;
    padding-top: 10px;
    width: 1000px;
    margin: 0 auto;
}

header h1 {
    text-transform: uppercase;
    font-size: 60px;
}

.title {
    font-size: 16px;
    color: #707070e1;
}

.desc {
    font-size: 14px;
    color: #707070e1;
    margin-left: 10px;
}

.value, .new-value {
    font-weight: bold;
}

.value {
    font-size: 20px;
}

.new-value {
    margin-left: 10px;
    font-size: 18px;
}

.cases-t {
    color: #3333ff;
}

.recovered-t {
    color: green;
}

.deaths-t {
    color: red;
}

.cards {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 1000px;
    margin: 0 auto;
}

.card-items {
    display: flex;
    margin-top: 30px;
    width: 700px;
    justify-content: space-around;
}

.item {
    width: 200px;
    height: 150px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 10px 10px rgb(0 0 0 / 10%);
    background-color: #fff;
    border: 1.5px solid #dadce0;
}

/* styling for modal to search/select countries */

.wrapper {
    width: 1000px;
    margin: 0 auto;
    margin-top: 30px;
    margin-bottom: -100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.country {
    margin: 10x auto;
    text-align: center;
}

.country span {
    cursor: pointer;
}

.searchbar {
    margin: 30px auto;
}

.searchcountry {
    width: 100%;
    padding: 5px 10px;
    font-family: 'Poppins';
}

.search {
    font-size: 14px;
}

.country-name {
    font-size: 28px;
}

.change-country {
    position: relative;
    height: 400px;
}

.search-container {
    width: 300px;
    height: 380px;
    margin: 0 auto;
    background-color: #fff;
    border: 1.5px solid #dadce0;
    padding: 10px;
    opacity: 0;
    position: relative;
    transition: all .5s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    top: -50%;
    z-index: -1;
}

.search-show {
    opacity: 1;
    top: 52%;
    z-index: 1;
}

.hide {
    display: none;
}

.exit {
    color: #404040;
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 25px;
    cursor: pointer;
}

.country-list {
    overflow-Y: scroll;
    width: 280px;
    height: 250px;
    cursor: pointer;
    font-size: 18px;
    display: none;
}

.country-show {
    display: inline-block;
}

.country-list ul {
    list-style-type: none;
}

/* styling for chart.js */

.chart{
    width: 80%;
    height: 65vh;
    min-height: 500px;
    margin: 80px auto;
    padding: 50px 0;
}

/* media queries */

@media screen and (max-width: 860px) {
    header {
        width: 100%;
    }

    header h1 {
        font-size: 40px;
    }

    .cards {
        width: 80%;
    }

    .card-items {
        flex-direction: column;
    }

    .item {
        margin-top: 10px;
        width: 100%;
        height: 130px;
    }

    .wrapper {
        width: 100%;
    }
}
