@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css");

/* ?Global declarations */
* {
  box-sizing: border-box;
  margin: 0;
  font-family: 'Noto Sans', sans-serif;
}

body {
  background-color: #e4e4e4;
}

:root {
  --color-red: #f44336;
  --color-blue: #2296f3;
  --color-green: #2f9688;
  --color-yellow: #fe9a3b;
}

.heading {
  font-weight: 300;
  padding-block: 0.5rem;
}

.backdrop {
  background-color: rgb(141, 141, 141, 0.6);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: none;
  z-index: 10;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-weight: 300;
  font-size: 0.9rem;
}

table td {
  padding-block: 0.5rem;
}

table tr:nth-child(odd) {
  background-color: rgb(228, 228, 228);
}

table tr:nth-child(even) {
  background-color: rgb(255, 255, 255);
}


/* ?Header */
header {
  width: 100%;
  height: 7vh;
  background-color: rgb(0, 0, 0);
  color: aliceblue;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 300;
  position: fixed;
  top: 0;
  z-index: 100;
}

.toggle-handler {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding-inline: 0.8rem 1.2rem;
  cursor: pointer;
}

.toggle-button {
  border: none;
  background-color: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  height: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.toggle-handler:hover {
  background-color: rgb(45, 45, 45);
}

.toggle-button__bar {
  display: block;
  width: 1rem;
  height: 0.1rem;
  background-color: #fff;
  border-radius: 20px;
}

.logo {
  margin-right: 1rem;
}


/* ?Side navigation bar*/
.main-nav {
  z-index: 100;
  position: fixed;
  background-color: #ffffff;
  top: 7vh;
  left: 0;
  height: 93vh;
  width: 300px;
  box-shadow: 0px 0px 10px grey;
  display: none;
}

.main-nav__avatar {
  padding-block: 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgb(207, 207, 207);
  display: flex;
  justify-content: space-around;
}

.main-nav__avatar-image {
  border: 1px solid grey;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
}

.main-nav__avatar-image img {
  width: 3rem;
}

.main-nav__avatar-description p {
  padding-bottom: 0.5rem;
  font-weight: 300;
}

.main-nav__avatar-description i {
  padding-inline: 1rem;
}

.dashboard {
  font-size: 1.5rem;
  font-weight: 400;
  padding: 1.5rem 0 0.5rem 1rem;
}

.main-nav__item {
  display: block;
  text-decoration: none;
  color: black;
  font-weight: 300;
  padding: 0.8rem 1rem;
}

.main-nav__item i {
  padding-right: 0.5rem;
}

.main-nav__item:hover {
  background-color: rgb(199, 199, 199);
}


/* ?dashboard section */
.dashboard-section {
  padding: 1rem;
  margin-top: 7vh;
}

.dashboard-section__heading {
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.dashboard-section__dashboard-items {
  display: flex;
  flex-direction: column;
}

.dashboard-section__dashboard-item {
  background-color: rgb(110, 110, 110);
  color: white;
}

.messages {
  background-color: var(--color-red);
}

.views {
  background-color: var(--color-blue);
}

.shares {
  background-color: var(--color-green);
}

.users {
  background-color: var(--color-yellow);
}

.dashboard-icon {
  display: inline-block;
  font-size: 3rem;
  padding: 1rem 0 0 1rem;
}

.dashboard-number {
  float: right;
  padding: 2rem 1rem 0 0;
  font-size: 1.5rem;
  font-weight: 300;
}

.dashboard-type {
  padding: 1rem 0 1.5rem 1rem;
  font-size: 1.2rem;
  font-weight: 300;
}


/* ?Regions and feeds */
.region-feeds-section {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.regions img {
  width: 100%;
}

.feeds-table td:nth-child(1) {
  padding-inline: 1rem 0.8rem;
}

.feeds-table .bi {
  font-size: 1rem
}

.feeds-table .red {
  color: var(--color-red);
}

.feeds-table .blue {
  color: var(--color-blue);
}


/* ?General Stats */
.general-stats-section {
  padding: 1rem;
  font-weight: 300;
}

.general-stats-section :not(.heading) {
  font-size: 0.9rem;
}

.general-stat {
  padding-block: 1rem 0.5rem;
}

.general-stat__bar-outer {
  height: 1.5rem;
  background-color: rgb(214, 214, 214);
  border-radius: 20px;
}

.general-stat__bar-inner {
  height: 100%;
  text-align: center;
  border-radius: 20px;
  color: white;
  display: grid;
  place-items: center;
}

.bar25 {
  width: 25%;
  background-color: var(--color-green);
}

.bar50 {
  width: 50%;
  background-color: var(--color-yellow);
}

.bar75 {
  width: 75%;
  background-color: var(--color-red);
}


/* ?Countries section */
.countries-section {
  padding: 1rem;
}

.countries-data tr {
  border: 1px solid rgb(195, 195, 194);
}

.countries-data td:nth-child(1) {
  padding-left: 2rem;
}

.general-section__button {
  padding: 0.3rem 0.6rem;
  border: none;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  background-color: rgb(73, 73, 73);
  color: white;
}

.general-section__button:hover {
  background-color: rgb(189, 189, 189);
  color: black;
}


/* ?comments section */
.comments-section {
  padding: 1rem;
}

.comments {
  display: grid;
}

.commentor-image {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  overflow: hidden;
}

.commentor-image img {
  width: 6rem;
  height: 6rem;
}

.commentor-comment {
  padding-inline: 1rem;
}

.user-name {
  font-size: 1.2rem;
  font-weight: 400;
  padding-block: 1rem;
}

.date-time-of-comment {
  font-weight: 300;
  font-size: 0.8rem;
}

.user-comment {
  font-weight: 300;
  padding: 0 0 1.5rem 1rem;
}


/* ?Other section */
.other-section {
  padding: 2rem;
  background-color: rgb(82, 82, 82);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.other-section__content-topic {
  font-size: 1.2rem;
  font-weight: 400;
}

.other-section__content-list {
  font-weight: 300;
  list-style-type: none;
  padding: 0.2rem 0 1.2rem 0;
}

.other-section__content-list li {
  padding: 0.5rem 0.8rem;
}

.demographic {
  border-bottom: 0.4rem solid var(--color-green);
}

.system {
  border-bottom: 0.4rem solid var(--color-red);
}

.target {
  border-bottom: 0.4rem solid var(--color-yellow);
}

/* ?Footer section */
.footer-section {
  background-color: black;
  color: rgb(255, 255, 255);
  text-align: center;
  padding-block: 0.8rem;
  font-size: 0.8rem;
}

.go-to-top {
  border: none;
  padding: 0.2rem 1.5rem;
  cursor: pointer;
}

.go-to-top:hover {
  background-color: rgb(177, 177, 177);
}

.footer__icons {
  margin-block: 0.6rem 0.3rem;
}

.footer__icons a {
  color: aliceblue;
  padding-inline: 0.5rem;
}

.footer__icons i:hover {
  color: rgb(158, 158, 158);
}


/* ?Tablet code */
@media (min-width:38rem) {
  .dashboard-section__dashboard-items {
    flex-direction: row;
    justify-content: space-between;
  }

  .dashboard-section__dashboard-item {
    width: calc(25% - 0.5rem);
  }

  .region-feeds-section {
    flex-direction: row;
  }

  .regions {
    width: 60%;
  }

  .feeds {
    width: 100%;
    margin-left: 0.5rem;
  }

  .comments {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
  }

  .commentor-image {
    align-self: center;
  }

  .other-section {
    flex-direction: row;
    justify-content: space-between;
  }

  .other-section__content {
    width: calc(33% - 1rem);
  }
}


/* ?Desktop code */
@media (min-width:62rem) {

  .main-nav {
    display: block;
  }

  .toggle-handler {
    visibility: hidden;
  }
  
  main,
  footer {
    margin-left: 300px;
  }
}