/* ==========================================================================
   TEYLL — Project: お問い合わせ /teyll/contact/（入力・確認）・/teyll/contact/thanks/（完了）（page-teyll-contact.php）
   Figma PC 212:3337・212:12409・84:540／SP 242:3542・242:3729・242:3880（SP の見出しは c-page-header-teyll-sp Page=Contact）
   ページ見出し p-teyll-page-header・手順 p-teyll-contact-steps・フォーム p-teyll-contact・確認 p-teyll-confirm・完了 p-teyll-done
   入力欄・選択肢の見た目は component.css（c-form-field・c-teyll-choice）
   - SP は同じファイルの中で @media (max-width: 767px) に書く
   ========================================================================== */

/* ==========================================================================
   ページ見出し（3画面で高さをそろえる：本文の最小の高さ 225px）
   ========================================================================== */
.p-teyll-page-header {
	padding: 56px 0 var(--space-4xl);
	background: var(--teyll-bg-canvas);
}

.p-teyll-page-header__inner {
	display: flex;
	align-items: center;
	gap: var(--space-4xl);
}

.p-teyll-page-header__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	min-width: 0;
	min-height: 225px;
}

.p-teyll-page-header__title {
	font: var(--text-teyll-h1);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-page-header__shape {
	display: block;
	width: 120px;
	height: 10px;
	background: var(--teyll-accent-indigo);
	border-radius: 5px;
}

.p-teyll-page-header__lead {
	color: var(--teyll-text-secondary);
}

.p-teyll-page-header__mark {
	flex-shrink: 0;
	width: 187px;
	height: auto;
}

@media (max-width: 767px) {
	.p-teyll-page-header {
		padding: 4px 0 40px; /* Figma c-page-header-teyll-sp の下の余白 */
	}

	/* パンくず → 見出しと線（右にロゴの三角）→ リード */
	.p-teyll-page-header__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-md);
	}

	.p-teyll-page-header__body {
		display: contents;
	}

	.p-teyll-page-header__body > .p-teyll-breadcrumb {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.p-teyll-page-header__title {
		grid-column: 1;
		grid-row: 2;
		align-self: end;
	}

	.p-teyll-page-header__shape {
		grid-column: 1;
		grid-row: 3;
		align-self: start;
		width: 80px;
		height: 8px;
		border-radius: 4px;
	}

	.p-teyll-page-header__mark {
		grid-column: 2;
		grid-row: 2 / 4;
		width: 84px;
	}

	.p-teyll-page-header__lead {
		grid-column: 1 / -1;
		grid-row: 4;
	}
}

/* ==========================================================================
   手順の表示（入力 → 確認 → 完了。色だけで区別しない：番号・チェック・「済み」）
   ========================================================================== */
.p-teyll-contact-steps {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p-teyll-contact-steps__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-xs);
	width: 36px;
}

.p-teyll-contact-steps__item + .p-teyll-contact-steps__item {
	margin-left: 96px;
}

/* 段階の間の線（終わった段階から先の線はインディゴ） */
.p-teyll-contact-steps__item + .p-teyll-contact-steps__item::before {
	position: absolute;
	top: 17px;
	right: 100%;
	width: 96px;
	height: 2px;
	content: "";
	background: var(--teyll-text-secondary);
}

.p-teyll-contact-steps__item.is-done + .p-teyll-contact-steps__item::before {
	background: var(--teyll-action-cta);
}

.p-teyll-contact-steps__num {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	font: var(--text-teyll-en-label);
	letter-spacing: var(--ls-teyll-en-label);
	color: var(--teyll-text-secondary);
	background: var(--teyll-bg-canvas);
	border: 1.5px solid var(--teyll-border-default);
	border-radius: 50%;
}

.p-teyll-contact-steps__item.is-current .p-teyll-contact-steps__num {
	color: var(--teyll-text-on-dark);
	background: var(--teyll-action-cta);
	border-color: var(--teyll-action-cta);
}

.p-teyll-contact-steps__item.is-done .p-teyll-contact-steps__num {
	color: var(--teyll-action-cta);
	border-color: var(--teyll-action-cta);
}

