/* ======================================================
   public_tables.css
   ------------------------------------------------------
   役割：
     フクオカギルド公開一覧ページの
     PC用テーブル表示を管理する。

   対象：
     ・基本テーブル
     ・詳細テーブル
     ・固定ヘッダー
     ・固定列
     ・横スクロール
     ・各カテゴリ専用列調整
     ・ツールチップ
     ・空き状況凡例

   注意：
     ・共通骨格は public_base.css
     ・スマホカードは public_cards.css
     ・色・背景画像は public_theme.css
====================================================== */


/* ======================================================
   ① テーブルスクロール領域
====================================================== */

.fg-public-table-wrap {
    position: relative;

    width: 100%;
    max-height: calc(100vh - 285px);

    overflow: auto;

    margin-top: 14px;

    background: #ffffff;

    border: 1px solid #d8dee8;
    border-radius: 10px;

    scrollbar-gutter: stable;
}


/* ======================================================
   ② 共通テーブル
====================================================== */

.fg-public-table {
    width: 100%;
    min-width: 920px;

    border-collapse: collapse;
    table-layout: fixed;

    font-size: 14px;
}

.fg-public-table th,
.fg-public-table td {
    padding: 10px 12px;

    border-bottom: 1px solid #e2e8f0;

    text-align: left;
    vertical-align: middle;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    transition:
        background-color .12s ease;
}


/* ======================================================
   ③ ヘッダー固定
====================================================== */

.fg-public-table thead th {
    position: sticky;
    top: 0;

    z-index: 5;

    background: #eef2f6;

    border-bottom: 1px solid #cfd7e3;

    box-shadow:
        0 1px 0 rgba(16, 24, 40, .08);

    color: #111827;
    font-weight: 700;

    white-space: nowrap;
}


/* ======================================================
   ④ 行の交互色
====================================================== */

.fg-public-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.fg-public-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}


/* ======================================================
   ⑤ 行ホバー
====================================================== */

.fg-public-table tbody tr:hover td {
    background: #eaf3ff;
}


/* ======================================================
   ⑥ 最終行
====================================================== */

.fg-public-table tr:last-child td {
    border-bottom: none;
}


/* ======================================================
   ⑦ リンク・注記
====================================================== */

.fg-public-table a {
    color: #0068c9;

    text-decoration: none;
}

.fg-public-table a:hover {
    text-decoration: underline;
}

.fg-public-table-note {
    color: #6b7280;
}


/* ======================================================
   ⑧ 共通：先頭列固定
====================================================== */

.fg-public-table th:first-child,
.fg-public-table td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table th:first-child {
    z-index: 7;

    background: #e9eef5;
}

.fg-public-table td:first-child {
    z-index: 2;

    font-weight: 650;

    box-shadow:
        1px 0 0 #e2e8f0;
}

.fg-public-table tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* ======================================================
   ⑨ 最終列
====================================================== */

.fg-public-table td:last-child {
    white-space: normal;

    line-height: 1.55;
}


/* ======================================================
   ⑩ 基本テーブル
====================================================== */

.fg-public-table-basic {
    min-width: 1270px;
}


/* 種別列固定 */
.fg-public-table-basic .fg-col-category {
    position: sticky;
    left: 0;
}


/* 名称列固定 */
.fg-public-table-basic .fg-col-name {
    position: sticky;
    left: 190px;
}


/* 固定ヘッダー */
.fg-public-table-basic thead .fg-col-category,
.fg-public-table-basic thead .fg-col-name {
    z-index: 8;

    background: #e9eef5;
}


/* 奇数行 */
.fg-public-table-basic tbody tr:nth-child(odd) .fg-col-category,
.fg-public-table-basic tbody tr:nth-child(odd) .fg-col-name {
    background: #ffffff;
}


/* 偶数行 */
.fg-public-table-basic tbody tr:nth-child(even) .fg-col-category,
.fg-public-table-basic tbody tr:nth-child(even) .fg-col-name {
    background: #f8fafc;
}


/* ホバー */
.fg-public-table-basic tbody tr:hover .fg-col-category,
.fg-public-table-basic tbody tr:hover .fg-col-name {
    background: #eaf3ff;
}


