/*
 * 問い合わせフォームの見た目(N79・docs/28)。
 *
 * ★色は親テーマ/子テーマのパレットから引き、無ければ無難な既定に落とす。
 * localift-base の blog.css と同じ考え方で、子テーマが :root で
 * --g / --line / --ink などを定義していれば自動でその配色になる。
 *
 * ★「既定」は :where() で包んで詳細度を0にし、子テーマが上書きできるようにする。
 * ただし margin は包まない——コアの
 *   :root :where(.is-layout-flow) > *{margin-block-start:24px;margin-block-end:0}
 * が (0,1,0) で当たるため、包むと必ず負けて余白が消える(N92で本番で起きた)。
 */

.localift-contact,
.localift-contact-done,
.localift-contact-notice,
.localift-contact-error {
	margin: 1.5em 0;
}

:where(.localift-contact) {
	--lc-ct-line: var( --line, #d8d8d8 );
	--lc-ct-ink: var( --ink, #1e1e1e );
	--lc-ct-mut: var( --mut, #6b6b7b );
	--lc-ct-key: var( --g, #3a5a7a );
	--lc-ct-key-dark: var( --gd, #2b445d );
	--lc-ct-soft: var( --soft, #f6f6fa );

	max-width: 640px;
}

.localift-contact__row {
	margin: 0 0 1.2em;
}

:where(.localift-contact__row) {
	display: block;
}

:where(.localift-contact__row label) {
	display: block;
	margin-bottom: 0.4em;
	color: var( --lc-ct-ink );
	font-weight: 700;
}

:where(.localift-contact__req) {
	margin-left: 0.6em;
	padding: 0.1em 0.5em;
	border-radius: 2px;
	background: var( --lc-ct-key );
	color: #ffffff;
	font-size: 0.75em;
	font-weight: 700;
	vertical-align: 0.1em;
}

.localift-contact input[type="text"],
.localift-contact input[type="email"],
.localift-contact input[type="tel"],
.localift-contact select,
.localift-contact textarea {
	/* box-sizing は仕様。負けると入力欄が枠からはみ出す(N80と同じ) */
	box-sizing: border-box;
	width: 100%;
}

:where( .localift-contact input[type="text"],
	.localift-contact input[type="email"],
	.localift-contact input[type="tel"],
	.localift-contact select,
	.localift-contact textarea ) {
	padding: 0.7em 0.8em;
	border: 1px solid var( --lc-ct-line );
	border-radius: 4px;
	background: #ffffff;
	color: var( --lc-ct-ink );
	font: inherit;
	line-height: 1.6;
}

/* ★select も同じ見た目にする。欄が2つ増えたときに、ここだけ素のままだと
   「入力できる場所」の見分けがつかなくなる(N190) */
:where( .localift-contact select ) {
	appearance: none;
	background-image: linear-gradient( 45deg, transparent 50%, var( --lc-ct-ink ) 50% ),
		linear-gradient( 135deg, var( --lc-ct-ink ) 50%, transparent 50% );
	background-position: calc( 100% - 1.15em ) 1.25em, calc( 100% - 0.8em ) 1.25em;
	background-size: 0.35em 0.35em, 0.35em 0.35em;
	background-repeat: no-repeat;
	padding-right: 2.2em;
}

:where( .localift-contact input:focus, .localift-contact select:focus, .localift-contact textarea:focus ) {
	outline: 2px solid var( --lc-ct-key );
	outline-offset: 1px;
	border-color: var( --lc-ct-key );
}

/* ハニーポット(S-A)。人には見えず、読み上げにも入らない */
.localift-contact__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.localift-contact__purpose {
	margin: 0 0 1em;
}

:where(.localift-contact__purpose) {
	color: var( --lc-ct-mut );
	font-size: 0.875em;
	line-height: 1.8;
}

.localift-contact__send {
	margin: 0;
}

:where(.localift-contact__btn) {
	padding: 0.9em 2.4em;
	border: 0;
	border-radius: 6px;
	background: var( --lc-ct-key );
	color: #ffffff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

:where(.localift-contact__btn:hover) {
	background: var( --lc-ct-key-dark );
}

/* 完了・エラー・管理者向けの案内 */
:where(.localift-contact-done) {
	padding: 1.2em 1.4em;
	border: 1px solid var( --line, #d8d8d8 );
	border-left: 6px solid var( --g, #3a5a7a );
	border-radius: 4px;
	background: var( --soft, #f6f6fa );
}

:where(.localift-contact-done__t) {
	margin-top: 0;
}

:where(.localift-contact-error) {
	padding: 1em 1.2em;
	border: 1px solid #c0392b;
	border-left: 6px solid #c0392b;
	border-radius: 4px;
	background: #fdf3f2;
	color: #8e2b20;
}

:where(.localift-contact-notice) {
	padding: 1em 1.2em;
	border: 1px dashed #b8860b;
	border-radius: 4px;
	background: #fffbe6;
	color: #6b5200;
}
