// moved to default.scss
/* -------------------------------------------------- */

/* Main Content */
.main-container {
  margin-top: 44px;
  margin-bottom: 44px;
}

/* Main Content */
.content-container {
  padding: 0 0 8px;
  margin: 0 auto;
}
.content {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.stories {
  width: 100%;
  background-color: hsl(0, 0%, 100%);
  padding: 16px 0;
  flex-shrink: 0;

  position: relative;
  overflow: hidden;
}
.stories::after {
  content: '';
  position: absolute;
  bottom: 0;

  width: 100%;
  height: 1px;
  background-color: hsl(0, 0%, 86%);
}
.stories__content {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 16px;
  padding: 0 16px;
  position: relative;

  scroll-behavior: smooth;
  scrollbar-width: none;
}
.stories__content::-webkit-scrollbar {
  display: none;
}

.posts {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.stories__left-button,
.post__left-button,
.stories__right-button,
.post__right-button {
  width: 24px;
  height: 24px;
  display: none;

  background-color: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.5));

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.stories__left-button {
  left: 10px;
}
.stories__right-button {
  right: 10px;
}
.post__left-button {
  left: 16px;
  opacity: 0.7;
}
.post__right-button {
  right: 16px;
  opacity: 0.7;
}

/* Components */
/* Story */
.story {
  background-color: transparent;
  border: none;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.story__avatar {
  position: relative;
}
.story__border {
  width: 64px;
  height: 64px;

  fill: none;
  stroke: hsl(0, 0%, 78%);
  stroke-width: 1.5;
}
.story--has-story .story__border {
  stroke: url(#--story-gradient);
  stroke-width: 2;
}
.story__picture {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
}
.story__picture::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border: 1px solid hsla(0, 0%, 0%, 0.1);
  border-radius: 50%;
}

.story__user {
  font-size: 12px;
  font-weight: 400;
  color: hsl(0, 0%, 60%);
  text-transform: lowercase;

  max-width: 72px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.story--has-story .story__user {
  color: hsl(0, 0%, 98%);
}

/* Post */
.post {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid  hsl(0, 0%, 86%);
  border-radius: 4px;
}

.post__header {
  background-color: hsl(0, 0%, 100%);
  border-bottom: 1px solid hsl(0, 0%, 86%);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}
.post__profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.post__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}
.post__avatar img{
    max-width: 100%;
    max-height: 100%;
}

.post__avatar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border: 1px solid hsla(0, 0%, 0%, 0.1);
  border-radius: 50%;
}
.post__user {
  font-size: 14px;
  font-weight: 500;
  color: hsl(0, 0%, 15%);
  text-decoration: none;
  text-transform: lowercase;
}
.post__user:hover {
  text-decoration: underline;
}
.post__more-options {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.post__content {
  display: flex;
  position: relative;
}
.post__medias {
  display: flex;
  overflow-y: hidden;
  overflow-x: auto;

  width: 100%;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.post__medias::-webkit-scrollbar {
  display: none;
}
.post__media {
  width: 100%;
  flex: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.post__footer {
  background-color: hsl(0, 0%, 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}
.post__buttons {
  display: flex;
  position: relative;
}
.post__button {
  background-color: transparent;
  border: none;
  cursor: pointer;

  padding: 8px;
}
.post__button--align-right {
  margin-left: auto;
}
.post__indicators {
  display: flex;
  align-items: center;
  gap: 4px;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
}
.post__indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: hsl(0, 0%, 60%);
}
.post__indicator--active {
  background-color: hsl(204, 100%, 48%);
}

.post__infos {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  gap: 10px;
}
.post__likes,
.post__description {
  display: flex;
}
.post__likes {
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
.post__likes-avatar {
  width: 20px;
  height: 20px;
  background: url(../img/default-profile-icon.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.post__likes-avatar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  border: 1px solid hsla(0, 0%, 0%, 0.1);
  border-radius: 50%;
}
.post__likes span,
.post__description span {
  font-size: 14px;
  font-weight: 400;
  color: hsl(0, 0%, 15%);
}
.post__likes a,
.post__description a {
  font-size: 14px;
  font-weight: 400;
  color: hsl(0, 0%, 15%);
  text-decoration: none;
}
.post__description a {
  font-weight: 600;
}
.post__name--underline {
  font-size: 14px !important;
  line-height: 18px !important;
}
.post__name--underline:hover {
  text-decoration: underline;
}
.post__date-time {
  font-size: 10px;
  font-weight: 400;
  color: hsl(0, 0%, 60%);
  text-transform: uppercase;
}

.post__view {
  color: #a62017 !important;
  font-weight: 600;
}

.hr {
  border-top: 1px solid hsl(0, 0%, 86%);
}

/* Media Queries */
@media (max-width: 767px) {
  /* Fix post medias indicators bugs on mobile */
  .post__medias {
    gap: 1px;
  }
}

@media (min-width: 620px) {
  .content-container {
    padding: 30px 0 24px;
  }

  .content {
    gap: 24px;
  }

  .stories {
    border: 1px solid hsl(0, 0%, 86%);
  }
  .stories::after {
    content: none;
  }

  .posts {
    gap: 24px;
  }
  .post {
    border: 1px solid hsl(0, 0%, 86%);
    border-radius: 4px;
  }
  .post__footer {
    padding: 4px 8px 12px;
  }
  .post__date-time {
    margin-top: 6px;
  }
}

@media (min-width: 1024px) {

  .content {
    margin: unset;
  }
}
