: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;
}

body{
    width: 100vw;
    height: 100vh;
    font-family: "Taipei Sans TC", "Zen Maru Gothic", sans-serif;
    font-style: normal;
    box-sizing: border-box;
}

.set-border-line{
    border: 1px solid #000;
}

.map-outside-container{
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);

    position: relative;
}

.web-view-container, .map-outside-container, .search-bar, .create-posts-btn, .loggin-btn-container{
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    justify-items: center;
    align-items: center;
}

.map-block{
    width: 99%;
    height: 99%;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 搜尋框設計 */
.search-bar{
    height: 260px; /* 220px */
    background-color: var(--bg-color);
    border: var(--search-border);
    border-radius: var(--search-border-radius);
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
}

.bar-container{
    width: 97%;
    max-height: 95%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(35px, max-content));
    gap: 5px;
    box-sizing: border-box;
}

/* 搜尋框下的使用者部分(用戶中心) */
.user-center{
    width: 100%;
    height: 50px;

    display: grid;
    grid-template-columns: repeat(2, minmax(50px, max-content));
    grid-template-rows: 1fr;
    gap: 7px;

    align-items: center;
}

.headshot-item{
    all: unset;
    width: 50px;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(116, 118, 121, 0);

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    cursor: pointer;
}

.headshot-item:hover{
    border: 2px solid rgba(116, 118, 121, 0.8);
}

.headshot-item-img{
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.user-name {
    font-size: 20px;
    font-weight: 600;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: left;
    text-align: center;
}

/* 搜尋框定位選項 */
.position-item{
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr;
    gap: 5px;
}

.location-container{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 5px;

    border: var(--search-border);
    border-radius: var(--search-border-radius);
}

.location-title, .types-title{
    font-size: 16px;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    font-family: 700;
}

.types-container{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 5px;

    border: var(--search-border);
    border-radius: var(--search-border-radius);
}

/* 地區選項 */
.item-country, .item-city, .item-types{
    border-radius: var(--search-border-radius);
    border: var(--search-border);

    position: relative;
}

.country-select, .city-select, .types-select{
    all:unset;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    font-size: 16px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.country-droplist, .city-droplist, .types-droplist{
    width: 189px;
    position: absolute;
    cursor: pointer;

    display: none;
}

/* 地區選項的下拉式動作 */
.country-droplist.active{
    display: block;
}

.country-droplist.invisible{
    display: none;
}
/* 城市選項的下拉式動作 */
.city-droplist.active{
    display: block;
}

.city-droplist.invisible{
    display: none;
}
/* 店家種類選項的下拉式動作 */
.types-droplist.active{
    display: block;
}
.types-droplist.invisible{
    display: none;
}

.country-option, .city-option, .types-option{
    list-style: none;
    width: 100%;
    height: auto;
    min-height: 70px;
    max-height: 190px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fit, minmax(35px, 1fr));
    background-color: var(--bg-color);
    border-radius: 7px;

    text-align: center;
    align-items: center;
    margin-top: 3px;

    /* 陰影 */
    box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.3);
    overflow-y: auto;

    &::-webkit-scrollbar{
        width: 6px;
        border-radius: var(--search-border-radius);
        background-color: #cfcdcd;
    }

    &::-webkit-scrollbar-thumb{
        background: #9b9a9a;
        border-radius: 10px;
    }
}

.option{
    height: 35px;
    font-size: 16px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    align-items: center;
    line-height: 35px;
    cursor: pointer;
    align-content: start;
}

.option:hover{
    background-color: var(--search-bar-option-hover);
    border-radius: 5px;
}

/* 搜尋框下的輸入匡與送出按鈕區塊 */
.search-input-item{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    justify-content: center;
    align-items: center;
}

.input-item-container{
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    border: var(--search-border);
    border-radius: var(--search-border-radius);

    box-sizing: border-box;

    display: flex;
}

.input-item-keyword{
    all: none;
    width: 88%;
    height: 95%;
    margin-top: 1px;
    padding-left: 10px;
    border-radius: var(--search-border-radius);
    background-color: var(--bg-color);

    font-size: 18px;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";

    /* 移除外框以及點擊時出現的外框 */
    border: none;
    outline: none;
}