.p-teyll-contact-steps__check {
	width: 20px;
	height: 20px;
}

.p-teyll-contact-steps__label {
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
	color: var(--teyll-text-secondary);
	white-space: nowrap;
}

.p-teyll-contact-steps__item.is-current .p-teyll-contact-steps__label {
	color: var(--teyll-text-primary);
}

/* ==========================================================================
   入力・確認（左にフォーム、右に電話の案内。SP は縦に積む）
   ========================================================================== */
.p-teyll-contact {
	padding: var(--space-4xl) 0 var(--teyll-section-py);
	background: var(--teyll-bg-subtle);
}

.p-teyll-contact__inner {
	display: flex;
	flex-direction: column;
	gap: var(--space-3xl);
}

.p-teyll-contact__columns {
	display: flex;
	align-items: flex-start;
	gap: var(--space-2xl);
}

.p-teyll-contact__form,
.p-teyll-confirm {
	flex: 1;
	min-width: 0;
	padding: var(--space-3xl);
	background: var(--teyll-bg-canvas);
	border-radius: var(--radius-lg);
}

.p-teyll-contact__note {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

/* ボタン（入力内容を確認する／入力画面に戻る・送信する） */
.p-teyll-contact__buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-md);
	padding-top: var(--space-md);
}

.p-teyll-contact__buttons .p-teyll-button {
	--teyll-button-line: var(--teyll-action-cta);
	color: var(--teyll-text-on-dark);
	background: var(--teyll-action-cta);
}

.p-teyll-contact__buttons .p-teyll-button:hover {
	--teyll-button-line: var(--teyll-action-cta-hover);
	background: var(--teyll-action-cta-hover);
}

.p-teyll-contact__buttons .p-teyll-button:disabled {
	cursor: wait;
	opacity: 0.6;
}

.p-teyll-contact__buttons .p-teyll-button::after,
.p-teyll-contact__buttons .p-teyll-button--back::before {
	width: 18px;
	height: 18px;
	content: "";
	background: currentColor;
	-webkit-mask: url("../../img/teyll/icons/arrow-right.svg") center / contain no-repeat;
	mask: url("../../img/teyll/icons/arrow-right.svg") center / contain no-repeat;
}

.p-teyll-contact__buttons .p-teyll-button--back {
	--teyll-button-line: var(--teyll-text-primary);
	padding: 18px 28px 18px 24px; /* Figma の余白（矢印が左） */
	color: var(--teyll-text-primary);
	background: var(--teyll-bg-canvas);
}

.p-teyll-contact__buttons .p-teyll-button--back:hover {
	--teyll-button-line: var(--teyll-text-primary);
	background: var(--teyll-bg-subtle);
}

.p-teyll-contact__buttons .p-teyll-button--back::after {
	display: none;
}

.p-teyll-contact__buttons .p-teyll-button--back::before {
	-webkit-mask-image: url("../../img/teyll/icons/arrow-left.svg");
	mask-image: url("../../img/teyll/icons/arrow-left.svg");
}

/* 確認：HTML は「送信する」が先（Tab の順・SP で上）。PC は逆に並べて「入力画面に戻る」を左に */
.p-teyll-contact__buttons--confirm {
	flex-direction: row-reverse;
	padding-top: var(--space-xs);
}

/* 右の電話の案内 */
.p-teyll-contact__aside {
	flex: 0 0 384px;
}

.p-teyll-contact__tel {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: var(--space-xl);
	background: var(--teyll-bg-canvas);
	border-radius: var(--radius-lg);
}

