﻿html {
    height: 100%;
    font-size: 15px;
    font-family: 微軟正黑體, Microsoft JhengHei;
    color: #262626;
}

input {
    font-family: 微軟正黑體, Microsoft JhengHei;
    color: #262626;
}

body {
    margin: 0px;
    height: 100%;
    width: 100%;
}

form {
    height: 100%;
}

/* when screen width < 480px */

.nav {
    font-size: 70%;
    letter-spacing: 0.1vw;
    display: flex;
    justify-content: space-between;
    padding: 2vh 1vw;
    max-width: 800px;
    margin: auto;
}

    .nav a {
        text-decoration: none;
        color: #2c6bff;
        font-weight: bold;
    }

.dropdown {
    position: relative;
    display: inline-block;
}

    .dropdown > .show {
        display: block;
    }

.dropdown-btn {
    text-decoration: none;
    cursor: pointer;
}


.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f3f9ff;
    overflow: auto;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 3;
    border-radius: 10px;
    padding: 1vh 1vw;
}

    .dropdown-content a {
        color: #262626;
        text-decoration: none;
        display: inline-block;
        border-radius: 10px;
    }

        .dropdown-content a:hover, .dropdown-content a:focus {
            background-color: #c1d9ed;
        }

    .dropdown-content#dpBranch {
        width: 92vw;
        max-width: 700px;
    }

        .dropdown-content#dpBranch a {
            padding: 12px 16px;
        }

    .dropdown-content#dpMore {
        right: 0px;
    }

        .dropdown-content#dpMore a, .dropdown-content#dpMore button {
            display: block;
            font-size: 80%;
            padding: 10px 15px;
            white-space: nowrap;
        }


.title {
    color: #e95c59;
    font-size: 100%;
    font-weight: bold;
    margin: auto 0px;
}

.icon {
    fill: currentColor; /* 讓 icon 繼承文字顏色 */
    vertical-align: -0.125em; /* font-awesome 的垂直置中 */
    height: 1em;
    width: 1em;
    overflow: visible;
    pointer-events: none;
}

    .icon use {
        transform: scale(1.1);
        transform-origin: center;
    }

.sbox {
    margin: 0.5vh auto;
    position: relative;
}

.rwd {
    color: #262626;
    font-size: 24px;
    text-align: center;
    padding: 0.1px 1vw 0vh 1vw; /*0.1px for margin collapsing*/
    letter-spacing: 1px;
}

    .rwd input, .rwd button {
        font-size: 125%;
        text-align: center;
        letter-spacing: 1px;
        border-radius: 10px;
        border: none;
    }

    .rwd button {
        background: #f3f9ff;
        cursor: pointer;
    }

        .rwd button:hover {
            background: #c1d9ed;
        }

#txtInput::placeholder {
    font-size: 75%;
    vertical-align: middle;
    color: #b0b0b0;
}

.sbox > input {
    padding: 1vw;
    border-radius: 1.5vw;
    border: 0px;
    width: 72vw;
}

.autocomplete-suggestions {
    text-align: center;
    letter-spacing: 0.2vw;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 6px;
    border-top: 0;
    background: #fff;
    max-height: 50vh;
}


.autocomplete-suggestion {
    font-size: 25px;
    position: relative;
    padding: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

.shadow {
    box-shadow: -7px 7px 3.5px rgba(0,0,0,.1);
}

#btnLocate {
    border: none;
    background-color: transparent;
    font-size: 150%;
    cursor: pointer;
    margin-left: 0.5vw;
    padding: 0px;
    position: fixed;
    white-space: nowrap;
    overflow: hidden;
}

    #btnLocate span {
        font-size: 30%;
        display: block;
        position: relative;
        top: -0.2em;
        font-weight: bold;
        letter-spacing: 0.03em;
    }



/* when screen width >= 480px & width < 640 */
@media only screen and (min-width: 480px) and (max-width: 639px) {
    .rwd {
        color: #262626;
        font-size: 5vw;
        padding: 0.1px 1vw 0vh 1vw; /*0.1px for margin collapsing*/
        letter-spacing: 0.2vw;
    }

        .rwd input, .rwd button {
            letter-spacing: 0.2vw;
        }

    .box > input {
    }

    .autocomplete-suggestions {
        letter-spacing: 0.2vw;
        border-width: 0.5vw;
        border-radius: 1.5vw;
    }

    .autocomplete-suggestion {
        font-size: 6vw;
        padding: 1.8vw;
    }

    .shadow {
        box-shadow: -1.6vw 1.6vw 0.8vw rgba(0,0,0,.1);
    }

    #recent > button {
        max-width: 33%;
    }
}
/* when screen width >= 640px */
@media only screen and (min-width: 640px) {
    .rwd {
        color: #262626;
        font-size: 210%;
        padding: 0.1px 10px 0px 10px; /*0.1px for margin collapsing*/
        letter-spacing: 2px;
    }

        .rwd input, .rwd button {
            letter-spacing: 2px;
        }

    .sbox > input {
        padding: 8px;
        border-radius: 10px;
        max-width: 640px;
    }

    .autocomplete-suggestions {
        letter-spacing: 2px;
        border-width: 3px;
        border-radius: 10px;
    }

    .autocomplete-suggestion {
        padding: 12px;
        font-size: 255%;
    }

    .shadow {
        box-shadow: -10px 10px 5px rgba(0,0,0,.1);
    }

    #imgTitle {
        max-width: 800px;
    }

    #recent > button {
        max-width: 33%;
    }
}