.input-item-btn{
    all:unset;
    width: 20%;
    background-color: var(--btn-bg-color);
    border-radius: var(--search-border-radius);
    
    display: grid;
    justify-content: center;
    align-items: center;

    overflow-y: hidden;
    cursor: pointer;
}

.input-item-btn:hover{
    box-shadow: 0 0 8px 3px rgba(155, 154, 154, 0.7);
}

.input-item-btn img{
    width: 25px;
    height: 25px;

    object-fit: cover;
}

/* 搜尋距離的CSS設定 */
.search-btn-distance{
    display: flex;
    gap: 5px;
    box-sizing: border-box;
}

.explain-search-distance{
    width: 80px;
    font-size: 16px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: center;
    line-height: 35px;
}

.btn-dis-onekm, .btn-dis-thrkm, .btn-dis-fivekm{
    all: unset;
    width: 65px;
    height: 95%;
    border: var(--search-border);
    border-radius: var(--search-border-radius);

    font-size: 16px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: center;

    cursor: pointer;
}

.btn-dis-onekm.active{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-dis-onekm.invisible{
    background-color: var(--bg-color);
    color: #000;
}

.btn-dis-thrkm.active{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-dis-thrkm.invisible{
    background-color: var(--bg-color);
    color: #000;
}

.btn-dis-fivekm.active{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-dis-fivekm.invisible{
    background-color: var(--bg-color);
    color: #000;
}

.btn-dis-onekm:hover ,.btn-dis-thrkm:hover, .btn-dis-fivekm:hover{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.search-btn-item{
    display: flex;
    box-sizing: border-box;
}

.item-tracker{
    width: 100px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-own, .btn-tracker, .btn-collect{
    all: unset;
    width: 100px;
    height: 95%;
    border: var(--search-border);
    border-radius: var(--search-border-radius);

    font-size: 16px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: center;

    cursor: pointer;
}

.btn-tracker, .btn-collect{
    margin-left: 5px;
}

.btn-own:hover, .btn-collect:hover{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-own.active{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-own.invisible{
    background-color: var(--bg-color);
    color: #000;
}

.btn-collect.active{
    background-color: var(--user-info-btn-bg-color);
    color: #fff;
    font-weight: 600;
}

.btn-collect.invisible{
    background-color: var(--bg-color);
    color: #000;
}

.tracker-droplist{
    width: 90px;
    position: absolute;
    cursor: pointer;
    display: none;

    margin-top: 140px;
    box-sizing: border-box;
}

/* 店家種類選項的下拉式動作 */
.tracker-droplist.active{
    display: block;
}
.tracker-droplist.invisible{
    display: none;
}

.tracker-option{
    list-style: none;
    width: 100%;
    height: 100px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fit, 35px);
    background-color: var(--bg-color);
    border-radius: 7px;

    text-align: center;
    align-items: center;

    /* 陰影 */
    box-shadow: 0 0 3px 2px rgba(0, 0, 0, 0.3);
    overflow-y: auto;

    &::-webkit-scrollbar{
        width: 6px;
        border-radius: var(--search-border-radius);
        background-color: #cfcdcd;
    }

    &::-webkit-scrollbar-thumb{
        background: #9b9a9a;
        border-radius: 10px;
    }
}

.marker-btn{
    appearance:none;
    width: 52px;
    height: 52px;
    background-color:#fff;
    border-radius:5px;
    overflow: hidden;
    cursor:pointer;
    position:absolute;
    z-index: 5;
}

.create-posts-btn{
    height: 50px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.loggin-btn-container{
    width: 80px;
    height: 40px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 5;
}

.post-add{
    all: unset;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    background-color: #fff;
    
}

.post-add img{
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.log-in-btn{
    all: unset;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    color: #fff;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    box-sizing: border-box;
    background-color: #000;
}

/* 登入註冊視窗的CSS設定 */
.view-login-dialog{
    width: 350px;
    height: 460px;
    border-radius: 5px;
    background-color:rgba(255, 255, 255, 0.7);
    margin: auto;
    border: none;
    outline: none;
}

.bg-color{
    width: 350px;
    height: 460px;
    background-color:rgba(255, 255, 255, 0.7);
    border-radius: var(--search-border-radius);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    z-index: 1;
}

.login-input-container{
    width: 350px;
    height: 100%; 

    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 30px 40px 1fr;
    gap: 20px;

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    z-index: 5;
}

.close-log-sign-btn{
    width: 100%;
    height: 100%;
    display: flex;
    padding-right: 10px;
    justify-content: end;
    align-items: center;
    overflow: hidden;
}

.close-img-btn{
    width: 15px;
    height: 15px;
    object-fit: cover;
    cursor: pointer;
}

.login-first-container{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content:flex-end;
}

.signin-top-btn{
    all: unset;
    width: 100%;
    height: 100%;
    border-radius: 5px  0 0 0;
    font-size: 18px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: center;
    cursor: pointer;
}

.signin-top-btn:hover{
    border-bottom: 2px solid black;
    font-weight: 600;
}

.signin-top-btn.active{
    border-bottom: 2px solid black;
    font-weight: 600;
}

.signin-top-btn.invisible{
    border-bottom: 0px;
    font-weight: 450;
}

.login-top-btn{
    all: unset;
    width: 100%;
    height: 100%;
    border-radius: 0 5px 0 0;
    font-size: 18px;
    font-weight: 450;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    text-align: center;
    cursor: pointer;
}

.login-top-btn:hover{
    border-bottom: 2px solid black;
    font-weight: 600;
}

.login-top-btn.active{
    border-bottom: 2px solid black;
    font-weight: 600;
}

.login-top-btn.invisible{
    border-bottom: 0px;
    font-weight: 450;
}

.login-second-container{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, 40px);
    justify-items: center;
    gap: 10px;

    position: relative;
}

.login-second-hidden{
    display: none;
}

.sign-second-hidden{
    display: none;
}

.sign-second-container{
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(auto-fill, 40px);
    justify-items: center;
    gap: 10px;

    position: relative;
}

.login-title, .signin-title{
    width: 100%;
    height: 100%;
    font-size: 30px;
    font-weight: bold;
    font-family: "Kaushan Script", "Zen Maru Gothic";
    text-align: center;
    line-height: 30px;
}

.login-email, .login-pw, 
.signin-email, .signin-pw, .signin-name, .signin-nickname{
    all: unset;
    width: 90%;
    height: 35px;
    border: 1px solid #000;
    border-radius: 5px;

    padding-left: 10px;
    box-sizing: border-box;

    font-size: 16px;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";


}

.login-btn, .signin-btn{
    all: unset;
    width: 90%;
    height: 100%;
    border-radius: 5px;
    background-color: black;
    color: #fff;

    font-size: 16px;
    text-align: center;
    cursor: pointer;
}

.error-login-text, .error-signin-text{
    width: 100%;
    height: 100%;
    font-size: 16px;
    font-weight: 600;
    font-family: "Taipei Sans TC", "Zen Maru Gothic";
    color: rgb(179, 17, 17);

    text-align: center;
    display: none;
}


@media (1200px < width <= 1920px) {
    .search-bar{
        width: 600px;
    }
}

@media (650px < width < 1200px) {
    .search-bar{
        width: 500px;
    }

    .country-droplist, .city-droplist, .types-droplist{
        width: 100%;
    }
}

@media (300px < width < 650px) {
    .search-bar{
        width: 90%;
    }

    .country-droplist, .city-droplist, .types-droplist{
        width: 100%;
    }

    .create-posts-btn{
        top: 285px;
        right: auto;
        left: 20px;
    }

    .loggin-btn-container{
        top: 285px;
        right: auto;
        left: 20px;
    }

    .bg-color{
        width: 320px;
    }

    .login-input-container{
        width: 320px;
        height: 100%; 
    }

}

.loading-container{
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 9999;
}

.loading-container.active{
    display: flex;
}

.load-animation{
    width: 10rem;
    height: 10rem;
    border-radius: 10rem;
    animation: circle-load 0.8s linear infinite;
}

@keyframes circle-load{
    0% {
        border-left: 5px solid #666666;
        border-top: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid transparent;
    }35% {
        border-left: 5px solid transparent;
        border-top: 5px solid #666666;
        border-right: 5px solid transparent;
        border-bottom: 5px solid transparent;
    }72%{
        border-left: 5px solid transparent;
        border-top: 5px solid transparent;
        border-right: 5px solid #666666;
        border-bottom: 5px solid transparent;
    }100%{
        border-left: 5px solid transparent;
        border-top: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid #666666;
    }
}