@charset "utf-8";
/* dform
------------------------------------------------------------*/
/*
 * 基本リセットと全体設定
 */
body.page-dform {
    font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    line-height: 1.6;
/*    background-color: #f8f9fa; */
    color: #333;
/*    padding: 20px;	*/
}

/* フォーム全体の最大幅設定（PC向け） */
.wpcf7 {
    max-width: 800px;
    margin: 0 auto;
/*    background-color: #f0f8ff;	*/
/*    padding: 15px;	*/
    border-radius: 8px;
/*    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);	*/
}

/*
 * 見出しのスタイル
 */
.page-dform #wrapper h2, h3 {
/*    border-left: 5px solid #007bff;
    padding-left: 10px;
    margin-bottom: 20px;
    font-weight: bold;	*/
}

h3 {
/*    color: #007bff;
    font-size: 1.25em;	*/
	margin-top: 0px;
    padding: 10px 15px;
    background: #4287f5;
    border-bottom-width: 0;
    color: #fffafa;
    font-weight: bold;
    font-size: 1.4em;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.page-dform #wrapper h2 {
/*    background-color: #3cb371;
    padding: 10px 10px 10px 15px;
    border-radius: 4px;
    font-size: 1.5em;
    border-left: none;
*/
}

span.description {
	font-size: 160%;
	font-weight: bold;
	color: #334;
}

body.page-dform .wpcf7 p {
    border-bottom-width: 0;
}

span.note {
	font-size: 150%;
	color: #ff4500;
}

/*
 * 基本的なフォーム要素（Contact Form 7タグ展開後の想定）
 */

/* labelタグ（入力フィールド全体） */
label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
}

.highlight {
	font-size: 150%;
	font-weight: bold;
	color: #454545;
} 

/* CF7の入力フィールド（text, email, number, textareaなど） */
.wpcf7-form-control:not(.wpcf7-submit):not([type="radio"]):not([type="checkbox"]) {
	font-size: 150%;
	width: 100%;
    padding: 10px;
    margin-top: 5px;
/*    border: 1px solid #ced4da;	*/
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.wpcf7-form-control:not(.wpcf7-submit):focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* textareaのサイズ調整 */
textarea {
/*    min-height: 100px;	*/
	height: 130px;
    resize: vertical;
}

/* ラジオボタンとチェックボックスのスタイリング */
.wpcf7-list-item-label {
    font-weight: normal;
    margin-left: 5px;
    margin-right: 15px;
    cursor: pointer;
}

/*
 * セクションのコンテナとパディング
 */
.container {
/*    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
*/
}

div.form-section {
    padding: 10px;
    margin-bottom: 25px;
/*    border: 1px solid #ddd;	*/
    border-radius: 5px;
    background-color: #f0f8ff;	
}

/* 申請者情報セクションのIDに特にスタイルを適用 */
#wrapper-identity,
#wrapper-realestate,
#wrapper-vehicle,
#wrapper-deposit,
#wrapper-insurance,
#wrapper-securities,
#wrapper-valuables,
#wrapper-debt,
#wrapper-income,
#wrapper-allowance {
/*	
    padding: 20px 0;
    margin-bottom: 20px;
*/
}

/*
 * 不動産セクション内の小見出し
 */
#wrapper-realestate p {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
/*    border-bottom: 1px dashed #ced4da;	*/
    padding-bottom: 5px;
    color: #495057;
}

.asset-group h4 {
	font-size: 160%;
	font-weight: bold;
	margin: 0;
	color: #5d9e92;
}

/*
 * 動的リスト (家族、援助者、口座、作業者) の共通スタイル
 */
ul#member-list,
ul#worker-list-supporters,
ul#worker-list-accounts,
ul#worker-list-workers {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

/* 各リストアイテム（グループ）のコンテナ */
.family-member-group,
.supporter-group,
.account-group,
.worker-group,
.asset-group {
    border: 1px dotted #d4d4d7;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 10px;
    background-color: #fff;
    position: relative;
}

