/**
 * かんたん問い合わせフォーム: フロント側スタイル
 * テーマの色に合わせたい場合は --ktf-accent を上書きしてください。
 */

.ktf-form-wrap,
.ktf-tabs {
	--ktf-accent: #2563eb;
	--ktf-accent-dark: #1d4ed8;
	--ktf-border: #d5d9e0;
	--ktf-text: #1f2430;
	--ktf-muted: #6b7280;
	--ktf-error: #d63638;
	--ktf-radius: 8px;
	--ktf-line: #06c755;

	max-width: 720px;
	margin: 0 auto;
	color: var(--ktf-text);
	scroll-margin-top: 80px;
}

.ktf-form-wrap *,
.ktf-tabs * {
	box-sizing: border-box;
}

/* =====================================================================
 * 問い合わせ手段のタブ
 * ================================================================== */

.ktf-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 -1px;
	padding: 0;
	list-style: none;
}

.ktf-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: 140px;
	padding: 14px 18px;
	border: 1px solid var(--ktf-border);
	border-bottom: none;
	border-radius: var(--ktf-radius) var(--ktf-radius) 0 0;
	background: #f1f3f6;
	color: var(--ktf-muted);
	font-family: inherit;
	font-size: 0.98em;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.ktf-tab:hover {
	background: #e8ebf0;
	color: var(--ktf-text);
}

.ktf-tab.is-active {
	background: #fff;
	color: var(--ktf-accent);
	box-shadow: inset 0 3px 0 var(--ktf-accent);
}

.ktf-tab:focus-visible {
	outline: 2px solid var(--ktf-accent);
	outline-offset: -2px;
}

.ktf-tab-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.ktf-panels {
	padding: 28px 24px;
	border: 1px solid var(--ktf-border);
	border-radius: 0 0 var(--ktf-radius) var(--ktf-radius);
	background: #fff;
}

.ktf-panel[hidden] {
	display: none;
}

.ktf-panel .ktf-form-wrap {
	max-width: none;
}

.ktf-tab-note {
	margin: 0 0 20px;
	line-height: 1.8;
}

@media (max-width: 600px) {
	.ktf-tab {
		min-width: 0;
		padding: 12px 10px;
		font-size: 0.9em;
	}

	.ktf-tab-icon {
		width: 16px;
		height: 16px;
	}

	.ktf-panels {
		padding: 20px 14px;
	}
}

/* ---------- 公式LINEのタブ ---------- */

.ktf-line {
	text-align: center;
}

.ktf-line-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	max-width: 100%;
	padding: 16px 28px;
	border-radius: 999px;
	background: var(--ktf-line);
	color: #fff !important;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
	transition: filter 0.15s, transform 0.05s;
}

.ktf-line-button:hover {
	filter: brightness(0.94);
}

.ktf-line-button:active {
	transform: translateY(1px);
}

.ktf-line-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.ktf-line-id {
	margin: 14px 0 0;
	color: var(--ktf-muted);
	font-size: 0.95em;
}

.ktf-line-qr {
	margin-top: 24px;
}

.ktf-line-qr img {
	width: 160px;
	height: auto;
	max-width: 100%;
	padding: 8px;
	border: 1px solid var(--ktf-border);
	border-radius: var(--ktf-radius);
	background: #fff;
}

.ktf-line-qr p {
	margin: 8px 0 0;
	color: var(--ktf-muted);
	font-size: 0.85em;
}

@media (max-width: 600px) {
	/* スマホはタップで開けるのでQRは出さない */
	.ktf-line-qr {
		display: none;
	}
}

/* ---------- レイアウト ---------- */

.ktf-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 16px;
}

.ktf-field {
	flex: 0 0 100%;
	min-width: 0;
}

.ktf-field.ktf-w-half {
	flex: 1 1 calc(50% - 8px);
}

@media (max-width: 600px) {
	.ktf-field.ktf-w-half {
		flex: 0 0 100%;
	}
}

/* ---------- ラベル ---------- */

.ktf-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.95em;
	line-height: 1.5;
}

.ktf-required {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 3px;
	background: var(--ktf-error);
	color: #fff;
	font-size: 0.72em;
	font-weight: 600;
	vertical-align: middle;
}

