/*
 * エイゴバ予約フォーム スタイル
 * 設計方針：スマホ幅優先（mobile-first）、PC側はメディアクエリで上書き。
 * フォーム外周の装飾は持たない（埋め込み先の固定ページ側で組む前提）。
 */

.eigoba-form-wrap {
	max-width: 560px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
	color: #333;
	font-size: 15px;
	line-height: 1.6;
}

.eigoba-form-row {
	margin-bottom: 18px;
}

.eigoba-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
}

.eigoba-required {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	font-size: 11px;
	color: #fff;
	background: #e53935;
	border-radius: 4px;
	font-weight: 600;
	vertical-align: middle;
}

.eigoba-form-wrap input[type="text"],
.eigoba-form-wrap input[type="email"],
.eigoba-form-wrap input[type="tel"],
.eigoba-form-wrap input[type="number"],
.eigoba-form-wrap select,
.eigoba-form-wrap textarea {
	width: 100%;
	padding: 14px;
	font-size: 16px; /* スマホで自動ズームを防ぐ */
	line-height: 1.5;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	background: #fafafa;
	box-sizing: border-box;
	transition: border-color 0.15s, background 0.15s;
	font-family: inherit;
	color: #333;
}

.eigoba-form-wrap input:focus,
.eigoba-form-wrap select:focus,
.eigoba-form-wrap textarea:focus {
	outline: none;
	border-color: #2563eb;
	background: #fff;
}

.eigoba-form-wrap input.is-invalid,
.eigoba-form-wrap select.is-invalid,
.eigoba-form-wrap textarea.is-invalid {
	border-color: #e53935;
	background: #fff5f5;
}

.eigoba-error {
	color: #e53935;
	font-size: 13px;
	margin: 6px 0 0;
	min-height: 0;
}

.eigoba-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ─── プライバシー同意行 ─── */

.eigoba-privacy-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.eigoba-privacy-link {
	display: inline-block;
	align-self: flex-start;
	background: none;
	border: none;
	color: #2563eb;
	font-size: 14px;
	font-family: inherit;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}

.eigoba-privacy-link:hover {
	color: #1d4ed8;
}

.eigoba-consent {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	cursor: pointer;
}

.eigoba-consent input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	flex-shrink: 0;
}

/* ─── 送信ボタン ─── */

.eigoba-submit-row {
	margin-top: 24px;
}

.eigoba-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 18px 24px;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, #ea729a, #d85a85);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
	box-shadow: 0 4px 12px rgba(234, 114, 154, 0.3);
	font-family: inherit;
}

.eigoba-submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(234, 114, 154, 0.4);
}

.eigoba-submit:active:not(:disabled) {
	transform: translateY(0);
}

.eigoba-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.eigoba-submit-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: eigoba-spin 0.8s linear infinite;
}

.eigoba-submit.is-loading .eigoba-submit-spinner {
	display: inline-block;
}

@keyframes eigoba-spin {
	to { transform: rotate(360deg); }
}

.eigoba-form-message {
	margin-top: 20px;
	padding: 0;
	font-size: 14px;
	text-align: center;
}

/* 問診票回答完了画面（v1.19.0〜：エイゴバ既存トンマナに合わせる）
   - 主色 #ea729a (ブランドピンク)、文字 #040d40 (ナビー)
   - ピンク枠＋淡いシャドウでブランド一貫性 */
.eigoba-form-message.is-success {
	padding: 32px 24px;
	background: #fff;
	border: 2px solid #ea729a;
	border-radius: 12px;
	line-height: 1.75;
	text-align: center;
	box-shadow: 0 4px 16px rgba(234, 114, 154, .14);
}
.eigoba-q-thanks__title {
	font-size: clamp(20px, 3vw, 28px);
	font-weight: 700;
	color: #ea729a;
	margin: 0 0 14px;
	letter-spacing: 0.02em;
}
.eigoba-q-thanks__body {
	font-size: clamp(15px, 1.8vw, 18px);
	font-weight: 500;
	color: #040d40;
	margin: 0;
}

.eigoba-form-message.is-error {
	padding: 12px;
	color: #b71c1c;
	background: #ffebee;
	border-radius: 8px;
}

.eigoba-form.is-submitted {
	display: none;
}

/* ─── 日時選択 ─── */

.eigoba-datetime-picker {
	border: 1px solid #d0d0d0;
	border-radius: 10px;
	background: #fff;
	padding: 12px;
}

.eigoba-picker-status {
	font-size: 13px;
	color: #666;
	padding: 12px;
	text-align: center;
}

.eigoba-date-tabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 8px;
	margin-bottom: 14px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.eigoba-date-tab {
	flex: 0 0 auto;
	min-width: 64px;
	padding: 10px 8px;
	font-size: 13px;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	line-height: 1.3;
	transition: all 0.15s;
	font-family: inherit;
	color: #333;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.eigoba-date-tab-md {
	font-weight: 600;
	font-size: 15px;
}

.eigoba-date-tab-wd {
	font-size: 11px;
	opacity: 0.85;
}

/* 平日のホバー */
.eigoba-date-tab:hover:not(.is-selected):not(.is-empty) {
	border-color: #ea729a;
}

/* 土曜日（青系） */
.eigoba-date-tab.is-sat {
	color: #1d4ed8;
}
.eigoba-date-tab.is-sat .eigoba-date-tab-wd {
	color: #1d4ed8;
}

/* 日曜日（赤系） */
.eigoba-date-tab.is-sun {
	color: #c62828;
}
.eigoba-date-tab.is-sun .eigoba-date-tab-wd {
	color: #c62828;
}

/* 選択中はオレンジ系で上書き */
.eigoba-date-tab.is-selected,
.eigoba-date-tab.is-selected .eigoba-date-tab-wd {
	background: #ea729a;
	color: #fff;
	border-color: #ea729a;
	font-weight: 600;
}

