/*
 * タイポグラフィ共通設定
 * APP版とSP版をデフォルト値とし、mode_web配下のみPC用の見出しサイズに変更する。
 */

/* オーバーレイ共通クラス */
.background_overlay {
    background-color: rgba(51, 51, 51, 0.6);
}

/* Title */
.title_h1,
.title_h2,
.title_h3,
.title_h4,
.title_h5 {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.title_h1 { font-size: 22px; }
.title_h2 { font-size: 18px; }
.title_h3 { font-size: 16px; }
.title_h4 { font-size: 14px; }
.title_h5 { font-size: 12px; }

.mode_web .title_h1 { font-size: 24px; }
.mode_web .title_h2 { font-size: 20px; }
.mode_web .title_h3 { font-size: 18px; }
.mode_web .title_h4 { font-size: 16px; }
.mode_web .title_h5 { font-size: 14px; }

/* Body - Bold */
.body_bold_medium {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

/* Body - Regular */
.body_regular_large,
.body_regular_medium,
.body_regular_caption,
.body_regular_caption_xsmall,
.body_regular_narrow_large,
.body_regular_narrow_medium,
.body_regular_narrow_small {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
}

.body_regular_large {
    font-size: 16px;
    line-height: 1.5;
}

.body_regular_medium {
    font-size: 14px;
    line-height: 1.5;
}

.body_regular_caption {
    font-size: 12px;
    line-height: 1.3;
}

.body_regular_caption_xsmall {
    font-size: 11px;
    line-height: 1.3;
}

/* Body - Regular Narrow */
.body_regular_narrow_large {
    font-size: 16px;
    line-height: 1.3;
}

.body_regular_narrow_medium {
    font-size: 14px;
    line-height: 1.3;
}

.body_regular_narrow_small {
    font-size: 12px;
    line-height: 1.2;
}

/* Label - Bold */
.label_bold_large,
.label_bold_medium,
.label_bold_small {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    line-height: 1.05;
}

.label_bold_large { font-size: 16px; }
.label_bold_medium { font-size: 14px; }
.label_bold_small { font-size: 12px; }

/* Label - Regular */
.label_regular_large,
.label_regular_medium,
.label_regular_small,
.label_regular_xsmall {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    line-height: 1.05;
}

.label_regular_large { font-size: 16px; }
.label_regular_medium { font-size: 14px; }
.label_regular_small { font-size: 12px; }
.label_regular_xsmall { font-size: 11px; }

/* Number */
.number_bold_large,
.number_regular_medium,
.number_regular_small,
.number_regular_xsmall,
.map_home_number {
    font-family: 'Roboto', sans-serif;
    line-height: 1.05;
}

.number_bold_large {
    font-size: 16px;
    font-weight: 700;
}

.number_regular_medium {
    font-size: 14px;
    font-weight: 400;
}

.number_regular_small {
    font-size: 12px;
    font-weight: 400;
}

.number_regular_xsmall {
    font-size: 11px;
    font-weight: 400;
}

/* Map Elements */
.map_spot_default,
.map_spot_selected,
.map_unselectable_spot,
.map_exit_name,
.map_caption {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.2;
}

.map_spot_default {
    font-size: 12px;
    font-weight: 500;
}

.map_spot_selected {
    font-size: 12px;
    font-weight: 700;
}

.map_unselectable_spot {
    font-size: 11px;
    font-weight: 400;
}

.map_home_number {
    font-size: 11px;
    font-weight: 700;
}

.map_exit_name {
    font-size: 11px;
    font-weight: 500;
}

.map_caption {
    font-size: 11px;
    font-weight: 400;
}

/* Elevation */

/* X: 0、Y: 0、ぼかし: 8、広がり: 0、黒: 20% */
.elevation1 {
    box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);
}

/*
 * X: 0、Y: 0、ぼかし: 12、広がり: 0、黒: 30%
 * X: 0、Y: 0、ぼかし: 4、 広がり: 0、黒: 10%
 */
.elevation2 {
    box-shadow:
        0 0 12px 0 rgba(0, 0, 0, 0.3),
        0 0 4px 0 rgba(0, 0, 0, 0.1);
}

/*
 * X: 0、Y: 0、ぼかし: 20、広がり: 0、黒: 30%
 * X: 0、Y: 0、ぼかし: 8、 広がり: 0、黒: 20%
 */
.elevation3 {
    box-shadow:
        0 0 20px 0 rgba(0, 0, 0, 0.3),
        0 0 8px 0 rgba(0, 0, 0, 0.2);
}

/* BackGround */
.background_primary {
    background-color: #FFFFFF;
}
.background_inverted {
    background-color: #4D4D4D;
}
.background_secondary {
    background-color: #F2F2F2;
}
/* LabelFill */
.label_fill_brand {
    background-color: #197982;
}
.label_fill_brand_subtle {
    background-color: #E7F2F3;
}
.label_fill_surface {
    background-color: #FFFFFF;
}
.label_fill_surface_subtle {
    background-color: #F2F2F2;
}

/* icon */
.icon_secondary {
    background-color: #197982;
}

/* border */
.border_primary {
    border: 1px solid #E5E5E5;
}
.border_secondary {
    border: 1px solid #CCCCCC;
}
.border_danger {
    border: 1px solid #E86666;
}

/* text color */
.text_primary {
    color: #000000;
}
.text_inverted {
    color: #FFFFFF;
}
.text_tertiary {
    color: #4D4D4D;
}
.text_brand {
    color: #197982;
}
.text_secondary {
    color: #333333;
}
.text_danger {
    color: #D90000;
}

/* ===== メッセージボックス（メッセージダイアログ / 確認ダイアログ） ===== */
#messageBoxOverlay {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

#messageBoxOverlay.is_open {
    display: flex;
}

