/*!
 * Tatata Contact Form
 * 色は管理画面「フォーム → 共通設定」のメインカラーから自動生成されます。
 */
.ttcf {
	/* 色は「共通設定 → メインカラー」から自動生成されて上書きされます */
	--ttcf-main: #214a81;
	--ttcf-main-dark: #173761;
	--ttcf-main-light: #eef3fa;
	--ttcf-main-text: #214a81;
	--ttcf-main-rgb: 33, 74, 129;
	--ttcf-btn-text: #fff;
	--ttcf-text: #222;
	--ttcf-sub: #5c6470;
	--ttcf-border: #c5ccd6;
	--ttcf-bg: #fff;
	--ttcf-error: #c8102e;
	--ttcf-error-bg: #fff5f6;
	--ttcf-ok: #1e7f4f;
	--ttcf-radius: 6px;

	color: var(--ttcf-text);
	font-size: 16px;
	line-height: 1.7;
	scroll-margin-top: 100px;
	text-align: left;
}
.ttcf *,
.ttcf *::before,
.ttcf *::after { box-sizing: border-box; }
.ttcf [hidden] { display: none !important; }
.ttcf .screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---------- ステップ ---------- */
.ttcf .ttcf-steps {
	display: flex; justify-content: center; gap: 0;
	list-style: none; margin: 0 0 32px; padding: 0; counter-reset: none;
}
.ttcf .ttcf-steps__item {
	position: relative; flex: 1 1 0; max-width: 160px;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	margin: 0; padding: 0; color: var(--ttcf-sub); font-size: 13px; font-weight: 700;
}
.ttcf .ttcf-steps__item::before { content: none; }
.ttcf .ttcf-steps__item + .ttcf-steps__item::after {
	content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px;
	background: var(--ttcf-border); z-index: 0;
}
.ttcf .ttcf-steps__item.is-current::after,
.ttcf .ttcf-steps__item.is-done::after { background: var(--ttcf-main); }
.ttcf .ttcf-steps__num {
	position: relative; z-index: 1;
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: #fff; border: 2px solid var(--ttcf-border); color: var(--ttcf-sub); font-size: 15px;
}
.ttcf .ttcf-steps__item.is-current { color: var(--ttcf-main-text); }
.ttcf .ttcf-steps__item.is-current .ttcf-steps__num { background: var(--ttcf-main); border-color: var(--ttcf-main); color: var(--ttcf-btn-text); }
.ttcf .ttcf-steps__item.is-done .ttcf-steps__num { border-color: var(--ttcf-main); color: var(--ttcf-main-text); }
/* JavaScript 無効時は確認ステップが無いので非表示 */
.ttcf:not(.is-js):has(.ttcf-form) .ttcf-steps { display: none; }

