@charset "UTF-8";

/* 

    YDITS for Web

    Copyright (C) よね/Yone

    Licensed under the Apache License 2.0.

*/

:root {
    /* main */
    --main-height: calc(100svh - var(--header-height) - var(--header-border-weight));

    --control-width: 32rem;
}

main {
    position: relative;
    display: flex;
    height: var(--main-height);
    overflow: hidden;

    &.control-right {
        flex-direction: row-reverse;

        #control {
            flex-direction: row-reverse;
        }
    }
}

/* control */
.control {
    display: flex;

    width: var(--control-width);
    height: 100%;
    border-bottom: 2px solid #808080;

    background-color: #303030;

    transition: height .5s;
}

/* control-nav */

.control-nav {
    display: flex;

    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    width: 3rem;
    height: 100%;
    overflow: auto;

    background-color: #202020;
}

.control-nav__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 0.6rem;
}

.control-nav__item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 8px 0;
}

#list ul li:hover {
    background-color: rgba(255, 255, 255, .5);
}

#eqHistoryBtn {
    display: none;

    @media (max-width: 640px) {
        display: flex;
    }
}

/* .panel */

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 29rem;
    margin: 0 auto;
}

/* .current-information-field */

.current-information-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    padding: .5rem;
    gap: 0.5rem;
    background-color: #404040;
}

.current-information-field__title {
    display: block;
    width: 100%;
    font-size: 1.2em;
}

.current-information-field__content {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    height: calc(100% - 2.4em);
    padding: 0.5rem;
    background-color: #00000020;
}

.current-information-field__content-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 30%;
    height: 100%;
}

.current-information-field__scale-title {
    display: block;
    height: 1em;
}

.current-information-field__scale {
    width: 7rem;
    height: 7rem;
    border-radius: 0.1rem;
    text-align: center;
    font-size: 4.5rem;
    color: #ffffffff;
}

.current-information-field__content-right {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 70%;
    height: 100%;
}

.current-information-field__region {
    font-size: 1.5rem;
}

.current-information-field__info {
    display: flex;
    flex-direction: column;
}

.current-information-field__origin-time {
    font-size: 1.2rem;
}

.current-information-field__hypocenter-info {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
}

.current-information-field__description {
    padding: .2rem;
    background-color: rgb(40, 40, 40);
    border-radius: 0.5rem;
}

/* .eq-history-field */

.eq-history-field {
    width: 100%;
    height: 100%;
    padding: 0.5rem 0;
    overflow: auto;
}

.eq-history-field>.list {
    display: flex;
    justify-content: space-around;
    align-items: center;

    box-sizing: border-box;
    width: 100%;

    padding: 0.5rem 1.5rem;
    gap: 1.5rem;

    transition: background-color 0.3s, padding-top 0.3s, padding-bottom 0.3s, font-size 0.3s;
    cursor: pointer;

    &:hover {
        background-color: #ffffff40;
        padding-top: 1rem;
        padding-bottom: 1rem;

        .hypocenter {
            font-size: 1.3rem;
        }
    }

    .maxScale {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 4.5rem;
        height: 4.5rem;
        border-radius: .2em;
        font-size: 2.75rem;
    }

    .right {
        display: flex;
        flex-direction: column;
        width: calc(100% - 8rem);
        height: 100%;
        gap: 0.2rem;
    }

    .hypocenter {
        font-size: 1.2rem;
        transition: font-size 0.3s;
    }


    .hypoInfo {
        display: flex;
        justify-content: space-between;

        p {
            margin-right: 2em;
        }
    }
}

#mapWrapper {
    position: relative;
    width: calc(100vw - var(--control-width));
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

#clock {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 10rem;
    height: 1.85rem;
    text-align: center;
    background-color: #202020;
    font-size: 1rem;
    z-index: 1;
}

#status {
    position: absolute;
    top: 0;
    left: calc(10rem);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.85rem;
    height: 1.85rem;
    background-color: #202020;
    z-index: 1;
}

#statusLamp {
    display: inline-block;
    width: 60%;
    height: 60%;
    border-radius: 100%;
    background-color: #808080;
    z-index: 1;
}

#fps {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 1.85rem;
    background-color: #202020;
    z-index: 1;
}

#hrpnsTime {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #202020;
    padding: .7em;
    border-radius: .6rem;
    z-index: 1;
}

#hrpnsTime.show {
    display: flex;
}

#hrpnsTime>.title {
    font-size: 0.7rem;
}

#hrpnsTime>.text {
    font-size: 1.5rem;
}

