@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Open+Sans:wght@400;700&family=Poppins:wght@300;400;500;600&family=Roboto:wght@100;300;500;700&display=swap');

:root {
    --dark-color-lightness:17%; 
    --primary-color-hue:252;
    --light-color-lightness:95%;
    --white-color-lightness:100%;

    --color-dark: hsl(252,30%,var(--dark-color-lightness));
    --color-light: hsl(252,30%,var(--light-color-lightness));
    --color-white: hsl(252,30%,var(--white-color-lightness));
    --color-gray: hsl(var(--primary-color-hue),15%,65%);
    --color-primary: hsl(var(--primary-color-hue), 75%, 60%);
    --color-secundary: hsl(252, 100%, 90%);
    --color-success: hsl(120, 95%, 65%);
    --color-danger: hsl(0, 95%, 65%);
    --color-black: hsl(252,30%,10%);

    --border-radius: 2rem;
    --card-border-radius: 1rem;
    --btn-padding: 0.6rem 2rem;
    --search-padding: 0.6rem 1rem;
    --card-padding: 1rem;

    --sticky-top-left: 5.4rem;
    --stick-top-right: -18rem;
}

*, 
*::before, 
*::after{
    margin: 0;
    padding: 0;
    outline: 0;
    text-decoration: border-box;
    list-style: none;
    border: none;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--color-dark);
    background: var(--color-light);
    overflow-x: hidden;
}

/* General Styles */
.container {
    width: 80%;
    margin: 0 auto;
}

.profile-picture {
    width: 4rem; /* Ajuste conforme necessário para diminuir pela metade */
    height: 4rem; /* Ajuste conforme necessário para diminuir pela metade */
    border-radius: 50%;
    overflow: hidden;
}

img {
    display: block;
    width: 100%;
    width: 4rem; /* Ajuste conforme necessário para diminuir pela metade */
    height: 4rem;
    border-radius: 50%;
}