.ktf-note {
	margin: 6px 0 0;
	color: var(--ktf-muted);
	font-size: 0.85em;
	line-height: 1.6;
}

.ktf-error {
	margin: 6px 0 0;
	color: var(--ktf-error);
	font-size: 0.85em;
	font-weight: 600;
}

/* ---------- 入力欄 ---------- */

.ktf-form input[type="text"],
.ktf-form input[type="email"],
.ktf-form input[type="tel"],
.ktf-form input[type="url"],
.ktf-form input[type="number"],
.ktf-form input[type="date"],
.ktf-form select,
.ktf-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--ktf-border);
	border-radius: var(--ktf-radius);
	background: #fff;
	color: inherit;
	font-size: 16px;
	font-family: inherit;
	line-height: 1.6;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ktf-form textarea {
	min-height: 140px;
	resize: vertical;
}

.ktf-form input:focus,
.ktf-form select:focus,
.ktf-form textarea:focus {
	outline: none;
	border-color: var(--ktf-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.ktf-has-error input,
.ktf-has-error select,
.ktf-has-error textarea {
	border-color: var(--ktf-error);
	background: #fff8f8;
}

/* ---------- 選択肢 ---------- */

.ktf-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding-top: 4px;
}

.ktf-choice {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	line-height: 1.5;
}

.ktf-choice input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--ktf-accent);
}

.ktf-agree {
	display: inline-flex;
	align-items: flex-start;
	gap: 9px;
	padding: 12px 14px;
	border: 1px solid var(--ktf-border);
	border-radius: var(--ktf-radius);
	background: #f8fafc;
	cursor: pointer;
	line-height: 1.6;
}

.ktf-agree input {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: var(--ktf-accent);
}

/* ---------- ボタン ---------- */

.ktf-actions {
	margin-top: 28px;
	text-align: center;
}

.ktf-form button {
	appearance: none;
	border: none;
	border-radius: 999px;
	font-family: inherit;
	font-size: 1.05em;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s, transform 0.05s, opacity 0.15s;
}

.ktf-submit {
	min-width: 260px;
	padding: 15px 32px;
	background: var(--ktf-accent);
	color: #fff;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.ktf-submit:hover {
	background: var(--ktf-accent-dark);
}

.ktf-submit:active {
	transform: translateY(1px);
}

.ktf-submit:disabled,
.ktf-form button.is-sending {
	opacity: 0.6;
	cursor: wait;
}

.ktf-back {
	min-width: 150px;
	padding: 15px 24px;
	background: #eef1f5;
	color: #4b5563;
}

.ktf-back:hover {
	background: #e2e6ec;
}

.ktf-actions-confirm {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

/* ---------- 確認画面 ---------- */

.ktf-confirm-lead {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--ktf-radius);
	background: #fff7e6;
	border: 1px solid #f0d9a8;
	font-size: 0.95em;
}

.ktf-confirm-list {
	margin: 0;
	border-top: 1px solid var(--ktf-border);
}

.ktf-confirm-list dt {
	margin: 0;
	padding: 14px 4px 4px;
	font-weight: 700;
	font-size: 0.9em;
	color: var(--ktf-muted);
}

.ktf-confirm-list dd {
	margin: 0;
	padding: 0 4px 14px;
	border-bottom: 1px solid var(--ktf-border);
	line-height: 1.7;
	word-break: break-word;
}

.ktf-confirm-list .ktf-empty {
	color: var(--ktf-muted);
}

/* ---------- 完了・通知 ---------- */

.ktf-thanks {
	padding: 36px 24px;
	border: 1px solid #cfe6d4;
	border-radius: 12px;
	background: #f3fbf5;
	text-align: center;
}

.ktf-thanks-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #1a9d4d;
	color: #fff;
	font-size: 28px;
	line-height: 52px;
}

.ktf-thanks-text p:last-child {
	margin-bottom: 0;
}

.ktf-alert {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--ktf-radius);
	background: #fdecec;
	border: 1px solid #f2b5b5;
	color: #a32020;
	font-weight: 600;
}

.ktf-notice-admin {
	padding: 12px 16px;
	border: 1px dashed #b5b5b5;
	border-radius: 6px;
	background: #fafafa;
	color: #666;
	font-size: 0.9em;
}

/* ---------- ハニーポット（人には見せない） ---------- */

.ktf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
