/* お知らせ(TOP画面のお知らせ枠・お知らせ一覧・お知らせ詳細)の共通スタイル */

/* 書体: TOP画面は bootstrap.min.css をテーマCSSより後に再読込するため body のフォント指定が上書きされる。
   どの画面でも同じ書体・サイズになるよう、お知らせの領域で固定する */
.top-page-notices,
.top-page-notice-detail {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Yu Gothic', YuGothic, 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', Arial, 'メイリオ', Meiryo, sans-serif;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.6;
}

/* 一覧の枠(TOP画面のお知らせ枠・お知らせ一覧) */
.top-page-notices {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#top-page-notices .top-page-notices {
    margin: 20px auto;
}

.top-page-notices-heading {
    padding: 8px 14px;
    font-weight: bold;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.top-page-notices-more {
    padding: 8px 14px;
    text-align: right;
}

/* 一覧の1行(クリックでお知らせ詳細画面へ遷移する) */
a.top-page-notice {
    display: flex;
    align-items: baseline;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
}

a.top-page-notice:last-of-type {
    border-bottom: 0;
}

a.top-page-notice:hover {
    color: inherit;
    background-color: #f7f7f7;
}

/* 種別ラベルは、最長の「運営からのお知らせ」(9文字)が収まる固定幅にし、日付・タイトルの開始位置をそろえる */
.top-page-notice-type {
    flex: none;
    display: inline-block;
    box-sizing: content-box;
    width: 9em;
    padding: 0 8px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0;
    border-radius: 3px;
}

.top-page-notice-type-system {
    color: #8a2d2d;
    background-color: #f9e8e8;
}

.top-page-notice-type-site {
    color: #1c5d99;
    background-color: #e4eefa;
}

/* 日付は最小幅を決めて、タイトルの開始位置をそろえる。日付とタイトルの間は、縦線を使わず、日本語2文字分(28px)の余白で区切る */
.top-page-notice-date {
    flex: none;
    display: inline-block;
    box-sizing: content-box;
    min-width: 9.4em;
    margin-right: 28px;
    color: #666;
    letter-spacing: 0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* タイトルは、バッジ・日付の右の残り幅の中で折り返す。英数字が続く場合も途中で折り返す */
.top-page-notice-title {
    flex: 1 1 0;
    min-width: 0;
    text-decoration: underline;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* お知らせ詳細 */
.top-page-notice-detail {
    margin: 20px auto;
}

.top-page-notice-detail-head {
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #ddd;
}

.top-page-notice-detail-head .top-page-notice-date {
    min-width: 0;
    margin-right: 0;
}

.top-page-notice-detail-title {
    margin-top: 8px;
    font-size: 18px;
    font-weight: bold;
    word-break: break-word;
}

.top-page-notice-detail-body {
    word-break: break-word;
}

/* 画像が含まれても、画面の幅からはみ出さない */
.top-page-notice-detail-body img {
    max-width: 100%;
    height: auto;
}

/* 詳細画面の下部のナビゲーション(前へ・一覧へ・次へ)。一覧へのボタンを中央に置く。前へ・次へが無い側は空欄にして、ボタンの位置を動かさない */
.top-page-notice-detail-nav {
    display: flex;
    align-items: center;
    max-width: 480px;
    margin: 32px auto 0;
}

.top-page-notice-detail-nav-side {
    flex: 1 1 0;
    white-space: nowrap;
}

.top-page-notice-detail-nav-previous {
    text-align: left;
}

.top-page-notice-detail-nav-next {
    text-align: right;
}

.top-page-notice-detail-nav a {
    color: inherit;
    font-weight: bold;
    text-decoration: none;
}

.top-page-notice-detail-nav a:hover {
    text-decoration: underline;
}

.top-page-notice-detail-nav .top-page-notice-detail-nav-list {
    flex: none;
    padding: 10px 40px;
    border: 1px solid #333;
    border-radius: 999px;
}

.top-page-notice-detail-nav .top-page-notice-detail-nav-list:hover {
    text-decoration: none;
    background-color: #f7f7f7;
}

/* ページ送り(マイページの履歴一覧と同じ見た目。共通テンプレートはマイページ用のCSSを読み込まないため、ここで定義する) */
#top-page-notices .pager {
    position: relative;
    margin: 20px 0;
    overflow: hidden;
}

#top-page-notices .pager ul {
    position: relative;
    left: 50%;
    float: left;
    padding: 0;
    list-style: none;
}

#top-page-notices .pager ul li {
    position: relative;
    left: -50%;
    float: left;
    margin-right: 5px;
}

#top-page-notices .pager ul li:last-child {
    margin-right: 0;
}

#top-page-notices .pager a {
    display: block;
    padding: 5px 12px;
    text-decoration: none;
    border: 1px solid #bfbfbf;
}

#top-page-notices .pager a:hover {
    background-color: #c9c9c9;
}

#top-page-notices .pager .pager__list_current {
    pointer-events: none;
    background-color: #c9c9c9;
}

#top-page-notices .pager .unavailable {
    pointer-events: none;
    color: rgba(51, 51, 51, 0.4);
    background-color: rgba(235, 234, 234, 0.4);
    border: none;
}

#top-page-notices .pager i {
    font-size: 16px;
    line-height: 1;
}

#top-page-notices .pager .pager__list_first i, #top-page-notices .pager .pager__list_pre i {
    margin-right: 5px;
}

#top-page-notices .pager .pager__list_next i, #top-page-notices .pager .pager__list_last i {
    margin-left: 5px;
}

/* スマートフォン: 一覧は1行目に種別と日付、2行目にタイトルを表示する。ページ送りは矢印アイコンのみ表示する */
@media (max-width: 767px) {
    .top-page-notice-date {
        min-width: 0;
        margin-right: 0;
    }

    a.top-page-notice {
        flex-wrap: wrap;
    }

    a.top-page-notice .top-page-notice-title {
        flex-basis: 100%;
        margin-top: 6px;
    }

    #top-page-notices .pager .pc {
        display: none;
    }
}
