/* =========================================
	 GRM Reservation Calendar / フロント表示
	 ・[grm_reservation]ショートコード／grm_reservation()関数
	 　で固定ページ等に埋め込んだときの表示専用スタイル
========================================= */

/* ---- flatpickrの見た目をGRM Core標準の青いテーマ（material_blue）に
   　　　固定する
   　　　・テーマ側の cf-reservation-date.css（別のCF7日付欄用に用意された
   　　　　グレー系スキン）が、flatpickrの各パーツをクラス名だけで
   　　　　（ページを問わず）上書きしており、このプラグインのCSSより後に
   　　　　読み込まれるため、そのままだと管理画面のflatpickr（GRM Core
   　　　　標準の青系）とは違う見た目（ヘッダー・曜日行・選択日がグレー、
   　　　　日付セルが角丸の四角、月送り矢印や月・年の文字がグレー、
   　　　　カレンダー全体の枠線・角丸・影もグレー系用のもの）になって
   　　　　しまう。flatpickr本体（material_blueテーマ）の値を
   　　　　!importantで確実に指定し直し、管理画面と同じ見た目に揃える。 ---- */
.flatpickr-calendar{
	border:0 !important;
	border-radius:5px !important;
	box-shadow:0 3px 13px rgba(0,0,0,.08) !important;
}

/* テーマ側で非表示にされている、入力欄を指す小さな三角の矢印を復元する
   （色はflatpickr本体（material_blue）側の指定がそのまま使われる） */
.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after{
	display:block !important;
}

.flatpickr-months{
	background:#42a5f5 !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month{
	color:#fff !important;
	fill:#fff !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year{
	color:#fff !important;
}

.flatpickr-weekdays{
	background:#42a5f5 !important;
}

