/* General styling */

* {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif ,sans-serif;
    /*background-color: #A1A1A1;*/
    color: black;
    box-sizing: border-box;
}

/* These css rules ensure main takes up the rest of the screen height that the header doesn't */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* 3 height related css rules above */

a {
    text-decoration: none;
}

a:hover{
    text-decoration: underline;
}

body {
    background-color: #f6f6f6;
    width: 100%;
    /* Allows for child element backgrounds to take up the whole screen width if required. */
    margin: 0;
    padding: 0;
}

li {
    all: unset;
}

ul {
    all: unset;
    margin: 0;
    padding: 5px;
    height: auto;
    margin-block-start: 0;
    margin-block-end: 0;
    padding-inline-start: 0;
}



h1 {
    margin-top: 1%;
    margin-bottom: 0.5%;
    font-size: 2.5rem;
}

.standard-btn{
    display: flex;
    justify-content: center;
    align-items: center;
}

.standard-btn:hover, .sign-in-btn:hover, .sign-out-btn:hover{
    cursor: pointer;
}

.like-button {
    all: unset;
}

.like-button:hover{
    cursor: pointer;
}

/* Chrome and Safari scrollbar styling */

::-webkit-scrollbar {
    width: 0.6em;
}

::-webkit-scrollbar-track {
    background-color: #e8e8e8;
    border-radius: 20px;
}

::-webkit-scrollbar-thumb {
    background-color: black;
    border-radius: 20px;
    border: 0.15em solid #e8e8e8;
}

::-webkit-scrollbar-button{
    display: none;
}

/* firefox scrollbar styling */
@-moz-document url-prefix() {
    * {
        scrollbar-width: thin;
        scrollbar-color: black #ccc;
    }
}

/* Header styling */

header{
    width: 100%;
    height: auto;
    background-color: #FFFFFF;
    
    position: static;
}

nav{
    display: flex;
    justify-content: space-between;
    background-color: #FFFFFF;
    padding: 0.5% 2%;
    align-items: center;
    font-size: 1.1rem;
    width: inherit;
    /*Adding shadow to bottom border. May change later*/
    box-shadow: 0px -1px 10px gray;
}

nav img, .standard-logo{
    height: 60px;
    width: auto;
}

.mobile-right-nav{
    display: none;
}

.notifications-drop-down{
    display: none;
    position: absolute;
    width: 400px;
    height: 450px;
    background-color: white;
    border: thin solid black;
    border-radius: 10px;
    overflow-y: auto;
    top: 90px;
    right: 10px;
    z-index: 4;
    padding: 0 10px;
    opacity: 1;
}

.notification-container{
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px dotted black;
}

.notification-container a{
    display: flex;
    align-items: center;
}

.notification-info{
    margin-left: 10px;
}

.notification-container p{
    margin-block-start: 0;
    margin-block-end: 0.1em;
}

.notification-container span{
    font-size: 0.8em;
    color: rgb(139, 139, 139);
}

.no-notif-p{
    margin-top: 30%;
    text-align: center;
}

.notifications-top{
    display: flex;
    justify-content: space-between;
}

.close-notifications-btn{
    all: unset;
}

.close-notifications-btn:hover{
    cursor: pointer;
}

.close-notifications-btn img{
    width: 35px;
    height: 35px;
}

/* mobile nav styling */