/* 名称固定列の右境界 */
.fg-public-table-basic .fg-col-name {
    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-basic tbody .fg-col-name {
    font-weight: 650;
}


/* ======================================================
   ⑪ 詳細テーブル共通
====================================================== */

.fg-public-table:not(.fg-public-table-basic) {
    min-width: 1400px;

    table-layout: fixed;
}

.fg-public-table:not(.fg-public-table-basic) th,
.fg-public-table:not(.fg-public-table-basic) td {
    padding: 11px 12px;

    vertical-align: middle;
}

.fg-public-table:not(.fg-public-table-basic) th:nth-child(1),
.fg-public-table:not(.fg-public-table-basic) td:nth-child(1) {
    white-space: normal;

    font-weight: 650;
    line-height: 1.5;
}

.fg-public-table:not(.fg-public-table-basic) tbody td {
    min-height: 42px;
}


/* ======================================================
   ⑫ 独自ツールチップ
====================================================== */

.fg-public-table td.fg-public-tooltip-cell {
    position: relative;

    overflow: visible;

    cursor: help;
}

.fg-public-tooltip-text {
    display: block;

    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.fg-public-table td.fg-public-tooltip-cell:hover {
    z-index: 30;
}

.fg-public-table td.fg-public-tooltip-cell:hover::after {
    content: attr(data-tooltip);

    position: absolute;
    left: 8px;
    top: calc(100% + 6px);

    z-index: 9999;

    min-width: 180px;
    max-width: 360px;

    padding: 8px 10px;

    border: 1px solid #98a2b3;
    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.22);
}


/* ======================================================
   ⑬ 介護保険サービス：対応・空き
====================================================== */

.fg-public-table-care-detail {
    min-width: 1440px;

    table-layout: fixed;
}


/* 事業所名 */
.fg-public-table-care-detail th:first-child,
.fg-public-table-care-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-care-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-care-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-care-detail tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-care-detail tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-care-detail tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 曜日列 */
.fg-public-table-care-detail th:nth-child(n+2):nth-child(-n+8),
.fg-public-table-care-detail td:nth-child(n+2):nth-child(-n+8) {
    text-align: center;
}

.fg-public-table-care-detail td:nth-child(n+2):nth-child(-n+8) {
    padding-left: 4px;
    padding-right: 4px;

    font-size: .94rem;
    font-weight: 700;
}


/* 土曜日 */
.fg-public-table-care-detail th:nth-child(7) {
    color: #2563eb;
}


/* 日曜日 */
.fg-public-table-care-detail th:nth-child(8) {
    color: #dc2626;
}


/* 対応エリア以降 */
.fg-public-table-care-detail th:nth-child(n+9),
.fg-public-table-care-detail td:nth-child(n+9) {
    text-align: left;
}


/* 営業時間 */
.fg-public-table-care-detail td:nth-child(10) {
    font-variant-numeric: tabular-nums;
}


/* セル */
.fg-public-table-care-detail th,
.fg-public-table-care-detail td {
    min-height: 42px;

    padding: 10px 11px;

    vertical-align: middle;
}


/* ツールチップ */
.fg-public-table-care-detail .fg-public-tooltip-cell {
    position: relative;

    overflow: visible;

    white-space: nowrap;
}

.fg-public-table-care-detail .fg-public-tooltip-text {
    display: block;

    width: 100%;
    max-width: 100%;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.fg-public-table-care-detail .fg-public-tooltip-cell:hover {
    z-index: 30;
}


/* ======================================================
   ⑭ 空き状況記号凡例
====================================================== */

.fg-care-status-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px 18px;

    margin: -5px 0 14px;

    color: #667085;

    font-size: .8rem;
}

.fg-care-status-legend span {
    display: inline-flex;
    align-items: center;

    gap: 5px;
}

.fg-care-status-legend strong {
    min-width: 18px;

    color: #172033;

    font-size: .9rem;

    text-align: center;
}


/* ======================================================
   ⑮ 制度系施設：受入・空き
====================================================== */

.fg-public-table-facility-care-detail {
    min-width: 1295px;

    table-layout: fixed;
}


/* 施設名 */
.fg-public-table-facility-care-detail th:first-child,
.fg-public-table-facility-care-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-facility-care-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-facility-care-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-facility-care-detail
tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-facility-care-detail
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-facility-care-detail
tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 条件列 */
.fg-public-table-facility-care-detail
th:nth-child(n+2):nth-child(-n+8),
.fg-public-table-facility-care-detail
td:nth-child(n+2):nth-child(-n+8) {
    text-align: center;
}


/* 居室タイプ */
.fg-public-table-facility-care-detail th:nth-child(2),
.fg-public-table-facility-care-detail td:nth-child(2) {
    text-align: left;
}


/* 備考 */
.fg-public-table-facility-care-detail th:nth-child(9),
.fg-public-table-facility-care-detail td:nth-child(9) {
    text-align: left;

    white-space: normal;

    line-height: 1.55;
}

.fg-public-table-facility-care-detail th,
.fg-public-table-facility-care-detail td {
    padding: 10px 11px;

    vertical-align: middle;
}


/* ======================================================
   ⑯ ショートステイ：対応・空き
====================================================== */

.fg-public-table-short-stay-detail {
    min-width: 1505px;

    table-layout: fixed;
}


/* 施設名 */
.fg-public-table-short-stay-detail th:first-child,
.fg-public-table-short-stay-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-short-stay-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-short-stay-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-short-stay-detail
tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-short-stay-detail
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-short-stay-detail
tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 空き開始・空き終了 */
.fg-public-table-short-stay-detail
th:nth-child(2),
.fg-public-table-short-stay-detail
td:nth-child(2),
.fg-public-table-short-stay-detail
th:nth-child(3),
.fg-public-table-short-stay-detail
td:nth-child(3) {
    text-align: center;

    font-variant-numeric: tabular-nums;

    white-space: nowrap;
}


/* 生活保護〜看取り */
.fg-public-table-short-stay-detail
th:nth-child(n+6):nth-child(-n+9),
.fg-public-table-short-stay-detail
td:nth-child(n+6):nth-child(-n+9) {
    text-align: center;
}


/* 居室タイプ・送迎エリア */
.fg-public-table-short-stay-detail
th:nth-child(4),
.fg-public-table-short-stay-detail
td:nth-child(4),
.fg-public-table-short-stay-detail
th:nth-child(5),
.fg-public-table-short-stay-detail
td:nth-child(5) {
    text-align: left;
}


/* 備考 */
.fg-public-table-short-stay-detail
th:nth-child(10),
.fg-public-table-short-stay-detail
td:nth-child(10) {
    text-align: left;

    white-space: normal;

    line-height: 1.55;
}

.fg-public-table-short-stay-detail th,
.fg-public-table-short-stay-detail td {
    padding: 10px 11px;

    vertical-align: middle;
}


/* ======================================================
   ⑰ 医療機関：診療・訪問
====================================================== */

.fg-public-table-medical-detail {
    min-width: 1500px;

    table-layout: fixed;
}


/* 医療機関名 */
.fg-public-table-medical-detail th:first-child,
.fg-public-table-medical-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-medical-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-medical-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-medical-detail
tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-medical-detail
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-medical-detail
tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 診察曜日〜往診 */
.fg-public-table-medical-detail
th:nth-child(n+3):nth-child(-n+7),
.fg-public-table-medical-detail
td:nth-child(n+3):nth-child(-n+7) {
    text-align: center;
}


/* 診療科 */
.fg-public-table-medical-detail th:nth-child(2),
.fg-public-table-medical-detail td:nth-child(2) {
    text-align: left;
}


/* 診察時間 */
.fg-public-table-medical-detail td:nth-child(4) {
    font-variant-numeric: tabular-nums;

    white-space: nowrap;
}


/* 対応エリア */
.fg-public-table-medical-detail th:nth-child(8),
.fg-public-table-medical-detail td:nth-child(8) {
    text-align: left;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* 備考 */
.fg-public-table-medical-detail th:nth-child(9),
.fg-public-table-medical-detail td:nth-child(9) {
    text-align: left;

    white-space: normal;

    line-height: 1.5;
}


/* ツールチップ内 */
.fg-public-table-medical-detail
td:nth-child(2) .fg-public-tooltip-text,
.fg-public-table-medical-detail
td:nth-child(8) .fg-public-tooltip-text {
    text-align: left;
}

.fg-public-table-medical-detail th,
.fg-public-table-medical-detail td {
    padding: 10px 11px;

    vertical-align: middle;
}


/* ======================================================
   ⑱ 社会資源：内容・利用
====================================================== */

.fg-public-table-social-resource-detail {
    min-width: 1300px;

    table-layout: fixed;
}


/* サービス名 */
.fg-public-table-social-resource-detail th:first-child,
.fg-public-table-social-resource-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-social-resource-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-social-resource-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-social-resource-detail
tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-social-resource-detail
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-social-resource-detail
tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 全列左寄せ */
.fg-public-table-social-resource-detail th,
.fg-public-table-social-resource-detail td {
    text-align: left !important;

    padding: 10px 11px;

    vertical-align: middle;
}


/* 概要 */
.fg-public-table-social-resource-detail
th:nth-child(2),
.fg-public-table-social-resource-detail
td:nth-child(2) {
    white-space: normal;

    overflow: visible;

    text-overflow: clip;
    overflow-wrap: anywhere;

    line-height: 1.5;
}


/* 受付時間 */
.fg-public-table-social-resource-detail
th:nth-child(5),
.fg-public-table-social-resource-detail
td:nth-child(5) {
    white-space: normal;

    overflow: visible;

    text-overflow: clip;
    overflow-wrap: anywhere;

    line-height: 1.5;
}


/* 備考 */
.fg-public-table-social-resource-detail
th:nth-child(6),
.fg-public-table-social-resource-detail
td:nth-child(6) {
    white-space: normal;

    overflow: visible;

    text-overflow: clip;
    overflow-wrap: anywhere;

    line-height: 1.5;
}


/* ======================================================
   ⑲ 求人：求人条件
====================================================== */

.fg-public-table-jobs-detail {
    min-width: 1535px;

    table-layout: fixed;
}


/* 名称 */
.fg-public-table-jobs-detail th:first-child,
.fg-public-table-jobs-detail td:first-child {
    position: sticky;
    left: 0;
}

.fg-public-table-jobs-detail th:first-child {
    z-index: 8;

    background: #e9eef5;
}

.fg-public-table-jobs-detail td:first-child {
    z-index: 3;

    font-weight: 650;
    line-height: 1.5;

    white-space: normal;

    box-shadow:
        1px 0 0 #d8dee8;
}

.fg-public-table-jobs-detail
tbody tr:nth-child(odd) td:first-child {
    background: #ffffff;
}

.fg-public-table-jobs-detail
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.fg-public-table-jobs-detail
tbody tr:hover td:first-child {
    background: #eaf3ff;
}


/* 左寄せ列 */
.fg-public-table-jobs-detail
th:nth-child(2),
.fg-public-table-jobs-detail
td:nth-child(2),
.fg-public-table-jobs-detail
th:nth-child(6),
.fg-public-table-jobs-detail
td:nth-child(6),
.fg-public-table-jobs-detail
th:nth-child(8),
.fg-public-table-jobs-detail
td:nth-child(8),
.fg-public-table-jobs-detail
th:nth-child(11),
.fg-public-table-jobs-detail
td:nth-child(11) {
    text-align: left;
}


/* 中央寄せ列 */
.fg-public-table-jobs-detail
th:nth-child(3),
.fg-public-table-jobs-detail
td:nth-child(3),
.fg-public-table-jobs-detail
th:nth-child(4),
.fg-public-table-jobs-detail
td:nth-child(4),
.fg-public-table-jobs-detail
th:nth-child(5),
.fg-public-table-jobs-detail
td:nth-child(5),
.fg-public-table-jobs-detail
th:nth-child(7),
.fg-public-table-jobs-detail
td:nth-child(7),
.fg-public-table-jobs-detail
th:nth-child(9),
.fg-public-table-jobs-detail
td:nth-child(9),
.fg-public-table-jobs-detail
th:nth-child(10),
.fg-public-table-jobs-detail
td:nth-child(10) {
    text-align: center;
}


/* 給与・勤務時間 */
.fg-public-table-jobs-detail td:nth-child(4),
.fg-public-table-jobs-detail td:nth-child(7) {
    font-variant-numeric: tabular-nums;

    white-space: nowrap;
}


/* 仕事内容 */
.fg-public-table-jobs-detail
th:nth-child(11),
.fg-public-table-jobs-detail
td:nth-child(11) {
    white-space: normal;

    line-height: 1.5;
}

.fg-public-table-jobs-detail th,
.fg-public-table-jobs-detail td {
    padding: 10px 11px;

    vertical-align: middle;
}