.eigoba-date-tab.is-empty {
	opacity: 0.4;
	cursor: not-allowed;
}

/* スロット領域（朝/昼/夜の3列縦並びテーブル） */

.eigoba-slot-area {
	min-height: 100px;
}

.eigoba-slot-table {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 6px;
	background: transparent;
}

.eigoba-slot-table-row {
	display: contents;
}

.eigoba-slot-table-cell {
	display: flex;
	align-items: stretch;
	justify-content: center;
	min-height: 44px;
}

.eigoba-slot-table-cell.is-blank {
	background: transparent;
}

.eigoba-slot-header-cell {
	font-size: 14px;
	font-weight: 700;
	padding: 8px;
	border-radius: 8px;
	align-items: center;
}

.eigoba-slot-header-cell--morning {
	background: #fff4d6;
	color: #b45309;
}
.eigoba-slot-header-cell--afternoon {
	background: #e7f0ff;
	color: #1d4ed8;
}
.eigoba-slot-header-cell--evening {
	background: #ede9fe;
	color: #5b21b6;
}

.eigoba-slot-cell {
	width: 100%;
	padding: 10px 4px;
	font-size: 14px;
	background: #fff;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: all 0.15s;
	font-family: inherit;
	color: #333;
	line-height: 1.2;
}

.eigoba-slot-cell:hover:not(.is-selected):not(:disabled) {
	border-color: #ea729a;
	background: #fce8ef;
}

.eigoba-slot-cell.is-selected {
	background: #ea729a;
	color: #fff;
	border-color: #ea729a;
	font-weight: 700;
}

/* 埋まり・過去スロットは「表示しない」方針なので、ここの disabled スタイルは予備として残す */
.eigoba-slot-cell:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.eigoba-slot-empty {
	text-align: center;
	padding: 24px;
	color: #999;
	font-size: 13px;
}

.eigoba-selected-display {
	margin-top: 14px;
	padding: 12px;
	background: #fce8ef;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	color: #c14d77;
	display: none;
	text-align: center;
}

.eigoba-selected-display.is-visible {
	display: block;
}

/* ─── モーダル ─── */

body.eigoba-modal-open {
	overflow: hidden;
}

.eigoba-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: flex-end; /* スマホは下から出す */
	justify-content: center;
	padding: 0;
}

.eigoba-modal[hidden] {
	display: none;
}

.eigoba-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.eigoba-modal-panel {
	position: relative;
	background: #fff;
	border-radius: 14px 14px 0 0;
	width: 100%;
	max-width: 640px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.eigoba-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #eee;
}

.eigoba-modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
}

.eigoba-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	padding: 4px 10px;
	cursor: pointer;
	color: #666;
	font-family: inherit;
}

.eigoba-modal-body {
	overflow-y: auto;
	padding: 16px;
	font-size: 14px;
	line-height: 1.7;
	flex: 1 1 auto;
	-webkit-overflow-scrolling: touch;
}

.eigoba-modal-body p {
	margin: 0 0 12px;
}

.eigoba-modal-footer {
	display: flex;
	flex-direction: column-reverse;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid #eee;
	background: #fafafa;
	border-radius: 0;
}

.eigoba-modal-secondary {
	background: #fff;
	color: #666;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
}

.eigoba-modal-secondary:hover {
	background: #f5f5f5;
}

.eigoba-modal-primary {
	background: linear-gradient(135deg, #ea729a, #d85a85);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 16px 20px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	box-shadow: 0 4px 12px rgba(234, 114, 154, 0.3);
}

.eigoba-modal-primary:hover {
	box-shadow: 0 6px 16px rgba(234, 114, 154, 0.4);
}

/* ─── PC幅（〜768px以上）の微調整 ─── */

/* ─── 問診票フォーム ─── */

.eigoba-q-wrap {
	max-width: 640px;
}

.eigoba-q-invalid {
	padding: 16px;
	background: #ffebee;
	color: #b71c1c;
	border-radius: 8px;
	text-align: center;
}

.eigoba-q-answered-notice {
	padding: 14px;
	background: #fff8e1;
	color: #8a6d00;
	border-radius: 8px;
	margin-bottom: 20px;
	line-height: 1.7;
	font-size: 14px;
}

.eigoba-q-registered-note {
	font-size: 13px;
	color: #777;
	margin-bottom: 14px;
	padding: 10px 12px;
	background: #f9f9f9;
	border-radius: 6px;
	line-height: 1.6;
}

.eigoba-q-fixed {
	padding: 12px 14px;
	background: #f0f0f0;
	border-radius: 8px;
	font-size: 15px;
	color: #555;
}

.eigoba-q-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.eigoba-q-radio {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	cursor: pointer;
}

.eigoba-q-radio input[type="radio"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

.eigoba-q-other-input {
	margin-top: 8px;
}

.eigoba-q-date {
	display: flex;
	align-items: center;
	gap: 6px;
}

.eigoba-q-date input {
	width: 80px;
	text-align: center;
}

.eigoba-q-date-y {
	width: 100px !important;
}

.eigoba-q-note {
	font-size: 12px;
	color: #888;
	margin: 6px 0 0;
}

@media (min-width: 768px) {
	.eigoba-modal {
		align-items: center;
	}
	.eigoba-modal-panel {
		border-radius: 14px;
		max-height: 80vh;
	}
	.eigoba-modal-footer {
		flex-direction: row;
		justify-content: flex-end;
	}
	.eigoba-modal-secondary {
		flex: 0 0 auto;
	}
	.eigoba-modal-primary {
		flex: 0 0 auto;
		min-width: 200px;
	}
}
