/* 🌍 General */

:root {
  --monospaceFont: 'IBM Plex Mono', monospace;
  --sansSerifFont: 'Inter', 'Helvetica', sans-serif;

  --font20: 1.25rem;
  --font16: 1rem;
  --font14: .875rem;
  --font13: .8125rem;

  --colDark: #0c0c0c;
  --colFont: #222222;
  --colDivLines: #cecece;
  --colBg: #f2f2f2;
  
  --colPlaceholder: #a6a6a6;
  --colBgInput: #ebebeb;
  --colInputLine: #c8c8c8;

  --colInfo: #40ce9b;
  --colError: #cb4343;
}

* {
  box-sizing: border-box;
}

body, html, .app {
  height: 100%;
  margin: 0;
}

body {
  background-color: var(--colBg);
  font-family: var(--monospaceFont);
}


img {
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 🗺️ Header */

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1240px;
  margin: 2rem auto 9rem auto;
  padding: 0 1rem;
}

.search {
  position: relative;
}

.search img {
  position: absolute;
  top: .65rem;
  left: .6rem;
}

.search input {
  border: none;
  border-bottom: 1px solid var(--colInputLine);
  background: none;
  padding: .5rem;
  padding-left: 2.2rem;
  width: 26ch;

  font-size: var(--font16);
  font-family: var(--monospaceFont);
}

.search input::placeholder {
  color: var(--colPlaceholder);
}

.search input:focus {
  outline: none;
}

.registration {
  display: flex;
  gap: 1rem;
}

.hamburgerIcon {
  display: none;
}


/* 🖱️ Buttons */

button {
  color: col(--colFont);
  font-family: var(--monospaceFont);
  font-size: var(--font14);
  padding: .5rem .8rem;
  border: none;
  background: none;
  border-radius: 0;
  cursor: pointer;
}

button.primary {
  background-color: white;
}

/* 📰 Main feed */

main {
  max-width: 1240px;
  padding: 0 1rem;
  margin: 0 auto;
}

.filters {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 
  2rem;
  margin-bottom: 4rem;
}

.filters > p {
  margin: 0;
  font-size: var(--font14);
}

.toggle-buttons input[type="radio"]{
  display: none;
}

.toggle-buttons label {
  font-size: var(--font14);
  padding: .5rem;
  color: var(--colFont);
  cursor: pointer;
  display: inline-block;
}

.toggle-buttons input[type="radio"]:checked + label {
  background-color: white;
  font-weight: 500;
}

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem 3rem;
}

.post .top {
  padding: .5rem 0;
  display: flex;
  justify-content: space-between;
}

.post .top img {
  margin-right: 1rem;
}

.post .top .votes {
  display: flex;
  align-items: center;
}

.post .top .votes p {
  margin: 0;
  font-weight: bold;
  color: #1e1e1e;
  font-size: .625rem;
}

