:root {
    --main-bule: #0073ff;
    --focus-bule: #0d4ae6;
    --content-gap: 20px;
}

* {
    margin: 0;
    padding: 0;
    font-family: Microsoft JhengHei;
    list-style: none;
}

html,
body {
    height: 100%;
}

body {
    display: grid;
    grid-template-rows: min-content 1fr auto;
}

header {
    position: relative;
    width: 100%;
    color: #fff;
    background-color: var(--main-bule);
    padding: 10px;
    box-sizing: border-box;
}

header #logo {
    position: relative;
    display: flex;
    align-content: center;
}

header #logo img {
    width: 50px;
}

header #logo #logo_text {
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
}

header #logo #logo_text .major{
    position: relative;
    font-size: 20px;
    font-weight: 500;
}

header #logo #logo_text .minor{
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

footer {
    margin-top: 40px;
    
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;

    background-color: var(--main-bule);
    color: #fff;

    display: grid;
    grid-template-columns: repeat(2, min-content);
    justify-content: space-around;
}

footer a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

footer a[href]:hover {
    background-color: rgba(0, 0, 0, 0.5);
    /* color: #000; */
}

footer .announcement {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: max-content;
    align-items: center;
}

footer .contact-us {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: max-content;
    align-items: center;
}

footer .icon-group {
    display: inline-block;
}

footer .icon-group img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

footer .icon-group a {
    vertical-align: middle;
}

#content {
    position: relative;
    display: grid;
    margin-left: 20px;
    margin-right: 20px;
    grid-template-columns: 4fr 6fr;
    grid-template-rows: 1fr;
    column-gap: var(--content-gap);
}

.Taiwan {
    position: relative;
    width: 100%;
    height: fit-content;
}

.Taiwan path:hover {
    transition: .3s;
    fill: gold;
}

.selectedLocation {
    transition: .3s;
    fill: var(--focus-bule) !important;
}

#panel-title {
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    background-color: var(--main-bule);
    color: #fff;
}

#input-panel {
    display: flex;
    position: relative;
    align-items: center;
    margin-bottom: 20px;
}

#city-select {
    position: relative;
    flex-grow: 1;
    padding: 5px;
}

#info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

#info-cards .info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 5px;
}

#info-cards .info-card .time-title {
    font-size: 20px;
}

#info-cards .info-card .weatherIcon {
    width: 60px;
    height: 60px;
}

.popDiv {
    display: flex;
    position: relative;
    width: 100%;
}

.popDiv .column:nth-child(1) {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: end;
}

.popDiv .column:nth-child(2) {
    flex: 1;
    position: relative;
}

.popDiv .column .popIcon {
    height: 100%;
    position: absolute;
}

.tab-widget {
    position: relative;
    margin-top: 20px;
}

.tab-widget .tab-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 5px;
}

.tab-widget .tab-buttons button {
    border: none;
    padding: 10px;
    box-sizing: border-box;
    background-color: #11b2b2;
    color: #fff;
    cursor: pointer;
}

.tab-buttons button:hover {
    transition: .3s;
    background-color: #109a9a;
}

.tab-buttons button.active {
    background-color: #109a9a;
    box-shadow: inset 0px -3px 3px gold;
}

.tab-widget .tab-widget-contents {
    /* display: block; */
    position: relative;
    width: 100%;
}

.tab-widget-content-div.inactive {
    display: none !important;
}

.tab-widget-content-div.active {
    display: initial;
}

#oneWeekForecastTable {
    position: relative;
    display: table;
    width: 100%;
}

#oneWeekForecastTable .thead {
    display: table-header-group;
}

#oneWeekForecastTable .tbody {
    display: table-row-group;
}

#oneWeekForecastTable .tbody .row-tr.odd-item {
    background-color: rgb(199, 250, 225);
}

#oneWeekForecastTable .tbody div.row-tr.even-item {
    background-color: rgb(235, 235, 187);
}

#oneWeekForecastTable .table-item-header {
    display: none;
}

/* tr */
#oneWeekForecastTable .row-tr {
    display: table-row;
    border: 1px solid #fff;
    border-collapse: collapse;
    margin-left: auto;
    margin-top: auto;
    text-align: center;
    vertical-align: middle;
}

#oneWeekForecastTable .tr-title {
    display: none;
}

/* td */
#oneWeekForecastTable .cell-td {
    display: table-cell;
    border: 1px solid #fff;
    border-collapse: collapse;
    text-align: center;
    vertical-align: middle;
}

/* th */
#oneWeekForecastTable .cell-th {
    display: table-cell;
    border: 1px solid #fff;
    border-collapse: collapse;
    background-color: #11897f;
    color: #fff;
    text-align: center;
    vertical-align: middle;
}

#oneWeekForecastTable .cell-td img {
    width: 40px;
    height: 40px;
}

#temperature-chart, #apparent-temperature-chart {
    position: relative;
    display: block;
    width: 100%;
    height: 400px;
}

#temperature-chart .chartWrap,
#apparent-temperature-chart .chartWrap {
    position: absolute;
    max-width: 100%;
    overflow: auto;
}

#temperature-chart .chartWrap svg,
#apparent-temperature-chart .chartWrap svg {
    pointer-events: none;
}

/* 以下是svg的class */
.gridline {
    pointer-events: none;
    stroke: black;
    stroke-width: 1px;
    stroke-opacity: .2;
}

.lineChartTooltip {
    position: absolute;
    z-index: 1;
    user-select: none;
    pointer-events: none;
    padding: 5px;
    border: 1px solid #000;
    border-radius: 8px;
    background-color: #109fe250;
    visibility: hidden;
}

/* 平板以下 */
@media screen and (max-width: 1200px) {
    .left {
        display: none;
    }

    .right {
        display: flex;
        flex-direction: column;
    }

    #content {
        display: block;
    }
}

/* 大手機 */
@media screen and (max-width: 768px) {
    #oneWeekForecastTable .thead {
        display: none;
    }

    #oneWeekForecastTable .row-tr {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: repeat(3, min-content);
        border: none;
    }

    #oneWeekForecastTable .row-tr .cell-td {
        padding: 10px;
        border: none;
    }

    #oneWeekForecastTable .row-tr .tr-title {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        background-color: rgb(224, 175, 78);
    }

    #oneWeekForecastTable .row-tr .cell-th {
        display: none;
    }

    #oneWeekForecastTable .table-item-header {
        position: relative;
        display: block;
        text-align: center;
        background-color: #11897f;
        color: #fff;
        padding: 10px;
    }

    #oneWeekForecastTable .table-item-header.hide::before {
        content: "\e145";
        display: flex;
        justify-content: center;
        align-items: center;
        font-family: "Material Icons";
        border-radius: 50%;
        width: 20px;
        height: 20px;
        background-color: rgb(81, 163, 214);
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    #oneWeekForecastTable .table-item-header.show::before {
        content: "\e15b";
        display: flex;
        justify-content: center;
        align-items: center;
        font-family: "Material Icons";
        border-radius: 50%;
        width: 20px;
        height: 20px;
        background-color: rgb(214, 81, 81);
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    #oneWeekForecastTable .row-tr.hide {
        max-height: 0;
        overflow-y: hidden;
        transition: 0.5s;
    }

    #oneWeekForecastTable .row-tr.show {
        max-height: 1000px;
        overflow-y: hidden;
        transition: 0.5s;
    }
}

/* 小手機 */
@media screen and (max-width: 576px) {
    #info-cards {
        display: flex;
        flex-direction: column;
    }

    footer {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
    }
}