/* =========================================================
   オットセッテ予約フォーム用スタイル（div構造版）
   テーマのstyle.cssやCustomizerの追加CSSに貼り付け、
   もしくは Head, Footer and Post Injections のフッターで
   <style>...</style> として読み込んでください。

   .ottosette-booking : 予約フォーム用（JS側の予約処理と連動）
   .ottosette-form     : 通常のお問い合わせ等、見た目だけ揃えたいフォーム用
   （どちらも同じ見た目のスタイルが当たります）

   フォーム内の構造（旧: table.inquiry > tr > th/td）：
     .inquiry              （旧 table.inquiry）
       .field               （旧 tr）
         .field-label       （旧 th）
         .field-input       （旧 td）
     横幅いっぱいに広げたい項目（ご相談内容・送信確認）には
     .field に .field-wide を追加する
   ========================================================= */

/* ---------- カード全体 ---------- */
.ottosette-booking,
.ottosette-form {
	background: #ffffff;
	border-radius: 16px;
	padding: 28px 24px;
	margin: 28px 0 16px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
	max-width: 480px;
}

/* ---------- フィールド行 ---------- */
.ottosette-booking .inquiry .field,
.ottosette-form .inquiry .field,
.ottosette-booking .inquiry .field-label,
.ottosette-form .inquiry .field-label,
.ottosette-booking .inquiry .field-input,
.ottosette-form .inquiry .field-input {
	background: transparent;
	border: none;
}

.ottosette-booking .inquiry .field,
.ottosette-form .inquiry .field {
	margin-bottom: 18px;
}
.ottosette-booking .inquiry .field:last-child,
.ottosette-form .inquiry .field:last-child {
	margin-bottom: 0;
}

/* ---------- ラベル行 ---------- */
.ottosette-booking .inquiry .field-label,
.ottosette-form .inquiry .field-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88em;
	font-weight: 600;
	color: #3a3a3a;
	margin-bottom: 8px;
}

.ottosette-booking .haveto,
.ottosette-booking .any,
.ottosette-form .haveto,
.ottosette-form .any {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72em;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	line-height: 1.6;
	white-space: nowrap;
}

.ottosette-booking .haveto,
.ottosette-form .haveto {
	background: #fde2e9;
	color: #d6336c;
}

.ottosette-booking .any,
.ottosette-form .any {
	background: #e3f4ee;
	color: #2f9e78;
}

/* ---------- 入力欄共通 ---------- */
.ottosette-booking input[type="text"],
.ottosette-booking input[type="email"],
.ottosette-booking input[type="tel"],
.ottosette-booking input[type="url"],
.ottosette-booking input[type="date"],
.ottosette-booking select,
.ottosette-booking textarea,
.ottosette-form input[type="text"],
.ottosette-form input[type="email"],
.ottosette-form input[type="tel"],
.ottosette-form input[type="url"],
.ottosette-form input[type="date"],
.ottosette-form select,
.ottosette-form textarea {
	width: 100%;
	box-sizing: border-box;
	font-size: 0.95em;
	padding: 11px 14px;
	border: 1px solid #e2dfe8;
	border-radius: 10px;
	background: #fbfaff;
	color: #2b2b2b;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	font-family: inherit;
}

.ottosette-booking input::placeholder,
.ottosette-booking textarea::placeholder,
.ottosette-form input::placeholder,
.ottosette-form textarea::placeholder {
	color: #b3aec2;
}

.ottosette-booking input:focus,
.ottosette-booking select:focus,
.ottosette-booking textarea:focus,
.ottosette-form input:focus,
.ottosette-form select:focus,
.ottosette-form textarea:focus {
	outline: none;
	border-color: #4a3fbf;
	box-shadow: 0 0 0 3px rgba(74, 63, 191, 0.12);
	background: #ffffff;
}

.ottosette-booking textarea,
.ottosette-form textarea {
	resize: vertical;
	min-height: 90px;
	line-height: 1.6;
}

.ottosette-booking select,
.ottosette-form select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='%23726b8a' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	padding-right: 36px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ottosette-booking select:disabled,
.ottosette-form select:disabled {
	color: #a9a4b8;
	background-color: #f1eff6;
}

/* WordPress標準の invalid チェック用ボックスと被る場合の余白調整 */
.ottosette-booking .wpcf7-form-control-wrap,
.ottosette-form .wpcf7-form-control-wrap {
	display: block;
}

/* ---------- 送信確認・プライバシーポリシー ---------- */
.ottosette-booking .inquiry .wpcf7-acceptance,
.ottosette-booking .inquiry label,
.ottosette-form .inquiry .wpcf7-acceptance,
.ottosette-form .inquiry label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9em;
	color: #4a4a4a;
}

.ottosette-booking .inquiry input[type="checkbox"],
.ottosette-form .inquiry input[type="checkbox"] {
	width: 24px;
	height: 24px;
	accent-color: #4a3fbf;
	flex: none;
}

/* ---------- 予約結果メッセージ（.ottosette-bookingのみで使用） ---------- */
.ottosette-booking .booking-result {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 0.9em;
	font-weight: 500;
	text-align: center;
}
.ottosette-booking .booking-result.ok {
	background: #e8f5e9;
	border: 1px solid #81c784;
	color: #2e7d32;
}
.ottosette-booking .booking-result.ng {
	background: #ffebee;
	border: 1px solid #e57373;
	color: #c62828;
}