.message_box {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 300px;
    max-width: 300px;
    max-height: 560px;
    margin: 0 24px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

/* WEB版 */
.mode_web .message_box {
    width: 400px;
    max-width: calc(100% - 48px);
}

.message_box_content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.message_box_image {
    margin-bottom: 16px;
}

.message_box_title {
    color: #000000;
    text-align: left;
    word-break: break-word;
}

.message_box_body {
    margin-top: 8px;
    color: #333333;
    text-align: left;
    word-break: break-word;
}

.message_box_title:empty,
.message_box_body:empty {
    display: none;
}

.message_box_actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
}

.message_box_btn {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 999px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.message_box_btn_ok {
    padding: 8px 4px;
    border: none;
}

.message_box_btn_cancel {
    display: none;
    height: 48px;
    padding: 8px 12px;
    color: #333333;
}

.message_box.is_confirm .message_box_btn_cancel {
    display: block;
}

/* ===== 通知メッセージ（トースト） ===== */
#toastOverlay {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#toastOverlay.is_open {
    display: block;
}

/* 共有完了トーストは表示中も背面を操作できるようにする。 */
#toastOverlay.share_toast {
    pointer-events: none;
}

.toast_message {
    box-sizing: border-box;
    position: absolute;
    left: 16px;
    right: 16px;
    /* ホームインジケータ（safe-area）の上に16px空けて配置 */
    bottom: calc(16px + var(--safe-area-bottom));
    width: auto;
    padding: 12px;
    border-radius: 8px;
    word-break: break-word;
}

/* WEB版: ヘッダーと同幅・同左位置、ヘッダー下部から16px */
.mode_web .toast_message {
    left: 16px;
    right: auto;
    top: 177px;
    bottom: auto;
    width: 360px;
    max-width: 360px;
}

/* ===== マイスポット登録ダイアログ ===== */
#myspotDialogOverlay {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    padding: 24px;
    align-items: center;
    justify-content: center;
}

#myspotDialogOverlay.is_open {
    display: flex;
}

.myspot_dialog {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    max-height: min(560px, 100%);
    height: auto;
    margin: 0;
    padding: 24px;
    border-radius: 12px;
}

.mode_web .myspot_dialog {
    max-width: 400px;
}

.myspot_dialog_content {
    flex: 0 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.myspot_dialog.is_scrollable .myspot_dialog_content {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.myspot_dialog_title {
    color: #000000;
    text-align: left;
    word-break: break-word;
}

.myspot_dialog_body {
    margin-top: 8px;
    color: #333333;
    text-align: left;
    word-break: break-word;
}

.myspot_dialog_input_wrap {
    position: relative;
    width: 100%;
    margin-top: 16px;
}

.myspot_dialog_input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px;
    border-radius: 8px;
    outline: none;
    resize: none;
    overflow: hidden;
    line-height: 1.5;
    font-family: inherit;
    word-break: break-word;
    white-space: pre-wrap;
}

.myspot_dialog_input.has_clear {
    padding-right: 40px;
}

.myspot_dialog_input.is_error {
    border-color: #E53935;
}

.myspot_dialog_clear {
    display: none;
    position: absolute;
    top: 10px;
    right: 8px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.myspot_dialog_error {
    display: none;
    margin-top: 8px;
    margin-bottom: 0;
    color: #E53935;
    text-align: left;
    word-break: break-word;
}

.myspot_dialog_actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
}

.myspot_dialog_btn {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    height: 48px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.myspot_dialog_btn_register {
    border: none;
    padding: 8px 4px;
}
