/* ==========================================================================
   mypage_test/assets/css/top_hub.css
   個人マイページ 総合トップ画面 (section-top-hub.php) 専用スタイル
   ========================================================================== */

:root {
    --theme-primary: #702d7f;
    --theme-primary-hover: #4a1555;
    --theme-primary-light: rgba(112, 45, 127, 0.08);
}

/* 建設業選択時の緑配色 */
body.theme-kensetsu,
.theme-kensetsu {
    --theme-primary: #019178;
    --theme-primary-hover: #00735f;
    --theme-primary-light: rgba(1, 145, 120, 0.08);
}

/* 画面コンテナ */
.view-top-hub {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background-color: #ffffff;
    box-sizing: border-box;
}

/* 総合トップ用 会員ヘッダー情報エリア */
.hub-header-info {
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #ffffff;
    margin: 0;
    box-sizing: border-box;
}

.hub-header-info .member-no-row {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    line-height: 1.4;
    min-height: 1.4em;
    margin: 0 0 4px 0;
    padding: 0;
}

.hub-header-info .member-no-val {
    font-weight: 700;
    color: #666666;
}

.hub-header-info .member-no-row.is-invisible-no {
    visibility: hidden;
}

.hub-header-info .member-name-heading,
.hub-member-name-wrap {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}

.hub-member-name {
    letter-spacing: 0.02em;
}

.hub-member-honorific {
    font-size: 18px;
    margin-left: 4px;
}

/* メニュー見出し帯 */
.hub-menu-header {
    background-color: var(--theme-primary);
    padding: 14px 20px;
    box-sizing: border-box;
    width: 100%;
    text-align: left;
}

.hub-menu-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    margin: 0;
    color: #ffffff;
    text-align: left;
}

/* コンテンツエリア全体 */
.hub-content-container {
    background-color: #ffffff;
    padding: 24px 20px 40px;
}

.hub-section {
    margin-bottom: 32px;
}

.hub-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    padding-left: 2px;
}

/* ご加入中の労災保険ボタン グリッド */
.hub-insurance-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 1件のみ加入の場合：2件並びと同じサイズ感・丸ボタン形状を維持 */
.hub-insurance-grid.single-item .hub-insurance-btn {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
}

/* 2件以上加入の場合：横2列 (50% - gap) */
.hub-insurance-grid:not(.single-item) .hub-insurance-btn {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
}

.hub-insurance-btn {
    height: 55px;
    min-height: 55px;
    background: #ffffff;
    border: 1px solid #e3e6e6;
    border-radius: 36px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
}

.hub-insurance-btn:hover,
.hub-insurance-btn:focus-visible {
    background-color: #f9f9f9;
    border-color: #d0d4d4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.hub-insurance-btn:active {
    transform: translateY(0);
    box-shadow: none;
    background-color: #f0f0f0;
}

.hub-insurance-btn-text {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
}

/* 各種手続き (カード型ボタン) */
.hub-procedures-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hub-procedure-card-btn {
    width: 109px;
    height: 109px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 5px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-align: center;
}

.hub-procedure-card-btn:hover,
.hub-procedure-card-btn:focus-visible {
    box-shadow: 0 2px 8px rgba(112, 45, 127, 0.25);
    transform: translateY(-1px);
}

.hub-procedure-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.hub-procedure-card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hub-procedure-card-text {
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    line-height: 1.3;
    text-align: center;
}

/* お知らせセクション */
.hub-news-section {
    margin-top: 40px;
    padding-top: 20px;
}

.hub-news-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-primary);
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.hub-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 28px;
}

.hub-news-item {
    border-bottom: 1px dotted #cccccc;
}

.hub-news-item:first-child {
    border-top: 1px dotted #cccccc;
}

.hub-news-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.hub-news-link:hover,
.hub-news-link:focus-visible {
    background-color: var(--theme-primary-light);
}

.hub-news-meta {
    flex: 1;
    padding-right: 12px;
}

.hub-news-date {
    display: block;
    font-size: 14px;
    color: #666666;
    margin-bottom: 4px;
}

.hub-news-headline {
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    line-height: 1.45;
    margin: 0;
    word-break: break-word;
}

/* 右矢印アイコン（紫色三角形） */
.hub-news-arrow {
    width: 8px;
    height: 12px;
    flex-shrink: 0;
    background-color: var(--theme-primary);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    display: inline-block;
    transition: transform 0.15s ease;
}

.hub-news-link:hover .hub-news-arrow {
    transform: translateX(3px);
}

/* アウトライン丸ボタン（過去のお知らせ / ログアウト） */
.hub-news-more-wrap {
    text-align: center;
    margin-bottom: 32px;
}

