:root {
	scroll-behavior: smooth;
}

.wp-block-button.is-style-target-button .wp-element-button {
	display: inline-flex;
	gap: var(--wp--preset--spacing--10);
	align-items: center;
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--24);
	border: 1px solid currentColor;
	border-radius: 5px;
	background-color: var(--wp--preset--color--custom-white);
	color: var(--wp--preset--color--custom-black);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: left;
	transition: background-color 0.3s;

	&::after {
		content: "";
		flex-shrink: 0;
		width: 24px;
		aspect-ratio: 1;
		background: url(../images/icon-target.png) no-repeat center / contain;
	}

	&:hover {
		background-color: var(--wp--preset--color--custom-secondary);
	}
}

.is-style-speech-text {
	min-width: 165px;
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--20);
	border-radius: calc(infinity * 1px);
	background-color: var(--wp--preset--color--custom-primary);
	color: var(--wp--preset--color--custom-white);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: 0.05em;
	text-align: center;
	position: relative;

	&::after {
		content: "";
		position: absolute;
		top: 100%;
		left: 50%;
		translate: -50% 0;
		width: 23px;
		height: 9px;
		clip-path: polygon(0 0, 50% 100%, 100% 0);
		background: var(--wp--preset--color--custom-primary);
	}
}

.wp-block-list.is-style-orange-list {
	list-style: none;
	margin-left: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--semi-medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.05em;

	li {
		position: relative;
		padding-left: 12px;

		&::before {
			content: "";
			width: 8px;
			aspect-ratio: 1;
			border-radius: calc(infinity * 1px);
			position: absolute;
			top: calc((1lh - 1em) / 2 + 4px);
			left: 0;
			background: var(--wp--preset--color--custom-primary);
		}
		
		&:nth-child(n +  2) {
			margin-top: var(--wp--preset--spacing--4);
		}
	}
}

.wp-block-list:is(ol) {
	list-style: none;
	margin-left: 0;
	padding-left: 0;
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--semi-medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.05em;
	counter-reset: number calc(attr(start type(<number>)) - 1);

	> li {
		padding-left: 34px;
		counter-increment: number;
		position: relative;
		font-size: var(--wp--preset--font-size--semi-medium);

		&::before {
			content: "("counter(number)")";
			position: absolute;
			top: 0;
			left: 0;
		}

		&:nth-child(n +  2) {
			margin-top: var(--wp--preset--spacing--10);
		}

		ul {
			/* margin-top: var(--wp--preset--spacing--10); */
		}

		ol {
			list-style: decimal;
			/* margin-top: var(--wp--preset--spacing--10); */
			padding-left: 20px;
			counter-reset: none;

			li {
				padding-left: 0;
				counter-increment: none;
				position: static;

				&::before {
					display: none;
				}

				&:nth-child(n + 2) {
					margin-top: 0;
				}
			}
		}
	}

	ul {
		list-style-type: disc;
	}
}

.wp-block-list:is(ul) {
	padding-left: 20px;

	ul {
		list-style-type: disc;
	}
}

.wp-block-buttons.is-style-page-links {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--preset--spacing--40);

	@media (width >= 600px) {
		flex-direction: row;
	}

	.wp-element-button {
		display: inline-flex;
		gap: var(--wp--preset--spacing--10);
		align-items: flex-end;
		margin: 0;
		padding: 0 0 var(--wp--preset--spacing--4);
		border-radius: 0;
		border-bottom: 1px solid var(--wp--preset--color--custom-gray);
		background: transparent;
		font-size: var(--wp--preset--font-size--semi-medium);
		transition: opacity 0.3s;

		&::after {
			content: "";
			width: 10px;
			height: 20px;
			background: url(../images/icon-arrow-bottom.svg) no-repeat center / contain;
		}

		&:hover {
			opacity: 0.6;
		}
	}
}

/* 会社情報カード */
.company-logo {

	img {
		width: auto;
		height: 40px;
	
		@media (width >= 600px) {
			width: auto;
			height: 80px;
		}
	}
}

/* フッター電話番号 */
.footer-tel__icon {
	img {
		display: block;
	}
}

.footer-tel__text {
	font-size: 36px !important;

	a {
		text-decoration: none;
	}
}

/* 下層ページのファーストビュー */
.page-fv {
}

.page-fv__ribbon {
	text-align: center;

	@media (width >= 600px) {
		text-align: left;
	}
}

