* {
    box-sizing: border-box;
}

.container {
    margin: 0px;
    padding: 16px;
}

input {
    border-radius: 10px;
}
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 16px;
}
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
/* Handle */
::-webkit-scrollbar-thumb {
   border-radius: 10px;
}


/**
* Bootstrap styles
**/
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9 {
    padding: 8px;
}

.content-card .row {
    margin: 0px;
}

.card-body {
    border: none;
    border-radius: 10px;
    padding: 8px;
    margin-right: 8px;
    width: 130px;
    height: 62px;
}

.row {
    margin: 0;
}

textarea {
  resize: none;
}


/**
* Login and registration screen
**/
.registration-container {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: auto auto;
    grid-template-areas:
        "head-img"
        "content";
    gap: 24px;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.login-img {
    border-radius: 10px;
    width: 100%;
    height: 170px;
    grid-area: head-img;
    object-fit: cover;
    object-position: center 85%;
}

.registration-container .content {
    grid-area: content;
}

.registration-container hr {
    margin-top: 40px;
    margin-bottom: 8px;
}

.registration-container p {
    display: block;
    text-align: center;
    margin-top: 0px;
    margin-bottom: 24px;
}

.registration-container h1 {
    margin-top: 0px;
    margin-bottom: 24px;
}
.registration-container button {
    padding-left: 16px;
    padding-right: 16px;
}

.form-control {
    height: 48px;
    width: 100%;
    border-radius: 10px;
    border-style: none;
    padding: 16px;
    margin-bottom: 16px;
    margin-top: 4px;
}

button {
    display: block;
    min-height: 48px;
    min-width: 120px;
    width: inherit;
    border-style: none;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
}
.messageDiv {
    opacity: 0;
    animation: fadeOut 7s forwards;
    margin-left: auto;
    margin-right: auto;
    width: max-content;
    min-height: 48px;
    min-width: 120px;
    padding-left: 16px;
    padding-right: 16px;
    margin-top: 16px;
}


/**
* Main page
**/
.main-container {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: 75px 1fr 50px 50px;
    grid-template-areas:
        "main-header"
        "main-content"
        "main-footer"
        "main-navigation";
    max-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    padding: 0px;
    gap: 8px;
}

.main-container header {
    padding-top: 8px;
    grid-area: main-header;
}

.header-div {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
}

.main-container .dropdown-menu.show {
    width: -webkit-fill-available;
}
.aside-button {
    height: 48px;
    width: 48px;
    border-radius: 10px;
}
.aside {
    display: none;
}
.main-container footer {
    grid-area: main-footer;
    margin-left: 8px;
    margin-right: 8px;
    position: sticky;
    z-index: 1000;
}
#postAPost {
    width: -webkit-fill-available;
}


.footer-div {
    position: sticky;
    border-radius: 10px;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

footer .aside-button {
    height: 30px;
    width: 30px;
}

footer form {
    margin: 0px;
    margin-left: 8px;
}

footer input {
    border-style: hidden;
    font-weight: 600;
}
#bottomDrawer {
  position: fixed;
  bottom: -520px; /* versteckt unter dem Bildschirm */
  left: 0;
  width: 100%;
  height: 520px;
  background-color: white;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
  transition: bottom 0.4s ease;
  z-index: 1000;
  padding: 1rem;
}

#bottomDrawer.open {
  bottom: 0; /* sichtbar */
}
#bottomDrawer .form-control {
    padding: 0 0 0 16px;
}
#bottomDrawer input#postPhoto {
    border-radius: 0;
}

#toggleDrawer {
    margin-left: 0;
    width: -webkit-fill-available;
    height: 48px;
    text-align: start;
    padding: 0 0 0 16px;
}
.drawer-content {
  overflow-y: auto;
  height: 100%;
}
.drawer-content .col-12 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#postButton {
    width: 48px;
    margin: 0 0 0 8px;
}
textarea#postDescription.form-control{
    padding: 16px 16px 16px 16px;
    height: 160px;
}

.main-container nav {
    grid-area: main-navigation;
    position: sticky;
    bottom: 0;
    z-index: 999;
    display: none;
}
nav > a {
    display: none;
}
nav > div {
    display: block;
}

.main-container main {
    grid-area: main-content;
    overflow-y: auto;
    padding: 8px;
    position: relative;
}

.youtube-card {
    border: none;
    border-radius: 10px;
    padding: 8px;
}

iframe {
    border-radius: 10px;
    height: 160px;
    width: -webkit-fill-available;
}
.aside.community .banner {
    height: 80px;
    border-radius: 10px;
}
.aside.community {
    display: none;
}
.aside .community-info {
    display: flex;
    flex-direction: column;
}