.map-controler {
    position: absolute;
    z-index: 1;
}

#mapLayersButton {
    bottom: 2.5rem;
    right: 1.5rem;
    display: flex;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #101010;
    cursor: pointer;
    z-index: 1;
}

#mapLayersButton:hover {
    background-color: #303030;
}

#mapLayersButton .close {
    display: none;
}

#mapLayersButton.active .open {
    display: none;
}

#mapLayersButton.active .close {
    display: block;
}

#mapLayersMenu {
    visibility: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 100vw;
    border-radius: 0;
    z-index: 1;
    background-color: #202020e0;
}

#mapLayersMenu>.content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

#layersControl .leaflet-control {
    padding: 0 !important;
}

#layersControl .leaflet-control * {
    display: flex;
    align-items: center;
    width: 100%;
}

#layersControl .layer-control {
    flex-direction: column;
}

#layersControl .layer-control label {
    display: block;
    padding: 1rem 0;
    width: 100%;
    color: #303030ff;
}

#layersControl .layer-control input[type="checkbox"] {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    margin-left: 1rem;
    margin-right: .75em;
}

.forecast-icon,
.warning-icon {
    text-align: center;
}

.forecast-time,
.warning-time {
    font-size: 1rem;
    color: #ffffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.menu-list {
    list-style: none;
}

.menu-list-item {
    padding: 1rem;
}

#mapLayersMenu .titleBar {
    background-color: unset;
}

#mapLayersMenu .content {
    height: calc(100% - 4rem - 4rem);
}

#mapLayersMenu.active {
    visibility: visible;
    left: 0;
}

#popup {
    display: block;
    position: fixed;
    top: 100svh;
    left: 0;
    width: 100vw;
    height: calc(100svh - 2rem);
    background-color: #101010c0;
    /* background-color: rgba(40, 40, 40, .75); */
    z-index: 1;
}

#popup.active {
    top: 2rem;
}

.window {
    visibility: hidden;
    position: fixed;
    top: 100svh;
    left: 1rem;
    display: block;
    width: calc(100% - 2rem);
    height: calc(100% - env(titlebar-area-height, 2rem) - 2rem);
    /* padding: 1em; */
    border-radius: 2rem;
    overflow: hidden;
    background-color: #202020ff;
    color: #ffffffff;

    transition: all .3s;
}

.window .closeBtn {
    position: absolute;
    top: .75rem;
    left: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 100%;
    font-size: 1.75rem;
}

.window .closeBtn:hover {
    background-color: rgba(127, 127, 127, .9);
}

.window>.titleBar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #101010ff;
    height: 4rem;
}

.window>.titleBar>.wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: calc(100% - 4rem);
    max-width: 769px;
}

.window .title {
    display: block;
    text-align: center;
    font-size: 1.3rem;
}

.window>.content {
    height: calc(100svh - 4rem - 4rem - 4rem);
    padding: 2rem 5%;
    overflow: auto;
}

#menu.active {
    visibility: visible;
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
}

.window .lists {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
    align-items: center;
    text-decoration: none;
}

.window .lists a {
    color: var(--color);
    text-decoration: none;
}

.window .lists .list {
    display: flex;
    align-items: center;
    /* margin-bottom: 2em; */
    width: 80%;
    height: 2rem;
    border-bottom: solid 1px #505050ff;
    /* border-radius: 2rem; */
    padding: 1.2rem 2rem;
    background-color: rgba(127, 127, 127, .3);
}

.window .lists .list.top {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

.window .lists .list.bottom {
    border: none;
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
}

.window .lists .list:hover {
    background-color: rgba(127, 127, 127, .9);
}

.window .lists .list span {
    margin-right: 2rem;
}

#jmaDataFeed {
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
    left: 100vw;
}

#jmaDataFeed.active {
    visibility: visible;
    left: 0;
}

#jmaDataFeedEqvol {
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
    left: 100vw;
}

#jmaDataFeedEqvol.active {
    visibility: visible;
    left: 0;
}

#jmaDataFeedEqvolLong {
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
    left: 100vw;
}

#jmaDataFeedEqvolLong.active {
    visibility: visible;
    left: 0;
}

#jmaDataFeedEqvol>.titleBar>.title,
#jmaDataFeedEqvolLong>.titleBar>.title {
    font-size: 1rem;
}

#jmaDataFeedEqvol .title,
#jmaDataFeedEqvolLong .title {
    text-align: left;
}

#jmaDataFeedEqvolList,
#jmaDataFeedEqvolLongList {
    list-style: none;
}