.page-fv__head {
	margin-top: 16px !important;

	@media (width >= 600px) {
		margin-top: 0 !important;
	}
}

.page-fv__head-sub:empty {
	padding: 0;
	border: none;
}

.page-fv__image {
	width: 100%;
	display: flex;
	justify-content: center;
	margin-top: 16px !important;
	overflow: hidden;

	.wp-block-post-featured-image {
		float: none !important;
		margin: 0 !important;
	}

	&:has(.wp-block-post-featured-image) {
		@media (width >= 600px) {
			margin-top: -44px !important;
			justify-content: flex-end;
		}
	}
}

/* パンくずリスト */
.breadcrumbs {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--10);
	color: var(--wp--preset--color--custom-gray);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--small);

	a {
		color: inherit;

		&:hover {
			color: var(--wp--preset--color--custom-primary);
		}
	}
}

/* アコーディオン */
.wp-block-details.is-style-accordion {
	position: relative;
	interpolate-size: allow-keywords;

	summary {
		display: block;
		padding-block: var(--wp--preset--spacing--10);
		padding-inline: var(--wp--preset--spacing--24) var(--wp--preset--spacing--60);
		background: var(--wp--preset--color--custom-secondary);
		text-align: center;
		font-family: var(--wp--preset--font-family--noto-sans-jp);
		font-size: var(--wp--preset--font-size--semi-large);
		font-weight: 600;
		position: relative;

		&::-webkit-details-marker {
			display: none;
		}

		&::before,
		&::after {
			content: "";
			position: absolute;
			top: 50%;
			right: 24px;
			translate: 0 -50%;
			border-radius: calc(infinity * 1px);
			width: 16px;
			height: 2px;
			background: var(--wp--preset--color--custom-black);
			transform-origin: center center;
			transition: rotate 0.3s;
		}
	
		&::after {
			rotate: 90deg;
		}
	}

	&::details-content {
		height: 0;
		transition: height 0.6s, content-visibility 0.6s allow-discrete;
		overflow: clip;
  }

	&[open] {
		&::details-content {
			height: auto;
		}

		summary::after {
			rotate: 180deg;
		}
	}
}

/* ユーティリティ */
/* 最後の文章が意味のある文になるように改行位置を調整 */
.is-pretty {
	text-wrap: pretty;
}

/* 意味のある文字の塊で改行 */
.is-auto-phrase {
	word-break: auto-phrase;
}

/* 全体の文字数のバランスで改行位置を調整 */
.is-balance {
	text-wrap: balance;
}

/* マーカー線 */
.is-marker {
	text-decoration: underline;
	text-underline-offset: -0.2em;
	text-decoration-thickness: 0.4em;
	text-decoration-color: rgba(252, 208, 5, 0.7);
	text-decoration-skip-ink: none;
}

.wp-block-columns {
	&.is-column-reverse-sp {
		@media (max-width: 781px) {
			flex-direction: column-reverse;
		}
	}
}

.is-overflow-scroll {
	overflow: auto;

	.wp-block-image img {
		max-width: initial;
	}
}

/* 拡張 */
.has-text-align-center {
	word-break: auto-phrase;
	text-wrap: balance;
}

/* 外部リンク */
.wp-block-post-content a[target="_blank"]:where(:not(.wp-element-button):not(.is-no-icon):not(:has(img))) {

	&::after {
		content: "";
		display: inline-block;
		width: 24px;
		height: 24px;
		margin-left: 4px;
		background: url(../images/icon-target.png) no-repeat center / contain;
		vertical-align: bottom;
	}
}

/* PDFファイルのリンク */
.wp-block-post-content a[href$=".pdf"]:where(:not(.wp-element-button)) {

	&::after {
		content: "";
		display: inline-block;
		width: 16px;
		height: 16px;
		margin-left: 2px;
		background: url(../images/icon-pdf.png) no-repeat center / contain;
		vertical-align: bottom;
	}
}

/* フォームボタン */
.smf-action,
.smf-form--simple-table + .smf-action {
	margin-top: var(--wp--preset--spacing--16);
	margin-bottom: 0;
	text-align: center;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--40);
}

