@use "global/acms-common" as acms;
@use "global/common" as global;

/* ------------------------------
　　お問い合わせ
------------------------------ */
.contact-box {
	.message-group {
		margin: 0 0 35px;
	}

	.message-text {
		color: global.$primary-color;
		font-weight: bold;
	}

	.contact-no {
		margin: 0;
		color: #333;
		font-weight: bold;

		@include acms.font-size(30);

		a {
			color: inherit;
		}
	}

	.error-text {
		/* エラー文 */
		margin: 5px 0 0;
		color: global.$primary-color;
	}

	p {
		line-height: 1.6;
	}
}

.contact-form {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	background: #E5E5E5;
}

.contact-form-heading {
	margin: 40px 0 10px;
}

.contact-form-group {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	padding: 0;
	background: #E5E5E5;
	border-bottom: 1px solid #FFF;
}

.contact-form-group fieldset {
	/*! autoprefixer: ignore next */
	display: contents;
	border: 0;
}

.contact-form-label {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 10px 10px 0;
	font-weight: bold;
	text-align: left;
}

.contact-form-control {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 10px;
}

.contact-form-grid {
	margin: 0 -5px;
}

.contact-form-col,
.acms-entry .contact-form-col {
	margin: 0 0 10px;
	padding: 0 5px;

	&:last-child {
		margin: 0;
	}
}

@media screen and (min-width: acms.$breakpoint-md-min){
	.contact-form {
		width: 100%;
	}

	.contact-form-label {
		padding: 15px 15px 5px;
		vertical-align: top;
	}

	.contact-form-control {
		padding: 5px 15px 15px;
	}

	.contact-form-col {
		margin: 0;
	}
}


/* ステップ
------------------------------ */
.contact-box {
	.mail-step {
		margin: 0 0 25px;
		padding: 0 10px;
		background: global.$base-color;

		/* カウンターの設定 */
		counter-reset: mailStep;
	}

	.mail-step-item {
		float: left;
		margin: 0 5px;
		padding: 14px 0 10px;
		color: #999;
		font-weight: bold;
		list-style: none;
		border-bottom: 4px solid transparent;

		@include acms.font-size(14);

		 &::before {
			content: counter(mailStep)".";

			/* カウンターの設定 */
			counter-increment: mailStep;
		}
	}

	.mail-step-item-current {
		color: #333;
		border-bottom: 4px solid global.$secondary-color;
	}

	@media screen and (min-width: acms.$breakpoint-md-min){
		.mail-step-item {
			margin: 0 10px;
			padding: 18px 0 14px;

			@include acms.font-size(16);
		}
	}
}

/* 送信ボタン
------------------------------ */
.form-btn-box {
	margin: 0 10px 50px;
	text-align: center;
}

.form-btn {
	display: inline-block;
}

@media screen and (min-width: acms.$breakpoint-md-min){
	.form-btn-send {
		width: 100%;
		max-width: 360px;
	}
}


/* ラベル
------------------------------ */
.label-required {
	margin: 0 5px;
	padding: 2px 8px;
	color: #FFF;
	background: global.$primary-color;
	border-radius: 3px;

	@include acms.font-size(12);
}

@media screen and (min-width: acms.$breakpoint-md-min){
	.label-required {
		margin: 0 10px;
	}
}


/* フォーム要素
------------------------------ */
.contact-box {
	select {
		&[required]:required {
			border: 1px solid #C49511;
		}

		&.focused:invalid {
			border: 1px solid #c41134;
		}

		&[required]:valid {
			border: 1px solid #A7A7AA;
		}
	}

	input,
	textarea {
		&[required]:required {
			background: #FFFDEB;
		}

		&.focused:invalid {
			background: #FFEBEE;
		}

		&[required]:valid {
			background: #FFF;
		}
	}

	// 入力欄をスマホのサイズのままにする
	input[type="text"],
	input[type="password"],
	input[type="datetime"],
	input[type="datetime-local"],
	input[type="date"],
	input[type="month"],
	input[type="time"],
	input[type="week"],
	input[type="number"],
	input[type="email"],
	input[type="url"],
	input[type="search"],
	input[type="tel"]{
		box-sizing: border-box;
		min-height: 30px;
		padding: 0 5px;

		@include acms.font-size(16);
}

	textarea {
		@include acms.font-size(16);

		padding: 5px 5px 4px;
	}

	select {
		min-height: 30px;
		padding-top: 4px;
		padding-bottom: 4px;
		vertical-align: top;
		background-color: #f7f7f7;

		@include acms.font-size(16);
	}
}

@media screen and (min-width: acms.$breakpoint-md-min){
	.contact-box {
		input[type="text"],
		input[type="password"],
		input[type="datetime"],
		input[type="datetime-local"],
		input[type="date"],
		input[type="month"],
		input[type="time"],
		input[type="week"],
		input[type="number"],
		input[type="email"],
		input[type="url"],
		input[type="search"],
		input[type="tel"] {
			min-height: 40px;
			padding: 5px 8px;
		}

		textarea {
			padding: 5px 8px;
		}

		select {
			min-height: 40px;
			padding-left: 8px;
		}
	}
}


/* バリデーター
------------------------------ */
.valid-mark {
	display: none;
}

.valid-mark.valid {
	display: inline;
	float: right;
	color: #5cb85c;
}

.invalid {
	background-color: #ffebee !important;
}
