/*========= Common Variables ===============*/
:root {
	--ftc-color: #9E1226;
	--ftc-hover-color: #780024;
	--ftc-middle-color: #d9b0be;
	--ftc-light-color: #f3e4e7;
	--button-disable-color: #9d9d9d;
	--default-radio-color: #3197ee; /* 追加 */
	--default-border-color: #aaa; /* 追加 */
	--readonly-background-color: #ddd; /* 追加 */
}

/*========= Common Styles ===============*/
/* タイトル以降要素 画面共通 ※横幅の1remはdatatableのmarginと相殺するために必要。 */
div.main-div {
	margin: 0.5rem 1rem;
}

/* ラベル共通 */
label {
	margin-bottom: 0 !important;
}

/* リスト共通 */
ul.no-bullet, .input-area ul {
	list-style-type: none;
	padding-left: 0;
}

/* プルダウン共通 */
select:not(.form-select), .ftc-select {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid var(--default-border-color);
	border-radius: 2px;
	padding: 2px 2.25rem 2px 0.5rem;
	background-color: white;
	background-image:
		url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 12px;
	color: #333;
}
/*========= Input ===============*/
input, .form-control, .form-select {
	border: 1px solid var(--default-border-color);
	border-radius: 2px;
}

/* 読み取り専用共通 */
input:read-only, .form-control:read-only {
	background-color: var(--readonly-background-color);
}

/*========= Input > radio, checkbox共通 ===============*/
input[type="radio"], input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	background-color: white;
	width: 1em;
	height: 1em;
}

/* 非活性(OFF) */
input[type="radio"]:disabled, input[type="checkbox"]:disabled {
	background-color: #eee;
	border-color: #ddd;
}

/* 非活性(ON) */
input[type="radio"]:checked:disabled, input[type="checkbox"]:checked:disabled
	{
	background-color: #ddd;
	border-color: #ddd;
}

/* label(labelで囲む場合) */
label:has(input[type="radio"]), label:has(input[type="checkbox"]) {
	display: inline-flex;
	align-items: center;
}

/* input(labelで囲む場合) */
label>input[type="radio"], label>input[type="checkbox"] {
	margin-right: 2px;
}

/* label(並列の場合) */
input[type="radio"] ~label, input[type="checkbox"] ~label {
	vertical-align: middle;
}

/* input(並列の場合) */
input[type="radio"]:has( ~label), input[type="checkbox"]:has( ~label) {
	vertical-align: text-bottom;
}

/*========= Input > radio ===============*/
input[type="radio"] {
	border-radius: 50%;
}

input[type="radio"]:checked {
	background-color: var(--default-radio-color);
	box-shadow: inset 0 0 0 2px white;
	border-color: var(--default-radio-color);
}

/*========= Input > checkbox ===============*/
input[type="checkbox"]:checked {
	background-color: var(--default-radio-color);
	background-image:
		url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	border-color: var(--default-radio-color);
}

/*========= Input > Date Picker ===============*/
/* 背景色をデフォルトに戻す */
input.date-picker:read-only, input.month-picker:read-only {
	background-color: revert;
}

/* DatePicker用入力欄 */
input.date-picker, input.month-picker {
	background: no-repeat url(../../image/icon/calendar.svg);
	background-position: 5px 50%;
	padding-left: 30px;
	width: 8rem;
}

/*========= Input > Datalist ===============*/
/* datalist用入力欄(デフォルトの三角を消す) */
input::-webkit-calendar-picker-indicator {
	opacity: 0;
	display: none;
}

/* datalist用入力欄(コンボボックス風アイコンを表示) */
input.input-for-datalist {
	cursor: pointer;
	background: no-repeat url(../image/icon/caret-down-square.svg);
	background-size: auto;
	background-position: right 5px bottom 50%;
	border: 1px solid var(--default-border-color);
	border-radius: 2px;
}

/*========= Textarea ===============*/
textarea {
	vertical-align: bottom; /* 下部余白を除去 */
	border: 1px solid var(--default-border-color);
}

/* テキストエリア 読み取り専用 */
textarea:read-only {
	background-color: var(--readonly-background-color);
}

/*========= Buttons ===============*/
/* ※CSSつける前に初期化(iOS対応) */
button {
	background-color: transparent;
	border: none;
	cursor: pointer;
	outline: none;
	padding: 0;
	appearance: none;
	color: black;
}

/* ボタン */
button[type="button"].btn-ftc-red, button[type="submit"].btn-ftc-red {
	background-color: var(--ftc-color);
	border: 1px solid transparent;
	border-radius: 2px;
	color: white;
	padding: 6px 12px;
}

/* ボタン(ホバー時) */
button[type="button"].btn-ftc-red:hover, button[type="submit"].btn-ftc-red:hover
	{
	background-color: var(--ftc-hover-color);
}

/* ボタン(非活性) */
button[type="button"].btn-ftc-red:disabled, button[type="submit"].btn-ftc-red:disabled
	{
	background-color: var(--button-disable-color);
}