/* 削除ボタンの共通スタイル */
.delete-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545; /* 赤色 */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #c82333;
}

/*
 * 家族構成員 (family-section) の詳細
 */
.member-info {
    display: grid;
    grid-template-columns: 1fr; /* SPでは1列 */
    gap: 10px;
    margin-bottom: 10px;
}

/*
 * 援助者 (supporter-section) と口座 (account-section) の詳細
 */
.supporter-header,
.account-header {
    display: grid;
    grid-template-columns: 1fr; /* SPでは1列 */
    gap: 10px;
    margin-bottom: 10px;
}

.supporter-header div,
.account-header div {
    display: flex;
    flex-direction: column;
}

.supporter-input,
.account-input,
.member-input {
    width: 100%;
    padding: 8px;
    margin-top: 3px;
    border: 1px solid #333;
    border-radius: 4px;
    box-sizing: border-box;
}

.member-date-part {
    padding: 8px;
    margin-top: 3px;
    border: 1px solid #333;
    border-radius: 4px;
    box-sizing: border-box;
}

/*
 * 働いている方 (worker-section) の詳細
 */
.worker-header {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.worker-header div {
 /* PCでは横に並べ、SPでは折り返す */
	flex: 1 1 45%;
    min-width: 250px; /* 最小幅 */
    display: flex;
    flex-direction: column;
}

.worker-header div label {
	font-size: 100%;
	margin-bottom: 10px;
}

.data-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.data-row {
/*    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;	*/
    padding: 8px;
	font-size: 90%;
    background: #f8f8ff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.data-row:last-child {
/*    border-bottom: none;	*/
}

.data-label {
	font-size : 80%;
	padding: 0;
}

.data-label span {
    font-weight: bold;
	color: #5d9e92;
	display: block;
    margin-bottom: 5px;
}

.data-item label {
    display: block;
/*    width: 80px;	*/
    font-weight: bold;
    margin-bottom: 0;
	font-size: 70%;
}

.member-info .data-item label {
	font-size: 90%;
}

.data-input {
    width: calc(100% - 90px); /* ラベルの幅を引く */
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-block;
}

/*
 * 追加ボタンのスタイル
 */
button[type="button"] {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background-color: #17a2b8; /* アクセントカラー */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s;
}

button[type="button"]:hover {
    background-color: #138496;
}

button[type="button"]:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/*
 * 送信ボタン (CF7)
 */
.wpcf7-submit {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #28a745; /* 緑色 */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpcf7-submit:hover {
    background-color: #218838;
}

/*
 * 補足情報・注意書き
 */
p:not(#wrapper-realestate p),
span.wpcf7-list-item-label {
    font-size: 0.9em;
    color: #6c757d;
}

p:has( + label) { /* 直後にlabelがあるp要素 (不動産以外) */
    font-size: 1em;
    font-weight: bold;
    color: #333;
    margin-top: 15px;
    margin-bottom: 5px;
}

/*
 * PC (デスクトップ) スタイル - 768px以上
 */
@media (min-width: 768px) {
    /* 家族構成員: 2列表示 */
    .member-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 援助者・口座: 3列表示 */
    .supporter-header,
    .account-header {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 口座: 残高のみ1列 (4列目の残高に合わせて) */
    .account-header {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 就労者データ: 4列表示 */
    .data-row {
        grid-template-columns: 1fr repeat(3, 1fr);
    }

    .data-item label {
        width: auto; /* ラベル幅を自動に */
        margin-right: 5px;
    }

    .data-input {
        width: auto;
        flex-grow: 1; /* 残りのスペースを埋める */
    }

    .data-item {
/*        display: flex;	*/
        align-items: center;
    }

    /* フォームの最大幅を少し広げる */
    .wpcf7 {
        max-width: 960px;
    }

    /* 削除ボタンを少し小さくして目立たなく */
    .delete-button {
        padding: 3px 8px;
        font-size: 0.8em;
    }
}