.hub-btn-outline-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    height: 44px;
    padding: 8px 20px;
    border-radius: 22px;
    background-color: #ffffff;
    border: 1px solid #999;
    color: #333;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease;
    line-height: 1em;
}

.hub-btn-outline-pill:hover,
.hub-btn-outline-pill:focus-visible {
    /*
    background-color: #333333;
    color: #ffffff;
    */
}

/* ログアウト / 代理復帰エリア */
.hub-action-bar {
    text-align: center;
    margin-top: 24px;
}

/* ==========================================================================
   共通ヘッダー情報・戻るリンク・タイトル帯 統一スタイル
   ========================================================================== */

/* 会員情報バー */
.member-header-info {
    background-color: #ffffff;
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    box-sizing: border-box;
}

/* 会員番号行 */
.member-header-info .member-no-row,
.member-header-info .small,
.member-header-info .card-reissue-member-no,
.member-header-info .health-check-member-no,
.member-header-info .editinfo_title_no_dairi {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    line-height: 1.4;
    margin: 0 0 4px 0;
    padding: 0;
}

.member-header-info .member-no-val,
.member-header-info .top-member-no,
.member-header-info .top-company-no,
.member-header-info #title_no {
    font-weight: 700;
    color: #666666;
}

/* 氏名行 */
.member-header-info .member-name-heading,
.member-header-info .card-reissue-member-name,
.member-header-info .health-check-member-name,
.member-header-info .editinfo_title_name,
.member-header-info .editinfo_title_name_dairi,
.member-header-info .h4 {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    line-height: 1.35;
    margin: 0;
    padding: 0;
}

.member-header-info .member-name-val,
.member-header-info .top-member-name,
.member-header-info .top-company-name,
.member-header-info #title_name {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
}

.member-header-info .member-honorific {
    font-size: 18px;
    font-weight: 500;
    color: #333333;
    margin-left: 4px;
}

/* 戻るナビゲーションバー */
.back-nav-bar,
.back-to-hub-bar {
    padding: 8px 20px 10px;
    background-color: #ffffff;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
}

/* 戻るリンク */
.back-nav-link,
.btn-back-to-hub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--theme-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.back-nav-link:hover,
.btn-back-to-hub:hover {
    color: var(--theme-primary-hover);
    text-decoration: underline;
}

.back-nav-link i,
.btn-back-to-hub i {
    font-size: 12px;
    line-height: 1;
}

/* タイトル見出し帯（基本は紫、建設業選択時は緑に変数が自動連動） */
.page-title-banner,
.menu-header,
.card-reissue-title-banner,
.accident-report-title-banner,
.health-check-title-banner,
.withdrawal-title-banner {
    background-color: var(--theme-primary);
    color: #ffffff;
    padding: 14px 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin: 0 0 20px 0;
}

.page-title-banner h1,
.page-title-banner h2,
.page-title-banner .menu-title,
.menu-header h1,
.menu-header h2,
.menu-header .menu-title,
.menu-header .union-page-title,
.accident-report-title-banner h1,
.card-reissue-title-banner h1,
.health-check-title-banner h1 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* ==========================================================================
   ログイン中の共通ヘッダーボタン（元のオレンジデザインを維持し、改行防止のみ適用）
   ========================================================================== */
#common_header .ch_mypage,
.ch_mypage {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#common_header .ch_mypage a,
#common_header .ch_mypage a.js-header-logout-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
}

#common_header .ch_mypage .ch_mypage_button_pc {
    grid-template-columns: 30px auto !important;
    white-space: nowrap !important;
}

#common_header .ch_mypage .ch_mypage_button_pc .mypage_text {
    white-space: nowrap !important;
    letter-spacing: -0.5px;
    /* 「マイページログアウト」が折り返さず綺麗に収まるよう微調整 */
}

/* ==========================================================================
   デバッグモード用インジケーターバナー（ヘッダー下・ページ右上にフロート表示）
   ========================================================================== */
.mypage-container {
    position: relative !important;
}

.debug-mode-indicator {
    position: absolute !important;
    top: 10px !important;
    right: 20px !important;
    z-index: 999999 !important;
    background: rgba(255, 248, 225, 0.98) !important;
    color: #b78103 !important;
    border: 1px solid #ffe082 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    pointer-events: auto !important;
}

.debug-mode-indicator code {
    background: #fff;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #ffd54f;
    color: #d84315;
    font-weight: 700;
    font-size: 11px;
}

@media (max-width: 768px) {
    .debug-mode-indicator {
        top: 8px !important;
        right: 10px !important;
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}