.flatpickr-day{
	border-radius:150px !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover{
	background:#42a5f5 !important;
	border-color:#42a5f5 !important;
	color:#fff !important;
}

.grmres-front-calendar{
	width:100%;
	box-sizing:border-box;
}

.grmres-front-nav{
	display:flex;
	justify-content:center;
	gap:10px;
	margin-bottom:20px;
}

.grmres-front-nav-btn{
	display:inline-flex;
	align-items:center;
	padding:6px 14px;
	border:1px solid #ccc;
	border-radius:999px;
	color:#333;
	/* テーマ側の.grm-page-content a{text-decoration:underline}の方が
	   詳細度が高く上書きされてしまうため!importantを付与 */
	text-decoration:none !important;
	font-size:13px;
	transition:.2s;
}

.grmres-front-nav-btn:hover{
	background:#f2f2f2;
	border-color:#999;
}

.grmres-front-month-title{
	text-align:center;
	/* テーマ側の.grm-page-content p{font-size:14px;}（Gutenberg
	   コンテンツ共通ルール）の方が詳細度が高く（クラス+要素 >
	   クラス単体）上書きされてしまうため!importantを付与。 */
	font-size:28px !important;
	font-weight:700;
	margin:0 0 20px;
	letter-spacing:.05em;
}

/* テーマ側のGutenbergコンテンツ共通ルール（.grm-page-content p{margin:0 0 24px;}）
   の方が詳細度が高く（クラス+要素 > クラス単体）、このボタンを包む<p>の
   margin-topが上書きされてカレンダーとの間が詰まってしまうため、
   !importantで確実にカレンダーとの間隔をあける。 */
.grmres-front-cta{
	text-align:center;
	margin:30px 0 4px !important;
}

.grmres-front-cta-btn{
	display:inline-block;
	padding:15px 48px;
	background:#fff;
	color:#222;
	border:1px solid #222;
	border-radius:999px;
	font-family:"Noto Sans JP", sans-serif;
	font-size:14px;
	font-weight:400;
	letter-spacing:.05em;
	/* テーマ側の .grm-page-content a{text-decoration:underline;}（Gutenberg
	   コンテンツ内のリンクに一律で下線を付ける規則）の方が詳細度が高く
	   （クラス+要素 > クラス単体）、このままだとボタンの文字に下線が出て
	   しまうため、!importantで確実に消す。 */
	text-decoration:none !important;
	box-sizing:border-box;
	transition:.2s;
}

.grmres-front-cta-btn:hover{
	background:#222;
	color:#fff;
}

.grmres-front-week-row{
	display:grid;
	grid-template-columns:repeat(7, 1fr);
	gap:6px;
	margin-bottom:8px;
}

.grmres-front-week-cell{
	text-align:center;
	font-weight:700;
	font-size:14px;
	color:#333;
	padding:6px 0;
}

.grmres-front-week-cell.is-sun{
	color:#e2493c;
}

.grmres-front-week-cell.is-sat{
	color:#3f7fd1;
}

.grmres-front-grid{
	display:grid;
	grid-template-columns:repeat(7, 1fr);
	gap:6px;
}

.grmres-front-cell{
	display:block;
	min-height:90px;
	border-radius:8px;
	background:#f4f4f4;
	padding:6px;
	box-sizing:border-box;
	color:inherit;
	/* テーマ側の.grm-page-content a{text-decoration:underline}の方が
	   詳細度が高く上書きされてしまうため!importantを付与。
	   時間帯予約のみの日もクリック可能にする設定がONの場合、
	   予約チップ（.grmres-front-chip）を含んだセルもaタグになるため、
	   ここに下線が出ないようにする。 */
	text-decoration:none !important;
}

.grmres-front-cell.is-blank{
	background:transparent;
}

.grmres-front-cell.is-weekend{
	background:#f7f2f0;
}

.grmres-front-cell.is-today{
	box-shadow:inset 0 0 0 2px #4a4a4a;
}

.grmres-front-cell.is-clickable{
	cursor:pointer;
	transition:.15s;
}

.grmres-front-cell.is-clickable:hover{
	background:#eaf0f7;
	box-shadow:inset 0 0 0 2px #4a4a4a;
}

/* ・以前はセル全体にopacity:.7をかけてグレーアウトしていたが、
     終日ラベル自体が色タグの色で表示されるようになった現在は、
     セルごと薄くすると色タグの色も一緒に薄く見えてしまうため廃止。
     終日であることはラベルの表示だけで十分に伝わる。 */

.grmres-front-full-label + .grmres-front-full-label{
	margin-top:3px;
}

/* ---- 凡例（色タグの色と名前） ---- */
.grmres-front-legend{
	display:flex;
	flex-wrap:wrap;
	gap:6px 18px;
	/* テーマ側のul共通ルールでmarginが打ち消されるため!importantを付与 */
	margin:28px 0 0 !important;
	padding:0;
	list-style:none;
	font-size:12px;
	color:#4a4a4a;
}

.grmres-front-legend-item{
	display:flex;
	align-items:center;
	gap:6px;
	/* テーマ側のli共通ルール（最後以外にmargin-bottom）で
	   最後の項目だけ高さがずれるため打ち消す */
	margin:0 !important;
	line-height:1.5;
}

.grmres-front-legend-swatch{
	display:inline-block;
	width:14px;
	height:14px;
	border-radius:3px;
}

.grmres-front-full-label{
	display:block;
	width:100%;
	box-sizing:border-box;
	border-radius:4px;
	padding:3px 6px;
	font-size:10px;
	font-weight:700;
	line-height:1.4;
}

.grmres-front-cell-head{
	margin-bottom:4px;
}

.grmres-front-cell-num{
	font-size:13px;
	font-weight:700;
	color:#4a4a4a;
}

.grmres-front-cell.is-holiday .grmres-front-cell-num{
	color:#c0392b;
}

.grmres-front-holiday-label{
	font-size:10px;
	color:#c0392b;
	line-height:1.3;
	margin-bottom:3px;
}

.grmres-front-cell-body{
	display:flex;
	flex-direction:column;
	gap:3px;
}

.grmres-front-chip{
	display:block;
	border-radius:4px;
	padding:3px 6px;
	background:#dbeafe;
	color:#1d4ed8;
	font-size:11px;
	line-height:1.4;
}

.grmres-front-chip-time{
	font-weight:700;
	white-space:normal;
	word-break:break-word;
}

@media(max-width:600px){

	.grmres-front-cell{
		min-height:60px;
		padding:4px;
	}

}

/* =========================================
	 予約のお申し込みフォーム（フロント）
	 ・以前は読みやすさのため640px幅に制限し中央寄せしていたが、
	 　[grm_reservation_form]ショートコードを2カラムのレイアウト
	 　（本文＋フォームなど）に埋め込んだ際、フォーム自体の
	 　左右に余白ができてしまうとのご指摘を受け、設置先の幅に
	 　そのまま追従するように変更（カレンダー側は既にv0.5.0で
	 　100%幅化済み）。
========================================= */
.grmres-front-request{
	max-width:100%;
	margin:48px 0 0;
}

.grmres-front-notice{
	padding:12px 16px;
	border-radius:6px;
	font-size:13px;
	margin-bottom:20px;
	border:1px solid transparent;
}

.grmres-front-notice.is-success{
	background:#eaf6ec;
	border-color:#bfe3c6;
	color:#256029;
}

.grmres-front-notice.is-error{
	background:#fce8e8;
	border-color:#f0b8b8;
	color:#a02222;
}

.grmres-front-request-form{
	display:flex;
	flex-direction:column;
	gap:18px;
}

.grmres-front-field-row{
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:14px;
}

@media(max-width:600px){
	.grmres-front-field-row{
		grid-template-columns:1fr;
	}
}

.grmres-front-field label,
.grmres-front-field-legend-label{
	display:block;
	font-size:13px;
	font-weight:700;
	color:#333;
	margin-bottom:6px;
}

.grmres-front-badge{
	display:inline-block;
	margin-left:6px;
	padding:2px 10px;
	border-radius:999px;
	font-family:"Noto Sans JP", sans-serif;
	font-size:11px;
	font-weight:400;
	color:#fff;
	background:#222;
	vertical-align:middle;
	box-sizing:border-box;
}

.grmres-front-badge-optional{
	background:transparent;
	color:#666;
	border:1px solid #ccc;
}

.grmres-front-field input[type="text"],
.grmres-front-field input[type="tel"],
.grmres-front-field input[type="email"],
.grmres-front-field input[type="date"],
.grmres-front-field input[type="time"],
.grmres-front-field select,
.grmres-front-field textarea{
	width:100%;
	padding:14px 18px;
	border:1px solid #ccc;
	border-radius:6px;
	background:#fff;
	font-size:14px;
	box-sizing:border-box;
	font-family:"Noto Sans JP", sans-serif;
}

.grmres-front-field textarea{
	resize:vertical;
}

/* ---- プルダウンの下向き矢印
   （テーマのCSSリセットでブラウザ標準の矢印が消える環境があるため、
   　自前でアイコンを描画して常に表示されるようにする） ---- */
.grmres-front-field select,
.grmres-front-time-select{
	appearance:none;
	-webkit-appearance:none;
	-moz-appearance:none;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat:no-repeat;
	background-position:right 16px center;
	background-size:12px 8px;
}

.grmres-front-field select{
	padding-right:42px;
}

.grmres-front-radio-row{
	display:flex;
	gap:20px;
	font-size:14px;
}

.grmres-front-radio-row label{
	display:flex;
	align-items:center;
	gap:6px;
	font-weight:400;
}

.grmres-front-radio-row input[type="radio"]{
	width:16px;
	height:16px;
	margin:0;
}

/* ---- ご利用希望スタジオ（縦並びのカード型ラジオ）
   ・選択肢ごとに枠付きの箱にし、選択中の箱は枠を濃く、
   　ラジオは黒丸（白フチ付き）にして、選んでいるものが一目でわかるようにする ---- */
.grmres-front-radio-row.grmres-front-radio-col{
	flex-direction:column;
	gap:8px;
}

.grmres-front-radio-col label{
	display:flex;
	align-items:center;
	gap:14px;
	width:100%;
	padding:16px 18px;
	background:#fff;
	border:1px solid #ccc;
	border-radius:6px;
	box-sizing:border-box;
	font-size:14px;
	cursor:pointer;
	transition:border-color .2s;
}

.grmres-front-radio-col label:hover{
	border-color:#888;
}

.grmres-front-radio-col label:has(input:checked){
	border-color:#222;
}

.grmres-front-radio-col input[type="radio"]{
	appearance:none;
	-webkit-appearance:none;
	flex-shrink:0;
	width:22px;
	height:22px;
	margin:0;
	background:#fff;
	border:1px solid #ccc;
	border-radius:50%;
	cursor:pointer;
	transition:.2s;
}

.grmres-front-radio-col input[type="radio"]:checked{
	background:#222;
	border-color:#222;
	box-shadow:inset 0 0 0 4px #fff;
}

.grmres-front-plan-price{
	margin-left:1em;
}

/* その日すでに予約済みで選べないスタジオ */
.grmres-front-radio-col label.is-disabled{
	color:#aaa;
	background:#f4f4f4;
	cursor:not-allowed;
}

.grmres-front-radio-col label.is-disabled input[type="radio"]{
	cursor:not-allowed;
}

.grmres-front-plan-off{
	margin-left:auto;
	font-size:12px;
}

/* ---- 希望日時（第1〜第3希望） ---- */
.grmres-front-pref{
	border:1px solid #ddd;
	border-radius:6px;
	padding:14px 16px 16px;
	margin:0;
}

.grmres-front-pref legend{
	padding:0 6px;
	font-size:13px;
	font-weight:700;
	color:#333;
}

.grmres-front-pref-row{
	display:flex;
	align-items:center;
	gap:8px;
	margin-top:8px;
}

.grmres-front-pref-row:first-of-type{
	margin-top:2px;
}

.grmres-front-pref-label{
	flex-shrink:0;
	font-size:12px;
	color:#666;
	width:34px;
}

.grmres-front-pref-row .grm-flatpickr-date,
.grmres-front-pref-row .grmres-front-time-select{
	padding:7px 8px;
	border:1px solid #ccc;
	border-radius:4px;
	font-size:13px;
	box-sizing:border-box;
}

.grmres-front-pref-row .grm-flatpickr-date{
	flex:1 1 auto;
	min-width:0;
	background:#fff;
}

.grmres-front-pref-row .grmres-front-time-select{
	flex:0 0 auto;
	width:110px;
	padding-right:26px;
	background-position:right 8px center;
	background-color:#fff;
	font-family:inherit;
}

@media(max-width:480px){
	.grmres-front-pref-row .grmres-front-time-select{
		width:90px;
	}
}

.grmres-front-agree label{
	display:flex;
	align-items:center;
	gap:8px;
	font-size:13px;
	color:#333;
}

.grmres-front-agree input[type="checkbox"]{
	width:16px;
	height:16px;
	margin:0;
	flex-shrink:0;
}

.grmres-front-submit{
	text-align:center;
	margin-top:8px;
}

.grmres-front-submit-btn{
	display:inline-block;
	padding:15px 48px;
	background:#222;
	color:#fff;
	border:none;
	border-radius:999px;
	font-family:"Noto Sans JP", sans-serif;
	font-size:15px;
	font-weight:400;
	letter-spacing:.05em;
	cursor:pointer;
	transition:.2s;
}

.grmres-front-submit-btn:hover{
	background:#555;
}

/* ---- ハニーポット（人間には見えない） ---- */
.grmres-front-hp{
	position:absolute;
	left:-9999px;
	width:1px;
	height:1px;
	overflow:hidden;
}

/* =========================================
	 入力チェック（未入力の必須項目）
========================================= */
.grmres-front-error-summary{
	background:#fff5f5;
	border:1px solid #dc3232;
	border-radius:6px;
	padding:20px;
	margin:0 0 20px;
}

.grmres-front-error-summary-title{
	color:#dc3232;
	font-size:14px;
	font-weight:700;
	margin:0 0 12px;
}

.grmres-front-error-summary-list{
	margin:0;
	padding-left:1.4em;
	font-size:13px;
	color:#333;
}

.grmres-front-error-summary-list li{
	margin:4px 0;
}

.grmres-front-field input.grmres-front-error-field,
.grmres-front-field select.grmres-front-error-field,
.grmres-front-field textarea.grmres-front-error-field,
.grmres-front-pref-row .grm-flatpickr-date.grmres-front-error-field,
.grmres-front-pref-row .grmres-front-time-select.grmres-front-error-field{
	background-color:#fff5f5;
	border:2px solid #dc3232;
}

.grmres-front-radio-row.grmres-front-error-radio{
	background:#fff5f5;
	border:2px solid #dc3232;
	border-radius:6px;
	padding:10px 12px;
}

.grmres-front-agree.grmres-front-error-check{
	background:#fff5f5;
	border:2px solid #dc3232;
	border-radius:6px;
	padding:12px 14px;
}

/* =========================================
	 確認画面（モーダル）
========================================= */
.grmres-front-confirm{
	position:fixed;
	top:0;
	left:0;
	right:0;
	bottom:0;
	background:rgba(0, 0, 0, .7);
	padding:40px 20px;
	box-sizing:border-box;
	overflow-y:auto;
	z-index:9999;
}

.grmres-front-confirm-box{
	background:#fff;
	border-radius:8px;
	max-width:800px;
	margin:0 auto;
	padding:30px;
	box-sizing:border-box;
}

.grmres-front-confirm-row{
	padding:15px 0;
	border-bottom:1px solid #eee;
}

.grmres-front-confirm-row:last-child{
	border-bottom:none;
}

.grmres-front-confirm-name{
	font-size:14px;
	font-weight:700;
	color:#333;
	margin-bottom:6px;
}

.grmres-front-confirm-value{
	font-size:14px;
	color:#333;
	white-space:pre-wrap;
	word-break:break-word;
	min-height:1em;
}

.grmres-front-confirm-actions{
	display:flex;
	justify-content:center;
	gap:10px;
	margin-top:24px;
}

.grmres-front-confirm-back,
.grmres-front-confirm-submit{
	display:inline-block;
	padding:15px 48px;
	border-radius:999px;
	font-family:"Noto Sans JP", sans-serif;
	font-size:14px;
	font-weight:400;
	letter-spacing:.05em;
	cursor:pointer;
	box-sizing:border-box;
	transition:.2s;
}

.grmres-front-confirm-back{
	background:#fff;
	color:#222;
	border:1px solid #222;
}

.grmres-front-confirm-back:hover{
	background:#222;
	color:#fff;
}

.grmres-front-confirm-submit{
	background:#222;
	color:#fff;
	border:none;
}

.grmres-front-confirm-submit:hover{
	background:#555;
}

@media(max-width:600px){

	.grmres-front-confirm{
		padding:20px 12px;
	}

	.grmres-front-confirm-box{
		padding:20px;
	}

	.grmres-front-confirm-back,
	.grmres-front-confirm-submit{
		padding:15px 24px;
	}

}

/* =========================================
	 送信完了画面
========================================= */
.grmres-front-complete{
	text-align:center;
	padding:56px 24px;
	border:1px solid #ddd;
	border-radius:8px;
}

.grmres-front-complete-icon{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:56px;
	height:56px;
	border-radius:50%;
	background:#222;
	color:#fff;
	font-size:26px;
	margin-bottom:20px;
}

.grmres-front-complete-title{
	font-size:18px;
	font-weight:700;
	margin:0 0 14px;
	letter-spacing:.05em;
}

.grmres-front-complete-text{
	font-size:14px;
	color:#555;
	line-height:1.8;
	margin:0;
}
