:root{
    --bg-color: aliceblue; 
    --search-bar-option-hover: #f0eeee;
    --search-border: 1px solid #cfcdcd;
    --search-border-radius: 10px;
    --btn-bg-color: #9b9a9a;
    /* 當使用者移到我、追蹤者或收藏時，會hover的背景 */
    --user-info-btn-bg-color: #000;
    --user-info-btn-text-color: #fff;
}

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family: 'Taipei Sans TC', 'Noto Sans TC', sans-serif;
    box-sizing: border-box;
}

.view-posts{
    height: 600px;
    border: none;
    border-radius: 5px;
    background-color: rgb(233, 233, 233);

    margin:  auto;
    outline: none;
    overflow-y: auto;
    &::-webkit-scrollbar{
        width: 6px;
        border-radius: var(--search-border-radius);
        background-color: #cfcdcd;
    }

    &::-webkit-scrollbar-thumb{
        background: #9b9a9a;
        border-radius: 10px;
    }

}

.nav{
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: flex-end;
    padding-top: 5px;
    padding-right: 20px;
    /* 固定的方法 */
    position: sticky;
    top: 0;
    z-index: 10;

    background-color: rgb(233, 233, 233);
    border-radius: 10px;
}

.close-btn{
    width: 20px;
    height: 20px;
    overflow: hidden;

    cursor: pointer;
}

.close-btn img{
    width: 20px;
    height: 20px;
    object-fit: cover;
}

.posts-container{
    width: 100%;
    padding: 2px 10px 10px 10px;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, 350px);
    gap: 5px;
}

.post-content-container{
    width: 100%;
    height: 350px;
    border: 1px solid #000;
    border-radius: 10px;
    background-color: #fff;

    box-sizing: border-box;

    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: 1fr;
    gap: 20px;
}

.post-content-img{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 35px;
}

.content-img-container{
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
}

.food-img-info{
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;

    display: flex;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    cursor: pointer;

    &::-webkit-scrollbar{
        display: none;
    }
}

.img-info-scroll{
    border-radius: 10px;
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align:center;
}

.imgSlides{
    width: 100%;
    height: 100%;
    display: flex;
    border-radius: 10px;
}

.img-container{
    width: 100%;
    height: 100%;
    background-color: #000;
    border-radius: 10px;

    display: flex;
    justify-content: center;
    flex: 0 0 100%;

    overflow: hidden;
}

.img-container img{
    width: 100%;
    height: 80%;
    border-radius: 10px;
    object-fit: cover;
    position: absolute;
    z-index: 1;
}

.sildeBtn{
    width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: space-between;
    position: absolute;
    z-index: 2;
    top: 110px;
}

.leftBtn, .rightBtn{
    all: unset;
    width: 25px;
    height: 50px;
    border-radius: 0 10px 10px 0;
    background-color:rgba(255, 255, 255, 0.5);
}

.rightBtn{
    border-radius: 10px 0 0 10px;
}

.leftBtn:hover, .rightBtn:hover{
    background-color: #fff;
}

.leftBtn img, .rightBtn img{
    padding-top: 8px;
    width: 20px;
    height: 30px;
}

.food-info{
    width: 100%;
    height: 20%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 10px 10px;
    position: absolute;
    z-index: 3;
    bottom: 0;
    right: 0;
}

.food-info-container{
    width: 100%;
    height: 100%;

    font-size: 15px;
    font-weight: 500;
    text-align: center;
    padding-left: 10px;
    line-height: 25px;
}

.food-info-container div{
    color: #fff;
}

.post-evaluate-action{
    width: 100%;
    height: 100%;
    display: flex;
    gap: 20px;

    padding-top: 8px;
    padding-left: 20px;
}

.love-btn, .collect-btn{
    width: auto;
    height: 20px;
    display: flex;
    gap: 5px;
    overflow: hidden;
}

.love-btn img{
    width: 20px;
    height: 20px;
    object-fit: cover;
}

#like-btn, #favorite-btn{
    cursor: pointer;
}

.collect-btn img{
    width: 20px;
    height: 20px;
    object-fit: cover;
}

.post-content-comment{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 70px 200px;
}

.user-info{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 0.5fr 3.5fr;
    grid-template-rows: 1fr;
    gap: 10px;
    align-items: center;
}

.user-headshot{
    width: 50px;
    height: 50px;
    overflow: hidden;

    border-radius: 10px;
    border: 1px solid #000;
    box-sizing: border-box;
}


.post-user-headshot{   
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
}

.usernickname-CTN{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 0.5fr 0.5fr;
}

.follow-btn{
    all: unset;
    width: 100px;
    height: 25px;
    border: var(--search-border);
    border-radius: var(--search-border-radius);

    font-size: 16px;
    font-weight: 500;
    text-align: center;
    font-family: 'Taipei Sans TC', 'Noto Sans TC';
    cursor: pointer;
}

.user-nickname{
    width: 100%;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Taipei Sans TC', 'Noto Sans TC';
    line-height: 20px;
    padding-left: 10px;
}

.post-comment{
    width: 100%;
    min-height: 0;
    padding-right: 5px;
    box-sizing: border-box;

    font-size: 16px;
    font-family: 'Taipei Sans TC', 'Noto Sans TC';
    overflow-y: auto;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 0.5fr 1fr 1fr;
    gap: 10px;
}

.store-name-add, .food-experience, .dining-area{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 0.1fr 1fr;
    gap: 5px;

    font-size: 16px;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    white-space: pre-line;
}

.obj-title{
    font-size: 18px;
    font-weight: 600;
    font-family: 'Taipei Sans TC', 'Noto Sans TC';
}

.space{
    width: 100%;
    height: 30px;
    flex-shrink: 0;
}

@media (1200px < width <=1920px){
    .view-posts{
        width: 1200px;
    }

    .post-content-comment{
        padding-bottom: 10px;
        box-sizing: border-box;
    }
}

@media (600px < width <= 1200px){
    .view-posts{
        width: 100%;
    }

    .posts-container{
        grid-template-columns: 1fr;
        grid-template-rows: repeat(auto-fill, 600px);
        gap: 5px;
    }

    .post-content-container{
        height: 600px;
        grid-template-columns: 1fr;
        grid-template-rows: 300px 200px;
        gap: 5px;
    }

    .img-container img{
        width: 40%;
        height: 80%;
    }

    .post-content-comment{
        grid-template-rows: 70px 200px;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        box-sizing: border-box;
    }
}

@media (300px <= width <= 600px){
    .view-posts{
        width: 100%;
        height: 100vh;
    }

    .posts-container{
        grid-template-columns: 1fr;
        grid-template-rows: repeat(auto-fill, 610px);
        gap: 5px;
    }

    .post-content-container{
        height: 610px;
        grid-template-columns: 1fr;
        grid-template-rows: 300px 200px;
        gap: 5px;
    }

    .food-img-info{
        scroll-snap-type: x proximity;
        scroll-behavior: auto;
    }

    .post-content-comment{
        grid-template-rows: 70px 200px;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
        box-sizing: border-box;
    }

}