/* 送信無しボタン */
button[type="button"].not-submit {
	padding: 0px 4px;
	background-color: steelblue;
}

/* 送信無しボタン(ホバー時) */
button[type="button"].not-submit:hover {
	background-color: #36668d;
}

/* 送信無しボタン(非活性) */
button[type="button"].not-submit:disabled {
	background-color: var(--button-disable-color);
}

/*========= Links ===============*/
a.easy-link {
	padding: 0.25rem 0;
}

a.easy-link:hover {
	color: darkblue;
	text-decoration: none;
}

/*========= File Select ===============*/
/* ファイル選択ボタンに重ねるラベル(見た目をボタンに寄せる) */
label.select-file {
	margin: 0;
	background-color: #EFEFEF;
	padding: 1px 10px;
	border: solid 1px rgb(133, 133, 133);
	border-radius: 2px;
}

/* ファイル選択ラベル(ホバー時) */
label.select-file:hover {
	background-color: #e6eae6;
	cursor: pointer;
}

/* ファイル選択ラベル(アクティブ時) */
label.select-file:active {
	background-color: #EFEFEF;
}

/*========= Image Select ===============*/
/* 画像選択 エリア */
.image-area {
	outline: 1px solid lightgray;
	background-color: #F6F6F6;
	width: 320px;
	height: 160px;
}

/* 画像選択 ラベル */
.image-label {
	cursor: pointer;
	background: no-repeat url(../image/icon/card-image.svg);
	background-size: 30px;
	background-position: 50% 50%;
	width: 100%;
	height: 100%;
}

/*========= Search Form ===============*/

/* 検索条件 外枠 */
.search-area {
	border: 1px solid gray;
	border-radius: 0.5em;
	margin-bottom: 1rem;
}

/* 検索条件 ヘッダー */
.search-header {
	color: white;
	background: gray;
	border-bottom: 1px solid gray;
	border-radius: 5px 5px 0px 0px;
	padding: 3px 10px;
}

/* 検索条件 コンテンツ */
.search-contents {
	padding: 10px;
}

/* PC(992px以上)のスタイル */
@media screen and (min-width: 992px) {
	.search-contents {
		display: grid;
		grid-template-columns: max-content 1fr;
		row-gap: 2px;
		column-gap: 10px;
		align-items: center;
		width: 100%;
	}

	/* 入力要素とエラーメッセージを横並び(右側)に配置 */
	.search-contents>div {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.5rem;
	}
	.search-contents>div>.invalid-feedback {
		width: auto;
		margin-top: 0;
	}
}

/* スマホ、タブレット(~991px)のスタイル */
@media screen and (max-width: 991px) {
	.search-contents {
		display: flex;
		flex-direction: column;
		gap: 2px;
		width: 100%;
	}

	/* 入力要素とエラーメッセージを縦並び(下側)に配置 */
	.search-contents>div {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}
	.search-contents>div>.invalid-feedback {
		width: 100%;
		margin-top: 0.25rem;
	}
}

/* 共通の1行ぶち抜きようクラス */
.grid-span-all {
	grid-column: 1/-1;
}

/* ラジオボタン 枠線 */
.rdo-border {
	border: solid 1px;
}

/*========= Others ===============*/
/* 必須マーク */
.required::after {
	content: "*";
	color: red;
	font-weight: bold;
	margin-left: 3px;
}

/* 入力欄 サイズ大 */
.input-long {
	width: 400px;
}

/* 入力欄 サイズ小 */
.input-short {
	width: 200px;
}

/* 破線 */
div.horizontal-dashed-line {
	width: 100%;
	border-top: 1px dashed lightgray;
	margin: 0.25rem 0;
}

/* 日付項目 波ダッシュ */
.tilde::after {
	content: "～";
}

/* 画面上部メッセージ */
div.disp-msg {
	color: red;
	white-space: pre-line;
}

/* 入力欄エラーメッセージ */
div.err-msg {
	color: red;
	font-size: 80%;
	white-space: pre;
}

.error-style {
	background-color: var(--ftc-light-color) !important;
}

/* カメラアイコン */
#cameraIcon {
	width: 30px;
	height: 30px;
}

/* カメラアイコン(ホバー、アクティブ時) */
#cameraIcon:hover, #cameraIcon.active {
	fill: gray;
	cursor: pointer;
}

/*======= Common Styles ==============*/
/* タイトル以降要素 画面共通 ※横幅の1remはdatatableのmarginと相殺するために必要。 */
body {
	/* 画面最下部のボタンをタブレットで押しやすくなるように対応 */
	margin-bottom: 5rem;
	/* bootstrap5のデフォルト府フォントが日本語に対応していないため独自設定 */
	font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
		"Hiragino Sans", Meiryo, sans-serif;
}

/* for smartphone and tablet(~991px) */
@media screen and (max-width: 991px) {
	div.main-div {
		margin: 0.25rem 1rem;
	}
	.input-long {
		width: 100%;
	}
	.input-short {
		width: 100%;
	}
	.image-area {
		width: 100%;
	}
}