@media screen and (max-width: 600px){
    .mobile-right-nav{
        display: block;
        position: relative;
        z-index: 0;
    }

    .open-mobile-menu-btn, .close-mobile-menu-btn{
        all: unset;
    }

    .open-mobile-menu-btn img, .close-mobile-menu-btn img{
        width: 40px;
        height: 50px;
    }
    
    .close-mobile-menu-btn{
        margin: 5px;
    }

    .right-nav.desktop-right-nav{
        display: none;
    }

    .mobile-right-nav .inactive{
        display: none;
    }

    .opened-mobile-right-nav{
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1;
        width: 80vw;
        height: 100vh;
        background-color: white;
        /*opacity: 0.9;*/
    }

    .mobile-nav-container{
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-nav-container > *, .mobile-nav-container .notification-btn{
        margin: 0;
        margin: 5px;
        /*margin-left: 20px;*/
        height: 60px;
        width: auto;
        font-size: 1.1em;
        justify-self: center;
        align-self: center;
    }

    .mobile-nav-container img{
        vertical-align: middle;
        margin: 0;
    }

    .mobile-nav-container .profile-container{
        justify-content: start;
    }

    .mobile-nav-container .post-link{
        justify-content: start;
        align-items: center;
    }

    .mobile-nav-container .post-link img{
        margin-top: 5px;
    }

    .mobile-nav-container .feed-link{
        display: flex;
        align-items: center;
    }

    .mobile-nav-container .profile-link{
        all: unset;
        margin-left: 0;
    }

    .mobile-nav-container form{
        margin-left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: auto;
    }

    .mobile-nav-container .notifications-drop-down{
        min-height: 50vh;
        width: 90vw;
        height: auto;
        top: 50%;
        left: 50%;
        transform: translate(-32%, -50%);
    }

    .mobile-nav-container .notification-container{
        height: auto;
    }

    .mobile-nav-container .notifications-drop-down p{
        font-size: 0.8em;
    }
}

/* main feed styling */

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.notification-btn{
    all: unset;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.notification-btn img{
    width: 40px;
    height: 40px;
}

.filter-section{
    width: 200px;
    background-color: white;
    padding: 0.5em 1em 0.5em 1em;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
}

.selected{
    font-weight: 600;
}

.unselected{
    color: rgb(139, 139, 139);
}

.unselected:hover{
    color: black;
    font-weight: 600;
}

.feed-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
}

.feed-post-container{
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #FFFFFF;
    /*max-height: 95vh;*/
    margin: 2vh 0;
}

.upper-feed-post, .lower-feed-post{
    display: flex;
    align-items: center;
    min-height: 70px;
    /*height: 10dvh;*/
    width: 90%;
    flex-grow: 1;
}

/* Prevents date from overlapping with heart and comment icon */
.feed-post-container .post-date{
    margin-left: 20px;
}


/* profil pic styling */

.user-profile-pic, .large-profile-pic{   
    border: 4px solid black;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
    margin-right: 1rem;
}

nav .user-profile-pic{
    height: 50px;
    width: 50px;
} 

.upper-feed-post .user-profile-pic, .comment-container .user-profile-pic{
    height: 60px;
    width: 60px;
}

.comment-container .user-profile-pic{
    min-width: 50px;
    min-height: 50px;
    height: 50px;
    width: 50px;
}



.large-profile-pic{
    height: 160px;
    width: 160px;
}

.post-pic{
    max-height: 70vh;
    width: auto;    
}

.post-pic img{
    max-height: 70vh;
    max-width: 100%;
    object-fit: cover;
}

.post-section .post-pic img{
    max-height: 65vh;
}



.lower-feed-post{
    display: flex;
    justify-content: space-between;

}

.likes-comments{
    display: flex;
    align-items: center;
}

.likes-comments div{
    display: flex;
    align-items: center;
}

.likes-comments .feed-likes{
    margin: 5%;
}

.likes-comments img{
    min-height: 29px;
    height: 4dvh;
    margin-left: -4px;
   
}

.likes-comments .new-post-icon{
    margin-left: 0;
}

.like-comments a{
    all: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-like div{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* login and register styling */

.login-main{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.content-login{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 0px 2%;
}

.reg-span{
    color: rgb(139, 139, 139);
    font-size: 0.9rem;
    
}

.login-main a{
    text-decoration: underline;
    color: rgb(139, 139, 139);
    font-size: 0.9rem;
}

/* Fix login styling */
.error-container, .error-message, .error-message a{
    
    word-wrap: break-word;
    color: rgb(255, 80, 80);
}

.error-container{
    border: 2px solid rgb(245, 72, 72);
    padding: 2%;
    border-radius: 10px;
    width: 20vw;
    min-width: 300px;
}

@media all and (min-height: 600px){
    .content-login h1{
        margin-bottom: 5%;
        text-align: center;
    }

    .content-login{
        
        height: 50vh;
        max-width: 95%;
        min-height: 450px;
        max-height: 600px;
    }

    .reg-span{
        margin-bottom: 0;
    }

    
}

@media all and (max-height: 450px) and (orientation: landscape){
    .content-login h1{
        margin-bottom: 0;
    }
    .content-login{
        padding-bottom: 10px;
    }
    .reg-span{
        margin-bottom: 5px;
    }

    .login-main{
        min-height: 120vh;
    }
}







.login-form{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-form input{
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 20vw;
    max-width: 350px;
    min-width: 300px;
    border-radius: 5px;
    font-size: 1.2rem;
    border-color: rgb(139, 139, 139);
    border: 1px solid rgb(139, 139, 139);
}

.login-form span{
    color: rgb(139, 139, 139);
    font-size: 0.8rem;
}



/* Fix form input sizing and span overlap */
/*
.login-form, .login-form input{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20vw;
    max-width: 400px;
    height: 40px;
    border-radius: 5px;
}*/

.sign-in-btn, .sign-out-btn, .standard-btn{
    margin: 1rem;
    padding: 0;
    border: 0;
    height: 55px; 
    background-color: rgb(46, 46, 46);
    color: white;
    border-radius: 5px;
}

.sign-in-btn:hover, .sign-out-btn:hover, .standard-btn:hover{
    background-color: black;
}

.login-form span{
    align-items: left;
}

/* profile page styling */

.right-nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 250px;
}

.nav-with-pic .right-nav{
    width: 225px;
}

.right-nav .user-profile-pic{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0;
}

.right-nav{
    width: auto;
}

.right-nav a{
    margin: 0 5px 0 5px;
}

.right-nav form{
    margin-left: 5px;
}

.post-link{
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.post-link img{
    height: 20px;
}

.sign-out-btn, .standard-btn{
    width: 100px;
    height: 35px;
    font-size: 1.1rem;
    margin: 0;
}

.profile-info{
    margin: 5vh 0;
    padding: 25px;
    display: flex;
    background-color: white;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    width: 35dvw;
    min-width: 500px;
}

#following-btn{
    background-color: white;
    color: black;
    border: 2px solid black;
}

.profile-info-right{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 60%;
}

.profile-upper{
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.settings-profile{
    position: relative;
    display: inline-block;
    padding: 10px;
}

.settings-dropdown{
    display: none;
    position: absolute;
    width: 150px;
    height: auto;
    flex-direction: column;
    align-items: center;
    background-color: white;
    
    border: thin solid black;
    transform: translate(-55px);
    border-radius: 10px;
}

.settings-profile:hover .settings-dropdown{
    display: flex;
}

.dropdown-items{
    text-align: center;
}

.dropdown-items button{
    all: unset;
}

.dropdown-items span, .dropdown-items button{
    width: 148px;
    display: block;
    padding-top: 8px;
    padding-bottom: 8px;
    overflow: hidden;
}

.top-dropdown-item{
    border-bottom: thin solid black; 
    border-radius: 10px 10px 0 0;
}

.bot-dropdown-item:hover{
    text-decoration: underline;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
}

.dropdown-items *:hover{
    background-color: #f6f6f6;
}

.cog-icon{
    height: 40px;
    width: auto;
}

.cancel-delete-posts-section{
    
    z-index: 4;
    display: none;
    /*display: flex;*/
    align-items: center;
    justify-content: center;

    position: sticky;
    background-color: white;
    width: auto;
    height: auto;
    padding: 10px;
    bottom: 25px;
    border-radius: 10px;
    border: 3px solid black;
}

.select-for-del-section{
    display: none;
    z-index: 3;
    position: absolute;
    width: 50px;
    height: 50px;
    right: 5px;
    top: 5px;
}

.cancel-delete-posts-section *{
    margin: 5px;
}

.delete-btn{
    background-color: rgb(255, 69, 69);
}

.delete-btn:hover{
    background-color: red;
}

.profile-lower{
    display: flex;
    justify-content: space-between;

}
.gallery{
    display: grid;
    grid-template-columns: 33.33% 33.33% 33.33%;
    gap: 5px;
    margin: 0 0 5dvh 0;
    max-width: inherit;
}

.post-preview img{
    object-fit: cover;
    max-width: 100%;
}

.post-preview{
    
    display: flex;
    height: 450px;
    width: 450px;
    position: relative;
    justify-content: center;
    background-color: white;
}

@media all and (max-width: 750px){
    .post-preview{
        height: initial;
        width: initial;
    }

    .profile-info{
        width: initial;
        min-width: initial;
        flex-direction: column;
    }

    .large-profile-pic{
        margin-right: 0;
    }

    .profile-info-right{
        flex-direction: column;
        width: 100%;
    }

    .profile-info-right .profile-upper{
        justify-content: center;
    }

    .profile-upper.otherUserProfile{
        flex-direction: column;
    }

    .profile-center p{
        text-align: center;
    }

    .profile-lower{
        flex-direction: column;
        align-items: center;
    }

    .gallery{
        grid-template-columns: 100%;
    }
}

@media all and (max-width: 1000px) and (min-width: 751px){
    .gallery{
        grid-template-columns: 50% 50%;
    }

    .post-preview{
        width: 320px;
        height: 320px;
    }
}

.post-preview .post-preview-pic{
    position: relative;
    z-index: 0;
    display: flex;
    justify-content: center;
    background-color: white;
}

@media all and (max-width: 1500px) and (min-width: 1001px){
    .gallery{
        grid-template-columns: 33.3% 33.3% 33.3%;
    }

    .post-preview{
        width: 320px;
        height: 320px;
    }
}



.post-preview-overlay{
    position: absolute;
    z-index: 5;
    display: flex;
    align-items: center;
    align-self: center;
    justify-self: center;
    visibility: hidden;
}

.post-preview-overlay a:hover{
    text-decoration: none;
}

.post-preview-overlay span{
    color: white;
}


.post-preview .post-preview-pic:hover{
    filter:blur(0.15rem);
}

.post-preview:hover .post-preview-pic{
    filter:blur(0.15rem);
}

.post-preview-pic:hover + .post-preview-overlay, .post-preview-overlay:hover{
    visibility:  visible;
}

.post-preview .likes-comments span{
    margin-right: 5px;
}

/* New post page styling */


.profile-info, .content-login{
    box-shadow: 0px 2px 5px gray;
}

.new-post-ui{
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: auto;
    background-color: white;
    box-shadow: 0px 2px 5px gray;
    border-radius: 10px;
    height: auto;
}

@media all and (max-width: 1030px){
    .new-post-ui{
        flex-direction: column;
        margin: 10px 5px 10px 5px;
        width: 95vw;
        height: auto;
    }
    main .new-post-details{
        width: 100vw;
        min-width: initial;
        max-height: initial;
        padding: 0 5%;
    }

    main .new-post-preview{
        width: 100%;
        max-height: initial;
        margin-left: 0;
        padding: 0 5px;
    }

    .post-pic{
        max-height: initial;
        max-width: 90dvw;
    }
}

.new-post-details{
    display: flex;
    flex-direction: column;
    
    border-radius: 10px;
    padding: 1% 2%;
    width: 35%;
    min-width: 600px;
    max-height: 450px;

}

.new-post-preview{
    
    padding: 0 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
}

.feed-post-container{
    box-shadow: 0px 2px 5px gray;
    border-radius: 5px;
}

.upload-zone{
    
    background-color: #f6f6f6;
    padding: 2%;
    border-radius: 12px;
    
}

.upload-zone .inner-border{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    border: 2px dashed black;
    padding: 2% 5%;
    border-radius: 12px;
}



.upload-zone .photo-upload-img{
    width: 80px;

}

.choose-file {
    display: none;
}

.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}


.submit-btn-div{
    display: flex;
    justify-content: right;
}

.post-now-btn {
    margin: 20px 0;
}

.new-post-preview {
    margin-left: 10px;
    width: 35%;
    max-height: 85dvh;
}

#new-post-pic{
    max-height: 40dvh;
}

/* User settings styling */

.settings-options-sec{
    background-color: white;
    border-radius: 10px;
    padding: 2%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 70vh;
    width: 30vw;
    min-width: fit-content;
}

@media all and (orientation: landscape){
    .settings-options-sec{
        height: initial;
    }
}

#change-profile-pic-form{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: 60%;
}

.upper-settings-form, .lower-settings-form{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.save-changes{
    width: 150px;
}

/*.nav-3 .right-nav{
    width: 300px;
}*/

.settings-options-sec .bio-input{
    width: 300px;
    height: 100px;
    font-size: 1rem;
    
}

.profile-center p {
    white-space: pre-wrap;
}

.settings-options-sec .standard-btn{
    width: 200px;
}

.settings-options-sec .large-profile-pic{
    margin: 0;
}

/* ############### following/follower list page styling ################ */

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-followed-container{
    background-color: white;
    display: flex;
    width: 50vw;
    justify-content: space-between;
    padding: 20px;
    align-items: center;
    border-radius: 10px;
    margin: 5px;
    box-shadow: 0px 2px 5px black;
}

@media screen and (max-width: 450px){
    .user-followed-container{
        width: 95vw;
    }

    .user-followed-container .username{
        font-size: 1.2em;
        margin-left: 5px;
    }

    .user-followed-container a .large-profile-pic{
        width: 70px;
        height: 70px;
    }
}

.user-followed-container *{
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.follow-h1{
    margin: 30px;
    text-align: center;
}

.user-followed-container .large-profile-pic{
    width: 100px;
    height: 100px;
}

.username{
    font-size: 1.5rem;
}

/* ################### post page and comments styling ##################*/

.main-post-page{
    display: flex;
    width: 95vw;
    height: 87vh;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 1025px){
    main .main-post-page{
        flex-direction: column;
    }
}

@media screen and (max-height: 1367px) and (max-width: 1100px){
    .main-post-page{
        margin: 5% 0 5% 0;
        height: initial;
    }

    .main-post-page .post-section{
        margin-bottom: 2%;
        
    }

    .main-post-page .comments-section{
        width: 99%;
        min-height: 353px;
        margin-left: 0;
    }

}

.feed-posts.post-section .feed-post-container{
    margin: 0;
    max-height: 70%;
    width: auto;
    border: none;
    
}

.feed-posts.post-section{
    display: inline-block;
    width: auto;
    border-radius: 5px;
    box-shadow: 0px 1px 3px black;
    
}

.feed-posts.post-section .user-profile-pic{
    height: 55px;
    width: 55px;
}

.profile-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    width: auto;
}

.comments-section{
    width: 50%;
    min-height: 200px;
    /*max-height: 400px;*/
    height: auto;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0px 1px 3px black;
    /*border: 2px solid black;*/
    margin-left: 5px;
    max-width: 550px;
}

.upper-comments{
    padding-left: 5%;
}

.mid-comments{
    padding: 0 20px 5px 20px;
    height: 95%;
    overflow-y: auto;
}

.right-comment p{
    overflow-wrap: anywhere;
}

.right-comment {
    width: 100%;
    margin: 10px;
}

.delete-comment-btn{
    all: unset;
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
}

.delete-comment-btn img{
    width: 30px;
    height: 30px;
}

.delete-comment-div{
    display: none;
    background-color: red;
    height: 100%;
    width: auto;
    text-align: center;
    border-radius: 25%;
    margin: 50px;
}

.delete-comment-btn:hover{
    cursor: pointer;
}

@media (hover: hover){
    .comment-container:hover .delete-comment-div{
        display: block;
    }
}

@media (hover: none){
    .comment-container .delete-comment-div{
        display: block;
    }
}



.comment-container{
    display: flex;
    align-items: center;
    width: 100%;
}

.comment-container *{
    margin: 0;
}

.comment-container .right-comment{
    margin: 0 0 0 2%;
}

.comment-container:hover .right-comment{
    margin-right: 2%;
}

.comment-container span{
    color: rgb(139, 139, 139);
    font-size: 0.8rem;
    margin: 0; 
}

.bot-comments *{
    display: flex;
    align-items: center;
    margin: 5px 5px 5px 5px;

}



.bot-comments textarea{
    width: 95%;
    height: 100%;
    height: 35px;
    padding: 7px;
}

.bot-comments button{
    width: 50px;
}