.btn {
    display: inline-block;
    padding: var(--btn-padding);
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 300ms ease;
    font-size: 0.9rem;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-create {
    background: var(--color-gray); /* Altere para a cor desejada */
    border-radius: 50%; /* Faz o botão redondo */
}

.text-bold {
    font-weight: 500;
}

.text-muted {
    color: var(--color-gray);
}

nav {
    width: 100%;
    background: var(--color-white);
    padding: 0.7rem 0;
    position: fixed;
    top: 0;
    z-index: 10;
}

nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-bar {
    display: flex; /* Adicione esta linha para alinhar os itens na mesma linha */
    align-items: center;
    background: var(--color-light);
    border-radius: var(--border-radius); /* Mantenha essa linha se quiser manter a forma oval */
    padding: var(--search-padding);
}

nav .search-bar input[type="search"] {
    background: transparent;
    width: 30vw;
    margin-left: 1rem;
    font-size: 0.9rem;
    color: var(--color-dark);
}

/* Adicione estas linhas para alinhar a lupa no centro verticalmente */
nav .search-bar i {
    margin-right: 0.5rem; /* Ajuste conforme necessário */
    vertical-align: middle;
}

nav .search-bar input[type="search"]::placeholder {
    color: var(--color-gray);
}

nav .create {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* ============================  MAIN  ============================*/
main {
    position: relative;
    top: var(--sticky-top-left);
}

main .container {
    display: flex;
    grid-template-columns: 15vh auto 18vw; /* ajuste o primeiro valor conforme necessário */
    column-gap: 1rem;
    position: relative;
    align-items: flex-start;
}

/* ============================  LEFT  ============================*/
main .container .left {
    height: 50px;
    position: sticky;
    top: var(--sticky-top-left);
}

main .container .left .profile { /* Área do perfil onde fica o @ e uma foto */
    padding: var(--card-padding);
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    display: flex;
    align-items: center;
    column-gap: 1rem;
    width: 87%;
    margin-top: 17px;
}



/* ============================  SIDEBEAR  ============================*/
.left .sidebar {
    margin-top: 2rem;
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    
}

.left .sidebar .menu-item {
    display: flex;
    align-items: center;
    height: 50px;
    cursor: pointer;
    transition: all 300ms ease;
    position: relative;
}

.left .sidebar .menu-item:hover {
    background: var(--color-light);
}

.left .sidebar i {
    font-size: 1.4rem;
    color: var(--color-gray);
    margin-left: 2rem;
    position: relative;
}

.left .sidebar i .notifications-count {
    background: var(--color-danger);
    color: var(--color-white);
    font-size: 0.6rem;
    width: fit-content;
    border-radius: 0.8rem;
    padding: 0.1rem 0.4rem;
    position: absolute;
    top: 1rem;
    right: -0.3rem;
}

.left .sidebar h3 {
    margin-left: 1.5rem;
    font-size: 1rem;
}

.left .sidebar .active {
    background: var(--color-light);
}

.left .sidebar .active i,
.left .sidebar .active h3 {
    color: var(--color-primary);
}

.left .sidebar .active::before {
    content: "";
    display: block;
    width: 0.5rem;
    height: 100%;
    position: absolute;
    background: var(--color-primary);
}

.left .sidebar .menu-item:first-child.active {
    border-top-left-radius: var(--card-border-radius);
    overflow: hidden;
}

.left .sidebar .menu-item:last-child.active {
    border-bottom-left-radius: var(--card-border-radius);
    overflow: hidden;
}

.left .btn {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
}


/* ============================  NOTIFICATION POPUP  ============================*/

.left .menu-item:hover .notifications-popup {
    display: block;
}

.left .notifications-popup {
    position: absolute;
    top: 1rem; /* Ajuste conforme necessário para posicionar o popup abaixo do ícone */
    left: calc(100% + 1rem); /* Ajuste conforme necessário para posicionar o popup ao lado do ícone */
    width: 20rem; /* Ajuste conforme necessário para largura desejada */
    background: var(--color-gray);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    box-shadow: 0 0 2rem hsl(var(--color-primary), 75%, 60%, 25%);
    z-index: 10;
    display: none;
}

.left .notifications-popup::before {
    content: "";
    width: 1rem;
    height: 1rem;
    display: block;
    background: var(--color-danger);
    position: absolute;
    left: -0.1rem;
    transform: rotate(45deg);
    top: 0.1rem; /* Ajuste conforme necessário para posicionar a seta corretamente */
}

.left .notifications-popup > div {
    display: flex;
    align-items: center; /* Ajuste o alinhamento vertical */
    gap: 1rem;
}

.left .notifications-popup .profile-photo img {
    width: 2rem; /* Ajuste conforme necessário */
    height: 2rem; /* Ajuste conforme necessário */
    border-radius: 50%; /* Mantém a foto redonda */
}

.left .notifications-popup .nofitication-body {
    flex: 0.9; /* Permite que o texto ocupe o espaço disponível */
    margin-top: 1rem;
}

.left .notifications-popup small {
    display: block;
    color: var(--color-gray); /* Ajuste a cor do texto das notificações */
}


/* ============================  MIDdLE ============================*/


/* ====================  STORIES  ===================*/
.middle .stories {
    display: flex;
    justify-content: center; /* Centraliza as histórias horizontalmente */
    align-items: start; /* Alinha as histórias no topo */
    height: 15rem; /* Aumenta a altura das histórias */
    gap: 0.5rem;
    margin-top: 1rem; /* Adiciona uma margem no topo */
}

.middle .stories .story {
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: var(--color-white);
    font-size: 0.75rem;
    width: 100%;
    height: 20rem;
    position: relative;
    overflow: hidden;
}

.middle .stories .story::before {
    content: "";
    display: block;
    width: 100%;
    height: 5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    position: absolute;
    bottom: 0;
}

.middle .stories .story .name {
    z-index: 2;
}

.middle .stories .story:nth-child(1) {
    background: url("../img/story-1.jpg") no-repeat center center/cover;
}

.middle .stories .story:nth-child(2) {
    background: url("../img/story-2.jpg") no-repeat center center/cover;
}

.middle .stories .story:nth-child(3) {
    background: url("../img/story-3.jpg") no-repeat center center/cover;
}

.middle .stories .story:nth-child(4) {
    background: url("../img/story-4.jpg") no-repeat center center/cover;
}

.middle .stories .story:nth-child(5) {
    background: url("../img/story-5.jpg") no-repeat center center/cover;
}

.middle .stories .story:nth-child(6) {
    background: url("../img/story-6.jpg") no-repeat center center/cover;
}

.middle .stories .story .profile-photo {
    width: 4rem; /* Diminui o tamanho da foto */
    height: 4rem; /* Diminui o tamanho da foto */
    border: 3px solid purple; /* Borda roxa */
    border-radius: 50%; /* Borda redonda */
    overflow: hidden; /* Garante que a foto fique redonda */
    display: flex; /* Permite o alinhamento central */
    justify-content: center; /* Centraliza a foto horizontalmente */
    align-items: center; /* Centraliza a foto verticalmente */
}

.middle .stories .story .profile-photo img{
    width: 130%;
    height: 130%;
    object-fit: contain;
    border-radius: 50%;
}


/* ============================  POSTAGEM ============================*/

.middle .create-post {
    width: calc(100% - 2 * var(--card-padding)); /* Ajusta a largura da área de postagem */
    height: 1rem; /* Ajusta a altura da área de postagem */
    display: flex;
    align-items: center; /* Alinha o input, a foto e o botão de postagem na mesma linha */
    justify-content: space-between;
    margin-top: 8rem;
    background: var(--color-white);
    padding: 2rem var(--card-padding);
    border-radius: var(--border-radius);
}

.middle .create-post .profile-photo {
    width: 4rem; /* Diminui o tamanho da foto */
    height: 3rem; /* Diminui o tamanho da foto */
    border: 3px solid purple; /* Borda roxa */
    border-radius: 50%; /* Borda redonda */
    overflow: hidden; /* Garante que a foto fique redonda */
    display: flex; /* Permite o alinhamento central */
    justify-content: center; /* Centraliza a foto horizontalmente */
    align-items: center; /* Centraliza a foto verticalmente */
}

.middle .create-post .profile-photo img {
    width: 150%;
    height: 150%;
    object-fit: contain;
    border-radius: 50%;
}


.middle .create-post input[type="text"] {
    justify-self: start;
    width: 100%;
    padding-left: 1.5rem;
    background:transparent;
    color: var(--color-dark);
    margin-right: 1rem;
}

/* ============================  FEED ============================*/

.middle .feeds .feed {
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

 .middle .feed .head {
    display: flex;
    justify-content: space-between;
 }

 .middle .feed .photo .img-sem-borda {
    width: 100%; /* Ajuste para o tamanho desejado */
    height: 100%; /* Mantém a proporção da imagem */
    border-radius: 0; /* Remove a borda redonda */
}

.middle .feed .user {
    display: flex;
    gap: 1rem;
}

.middle .feed .user img {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    border-radius: 50%;
}

.middle .feed .photo {
    border-radius: var(--card-border-radius);
    overflow: hidden;
    margin: 0.7rem 0;    
}

.middle .feed .action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    margin: 0.1rem;
}

.middle .liked-by {
    margin-left: 0.5rem;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
    align-items: center;
    display: flex;
    order: -1; /* Posiciona este elemento acima dos outros na ordem de renderização */
    font-size: 0.7rem;
}
 
.middle .liked-by span {
    width: 1.4rem;
    height: 1.4rem;
    display: block;
    border-radius: 50%;
    object-fit: contain;
    overflow: hidden;
    border: 3px solid #ffffff;
    margin-left: -0.6rem;
}

.middle .liked-by span img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.middle .feed .head,
.middle .feed .photo,
.middle .feed .action-buttons,
.middle .liked-by {
    order: 1;
}

.middle .feed .caption,
.middle .feed .comments {
    order: 2;
}

.middle .liked-by p {
    margin-left: 0.5rem;
}

/* ============================  RIGHT ============================*/

main .container .right {
    height: max;
    position: sticky;
    bottom: 0;
    right: 0;
}

.right .messages {
    position: relative;
    background: var(--color-white);
    border-radius: var(--card-border-radius);
    padding: var(--btn-padding);
    margin-top: 1rem;
    overflow-y: auto;
    overflow-x: auto;
}

.right .messages .heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.right .messages i {
    font-size: 1rem;
}

.right .messages .search-bar {
    display: flex;
    margin-bottom: 1rem;
    width: 200px;
}

.right .search-bar input[type="text"] {
    background: transparent;
    margin-left: 1rem;
    font-size: 0.9rem;
    color: var(--color-dark);
    width: 200px;
}

.right .messages .category {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.right .messages .category h6 {
    width: 80%;
    text-align: center;
    border-bottom: 4px solid var(--color-light);
    padding-bottom: 0.7rem;
    font-size: 0.85rem;
}

.right .messages .category .active {
    border-color: var(--color-dark);
}
.right .messages .category .message-requests {
    color: var(--color-primary);
}

.right .messages .message {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.right .messages .message:last-child {
    margin: 0;
}

.right .messages .message p {
    font-size: 0.8rem;
    align-self: flex-end;
}

.right .messages .message .text-muted {
    align-self: flex-end;
}

.right .message .profile-photo .active {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    background: var(--color-success);
    position: absolute;
    bottom: 0;
    right: 0;
}

.right .message .profile-photo {
    position: relative;
    overflow: visible;
}


.right .messages .message .profile-photo img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* ============================  SOLICITAÇÕES DE AMIGOS ============================*/

.right .friend-requests {
    margin-top: 1rem;
}

.right .friend-requests h4 {
    color: var(--color-gray);
    margin: 1rem 0;
    margin-left: 1.5rem;
}

.right .request {
    background: var(--color-white);
    padding: var(--card-padding);
    border-radius: var(--card-border-radius);
    margin-bottom: 0.7rem;
}

.right .request .info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.right .request .info .profile-photo img {
    width: 3rem;
    height: 3rem;
}

.right .request .action {
    display: flex;
    gap: 1rem;
}

/*--=============================  THEME CUSTOMIZATION  ==========================================- */

.customize-theme {
    background: rgba(255, 255, 255, 0.5);
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    text-align: center;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    display: none;
}

.customize-theme .card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-white);
    padding: 3rem;
    border-radius: var(--card-border-radius);
    width: calc(100% - 2 * var(--card-padding));
    max-width: 800px;
    justify-content: center;
    box-shadow: 0 0 1rem var(--color-primary);
}

.customize-theme .card i {
    position: absolute;
    top: 10px; /* Ajuste conforme necessário */
    right: 10px; /* Ajuste conforme necessário */
    cursor: pointer;
    font-size: 30px;
    color: var(--color-dark); /* Cor do ícone */
}

/*--=============================  FONTE SIZE  ==========================================- */

.customize-theme .font-size {
    margin-top: 5rem;
}

.customize-theme .font-size > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-light);
    padding: var(--search-padding);
    border-radius: var(--card-border-radius);
}