.post .top .user-info {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.post .top .user-info p {
  font-family: var(--sansSerifFont);
  font-size: .625rem;
  flex-grow: 2;
  color: var(--colFont);
  text-decoration: none;
}

.post img {
  max-width: 100%;
}

.post h2 {
  font-size: 1.2rem;
  font-weight: 500;
  margin: .6rem 0 0 0;
}

@media (max-width: 800px) {
  .hamburgerIcon, .hamburgerIcon img {
    display: block;
  }

  .registration {
    display: none;
  }

  .search {
    display: none;
  }

  header {
    position: relative;
    justify-content: flex-end;
  }

  header > img {
    width: 7rem;
    position: absolute;
    top: 0;
    left: calc(50% - 3.5rem);

  }

  main .posts{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  main .posts{
    grid-template-columns: 1fr;
  }
}

/* 📋 Dashboard */

.dashboard {
  display: grid;
  grid-template-columns: 300px 1fr 280px;
}

.dashboard main {
  overflow-y: scroll;
  max-width: 100%;
  width: 100%;
}

.dashboard .posts {
  max-width: 800px;
  margin: 0 auto;
  display: block;
}

.dashboard main::-webkit-scrollbar {
  background-color: var(--colBg);
  width: 4px;
}

.dashboard main::-webkit-scrollbar-thumb {
  background-color: var(--colDivLines);
}

aside.menu {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  border-right: 1px solid var(--colDivLines);
}

aside.menu > ul {
  padding: 2.6rem;
}

aside.menu > ul > li > a {
  font-weight: 500;
}

aside.menu ul {
  list-style-type: none;
  margin: 0;
  font-size: var(--font14);
  color: var(--colFont);
}

aside.menu li a{
  display: block;
  margin-bottom: 1.6rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

aside.menu .settings {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--colDivLines);

  justify-content: center;
  padding: 2.6rem;
}

aside.menu .settings img {
  margin-right: 2rem;
}

aside.menu .settings a {
  font-size: var(--font14);
  font-weight: 500;
}

aside.notifications {
  border-left: 1px solid var(--colDivLines);
}

.dashboard main nav {
  display: flex;
  justify-content: center;
  margin: 3rem auto 4rem auto;
}

.dashboard main .logo {
  display: block;
}

.dashboard main .hamburger {
  display: none;
}

@media (max-width: 800px) {

  .dashboard main nav {
    justify-content: space-evenly;
  }

  .dashboard main nav .hamburger {
    display: block;
  }

}

.post-lg {
  display: flex;
  /* flex-wrap: wrap; */
}

.updatePreview, .post-lg {
  margin-bottom: 4rem;
}

.post-lg > img {
  margin-right: 2rem;
}

.post-lg h2 {
  display: block;
  font-size: var(--font14);
  color: var(--colFont);
  font-weight: 500;
  margin: 0;
}

.post-lg .info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .8rem;
  /* min-width: 100px; */

}

.post-lg .userInfo {
  display: flex;  
  align-items: center;
  justify-content: flex-start;
  font-size: var(--font14);
}


.post-lg p {
  margin: 0;
}

.post-lg .userInfo img {
  margin-right: 1rem;
}

@media (max-width: 500px) {
  .post-lg {
    flex-wrap: wrap;
  }

  .post-lg > img {
    width: 100%;
    margin: 0;
    margin-bottom: 1rem;;
  }
}

.updatePreview {
  background: #fff;
  padding: 1rem;
  font-size: var(--font14);
}

.updatePreview .header {
  display: flex;
  justify-content: space-between;
}

.updatePreview .title {
  font-weight: 500;
}

.updatePreview .bottom {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
}

.updatePreview .bottom {
  display: flex;
  align-items: center;
}

.updatePreview .info > * {
  display: inline;
}

.updatePreview .info span {
  margin: 0 .5rem;
}

.updatePreview .info .type {
  color: var(--colInfo);
  font-weight: 800;
}

.updatePreview .updateUserInfo {
  display: flex;
  align-items: center;
}

.updatePreview .updateUserInfo img {
  margin-left: 1rem;
}

.updatePreview .updateUserInfo p {
  margin: 0;
}

.dashboard .notifications {
  padding: 1.4rem;
}

.dashboard .notifications h1 {
  font-size: var(--font14);
  font-weight: 500;
  text-align: center;
  margin: 1rem 0 4rem 0;
}

.dashboard .commentPreview {
  font-size: var(--font14);
  background: white;
  padding: .8rem;
}

.dashboard .commentPreview .info {
  color: var(--colInfo);
  font-weight: 900;
}

.dashboard .commentPreview h2 {
  font-size: inherit;
  font-weight: 500;
}

@media (max-width: 1100px) {
  .dashboard {
    grid-template-columns: 300px 1fr;
  }  


  .notifications {
    display: none;
  }
}

@media (max-width: 800px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .dashboard .menu {
    display: none;
  }
}

.signup {
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup .form {
  max-width: 435px;
}

input[type="text"], input[type="password"] {
  display: block;
  width: 100%;
  font-family: inherit;
  outline: none;
  border: none;
  background: var(--colBgInput);
  border-bottom: 1px solid var(--colInputLine);
  padding: .5rem .7rem;
  margin-bottom: 2rem;
}

.checkbox {
  display: flex;
  gap: 1rem;
}

input[type="submit"] {
  display: block;
  margin-left: auto;
  margin-top: 2rem;
  font-family: inherit;
  outline: none;
  border: none;
  background: var(--colDark);
  color: #fff;
  padding: .5rem 1.3rem;
  font-weight: 500;
  cursor: pointer;
}

label {
  font-size: var(--font13);
  font-weight: 500;
  margin-bottom: .3rem;
  display: block;
}

.checkbox label {
  font-weight: 400;
  font-size: var(--font13);
}