@font-face {
  font-family: "Nanum Pen Script";
  src: url("/fonts/NanumPenScript-Regular.ttf");
}

:root {
  --bg-color: #ffe7d3;
  --fg-color: #371f0b;
  --button-back: #b67c61;
  --button-fore: #ffe7d3;
  --input-back: #d2a795;
  --input-fore: #371f0b;
  --button-back-hovered: #98684d;
  --button-back-clicked: #844a2f;
  --post-color: #f5d3bf;
  --post-footer: #e1bfab;
  --comment-color: #f5d3bf;
  --comment-footer: #f5d3bf;
}

.dark-mode {
  --bg-color: #1c1c1c;
  --fg-color: #f5d3bf;
  --button-back: #8d5a3f;
  --button-fore: #f5d3bf;
  --button-back-hovered: #6b3e2a;
  --button-back-clicked: #4f2619;
  --input-fore: #371f0b;
  --post-color: #1f1f1f;
  --post-footer: #333333;
  --comment-color: #1f1f1f;
  --comment-footer: #1f1f1f;
}

html,
body {
  background-color: var(--bg-color);
  color: var(--fg-color);
  font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

::-webkit-scrollbar {
  width: 3px;
  height: 10px;
  transition: all 500ms;
}

::-webkit-scrollbar-thumb {
  background: var(--fg-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(150, 150, 150);
}

a {
  color: var(--fg-color);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-color);
  color: var(--fg-color);
  padding: 15px;
  z-index: 10000000;
}

.navbar.sticky {
  position: fixed;
  top: 0;
  left: 15px;
  width: 98%;
  padding-top: 15px;
  animation: navbarEnter 0.5s ease-in-out;
  margin-bottom: 2000px;
}

.left {
  display: flex;
  align-items: center;
}

.logo {
  color: var(--fg-color);
  font-size: 22px;
  text-decoration: none;
  font-family: "Nanum Pen Script", BlinkMacSystemFont, -apple-system, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.right {
  display: flex;
}

.footerText {
  width: 100%;
  text-align: center;
}

input,
textarea {
  background-color: var(--input-back);
  color: var(--input-fore);
  border: none;
  border-radius: 5px;
  font-family: inherit;
}

input::-webkit-input-placeholder {
  color: var(--input-fore);
}

input.search {
  padding-left: 10px;
  padding-right: 10px;
  width: 150px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

input.search:focus {
  width: 250px;
  outline: 1px solid var(--fg-color);
}

.button {
  padding: 8px;
  font-family: inherit;
  background-color: var(--button-back);
  color: var(--button-fore);
  border-radius: 5px;
  border: none;
  margin-left: 10px;
  transition: all 0.2s ease-in-out;
}

.button:hover {
  background-color: var(--button-back-hovered);
  transform: translateY(-5px);
  cursor: pointer;
}

.button:active {
  background-color: var(--button-back-clicked);
  transform: translateY(-3px);
}

select {
  font-family: inherit;
  background: none;
  color: var(--fg-color);
  border: none;
  margin-left: 10px;
  font-size: 14px;
}

select option {
  background: var(--button-back);
  color: var(--button-fore);
  border-radius: 5px;
}

.read-more-button {
  color: var(--fg-color);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 16px;
  margin-left: 15px;
  width: 85px;
}

.read-more-button:hover {
  cursor: pointer;
}

.sortSelector {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: right;
  width: 50%;
  position: relative;
  margin: auto;
  margin-top: 100px;
  margin-bottom: 20px;
}

p.status {
  font-size: 18px;
}

.feed {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: all 0.2s ease-in-out;
}

.post {
  background-color: var(--post-color);
  border-radius: 8px;
  width: 50%;
}

.post * {
  margin: 0;
  padding: 0;
  animation: popupEnter 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}

.post .title {
  margin: 20px;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  font-size: 35px;
}

.post .content {
  margin: 20px;
  font-size: 18px;
}

.post .footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 25px;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 8px;
  background-color: var(--post-footer);
  border-radius: 8px;
}

.post .footer .button {
  padding: 10px;
  width: 30%;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 100000000;
}

.popup.closed {
  animation: fadeOut 0.75s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.popup.closed .content {
  animation: popupExit 0.75s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.popup .content {
  background-color: var(--post-color);
  border-radius: 8px;
  animation: popupEnter 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}

.popup .content .close {
  float: right;
  margin-top: 10px;
  margin-right: 18px;
  color: var(--fg-color);
  font-size: 28px;
  font-weight: bold;
  user-select: none;
}

.popup .content .close:hover {
  cursor: pointer;
}

.popup.comments .content {
  width: 50%;
}

.popup.comments .content .title {
  margin: 20px;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  font-size: 35px;
}

.popup.comments .content .description {
  margin: 20px;
}

.popup.comments .content .allComments {
  overflow-y: scroll;
  overflow-x: hidden;
  height: 300px;
  width: 100%;
}

.popup.comments .content .allComments .status {
  width: 100%;
  text-align: center;
}

.popup.comments .content .allComments .comment {
  background: var(--comment-color);
  margin-left: 0px;
}

.popup.comments .content .allComments .comment .content {
  background: var(--comment-color);
  width: 95%;
  margin-left: 20px;
}

.popup.comments .content .allComments .comment .footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 25px;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 5px;
  background-color: var(--comment-footer);
  border-radius: 8px;
}

.popup.comments .content .allComments .comment .footer * {
  width: 38%;
}

.popup.comments .content .inputs {
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 20px;
  padding-top: 20px;
}

.popup.comments .content .inputs .input {
  width: 70%;
  padding-left: 10px;
  padding-right: 10px;
}

.popup.comments.closed {
  display: none;
}

.popup.addConfession.closed {
  display: none;
}

.popup.addConfession .content {
  width: 50%;
}

.popup.addConfession .content .title {
  margin: 20px;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  font-size: 35px;
}

.popup.addConfession .content .description {
  margin: 20px;
}

.popup.addConfession .content .inputs {
  margin: 20px;
}

.popup.addConfession .content .inputs input {
  margin-top: 10px;
  height: 25px;
  width: 100%;
}

.popup.addConfession .content .inputs textarea {
  margin-top: 10px;
  width: 100%;
}

.popup.addConfession .content .button {
  float: right;
  margin: 20px;
}

@media only screen and (min-width: 600px) and (max-width: 992px) {
  .post {
    background-color: var(--post-color);
    border-radius: 8px;
    width: 90%;
  }
  .navbar.sticky {
    width: 95%;
  }
  .sortSelector {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
    width: 90%;
    position: relative;
    margin: auto;
    margin-top: 100px;
    margin-bottom: 20px;
  }
}

@media only screen and (max-width: 600px) {
  .sortSelector {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
    width: 90%;
    position: relative;
    margin: auto;
    margin-top: 100px;
    margin-bottom: 20px;
  }
  .post {
    background-color: var(--post-color);
    border-radius: 8px;
    width: 90%;
  }
  .popup.comments .content {
    width: 100%;
    height: 100%;
  }
  .popup.comments .content .allComments {
    width: 100%;
    height: 75%;
  }
  .popup.comments .content .inputs {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 20px;
    padding-top: 20px;
    bottom: 0;
  }
  .popup.comments .content .inputs .input {
    width: 50%;
    padding-left: 10px;
    padding-right: 10px;
  }
  .popup.addConfession .content {
    width: 100%;
    height: 100%;
  }
  .logo {
    display: none;
  }
  .navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    color: var(--fg-color);
    padding: 15px;
    width: 94%;
  }
  .navbar.sticky {
    width: 94%;
  }
  .navbar .left {
    display: none;
  }
  .navbar .right {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  .navbar .right * {
    width: 98%;
  }
  .navbar .right button {
    font-size: 12px;
    width: 90%;
  }
  input.search:focus {
    width: 98%;
    outline: 1px solid var(--fg-color);
  }
}

.lds-heart {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: rotate(45deg);
  transform-origin: 40px 40px;
}
.lds-heart div {
  top: 32px;
  left: 32px;
  position: absolute;
  width: 32px;
  height: 32px;
  background: var(--fg-color);
  animation: lds-heart 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
.lds-heart div:after,
.lds-heart div:before {
  content: " ";
  position: absolute;
  display: block;
  width: 32px;
  height: 32px;
  background: var(--fg-color);
}
.lds-heart div:before {
  left: -24px;
  border-radius: 50% 0 0 50%;
}
.lds-heart div:after {
  top: -24px;
  border-radius: 50% 50% 0 0;
}
@keyframes lds-heart {
  0% {
    transform: scale(0.95);
  }
  5% {
    transform: scale(1.1);
  }
  39% {
    transform: scale(0.85);
  }
  45% {
    transform: scale(1);
  }
  60% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(0.9);
  }
}

@keyframes navbarEnter {
  0% {
    transform: translateY(-100px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes popupEnter {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes popupExit {
  0% {
    opacity: 1;
    transform: translateY(0px);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