#settings {
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
    left: 100vw;
}

#settings.active {
    visibility: visible;
    left: 1rem;
}

.window.settings_list {
    height: calc(100% - env(titlebar-area-height, 2rem) - 2rem);
    overflow: hidden;
}

.window.settings_list>label {
    font-size: 1.3em;
}

.window.settings_list .list>label {
    font-size: 1rem;
}

.window.settings_list .item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: .5rem 0;
    border-radius: 1.7rem;
    padding: .7rem;
    background-color: #404040ff;
}

.window.settings_list .item h3 {
    font-size: 1.2rem;
}

.window.settings_list .item>.content {
    display: flex;
    padding: 0 1rem;
}

.window .version {
    text-align: center;
}

.window .list label {
    display: block;
    padding: .5em;
}

.window button {
    text-align: left;
    display: block;
    margin: .5rem 0;
    border: none;
    border-radius: 2rem;
    padding: 1.2rem;
    width: 100%;
    background-color: #404040ff;
    color: #ffffffff;

    cursor: pointer;
}

.window button:hover {
    background-color: #707070ff;
}

.window select {
    display: block;
    border: none;
    padding: .5rem;
    border-radius: 2rem;
    background-color: #303030ff;
    color: #ffffffff;
}

.window.settings_list {
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
    left: 100vw;
}

.window.settings_list.active {
    visibility: visible;
    left: 1rem;
}

/* #settings_playSound_eew {
    padding: 1em 0;
}

#settings_playSound_eqinfo {
    padding: 2em 0;
} */

#settings_playSound .sectionTitle {
    display: block;
}

#settings_getTypes div {
    padding: .5em;
}

#settings_getTypes label {
    display: inline !important;
}

#debugLogLists {
    padding: 2rem 0;
    font-family: monospace;
    list-style: none;
}

#debugLogLists>li {
    margin-bottom: 1rem;
}

#debugLogLists .title {
    text-align: left;
    font-size: 1rem;
}

#debugLogLists .text {
    text-align: left;
    font-size: .9rem;
}

#license {
    line-height: 1.5rem;
}

#license.active {
    visibility: visible;
    top: calc(env(titlebar-area-height, 2rem) + 1rem);
}

#license>.content a {
    color: #a0f0a0ff;
    text-decoration: underline;
}

#copyrights {
    padding-top: 4rem;
    padding-bottom: 4rem;
    height: calc(100svh - 8rem - 4rem - 4rem);
}

.qcnsjs {
    font-size: 1.5rem;
    font-weight: 700;
}

.enwfew {
    border-color: #a0a0a0ff;
    border-width: 1px;
    border-style: solid;
}

.rhkdmh {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2em;
}

.qugesl {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.srajis {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#betaBanner {
    display: none;
    position: absolute;
    right: 2rem;
    top: 2rem;
    border-radius: 100vw;
    padding: 0 0.5rem;
    background-color: #e04040;
    opacity: 0.5;
    z-index: 3;
    pointer-events: none;
}

#betaBanner.active {
    display: flex;
}

#betaBannerText {
    color: #ffffff;
    text-align: center;
}

#debugOutput {
    display: none;
    flex-direction: column;
    position: absolute;
    bottom: 0;
    left: 0;
    max-width: 100vw;
    font-size: 0.8rem;
    z-index: 2;
    pointer-events: none;
}

#debugOutput.active {
    display: flex;
}

#debugOutput>* {
    background-color: #00000040;
}

@media (max-width: 769px) {
    :root {
        --control-width: 30rem;
    }
}


@media (max-width: 640px) {
    main {
        flex-direction: column;
    }

    /* #eqHistoryBtn {
        display: flex !important;
    } */

    #control {
        display: flex;
        width: 100vw;
        height: 14em;
    }

    #map {
        width: 100vw;
    }

    #mapWrapper {
        width: 100%;
    }

    #eqHistoryField {
        display: none;
    }

    #control.mobile {
        height: 100%;
    }

    #eqHistoryField.mobile {
        display: block;
    }

    #mapWrapper.mobile {
        display: none;
    }

    #settings>.wrapper {
        flex-direction: column;
    }

    #settings .settings_list {
        width: 100%;
    }

    #settings_lists {
        width: calc(100% - 2em);
    }

    #settings_lists ul {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    #settings_lists li {
        width: 15%;
        text-align: center;
    }
}

@media (max-width: 384px) {

    html,
    body {
        font-size: 11px;
    }
}