/*-- travel page specific styles --*/

/* 地図の表示幅がmainより狭いため、.container側の中央寄せ収縮を無効化して他ページと同じ左起点に揃える */
.container {
    width: 100%;
}

.title {
    align-items: center;
    text-align: left;
    max-height: 100%;
}

.title h1 {
    font-size: clamp(2.0rem, calc(1.8rem + 0.625vw), 2.5rem);
}

.msg {
    margin-top: 10px;
    align-items: center;
    text-align: left;
    max-height: 100%;
}

.msg a {
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}

.msg a:link,
.msg a:visited {
    color: var(--fg-color);
}

.msg a:active,
.msg a:hover {
    color: var(--accent-color);
    text-decoration: none;
}


.prefecture path {
    fill: var(--fg-color);
    cursor: pointer;
}

.prefecture text {
    fill: var(--bg-color);
}

.prefecture:hover path {
    fill: rgba(255, 255, 255, 0.7);
}

.prefecture:hover text {
    fill: var(--accent-color);
}

#toyama path,
#gifu path,
#wakayama path,
#aomori path,
#shizuoka path,
#chiba path,
#kagawa path,
#fukuoka path {
    fill: var(--accent-color);
}

#japan-map-wrapper {
    max-width: 100%;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}

.map-note {
    margin-bottom: 0.5em;
    font-size: var(--font-size-small);
    opacity: 0.6;
    text-align: left;
}

#japan-map-wrapper.is-dragging {
    cursor: grabbing;
}

#japan-map {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: center center;
}

/* タブレット帯(767.98px〜1024px未満): デスクトップより低いvh上限で、狭い画面でも地図全体が収まりやすくする */
@media (min-width: 767.98px) {
    #japan-map-wrapper {
        height: min(650px, 55vh);
    }

    #japan-map {
        width: auto;
        height: 100%;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    #japan-map-wrapper {
        height: min(910px, 65vh);
    }
}

#lightbox {
    position: fixed;
    z-index: 100;
    background: rgba(15, 37, 64, 0.8);
    display: none;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

#lightbox .lightbox-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#lightbox img {
    width: 100%;
    height: auto;
    object-fit: cover;
    align-items: center;
    text-align: center;
    /* クリックを受け付けるためpointer-eventsのみ有効化する。
       touch-callout/user-selectはサイト共通のimg既定値(none)のままにし、
       長押しでの画像保存・選択はできないようにする */
    pointer-events: initial;
}

#lightbox h2 {
    margin: 0 auto;
    color: var(--fg-color);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: 400;
}

#lightbox a {
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
    margin: 0 auto;
    color: var(--fg-color);
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: 400;
}

#lightbox a:link,
#lightbox a:visited {
    color: var(--fg-color);
}

#lightbox a:active,
#lightbox a:hover {
    color: var(--accent-color);
    text-decoration: none;
}
