*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --dark: #000;
  --light: #fff;
}

html, body {
  font-family: 'Noto Sans', sans-serif;

  margin: 0;
  padding: 0;

  background-color: var(--dark);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;

  /* Hidden by default */
  visibility: hidden;
  pointer-events: none;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  padding: 10px 10px 0;

  background-color: rgb( 0 0 0 / 0% );

  transition: all 180ms ease-out;
}

.modal.active {
  visibility: visible;
  pointer-events: all;
  background-color: rgb( 0 0 0 / 80% );
}

.modal-dialog {
  flex: 0 1 540px;
  background: #fff;

  z-index: 1;

  transform: translateY(100%);
  transition: all 180ms ease-out;

  border-radius: 8px;
}

.modal.active .modal-dialog {
  transform: translateY(-50px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  
  padding: 15px;
}

.modal-body {
  max-height: 70vh;
  max-height: 70dvh;
  overflow-y: auto;
}

.modal-close {
  font-size: 20px;

  display: flex;
  padding: 0;

  color: var(--dark);

  cursor: pointer;

  border: unset;
  background: unset;
}


/* Main App Shell */
.app {
  position: relative;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  overflow-x: hidden;
  overflow-y: auto;

  scroll-snap-type: y mandatory;

  /* IE and Edge | Scrollbar */
  -ms-overflow-style: none;

  /* Firefox | Scrollbar */
  scrollbar-width: none;
}

.app::-webkit-scrollbar {
  display: none;
}

.video {
  position: relative;

  max-width: 540px;
  height: 100%;

  margin-inline: auto;

  scroll-snap-align: start;
}

.video video {
  display: flex;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.video__wrapper {
  position: absolute;
  bottom: 0;

  display: grid;
  grid-template-columns: 1fr 60px;
  
  width: 100%;

  padding-bottom: 50px;

  pointer-events: none;
  
  filter: drop-shadow( 0px 1px 1px rgb(0 0 0 / 25%) );
  background: linear-gradient(0deg, var(--dark), transparent);
}

.video__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  color: var(--light);

  padding-left: 15px;

  pointer-events: none;
}

.video__content a {
  color: var(--light);
  text-decoration: none;
}

.video__content-username {
  font-size: 1rem;
  margin-block: 0 12px;
}

.video__content-description {
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.video__content-tags {
  display: flex;
  flex-wrap: wrap;

  font-size: 0.75rem;

  gap: 8px;
}

.video__content > * {
  pointer-events: all;
}

/* Video Sidebar */
.video__aside {
  display: flex;
  flex-direction: column;

  align-items: center;

  gap: 20px;

  pointer-events: all;
}

.video__aside a {
  display: block;
}

.video__avatar {
  width: 40px;
  height: 40px;

  border-radius: 50%;
  border: 2px solid var(--light);
}

.video__button {
  border: 0;
  padding: 0;

  color: var(--light);

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 10px;

  cursor: pointer;

  background-color: transparent;

  filter: drop-shadow( 0px 1px 2px rgb(0 0 0 / 25%) );
}

.video__button svg {
  height: 30px;
  width: auto;
}

.video__button-comment svg {
  height: 26px;
}

.video__button span {
  font-size: 15px;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5);
  }
  30% {
    transform: scale(1.25);
  }
  50% {
    transform: scale(0.9)
  }
  70% {
    transform: scale(1.1)
  }
  80% {
    transform: scale(1)
  }
}

.video__button-like.liked svg {
  color: #5D8AC7;
  animation: bounceIn .5s linear;
}

/* Share Links */
.share-links {
  display: flex;
  flex-wrap: wrap;

  justify-content: center;

  max-width: fit-content;
  margin-inline: auto;

  gap: 15px;

  padding: 15px 15px 22px;
}

.share-links a {
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.2rem;

  width: 40px;
  height: 40px;

  border-radius: 50%;

  color: var(--color, #fff);
  background: var(--background, #000);
}

/* Comments */
.comments {
  padding: 15px;
}

.comments > div:not(:last-child) {
  margin-bottom: 1.4rem;
}

.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
}

.comment img {
  width: 40px;
  height: 40px;

  border-radius: 50%;
  object-fit: cover;
}

.comment-username {
  font-size: 0.8rem;
  margin-block: 0 8px;
}

.comment-message {
  font-size: 0.8rem;
  margin: 0;
}

.comment-form {
  position: relative;
  display: flex;

  margin-block: 15px;
  padding-inline: 15px;
}

.comment-form textarea {
  font-family: 'Noto Sans', sans-serif;

  width: 100%;
  padding: 15px 20px;
  padding-right: 60px;

  font-size: 0.9rem;

  border-radius: 8px;
  border: 1px solid #aaa;

  outline: none;
}

.comment-form button {
  position: absolute;
  display: flex;

  top: 14px;
  right: 35px;

  border: unset;
  padding: unset;
  background: unset;

  cursor: pointer;
  font-size: 24px;

  color: #444;
}