.progress-item {
    margin-bottom: 20px;
}

.label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: bold;
}

.progress-bar {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    transition: width 0.5s;
}

/**
* Challenges
**/
.content-card {
    padding: 8px;
    border-radius: 10px;
}
.content-card .row .col-button {
    display: flex;
    justify-content: flex-end;
}
p.caption {
    margin-bottom: 0px;
}

.challenge-img {
    min-height: 80px;
    max-height: 135px;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.challenge-name {
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    text-overflow: ellipsis;
}

.challenge-description {
    max-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
}

.content-card button {
    display: none;
    min-width: 48px;
    padding: 0px;
}
.challenge-infos > p{
    display: none;
}

.content-card .col-9,
.content-card .col-8,
.content-card .col-7 {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

div.scrollmenu {
    width: 100%;
    height: fit-content;

    /**used to scroll text*/
    white-space: nowrap;
    overflow-x: scroll;
    overflow-y: hidden;

    /**keep scrolling when
      *finger or cursor scrolling*/
    -webkit-overflow-scrolling: touch;
    padding: 16px 0 16px 0;
    border-radius: 10px;
}

.card-title {
    margin-bottom: 0px;

    max-height: 3em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    text-overflow: ellipsis;
}

.challenges .card-text {
    display: none;
}

.challenges .card {
    flex-direction: row;
    border-style: none;
    width: fit-content;
    border-radius: 10px;
}

.challenges button {
    position: absolute;
    z-index: 1000;
    right: 8px;
    min-width: 48px;
    width: 48px;
    height: 62px;
    border-radius: 10px;
}

/**
* Categories
**/
.categorie-container {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: auto 1fr 150px;
    grid-template-areas:
        "head-img"
        "content"
        "weiter-button";
    gap: 24px;
    align-items: flex-start;
    max-width: 100%;
    height: 100vh;
    margin: 0 auto;
}

.categorie-body {
    border: none;
    border-radius: 10px;
    padding: 8px;
    margin-right: 8px;
    margin-bottom: 16px;
    width: 100%;
}

.categorie .categorie-liste {
    max-height: 36vh;
    overflow-y: auto;
    margin-top: 16px;
}

.categorie-container p {
    text-align: left;
}

/*Checkbox*/
input[type="checkbox"] {
    appearance: none;
    width: 1.4rem;
    height: 1.4rem;
    display: inline-block;
    position: relative;
    border-radius: 0.15em;
    transform: translateY(0.16em);
    transition: background 0.2s ease-in-out;
    cursor: pointer;
}

/* Check */
input[type="checkbox"]::after {
    content: "✔";
    font-size: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease-in-out;
}

/* Check zeigen */
input[type="checkbox"]:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

label.checkbox {
    margin-left: 8px;
}


.categorie h1 {
    margin-bottom: 8px;
}

.categorie p {
    margin-bottom: 24px;
}

.weiter-button {
    position: sticky;
    grid-area: weiter-button;
}

/* Posts */
.posts {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 16px;
}
input[type="text"]:focus {
    outline: none;
}

/* Navigation */
nav {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}
nav > div {
    border-radius: 50px;
    height: 40px;
    width: 40px;
}



/**
* User Page
**/
.user-container {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: 75px 1fr 50px 50px;
    grid-template-areas:
        "user-header"
        "user-profile"
        "user-main"
        "user-nav";
    max-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    padding: 0px;
    gap: 8px;
}
.user-container nav {
    grid-area: user-nav;
}
.user-container main {
    padding: 8px;
    position: relative;
    grid-area: user-main;
}
.user-container .profile {
    width: 100%;
    height: fit-content;
    border-radius: 10px;
    display: block;
    padding: 16px;
    grid-area: user-profile;
}
.user-container header {
    grid-area: user-header;
}
.user-container .profile .user-profile {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.user-container .profile .user-profile .user-img {
    width: 250px;
    height: 250px;
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    border-radius: 130px;
    background-color: var(--secondary-color);
}

.user-img .fa-user {
    font-size: 160px;
}


/*
 * Communities
 */
.communities {
    position: static;
    margin-right: 0;
    margin-bottom: 6px;
    display: flex;
    gap: 16px;
    height: 36vh;
    flex-direction: column;
    overflow-y: scroll;
}
.communities .community-card button {
    margin-right: 8px;
    margin-bottom: 8px;
    position: static;
}
.community .col-9 {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
.community-card {
    padding: 8px;
    border-radius: 10px;
}
.community-card .row {
    margin: 0px;
}
.community-card .description {
    max-height: none;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    text-overflow: ellipsis;
}
.community-card img {
    min-height: 80px;
    height: 150px;
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}
.community-card p {
    margin-bottom: 0px;
}