/* ==========================================================
   page-short_stay.css
   ショートステイ専用：列幅調整
   ========================================================== */

.fg-table {
    width: 100%;
    table-layout: fixed;
}

/* ==========================================================
   ▼ 非ログイン時（表示列：カテゴリ〜WEB） 
   ========================================================== */

/* 4: カテゴリ */
body:not(.admin-mode) .fg-table th:nth-child(4),
body:not(.admin-mode) .fg-table td:nth-child(4) {
    width: 8%;
}

/* 5: 事業所名 */
body:not(.admin-mode) .fg-table th:nth-child(5),
body:not(.admin-mode) .fg-table td:nth-child(5) {
    width: 15%;
}

/* 6: 住所 */
body:not(.admin-mode) .fg-table th:nth-child(6),
body:not(.admin-mode) .fg-table td:nth-child(6) {
    width: 18%;
}

/* 7: TEL */
body:not(.admin-mode) .fg-table th:nth-child(7),
body:not(.admin-mode) .fg-table td:nth-child(7) {
    width: 10%;
}

/* 8: 利用可能日 */
body:not(.admin-mode) .fg-table th:nth-child(8),
body:not(.admin-mode) .fg-table td:nth-child(8) {
    width: 10%;
}

/* 9: 対応エリア */
body:not(.admin-mode) .fg-table th:nth-child(9),
body:not(.admin-mode) .fg-table td:nth-child(9) {
    width: 20%;
}

/* 10: 備考 */
body:not(.admin-mode) .fg-table th:nth-child(10),
body:not(.admin-mode) .fg-table td:nth-child(10) {
    width: 10%;
}

/* 11: WEB */
body:not(.admin-mode) .fg-table th:nth-child(11),
body:not(.admin-mode) .fg-table td:nth-child(11) {
    width: 3%;
}


/* ==========================================================
   ▼ 管理者モード（全列表示：ID〜WEB）
   ========================================================== */

/* 1: ID */
body.admin-mode .fg-table th:nth-child(1),
body.admin-mode .fg-table td:nth-child(1) {
    width: 4%;
}

/* 2: Token */
body.admin-mode .fg-table th:nth-child(2),
body.admin-mode .fg-table td:nth-child(2) {
    width: 9%;
}

/* 3: 更新日 */
body.admin-mode .fg-table th:nth-child(3),
body.admin-mode .fg-table td:nth-child(3) {
    width: 8%;
}

/* 4: カテゴリ */
body.admin-mode .fg-table th:nth-child(4),
body.admin-mode .fg-table td:nth-child(4) {
    width: 8%;
}

/* 5: 事業所名 */
body.admin-mode .fg-table th:nth-child(5),
body.admin-mode .fg-table td:nth-child(5) {
    width: 17%;
}

/* 6: 住所 */
body.admin-mode .fg-table th:nth-child(6),
body.admin-mode .fg-table td:nth-child(6) {
    width: 18%;
}

/* 7: TEL */
body.admin-mode .fg-table th:nth-child(7),
body.admin-mode .fg-table td:nth-child(7) {
    width: 10%;
}

/* 8: 利用可能日 */
body.admin-mode .fg-table th:nth-child(8),
body.admin-mode .fg-table td:nth-child(8) {
    width: 8%;
}

/* 9: 対応エリア */
body.admin-mode .fg-table th:nth-child(9),
body.admin-mode .fg-table td:nth-child(9) {
    width: 17%;
}

/* 10: 備考 */
body.admin-mode .fg-table th:nth-child(10),
body.admin-mode .fg-table td:nth-child(10) {
    width: 8%;
}

/* 11: WEB */
body.admin-mode .fg-table th:nth-child(11),
body.admin-mode .fg-table td:nth-child(11) {
    width: 3%;
}

/* モーダル内の行を完全に非表示にする */
.fg-modal-row.hidden-field {
    display: none !important;
}

/* ==========================================================
   ▼ 統一モーダルデザイン（施設・社会資源・保険内・ショートステイ共通）
   ========================================================== */

/* モーダル背景 */
.fg-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fg-modal.open {
    display: flex !important;
}

/* モーダル本体 */
.fg-modal-content {
    background: #fff;
    width: 540px;
    padding: 28px 32px;
    border-radius: 12px;
    border: 1px solid #dadada;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.08);

    /* 高さが画面を超える場合のスクロール */
    max-height: 85vh;
    overflow-y: auto;
}

/* タイトル */
.fg-modal-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

/* 入力行 */
.fg-modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

/* ラベル */
.fg-modal-row label {
    width: 120px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    text-align: right;
}

/* 入力欄 */
.fg-modal-row input,
.fg-modal-row textarea,
.fg-modal-row select {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;

    background: #fafafa;
    border: 1px solid #ccc;
    border-radius: 6px;

    transition: border-color 0.2s, background 0.2s;
}

/* テキストエリア */
.fg-modal-row textarea {
    height: 80px;
    resize: vertical;
}

/* ボタン行 */
.fg-modal-buttons {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* ボタン共通 */
.fg-modal-buttons button {
    flex: 1;
    padding: 10px 0;

    background: #fff;
    border: 1px solid #bbb;
    border-radius: 6px;

    font-size: 14px;
    cursor: pointer;


    transition: background 0.2s, border-color 0.2s;
}

.fg-modal-buttons button:hover {
    background: #f5f5f5;
}

/* 保存ボタン（青） */
.fg-btn-save {
    background: #fafafa;
    border: 1px solid #ccc;
}

/* 削除ボタン（赤） */
.fg-btn-delete {
    background: #fafafa;
    border: 1px solid #ccc;
}

/* 非表示欄 */
.fg-modal-row.hidden-field {
    display: none !important;
}