.smf-action .smf-button-control__control {
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--24);
	border-radius: 5px;
	background: var(--wp--preset--color--custom-secondary);
	border: none;
	color: var(--wp--preset--color--custom-black);
	font-family: var(--wp--preset--font-family--noto-serif-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	letter-spacing: 0.08em;

	&:hover {
		background-color: var(--wp--preset--color--custom-primary);
	}

	&[data-action="back"] {
		background: var(--wp--preset--color--custom-white);
		border: 1px solid var(--wp--preset--color--custom-black);
	}
}

.smf-action .smf-button-control {
	display: inline-grid;
	min-width: 240px;
}

.smf-action .smf-button-control + .smf-button-control {
	margin-left: 0;
}

/* フォーム */
.snow-monkey-form {
	::placeholder {
		color: rgba(35, 24, 21, 0.30);
	}
}

.snow-monkey-form[data-screen="input"],
.snow-monkey-form[data-screen="back"],
.snow-monkey-form[data-screen="invalid"] {
	.is-hidden-input {
		display: none;
	}
}

.snow-monkey-form[data-screen="confirm"] {
	
	.is-hidden-confirm {
		display: none;
	}

	.smf-action {
		margin-top: var(--wp--preset--spacing--40);
	}
}

.smf-form {
}

.smf-form .smf-item {
	padding-block: var(--wp--preset--spacing--24);
	border-top: 1px solid var(--wp--preset--color--custom-gray);
}

.smf-form--simple-table .smf-item {
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 640px) {
	.smf-form--simple-table .smf-item__col--label {
		flex-basis: 250px;
		max-width: initial;
		padding-top: var(--wp--preset--spacing--10);
		padding-right: 0;
	}
}

/* 確認画面テキスト */
.smf-placeholder:not(:has(.smf-text-control,.smf-textarea-control)) {
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--16);
	color: var(--wp--preset--color--custom-black);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 170%;
	letter-spacing: 0.08em;
}

/* テキスt（1行） */
.smf-form .smf-text-control__control {
	width: 100%;
	padding: var(--wp--preset--spacing--12) var(--wp--preset--spacing--16);
	border: none;
	border-radius: 4px;
	background: var(--wp--preset--color--custom-white);
	box-shadow: 0 0 4px 0 rgba(35, 24, 21, 0.50) inset;
	color: var(--wp--preset--color--custom-black);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.08em;
}

/* テキストエリア */
.smf-form .smf-textarea-control__control {
	width: 100%;
	height: 136px;
	field-sizing: content;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--16);
	border: none;
	border-radius: 4px;
	background: var(--wp--preset--color--custom-white);
	box-shadow: 0 0 4px 0 rgba(35, 24, 21, 0.50) inset;
	color: var(--wp--preset--color--custom-black);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.08em;
}

/* セレクトボックス */
.smf-form .smf-select-control {
	display: block;
}

.smf-form .smf-select-control__control {
	display: block;
	width: 100%;
	padding: var(--wp--preset--spacing--10) var(--wp--preset--spacing--16);
	border: none;
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.08em;
}

/* ラジオボタン */
.smf-radio-buttons-control__control {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--24);

	@media (min-width: 768px) {
		flex-direction: row;
		align-items: center;
	}
}

.smf-item__label__text {
	color: var(--wp--preset--color--custom-black);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--semi-large);
	font-weight: 600;
	line-height: 1.7;
	letter-spacing: 0.02em;
}

.smf-item .smf-item__label {
	display: flex;
	gap: var(--wp--preset--spacing--12);

	&::after {
		content: "任意";
		padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--10);
		background: var(--wp--preset--color--custom-white);
		border: 1.5px solid var(--wp--preset--color--custom-gray);
		color: var(--wp--preset--color--custom-gray);
		font-family: var(--wp--preset--font-family--noto-sans-jp);
		font-size: var(--wp--preset--font-size--small);
		font-weight: 600;
		line-height: 1.7;
		letter-spacing: 0.065em;
	}

	@media (min-width: 640px) {
		justify-content: space-between;
	}
}

.smf-item:has([data-validations*="required"]) .smf-item__label {

	&::after {
		content: "必須";
		border-color: var(--wp--preset--color--custom-red);
		color: var(--wp--preset--color--custom-red);
	}
}

.smf-error-messages {
	color: var(--wp--preset--color--custom-red);
	margin-top: var(--wp--preset--spacing--4);
	font-family: var(--wp--preset--font-family--noto-sans-jp);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: 0.07em;
}
