@import url("./global.css");

body {
  background-image: url("/assets/imgs/bg_2.png");
  background-color: rgb(255, 255, 255);
}

.main-feed {
  padding: 0.7rem 0;
  margin-top: 6rem;
  background-color: rgb(0, 0, 0);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  width: 80%;
  max-width: 500px;
  height: 100vh;
}

/* pinned post */
.post__pinned {
  background-color: rgb(146, 230, 158);
  padding: 0.7rem;
  margin: 0 0.7rem;
  height: fit-content;
}

.post__pinned h2 {
  margin: 0 0 1rem 0;
}

.post__pinned img {
  display: block;
  margin-bottom: 0.5rem;
  margin-left: auto;
  margin-right: auto;
}

.text__pinned p,
h3 {
  padding: 0.2rem;
  margin: 0;
  color: rgb(0, 0, 0);
  background-color: rgba(255, 255, 255, 0);
}

.text__pinned h3 {
  font-family: "AlfaZ";
  text-transform: uppercase;
  color: rgb(238, 255, 0);
  text-shadow: #ffcc00 1px 0 10px;
}

/* grid */
/* grid wrapper */
.posts__grid {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, minmax(120px, 35px));
  /* width: 100%; */
  margin-top: 0.7rem;
}

.popup-image {
  /* padding: 0.5rem; */
  overflow: hidden;
}

.popup-image img {
  cursor: pointer;
  width: 100px;
  height: auto;
  display: block;
}

.popup-image img:hover {
  transform: scale(1.25);
}

/* try code for pop up */
.popup p {
  text-align: center;
}

.popup-content h2 {
  text-transform: uppercase;
}

.popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.popup.open {
  display: block;
}

.popup-content {
  padding: 2rem 1rem 0.25rem 1rem;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 0);
  margin-top: 1rem;
  width: 80%;
  max-width: 500px;
  height: 100vh;
  overflow: scroll;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.popup-content img {
  padding-bottom: 1rem;
}

.popup-text {
  padding: 0 0.7rem 0.7rem 0.7rem;
  margin-bottom: 1rem;
  width: fit-content;
  background-color: white;
}

.popup-text p {
  color: black;
  /* background-color: rgba(255, 255, 255, 0); */
  word-wrap: break-word;
}

@media only screen and (min-width: 800px) {
  /* main feed */
  .main-feed {
    max-width: 550px;
  }

  /* pinned post */
  .post__pinned {
    max-width: 550px;
  }

  /* post grid */
  .posts__grid {
    /* max-width: 100%; */
    grid-template-columns: 1fr 1fr 1fr;
  }

  .popup-image img {
    width: 100%;
  }
}
