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

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

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

/* テーブル構造は残しつつ、見た目はブロック要素のように積む */
.ottosette-booking table.inquiry,
.ottosette-booking table.inquiry tbody,
.ottosette-booking table.inquiry tr,
.ottosette-booking table.inquiry th,
.ottosette-booking table.inquiry td,
.ottosette-form table.inquiry,
.ottosette-form table.inquiry tbody,
.ottosette-form table.inquiry tr,
.ottosette-form table.inquiry th,
.ottosette-form table.inquiry td {
	display: block;
	width: 100%;
	border: none;
	padding: 0;
	margin: 0;
	background: transparent;
	text-align: left;
}

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

/* ---------- ラベル行 ---------- */
.ottosette-booking table.inquiry th,
.ottosette-form table.inquiry th {
	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 table.inquiry .wpcf7-acceptance,
.ottosette-booking table.inquiry label,
.ottosette-form table.inquiry .wpcf7-acceptance,
.ottosette-form table.inquiry label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	color: #4a4a4a;
}

.ottosette-booking table.inquiry input[type="checkbox"],
.ottosette-form table.inquiry input[type="checkbox"] {
	width: 16px;
	height: 16px;
	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: 8px;
	margin: 14px 0 0;
	font-size: 0.9em;
	color: #4a4a4a;
}

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

/* ---------- 送信ボタン ---------- */
.ottosette-booking-footer input[type="submit"],
.ottosette-form-footer input[type="submit"] {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 13px 20px;
	border: none;
	border-radius: 999px;
	background: #3b3374;
	color: #ffffff;
	font-size: 1em;
	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;
}

/* ---------- レスポンシブ ---------- */
@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 table.inquiry,
	.ottosette-form table.inquiry {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 20px;
	}

	/* ブラウザが自動生成する<tbody>を "透過" させ、<tr>を直接グリッドの子要素にする */
	.ottosette-booking table.inquiry tbody,
	.ottosette-form table.inquiry tbody {
		display: contents;
	}

	.ottosette-booking table.inquiry tr,
	.ottosette-form table.inquiry tr {
		display: block; /* thをラベル、tdを入力欄として縦積みのまま、列だけ2分割 */
	}

	/* ご相談内容（textarea）と送信確認（acceptance）は横幅いっぱいに */
	.ottosette-booking table.inquiry tr:has(textarea),
	.ottosette-booking table.inquiry tr:has(.wpcf7-acceptance),
	.ottosette-form table.inquiry tr:has(textarea),
	.ottosette-form table.inquiry tr:has(.wpcf7-acceptance) {
		grid-column: 1 / -1;
	}
}