.p-teyll-contact__tel-title {
	font: var(--text-teyll-h3);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-contact__tel-number {
	display: inline-flex;
	align-items: center;
	gap: var(--space-xs);
	width: fit-content;
	padding-block: 8px; /* 押せる範囲（文字の行は PC 35・SP 29）。見た目の位置は margin で戻す */
	margin-block: -8px;
	font: 700 32px/1.1 var(--font-teyll-en); /* Figma の電話番号（Sora Bold 32px。SP は 26px） */
	letter-spacing: var(--ls-teyll-en-h1);
	color: var(--teyll-text-primary);
	text-decoration: none;
	white-space: nowrap;
}

.p-teyll-contact__tel-icon {
	width: 28px;
	height: 28px;
}

.p-teyll-contact__tel-hours,
.p-teyll-contact__tel-note {
	font: var(--text-teyll-body-s);
	letter-spacing: var(--ls-teyll);
	color: var(--teyll-text-secondary);
}

/* 確認（入力内容の表） */
.p-teyll-confirm__form {
	gap: var(--space-xl);
}

.p-teyll-confirm__row {
	display: flex;
	gap: var(--space-lg);
	padding: 18px 0;
	border-bottom: 1px solid var(--teyll-border-default);
}

.p-teyll-confirm__row:first-child {
	border-top: 1px solid var(--teyll-border-default);
}

.p-teyll-confirm__th {
	flex: 0 0 200px;
	padding-top: 5px;
	font: var(--text-teyll-label);
	letter-spacing: var(--ls-teyll-label);
}

.p-teyll-confirm__td {
	flex: 1;
	min-width: 0;
	margin: 0;
}

@media (max-width: 1023px) {
	.p-teyll-contact__columns {
		flex-direction: column;
		align-items: stretch;
	}

	.p-teyll-contact__aside {
		flex: none;
	}
}

@media (max-width: 767px) {
	.p-teyll-contact {
		padding: 32px 0 var(--teyll-section-py);
	}

	.p-teyll-contact__inner,
	.p-teyll-contact__columns {
		gap: var(--space-xl);
	}

	.p-teyll-contact__form,
	.p-teyll-confirm {
		padding: var(--space-xl) var(--space-md) 28px;
	}

	.p-teyll-contact__buttons {
		flex-direction: column;
		gap: var(--space-sm);
	}

	/* 確認：「送信する」が上、「入力画面に戻る」が下（HTML の順のまま） */
	.p-teyll-contact__buttons--confirm {
		flex-direction: column;
	}

	.p-teyll-contact__tel {
		gap: 10px;
		padding: var(--space-xl) 20px;
	}

	.p-teyll-contact__tel-number {
		font-size: 26px;
	}

	.p-teyll-confirm__row {
		flex-direction: column;
		gap: 4px;
		padding: 14px 0 15px; /* Figma の行の高さ 83 */
	}

	.p-teyll-confirm__th {
		flex: none;
		padding-top: 0;
	}
}

/* ==========================================================================
   完了（メッセージは中央）
   ========================================================================== */
.p-teyll-done {
	padding: var(--space-4xl) 0 var(--space-7xl);
	background: var(--teyll-bg-subtle);
}

.p-teyll-done__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-lg);
	text-align: center;
}

.p-teyll-done__inner > .p-teyll-contact-steps {
	margin-bottom: var(--space-xl);
}

.p-teyll-done__title {
	font: var(--text-teyll-h2);
	letter-spacing: var(--ls-teyll);
}

.p-teyll-done__text {
	color: var(--teyll-text-secondary);
}

/* HTML は「TEYLLのトップへ」が先（Tab の順・SP で上）。PC は逆に並べて「サービスを見る」を左に */
.p-teyll-done__buttons {
	display: flex;
	flex-direction: row-reverse;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-md);
	padding-top: var(--space-md);
}

@media (max-width: 767px) {
	.p-teyll-done {
		padding: 32px 0 var(--teyll-section-py);
	}

	/* Figma 242:3880：手順 → 見出し 48・見出し → 本文 16・本文 → ボタン 32 */
	.p-teyll-done__inner {
		gap: var(--space-md);
	}

	.p-teyll-done__inner > .p-teyll-contact-steps {
		margin-bottom: 32px;
	}

	/* 「TEYLLのトップへ」が上、「サービスを見る」が下（HTML の順のまま） */
	.p-teyll-done__buttons {
		flex-direction: column;
		align-self: stretch;
		gap: var(--space-sm);
		padding-top: var(--space-md);
	}
}
