@charset "UTF-8";

/*!

    SSC for Web

    Copyright (C) Saitama Sora Cam, よね/Yone
    Licensed under the Apache License 2.0

    https://github.com/YDITS/SSC-Web

*/

:root {
    --font-size: 18px;
    --font-weight: 400;
    --font-family: "Local Noto Sans JP", "Noto Sans JP", "Roboto", sans-serif;

    --link-color: #25caa9;

    --map-item--border-radius: 0.5rem;
    --map-item--bgcolor: #000000c0;
    --map-item--color: #ffffffff;

    --information-details--width: 16rem;

    /* z-index */
    --map-item--z-index: 9999;
    --menu-button-wrapper--z-index: calc(var(--map-item--z-index) + 1);
    --modals--z-index: calc(var(--map-item--z-index) + 2);
    --modal--z-index: calc(var(--modals--z-index) + 3);

    @media (width < 1024px) or (height < 768px) {
        --font-size: 16px;
    }

    font-size: var(--font-size);
}

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    font-family: var(--font-family);
    font-size: var(--font-size);
    user-select: none;

    & * {
        margin: 0;
        padding: 0;
    }
}

main {
    display: flex;
    flex-direction: row;
}

/* map */

.map {
    width: calc(100vw - var(--information-details--width));
    height: 100dvh;

    @media (max-width: 768px) {
        transition: width 0.3s;
        width: 100vw;
    }
}

.map__item {
    position: fixed;
    z-index: var(--map-item--z-index);
    background-color: var(--map-item--bgcolor);
    color: var(--map-item--color);
}

/* information-title */

.information-title {
    top: 1rem;
    left: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0.5em;
    font-size: 1.8rem;
    font-weight: bold;
}

/* published-time */

.published-time {
    top: 5.5rem;
    left: 0;

    background-color: #0000;
    padding: 0.5em;
    font-size: 1rem;
    text-shadow: -1px -1px #0008, -1px 1px #0008, 1px -1px #0008, 1px 1px #0008;
}

/* information-details */

.information-details {
    display: flex;
    flex-direction: column;

    box-sizing: border-box;

    width: var(--information-details--width);
    height: 100vh;
    border-left: 1px solid #fff4;
    overflow: auto;

    padding: 0.5rem 0.8rem;
    background-color: #111;
    color: #fff;

    @media (max-width: 768px) {
        position: fixed;
        top: 0;
        right: -100%;
        transition: right 0.3s;
        z-index: calc(var(--map-item--z-index) + 1);

        &.enabled {
            right: 0;
        }
    }

}

.information-details__item {
    display: flex;
    flex-direction: row;
    align-items: center;

    min-height: 3.5rem;
    overflow: hidden;
    border-top: 1px solid #fff4;

    padding: 0.5rem 0;

    &:first-child {
        border-top: none;
    }
}

.information-details__term {
    width: 50%;
}

.information-details__label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ccc;
    text-wrap: nowrap;
}

.information-details__description {
    display: flex;
    justify-content: end;
    width: 50%;
    text-wrap: nowrap;
}

.information-details__display {
    display: inline-block;
    text-align: right;
    font-size: 1rem;
}

.occurred-time,
.hypocenter,
.tsunami {
    flex-direction: column;
    gap: 0.5rem;
}

.occurred-time__term,
.occurred-time__description,
.hypocenter__description,
.hypocenter__term,
.hypocenter__display,
.tsunami__description,
.tsunami__term,
.tsunami__display {
    width: 100%;
}

.max-int__display,
.magnitude__display {
    font-size: 2rem;
    font-weight: bold;
}

/* expand-information-details */

.expand-information-details {
    position: fixed;
    top: 42vh;
    right: 0;
    height: fit-content;
    z-index: calc(var(--map-item--z-index) + 2);

    transition: right 0.3s;

    & .close {
        display: none;
    }

    &.enabled {
        right: calc(var(--information-details--width) - 1px);

        & .open {
            display: none;
        }

        & .close {
            display: block;
        }
    }
}

.expand-information-details__button {
    display: none;
    writing-mode: vertical-rl;
    text-orientation: upright;
    border: none;
    border-left: 1px solid #fff4;
    border-top: 1px solid #fff4;
    border-bottom: 1px solid #fff4;
    border-radius: 0.5em 0 0 0.5em;
    padding: 0.5em 0.3em;
    background-color: #111;
    color: var(--map-item--color);

    @media (max-width: 768px) {
        display: block;
    }
}

/* icon-legends */