/* ---------- 共通 ---------- */
.ttcf .ttcf-form { margin: 0; }
.ttcf .ttcf-lead { margin: 0 0 24px; color: var(--ttcf-sub); font-size: 14px; }
.ttcf .ttcf-field { margin: 0 0 28px; padding: 0; border: 0; min-width: 0; }
.ttcf .ttcf-label {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 0 0 8px; padding: 0; font-weight: 700; font-size: 16px; color: var(--ttcf-text);
	float: none; width: auto;
}
.ttcf .ttcf-badge {
	display: inline-block; padding: 1px 8px; border-radius: 3px;
	font-size: 12px; font-weight: 700; line-height: 1.6; vertical-align: middle;
}
.ttcf .ttcf-badge--req { background: var(--ttcf-error); color: #fff; }
.ttcf .ttcf-badge--opt { background: #e6e9ee; color: var(--ttcf-sub); }
.ttcf .ttcf-help { margin: -2px 0 8px; font-size: 13px; color: var(--ttcf-sub); }

/* ---------- 入力欄 ---------- */
.ttcf .ttcf-input {
	display: block; width: 100%; max-width: 100%; margin: 0;
	padding: 13px 14px; min-height: 52px;
	font: inherit; font-size: 16px; /* iOS の自動ズーム防止 */
	color: var(--ttcf-text); background-color: var(--ttcf-bg);
	border: 1px solid var(--ttcf-border); border-radius: var(--ttcf-radius);
	box-shadow: none; outline: none; appearance: none; -webkit-appearance: none;
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ttcf .ttcf-select {
	padding-right: 44px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6470' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.ttcf .ttcf-input[type="date"] { max-width: 260px; }
.ttcf .ttcf-textarea { min-height: 200px; resize: vertical; line-height: 1.7; }
.ttcf .ttcf-input::placeholder { color: #9aa1ab; opacity: 1; }
.ttcf .ttcf-input:hover { border-color: #9aa6b6; }
.ttcf .ttcf-input:focus {
	border-color: var(--ttcf-main);
	box-shadow: 0 0 0 3px rgba(var(--ttcf-main-rgb), .18);
}
.ttcf .is-invalid .ttcf-input { border-color: var(--ttcf-error); background-color: var(--ttcf-error-bg); }
.ttcf .is-invalid .ttcf-input:focus { box-shadow: 0 0 0 3px rgba(200, 16, 46, .15); }
.ttcf .is-valid .ttcf-input:not(select):not([type="date"]) {
	padding-right: 42px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e7f4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px top 16px; background-size: 18px;
}
.ttcf .ttcf-counter { margin: 6px 0 0; text-align: right; font-size: 13px; color: var(--ttcf-sub); }
.ttcf .ttcf-counter.is-near { color: var(--ttcf-error); }

/* ---------- ラジオ（カード型） ---------- */
.ttcf .ttcf-choices {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; outline: none;
}
.ttcf .ttcf-choices--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ttcf .ttcf-choice {
	display: flex; align-items: center; gap: 10px; margin: 0;
	padding: 14px 16px; min-height: 52px; cursor: pointer;
	background: var(--ttcf-bg); border: 1px solid var(--ttcf-border); border-radius: var(--ttcf-radius);
	font-weight: 500; line-height: 1.5;
	transition: border-color .15s, background-color .15s;
}
.ttcf .ttcf-choice:hover { border-color: var(--ttcf-main); }
.ttcf .ttcf-choice input,
.ttcf .ttcf-check input {
	display: inline-block; position: static; opacity: 1; visibility: visible;
	flex: 0 0 auto; width: 20px; height: 20px; margin: 0;
	accent-color: var(--ttcf-main); cursor: pointer; appearance: auto; -webkit-appearance: auto;
}
.ttcf .ttcf-choice:has(input:checked) {
	border-color: var(--ttcf-main); background: var(--ttcf-main-light);
	box-shadow: inset 0 0 0 1px var(--ttcf-main); font-weight: 700; color: var(--ttcf-text);
}
.ttcf .ttcf-choice:has(input:focus-visible),
.ttcf .ttcf-check:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(var(--ttcf-main-rgb), .25); }
.ttcf .is-invalid .ttcf-choice { border-color: var(--ttcf-error); }

/* ---------- 同意チェック ---------- */
.ttcf .ttcf-agree {
	padding: 16px; background: #f5f7fa; border-radius: var(--ttcf-radius);
}
.ttcf .is-invalid .ttcf-agree { background: var(--ttcf-error-bg); outline: 1px solid var(--ttcf-error); }
.ttcf .ttcf-check {
	display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer;
	font-weight: 700; border-radius: 4px;
}
.ttcf .ttcf-check a { color: var(--ttcf-main-text); text-decoration: underline; }

/* ---------- エラー ---------- */
.ttcf .ttcf-error {
	display: flex; align-items: flex-start; gap: 6px;
	margin: 8px 0 0; color: var(--ttcf-error); font-size: 14px; font-weight: 700;
}
.ttcf .ttcf-error::before {
	content: "!"; flex: 0 0 18px; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 3px;
	border-radius: 50%; background: var(--ttcf-error); color: #fff; font-size: 12px; line-height: 1;
}
.ttcf .ttcf-alert {
	margin: 0 0 28px; padding: 16px 18px;
	background: var(--ttcf-error-bg); border: 1px solid #f1c2c9; border-left: 4px solid var(--ttcf-error);
	border-radius: var(--ttcf-radius); color: var(--ttcf-error); font-weight: 700; outline: none;
}
.ttcf .ttcf-alert p { margin: 0; }
.ttcf .ttcf-alert ul { margin: 8px 0 0; padding-left: 1.2em; font-weight: 500; }
.ttcf .ttcf-alert li { margin: 2px 0; }
.ttcf .ttcf-alert a { color: var(--ttcf-error); text-decoration: underline; }

/* ---------- ボタン ---------- */
.ttcf .ttcf-actions {
	display: flex; justify-content: center; gap: 16px; margin: 36px 0 0;
}
.ttcf .ttcf-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 100%; max-width: 340px; min-height: 58px; margin: 0; padding: 12px 24px;
	font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .05em; line-height: 1.4;
	border-radius: var(--ttcf-radius); border: 2px solid var(--ttcf-main);
	cursor: pointer; text-decoration: none; text-align: center;
	transition: background-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.ttcf .ttcf-btn--primary { background: var(--ttcf-main); color: var(--ttcf-btn-text); box-shadow: 0 3px 0 var(--ttcf-main-dark); }
.ttcf .ttcf-btn--primary:hover { background: var(--ttcf-main-dark); border-color: var(--ttcf-main-dark); color: var(--ttcf-btn-text); }
.ttcf .ttcf-btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ttcf-main-dark); }
.ttcf .ttcf-btn--ghost { background: #fff; color: var(--ttcf-main-text); border-color: var(--ttcf-main); }
.ttcf .ttcf-btn--ghost:hover { background: var(--ttcf-main-light); color: var(--ttcf-main-text); }
.ttcf .ttcf-btn:focus-visible { outline: 3px solid rgba(var(--ttcf-main-rgb), .35); outline-offset: 2px; }
.ttcf .ttcf-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.ttcf .ttcf-btn.is-loading::before {
	content: ""; width: 18px; height: 18px; margin-right: 10px;
	border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
	animation: ttcf-spin .8s linear infinite;
}
@keyframes ttcf-spin { to { transform: rotate(360deg); } }

/* ---------- 確認画面 ---------- */
.ttcf .ttcf-confirm-title {
	margin: 0 0 8px; padding: 0; border: 0; background: none;
	font-size: 20px; font-weight: 700; color: var(--ttcf-main-text); outline: none;
}
.ttcf .ttcf-confirm-title::before,
.ttcf .ttcf-confirm-title::after { content: none; }
.ttcf .ttcf-confirm-list {
	display: grid; grid-template-columns: 200px 1fr; margin: 0;
	border-top: 1px solid var(--ttcf-border);
}
.ttcf .ttcf-confirm-list dt,
.ttcf .ttcf-confirm-list dd {
	margin: 0; padding: 16px; border-bottom: 1px solid var(--ttcf-border); float: none; width: auto;
}
.ttcf .ttcf-confirm-list dt { background: #f5f7fa; font-weight: 700; }
.ttcf .ttcf-confirm-list dd { white-space: pre-wrap; word-break: break-word; }
.ttcf .ttcf-confirm-list dd.is-empty { color: var(--ttcf-sub); }

/* ---------- 完了画面 ---------- */
.ttcf .ttcf-complete {
	padding: 40px 24px; text-align: center; outline: none;
	background: var(--ttcf-main-light); border-radius: 10px;
}
.ttcf .ttcf-complete__icon {
	width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--ttcf-main);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center; background-size: 32px;
}
.ttcf .ttcf-complete__title { margin: 0 0 12px; font-size: 22px; font-weight: 700; color: var(--ttcf-main-text); }
.ttcf .ttcf-complete__download { margin: 24px 0 0; }
.ttcf .ttcf-btn--download::before {
	content: ""; width: 20px; height: 20px; margin-right: 10px; flex: 0 0 auto; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ttcf .ttcf-complete__text p { margin: 0 0 1em; }
.ttcf .ttcf-complete__back { margin: 24px 0 0; }

/* ---------- reCAPTCHA ---------- */
/* バッジを非表示にする代わりに、Google 規約に沿った表記をフォーム下に表示 */
.grecaptcha-badge { visibility: hidden; }
.ttcf .ttcf-recaptcha-note { margin: 24px 0 0; font-size: 12px; color: var(--ttcf-sub); text-align: center; }
.ttcf .ttcf-recaptcha-note a { color: inherit; text-decoration: underline; }

/* ---------- ハニーポット ---------- */
.ttcf .ttcf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- スマートフォン ---------- */
@media (max-width: 600px) {
	.ttcf .ttcf-choices--grid { grid-template-columns: 1fr; }
	.ttcf .ttcf-actions--confirm { flex-direction: column-reverse; align-items: center; }
	.ttcf .ttcf-btn { max-width: none; }
	.ttcf .ttcf-confirm-list { grid-template-columns: 1fr; }
	.ttcf .ttcf-confirm-list dt { border-bottom: 0; padding-bottom: 6px; }
	.ttcf .ttcf-confirm-list dd { padding-top: 6px; }
	.ttcf .ttcf-steps { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.ttcf * { transition: none !important; animation: none !important; }
}
