html,body { min-height: 100vh;}
body {
    margin: 0;
    padding: 0;
    background-color: rgba(143, 45, 78, 0.363);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
}
* {
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

.center {
    background-color: #be3a35;
    min-height: 100vh;
    height: fit-content;
    width: 52%;
    border: solid 2px black;
    border-top: 0;
    border-bottom: 0;
    padding-left: 1%;
    padding-right: 1%;
}


header {
    background-color: #be3a35;
    width: 100%;
    height: 60px;
    border-bottom: 2px solid black;
    padding: 1%;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    top: 0;
    position: sticky;
    z-index: 100;
}

.searchBar {
    width: 90%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.searchBar * {
    height: 100%;
}

.searchBar input {
    width: 80%;
    border: 0;
    outline: none;
    background-color: #ffffff;
    border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
    padding-left: 1%;
}

.searchIcon {
    width: 5%;
    border: 0;
    background-color: rgb(244, 87, 87);
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    border-bottom-right-radius: 10px;
    border-top-right-radius: 10px;
    cursor: pointer;
}
.searchIcon * {
    height: 100%;
    width: 100%;
    font-size: 20px;
    align-items: center;
    text-align: center;
    justify-content: center;
    display: flex;
    padding-right: 1%;
}


/* Blog post */
.Title {
    width: 60%;
    height: 2rem;
    border: 0;
    outline: none;
    background-color: #ffffff;
    border-radius: 2px;
    padding-left: 1%;
    margin-top: 20px;
    margin-bottom: 20px;
}
.Tag  {
    width: 100%;
    height: 2rem;
    border: 0;
    outline: none;
    background-color: #ffffff;
    border-radius: 2px;
    padding-left: 10%;
}

.main {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}

h1 {
    width: fit-content;
    font-size: 40px;
    margin-bottom: 2%;
    display: flex;
    flex-direction: row;
    margin-right: 0;
}
.importance {
    width: fit-content;
    display: flex;
    align-items: center;
    text-align: center;
    border-radius: 40px;
    font-size: 30px;
    color: black; /*generate dynamically based on readability*/
    padding: 0.2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: 0.5rem;
}

.tagSearch {
    position: relative;
    width: 10%;
}
.tagList {
    position: absolute;
    display: none;
    flex-direction: column;
    z-index: 50;
    width: 100%;
    top: 2.5rem;
}
.tagContainers {
    display: flex;
    flex-direction: row;
    height: 3rem;
}
.tagContainers * {
    margin-right: 1%;
}
.tagContainers span {
    height: 2rem;
    display: flex;
    text-align: center;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
}

.tagList span {
    padding: 3px 0;
    text-align: center;
    border-radius: 5px;
    margin-top: 3px;
    width: 100%;
    display: flex;
    text-align: center;
    justify-content: center;
}
.tags {
    margin-bottom: 10px;
}
.tags > span:first-child {
    border-radius: 0;
    border-right: 2px solid black;
}
.tags span{
    cursor: pointer;
    width: fit-content;
    height: fit-content;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    color: black; /*generate dynamically based on readability*/
    padding: 0.2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-right: 0.5rem;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none;
}
.newTag {
    box-shadow: 
    0 0 5px 2px rgba(255, 165, 0, 0.9),  /* strong orange glow */
    0 0 5px 5px rgba(255, 215, 0, 0.8);  /* stronger yellow outer glow */
}

.selectImportance {
    border: none;
    overflow: hidden;
    height: 2rem;
    border-radius: 15px;
    padding-left: 1%;
}
p img {
    max-width: 32% !important;
    margin-top: 1%;
    margin-right: 1%;
}
p {
    margin: 0;
    font-size: 18px;
}
.blogDescription {
    margin-top: 5px;
}
.ql-editor {
    padding: 10px 0;
    border: 0;
}
.ql-container.ql-snow{
    border: 0;
    border-bottom: 1px solid white;
}

/* blogpost */

.blogPost {
    width: 100%;
    
    background-color: #a62b27;
    border-radius: 6px;
    margin-top: 2%;
    padding: 2%;
}
.blogMain {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}
.blogImage {
    max-width: 40%;
}
.blogImage img{
    width: 100%;
    max-height: 220px;
    border-radius: 10px;
    object-fit: contain
}

.blogFav {
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 1.5rem;
}

.blogTitle {
    width: fit-content;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
}
.blogTitle span {
    margin-top: 2%;
    content: "";
    width: 66%;
    border-bottom: 2px solid black;
}

.blogTagLikes {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: row;
    width: fit-content;
    height: 26px;
}
.blogTags {
    display: flex;
    flex-direction: row;
    height: 100%;
    align-items: center;
    text-align: center;
    margin-left: 0.5rem;
}
.blogImportance {
    width: fit-content;
    display: flex;
    align-items: center;
    text-align: center;
    border-right: 2px solid black;
}
.blogTags span, .blogImportance span{
    width: fit-content;
    height: fit-content;
    border-radius: 20px;
    background-color: aqua; /*generate dynamically*/
    color: black; /*generate dynamically based on readability*/
    padding: 0.2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-right: 0.5rem;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none;
    cursor: pointer;
}
.blogText {
    position: relative;
    flex: 1;
}
.Fading {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(0deg,rgba(166, 43, 39, 1) 50%, rgba(166, 43, 39, 0.60) 80%, rgba(166, 43, 39, 0) 100%);
    display: flex;
    align-items: flex-end;
}
.Fading a {
    margin-bottom: 35px;
}

/* margins*/

.margin {
    position: sticky;
    top: 0;
    height: fit-content;
    width: 24%;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    margin-top: 15px;
}

.margin a {
    color: black;
}
.margin > div {
    background: linear-gradient(90deg, rgb(205, 64, 52) 26%, rgb(154, 18, 18) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border-bottom-left-radius: 40px;
    margin: 1%
}
.margin2 > div {
    align-self: flex-start;
    background: linear-gradient(90deg,rgb(154, 18, 18) 26%, rgb(205, 64, 52) 100%);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 40px;
}
.margin:last-child > div {
    align-self: flex-start;
    background: linear-gradient(90deg,rgb(154, 18, 18) 26%, rgb(205, 64, 52) 100%);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 40px;
}

.margin > div:first-child {
    width: 90%;
    height: 90px;
}
.margin > div:nth-child(2) {
    width: 80%;
    height: 80px;
}
.margin > div:nth-child(3) {
    width: 70%;
    height: 75px;
}

.margin > div:nth-child(4) {
    width: 60%;
    height: 75px;
    border-bottom-right-radius: 20px;
}.margin:last-child > div:nth-child(4) {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 40px;
}.margin2 > div:nth-child(4) {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 40px;
}

.margin > div:nth-child(5) {
    width: 40%;
    height: 60px;
    margin-right: 10%;
    margin-left: 10%;
    border-bottom-right-radius: 40px;
    border-bottom-left-radius: 40px;
}
.margin > div:nth-child(6) {
    content: "";
    margin-right: 20%;
    margin-left: 20%;
    width: 20%;
    height: 70px;
    clip-path: polygon(0 0, 50% 100%, 100% 0);
}

/* login */
.login {
    display: flex;
    flex-direction: column;
    width: 60%;
    padding-left: 6px;
    align-items: flex-start;
    justify-self: flex-start;
}
.login > * {
    width: 100%;
    margin: 2px 0;
}
.login button {
    width: 25%;
    align-self: flex-end;
    cursor: pointer;
}
.login a {
    font-size: 0.8rem;
}



/*Display user account*/
.userAccountHolder {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    padding: 1%;
    padding-right: 10%;
}
.userAccountIMG {
    max-height: 100%;
    max-width: 25%;
    border-radius: 8px;
}
.userDetails {
    margin-left: 2%;
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    flex-direction: column;
}
.userDetails * {
    width: fit-content;
}
.userDisplayName {
    font-weight: bold;
    font-size: 1.3rem;
}
.userUsername {
    font-size: 0.9rem;
}
.userLogout {
    position: absolute;
    font-size: 0.6rem;
    align-self: flex-end;
    bottom: 0;
    cursor: pointer;
    text-decoration: underline;
}

/* Favorites */
.favorites {
    width: 100%;
    height: 100%;
    min-width: fit-content;
    position: relative;
    display: flex;
    flex-direction: row;
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    padding: 3.5% 5%;
    overflow: hidden;
}
.favoriteColumn {
    display: flex;
    flex-direction: column;
    margin-right: 2%;
    max-height: 100%;
    max-width: 40%;
}
.fa-list {
    position: absolute;
    left: 3%;
    top: 10%;
}




/* User interaction field (comments) */
.userInteract {
    padding-top: 10px;
    margin-top: 10px;
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    border-top: 2px solid black;
}
.commentBox {
    border-radius: 5px;
}
.commentBox:first-child {
    display: none;
}
.profileEditor {
    display: flex;
    flex-direction: row;
    margin-bottom: 20px;
    background-color: #b22d29;
    border-radius: 5px;
}
.commentInput {
    width: 100%;
    height: fit-content;
    min-height: 80px;
    padding-left: 10px;
    border: 0 !important;
}
.postComment {
    width: 100%;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.commentBody {
 padding: 15px;
}
.commentImage {
    max-width: 80%;
    max-height: 8rem;
    border-radius: 3px;
}


/* profile */
.profileEditor > div:last-child {
    flex: 1;
    overflow: hidden;
    padding-right: 2%;
}
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 20%;
    width: fit-content;
    padding: 10px 10px;
}
.profileName {
    font-weight: bold;
    margin-top: 5px;
}


/* right side post comment*/
.rightSide {
    display: flex;
    flex-direction: row;
    align-items: center;
}
.charount {
    margin: 0 10px;
    position: relative;
}



#popup {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 14px;
    pointer-events: none;
    white-space: nowrap;
    display: none;
    z-index: 30;
    bottom: 20px;
}

.commentBox .ql-snow {
    border: 0px !important;
}
.ql-editor {
    height: fit-content;
    min-height: 80px;
}