.icon-legend {
    bottom: 7rem;
    left: .7rem;

    display: none;
    flex-direction: column;

    gap: 0.5rem;
    border-radius: var(--map-item--border-radius);
    padding: .5em 1em;

    &.enabled {
        display: flex;
    }
}

.icon-legend__item {
    display: flex;
    align-items: center;
}

.icon-legend__image {
    width: 1.5rem;
    margin-right: .3rem;
}

.ellipsis {
    display: flex;
    flex-direction: column;
    justify-content: center;

    &>* {
        transform: rotate(90deg);
    }
}

/* ydits-copyright */

.ydits-copyright {
    bottom: 3rem;
    left: .7rem;
    border-radius: var(--map-item--border-radius);
}

.ydits-copyright__link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;

    color: var(--map-item--color);
    text-decoration: none;
}

.ydits-copyright__before {
    font-size: 0.8rem;
    color: var(--map-item--color);
}

.ydits-copyright__image {
    width: 4.5rem;
}

/* menu-button */

.menu-button__wrapper {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;

    z-index: var(--menu-button-wrapper--z-index);
}

.menu-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: var(--map-item--border-radius);

    background-color: var(--map-item--bgcolor);
    color: var(--map-item--color);

    &>* {
        transition: opacity 0.2s;
    }

    &:active {
        &>* {
            opacity: 0.4;
        }
    }
}

/* link-button */

.link-button {
    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;
    width: 100%;
    border-radius: 1rem;

    padding: 1rem;
    background-color: #333;
    color: #fff;
    text-decoration: none;
}

/* modals */

.modals {
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #0006;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.6s;

    &.enabled {
        opacity: 1;
        pointer-events: stroke;
    }

    z-index: var(--modals--z-index);
}

/* modal */

.modal {
    position: fixed;
    bottom: -100%;
    left: 0;

    box-sizing: border-box;
    width: 100vw;
    max-width: clamp(48rem, 48rem, 100vw);
    height: 80vh;
    outline: 1px solid #fff1;
    border-radius: 1rem 1rem 0 0;

    background-color: #000;
    color: #eee;

    transition: bottom 0.4s;
    pointer-events: auto;

    &.enabled {
        bottom: 0;
    }

    @media (width > 54rem) {
        left: calc(50dvw - 24rem);
    }

    z-index: var(--modal--z-index);
}

.modal__title-bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 4rem;
}

.modal__close-button {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;

    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: var(--map-item--border-radius);

    background-color: #0000;
    color: var(--map-item--color);

    &>* {
        transition: opacity 0.2s;
    }

    &:active {
        &>* {
            opacity: 0.4;
        }
    }
}

.modal__content {
    display: flex;
    flex-direction: column;

    box-sizing: border-box;
    padding: 1rem;
    height: calc(100% - 4rem);
    overflow: auto;

    gap: 3rem;
    background-color: #111;
}

.modal__title {
    font-size: 1.5rem;
    text-align: center;
    font-weight: bold;
}

/* menu */

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

.menu__section__title {
    font-size: 1rem;
    font-weight: bold;
    padding-left: 1.5rem;
}

/* version */

.version {
    text-align: center;
}

/* settings */

.settings__item {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: fit-content;
    border-radius: 1rem;
    padding: 1rem;
    background-color: #333;
}

.settings__select {
    border-radius: 100vw;
    padding: 0.5rem;
    height: 2.5rem;
}

/* scale-icon-settings-preview */

.scale-icon-settings-preview {
    border: 1px solid #fff4;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scale-icon-settings-preview__root {
    display: grid;
    grid-row: auto;
    grid-template-columns: repeat(auto-fill, 32px);
    gap: 0.3rem;
}

/* licenses */

.licenses {
    gap: 0.2rem;
}

.licenses__list {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.licenses__item {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    gap: 0.5rem;
    list-style: none;

    padding: 1rem;

    border-top: 1px solid #fff4;

    &:first-child {
        border-top: none;
    }

    & a {
        color: var(--link-color);
    }
}

.licenses__name {
    font-weight: var(--font-weight);
}

/* disclaimer */

.disclaimer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    line-height: 1.75em;
    padding-left: 1rem;
    font-size: 0.8rem;
}

/* debug-mode-marker */

.debug-mode-marker {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #e62;
    color: #fff;
    opacity: 0.8;
    border-radius: 100vw;
    padding: 0.2em 0.5em;
    z-index: 9999;

    display: none;

    transition: font-size 0.3s,
        background-color 0.3s;

    &.enabled {
        display: block;
    }

    &.highlight {
        background-color: #f44;
        font-size: 3rem;
    }
}

/* leaflet */

.leaflet-control-attribution {
    display: none;
}