/* when screen height > width */
@media only screen and (orientation: portrait) {
    .autocomplete-suggestions {
        max-height: 30vh;
    }
}


i.fa {
    margin: 0.3vw;
}

#bg {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #b7deff;
}

/* div.msg放在要顯示的element內，該element的position要設定為relative */
.msg {
    position: absolute;
    z-index: 2;
    background-color: #f3f9ff;
    border-radius: 10px;
    padding: 8px;
}

    .msg::after {
        content: " ";
        position: absolute;
        border: solid transparent;
        border-width: 10px;
        border-color: transparent;
    }

    .msg > * {
        letter-spacing: 0.1em;
        font-size: 75%;
        font-weight: bold;
    }

    .msg > p {
        margin: 1em;
    }

.msg-left {
    top: 50%;
    transform: translateY(-50%);
    right: 100%;
    margin-right: 10px;
    width: 28vw;
    max-width: 275px;
}

    .msg-left::after {
        top: 50%;
        left: 100%;
        transform: translateY(-50%);
        border-left-color: var(--msg-bg-color, #f3f9ff);
    }

.msg-right {
    top: 50%;
    transform: translateY(-50%);
    left: 100%;
    margin-left: 10px;
    width: 28vw;
    max-width: 275px;
    z-index: 3;
}

    .msg-right::after {
        top: 50%;
        right: 100%;
        transform: translateY(-50%);
        border-right-color: var(--msg-bg-color, #f3f9ff);
    }

.msg-bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
}

    .msg-bottom::after {
        top: 0;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
        border-bottom-color: var(--msg-bg-color, #f3f9ff);
    }

.msg-gold {
    --msg-bg-color: gold;
    background-color: var(--msg-bg-color);
}

.msg-khaki {
    --msg-bg-color: khaki;
    background-color: var(--msg-bg-color);
}

.msg-red {
    --msg-bg-color: #feffe4;
    background-color: var(--msg-bg-color);
    color: red;
    font-weight: bold;
}

.msg-error {
    --msg-bg-color: #ffdada;
    background-color: var(--msg-bg-color);
    color: red;
    font-weight: bold;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

    table tr th,
    table tr td {
        border-right: 1px solid #bbb;
        border-bottom: 1px solid #bbb;
    }

        table tr th:first-child,
        table tr td:first-child {
            border-left: 1px solid #bbb;
        }

    table tr th {
        background: #eee;
        border-top: 1px solid #bbb;
    }

    /* top-left border-radius */
    table tr:first-child th:first-child {
        border-top-left-radius: 10px;
    }

    /* top-right border-radius */
    table tr:first-child th:last-child {
        border-top-right-radius: 10px;
    }

    /* bottom-left border-radius */
    table tr:last-child td:first-child {
        border-bottom-left-radius: 10px;
    }

    /* bottom-right border-radius */
    table tr:last-child td:last-child {
        border-bottom-right-radius: 10px;
    }

#tbPoleSelection {
    display: inline-table;
    margin: 1vw;
}

    #tbPoleSelection tbody > tr {
        cursor: pointer;
        font-weight: normal;
    }

    #tbPoleSelection * {
        font-size: 95%;
        padding: 1vw;
    }

    #tbPoleSelection tbody > tr:focus, #tbPoleSelection tbody > tr:hover {
        background-color: #c1d9ed;
    }

#lbTip {
    font-size: 66%;
    display: block;
}

#recent {
    margin: 10px auto;
    max-width: 640px;
    text-align: left;
}

    #recent > div:first-child {
        font-size: 50%;
    }

    #recent > button {
        font-size: 80%;
        margin: 0;
        display: inline-block;
        border: none;
        background: none;
        border-radius: 10px;
        cursor: pointer;
        color: #2c6bff;
        padding: 0.7vh 1vw;
        vertical-align: middle;
        width: 50%;
    }

        #recent > button:hover {
            background: white;
        }

#banner {
    position: fixed;
    display: block;
    bottom: 0px;
    left: 0px;
    right: 0px;
    padding: 3vh 3vw;
    background: #3d6785;
    color: white;
    font-size: 50%;
}

    #banner > button {
        font-size: 150%;
        padding: 0.5vh 1vw;
        font-weight: bold;
    }