/* ---------- フッター枠（プライバシーポリシー＋送信ボタン） ---------- */
.ottosette-booking-footer,
.ottosette-form-footer {
	max-width: 480px;
	margin: 0 0 16px;
}

.ottosette-booking-footer center:first-child,
.ottosette-form-footer center:first-child {
	display: none; /* 罫線代わりの "-----" テキストは非表示にし、代わりに余白で区切る */
}

.ottosette-booking-footer label center b,
.ottosette-form-footer label center b {
	display: block;
	font-size: 0.85em;
	color: #3a3a3a;
	margin: 4px 0 10px;
}

/* ---------- 個人情報保護方針（スクロールボックス） ---------- */
.ottosette-booking-footer .scroll-box,
.ottosette-form-footer .scroll-box {
	background: #fbfaff !important;
	border: 1px solid #e2dfe8 !important;
	border-radius: 10px !important;
	padding: 14px 16px !important;
	font-size: 0.82em;
	line-height: 1.7;
	color: #4a4a4a;
}

.ottosette-booking-footer .scroll-box p.bs,
.ottosette-form-footer .scroll-box p.bs {
	margin: 0 0 12px;
}
.ottosette-booking-footer .scroll-box p.bs:last-child,
.ottosette-form-footer .scroll-box p.bs:last-child {
	margin-bottom: 0;
}

/* プライバシーポリシー同意行（フッター内2つ目のcenter要素） */
.ottosette-booking-footer > center:not(:first-child),
.ottosette-form-footer > center:not(:first-child) {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
	font-size: 0.9em;
	color: #4a4a4a;
}

.ottosette-booking-footer input[type="checkbox"],
.ottosette-form-footer input[type="checkbox"] {
	width: 24px;
	height: 24px;
	accent-color: #4a3fbf;
	flex: none;
}

/* ---------- 送信ボタン ---------- */
.ottosette-booking-footer input[type="submit"],
.ottosette-form-footer input[type="submit"] {
	display: block;
	width: 100%;
	margin-top: 32px;
	padding: 17px 20px;
	border: none;
	border-radius: 999px;
	background: #3b3374;
	color: #ffffff;
	font-size: 1.08em;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
}

.ottosette-booking-footer input[type="submit"]:hover,
.ottosette-form-footer input[type="submit"]:hover {
	background: #4a3fbf;
}

.ottosette-booking-footer input[type="submit"]:disabled,
.ottosette-form-footer input[type="submit"]:disabled {
	background: #b7b2d1;
	cursor: not-allowed;
}

/* ---------- 自作カレンダー（日付ピッカー） ---------- */
.ottosette-booking input.ottosette-date-input,
.ottosette-form input.ottosette-date-input {
	cursor: pointer;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23726b8a' d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1V3a1 1 0 0 1 1-1zM4 10v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-9H4z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
	padding-right: 42px;
}

.ottosette-datepicker {
	position: relative;
	margin-top: 8px;
	padding: 12px;
	background: #fbfaff;
	border: 1px solid #e2dfe8;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.ottosette-datepicker-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.ottosette-datepicker-header .dp-title {
	font-size: 0.92em;
	font-weight: 700;
	color: #3a3a3a;
}

.ottosette-datepicker-header button {
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #4a3fbf;
	font-size: 0.9em;
	line-height: 1;
	padding: 0;
	margin: 0;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	flex: none;
	transition: background 0.15s ease;
}
.ottosette-datepicker-header button:hover {
	background: #ece9fb;
}

.ottosette-datepicker-weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	text-align: center;
	font-size: 0.78em;
	color: #9a94ab;
	margin-bottom: 4px;
}

.ottosette-datepicker-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.ottosette-datepicker-grid .dp-empty {
	display: block;
	min-width: 0;
}

.ottosette-datepicker-grid .dp-day {
	min-width: 0;
	box-sizing: border-box;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #2b2b2b;
	font-size: 0.82em;
	line-height: 1;
	padding: 0;
	margin: 0;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ottosette-datepicker-grid .dp-day:hover:not(.dp-disabled) {
	background: #ece9fb;
}

.ottosette-datepicker-grid .dp-day.dp-selected {
	background: #4a3fbf;
	color: #ffffff;
	font-weight: 700;
}

.ottosette-datepicker-grid .dp-day.dp-disabled {
	color: #cfcbdb;
	background: transparent;
	cursor: not-allowed;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 480px) {
	.ottosette-booking,
	.ottosette-form {
		padding: 20px 16px;
		border-radius: 12px;
	}
}

/* ---------- PC表示：2カラムレイアウト ---------- */
@media (min-width: 700px) {
	.ottosette-booking,
	.ottosette-booking-footer,
	.ottosette-form,
	.ottosette-form-footer {
		max-width: 680px;
		margin-left: auto;
		margin-right: auto;
	}

	.ottosette-booking .inquiry,
	.ottosette-form .inquiry {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 20px;
	}

	/* ご相談内容・送信確認など、横幅いっぱいに広げたい項目 */
	.ottosette-booking .inquiry .field.field-wide,
	.ottosette-form .inquiry .field.field-wide {
		grid-column: 1 / -1;
	}
}
