@import url('https://fonts.googleapis.com/css2?family=Ballet:opsz@16..72&display=swap');

@font-face {
  font-family: "Modified_Tangerine";
  src: url("../../assets/fonts/Tangerine/Tangerine-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Modified_Bold_Tangerine";
  src: url("../../assets/fonts/Tangerine/Tangerine-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

:root {
  --PRIMARY: #0c0d14;
  --ACCENT: #333;
  --TEXT-PRIMARY: white;
  --TEXT-ACCENT: #bbb;
  --FONT-HEADING: "Ballet", cursive;
  --FONT-BODY: "Modified_Tangerine", cursive;
  --FONT-BODY-SIZE: 2rem;
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  color: var(--TEXT-PRIMARY);
  font-family: var(--FONT-BODY);
  font-size: var(--FONT-BODY-SIZE);
  background-color: var(--PRIMARY);

  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

button {
  display: flex;
  column-gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  background-color: var(--ACCENT);
  border: none;
  font-family: var(--FONT-BODY);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 5%;
  background-color: var(--PRIMARY);
  color: white;
}

button:hover {
  opacity: 0.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--FONT-HEADING);
}

img {
    display: block;
    max-width: 100%;
}

svg {
  width: clamp(28px, calc(5px + 4vw), 35px);
  height: auto;
}

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

a:hover {
  opacity: 0.8;
}

.hidden {
  display: none !important; 
  width: 0 !important;
  height: 0 !important;
}

.nowrap {
  white-space: nowrap;
}

.border {
  border: 1px solid var(--ACCENT);
}

.page-inner {
  /* !!! Use this class for any content element aside from the nav */
  
  /* border-inline: 1px solid var(--ACCENT); */
  /* padding: 3rem; */
  width: clamp(660px, 70%, 1500px);
  max-width: 100%;
  
  padding: 1rem;
  margin-inline: auto; /* inline necessary as content is a grid element */
}

.page-inner > #page-content-wrapper { /* Makes it possible for .page-inner to be 100% of the column, providing more consistent sizing */
  width: min(100%, 1000px);
}

/* NAV STILUSOK */

.nav-icon li a {
  aspect-ratio: 1/1;
  width: 50px;
  height: 50px;
  padding: 0;
}

nav {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 1;
  grid-template-rows: auto 1fr auto;
  gap: 2rem;
  padding: 1rem min(3vw, 2rem);
  flex-flow: column nowrap;
  border-right: 1px solid var(--ACCENT);
  height: 100svh;
}

nav .nav-container {
  list-style-type: none;
  display: flex;
  flex-flow: column nowrap;
}

nav .nav-container li {
  display: inline-block;
}

nav .nav-container li a {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem;
  border-radius: 0.4rem;
  color: white;
  text-decoration: none;
}

nav .nav-container li a:hover {
  background-color: var(--ACCENT);
}

/* LEBEGŐ POST STILUSOK */

#post-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

#post-float #btn-float-close {
  position: absolute;
  background-color: rgba(0, 0, 0 , 0);
  top: 10px;
  right: 10px;
  z-index: 9999;
}

#post-float #post-float-content {
  position: fixed;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(90%, 1500px);
  height: 90svh;

  display: grid;
  grid-template-columns: 1fr fit-content(50%);

  background-color: var(--PRIMARY);
}

#post-float #post-float-content #post-float-img-cont {
  display: grid;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0; /* A grid elemek alapból nem lehetnek kisebbek, mint tartalmuk */
  background-color: black;
}

#post-float #post-float-content #post-float-img-cont #post-float-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: hidden;
}

#post-float #post-float-content #post-float-text {
  overflow-y: auto;
  padding-top: 3rem;
  padding: 1rem;
}

.user-card {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  padding: 0.5rem;
}

.user-card .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.user-card .user-info img {
  width: 35px;
  height: 35px; 
  border-radius: 50%;
}

.user-card .user-info h5 {
  overflow: hidden;
  text-overflow: ellipsis;
}

#post-float #post-float-content #post-float-text #user-comments-empty {
  opacity: 0.5;
  text-align: center;
  padding: 3rem 0;
}

#post-float #post-float-content #post-float-text #user-comments-empty .icon {
  width: 25%;
}

/* TÖRÉSPONT */
@media screen and (max-width: 768px) {
  body {
    display: block;
    padding-bottom: 5rem; /* Account for space created by navbar */
  }

  /* NAV TÖRÉSPONT STILUSOK */

  nav {
    width: 100%;
    position: fixed;
    top: auto;
    bottom: 0;
    gap: 1rem;
    align-items: center;
    grid-template-rows: none;
    grid-template-columns: auto 1fr auto;
    background-color: var(--PRIMARY);
    border-top: 1px solid var(--ACCENT);
    border-right: none;
    padding: 1rem;
    height: auto;
  }

  nav .nav-general {
    flex-flow: row;
    justify-content: center;
    column-gap: 0.75rem;
  }

  nav .nav-container .link-text {
    display: none;
  }

  /* LEBEGŐ POSZT TÖRÉSPONT STILUSOK */

  #post-float #post-float-content {
    display: block;
    overflow-y: scroll;
    width: 70%;
    padding: 0;
  }

  #post-float #post-float-content #post-float-text {
    margin-top: 1rem;
  }

  #post-float #post-float-content #btn-float-close {
    position: sticky;
    top: 0;
    margin: auto;
    aspect-ratio: 1/1;
    padding: 1rem;
    font-size: 2.5rem;
    border-radius: 50%;
  }
}