.customize-theme .choose-size {
    background: var(--color-secundary);
    height: 0.3rem;
    width: 100%;
    margin: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customize-theme .choose-size span {
    width: 1rem;
    height: 1rem;
    background: var(--color-secundary);
    border-radius: 50%;
    cursor: pointer;
}

.customize-theme .choose-size span.active {
     background: var(--color-primary);
}

/*--=============================  FONTE SIZE  ==========================================- */

.customize-theme .color {
    margin-top: 2rem;
}

.customize-theme .choose-color {
    background: var(--color-light);
    padding: var(--search-padding);
    border-radius: var(--card-border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customize-theme .choose-color span {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
}

.customize-theme .choose-color span:nth-child(1) {
    background: hsl(252, 75%, 60%);
}

.customize-theme .choose-color span:nth-child(2) {
    background: hsl(52, 75%, 60%);
}

.customize-theme .choose-color span:nth-child(3) {
    background: hsl(352, 75%, 60%);
}

.customize-theme .choose-color span:nth-child(4) {
    background: hsl(152, 75%, 60%);
}

.customize-theme .choose-color span:nth-child(5) {
    background: hsl(202, 75%, 60%);
}

.customize-theme .choose-color span.active {
    border: 5px solid white;
}

/*--=============================  BACKGROUND  ==========================================- */

.customize-theme .background {
    margin-top: 2rem;
}

.customize-theme .choose-bg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.customize-theme .choose-bg > div {
    padding: var(--card-padding);
    width: 100%;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0.4rem;
    cursor: pointer;
}

.customize-theme .choose-bg > div.active {
    border: 2px solid var(--color-primary);
}

.customize-theme .choose-bg .bg-1 {
    background: white;
    color: black;
}

.customize-theme .choose-bg .bg-2 {
    background: hsl(252, 30%, 17%);
    color: white;
}

.customize-theme .choose-bg .bg-3 {
    background: hsl(252, 30%, 10%);
    color: white;
}

.customize-theme .choose-bg > div span{
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--color-gray);
    border-radius: 50%;
    margin-right: 1rem;
}

/*--=============================  MEDIA QUERIES PARA PEQUENOS LAP TOPS E TABLETS GRANDE  ==========================================- */

@media screen and (max-width: 1200px) {
    .container {
        width: 96%;
    }

    main .container {
        grid-template-columns: 30rem auto 20vw;
        gap: 1rem;
    } 

    .left .sidebar i {
        margin-left: 0.5rem;
    }

    .left {
        width: 5rem;
        z-index: 5;
    }

    main .container .left .profile {
        display: none;
    }

    .sidebar h3 {
        display: none;
    }

    .left .btn {
        display: none;
    }  

    .customize-theme .card {
        width: 96vw;
    }
}

/*--============ MEDIA QUERIES PARA PEQUENOS TABLETS E CELULARES  ==============- */

@media screen and (max-width: 992px) {
    nav .search-bar {
       display: none;
    }

    main .container {
        grid-template-columns: 0 auto 5rem;
    }

    main .container .left {
        grid-column: 3/4;
        left: -20rem;
        width: 5rem;
    }

    .left .sidebar i {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }

    /*--============ NOTIFICAÇÔES  ==============- */

    .left .notifications-popup::before {
        display: absolute;
        top: 1.3rem;
        left: calc(20rem - 0.6rem);
        display: block;
    }

    main .container .middle {
        grid-column: 1/3;
    }

    main .container .right {
        display: none;
    }


}