/*
 * 旧サイトの CSS（legacy/）の後に読む「部品の違いの吸収」だけを書く。
 * 旧サイトの見た目そのものは legacy/（旧サイトの公開中の CSS を変換したもの）が正。
 * 旧 CSS と同じ強さ（html:root）で書く。
 */

/* ONEstar は html を「幅のコンテナ」にしている（全幅の部品のため）。旧サイトは普通の箱なので、旧サイトと同じにする */
html:root {
	container-type: normal;
	scrollbar-gutter: auto; /* 旧サイトはスクロールバーの場所を空けていない（ONEstar は stable） */
}

html:root .wp-site-blocks {
	display: block;
	min-height: 0;
}

/* 旧サイトの WordPress の全体設定（クラシックテーマ）：カラムの間は 2em */
html:root :where(.wp-block-columns.is-layout-flex) {
	gap: 2em;
}

/* 文字の大きさのプリセット（旧サイトの WordPress の全体設定の値。雪塩ミニのページの「大」） */
html:root .has-small-font-size {
	font-size: 13px !important;
}
html:root .has-medium-font-size {
	font-size: 20px !important;
}
html:root .has-large-font-size {
	font-size: 36px !important;
}
html:root .has-x-large-font-size {
	font-size: 42px !important;
}

/* 全幅（旧サイトのカバーの alignfull）：旧サイトはテーマに全幅の指定が無く、main いっぱいの普通の箱だった */
html:root .main .alignfull {
	width: auto;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* 主要製品・雪塩ミニの見出しの背景（旧サイトはこの 2 ページだけ Simple CSS で .bg_page_post の写真を替えていた。スマホでも同じ写真） */
html:root .page_heading.ys-bg-sea {
	background: url(../legacy/uploads/2022/08/bg_page_heading.jpg) no-repeat center top;
	background-size: cover;
}

/* 寄せた画像（旧サイトは古い形の画像のブロック div.wp-block-image > figure.alignright で、その余白）。
   新サイトは今の形（figure.wp-block-image.alignright）なので、旧サイトと同じ余白にする */
html:root .wp-block-image.alignright {
	float: right;
	margin: 0.5em 0 0.5em 1em;
}
html:root .wp-block-image.alignleft {
	float: left;
	margin: 0.5em 1em 0.5em 0;
}

/* 区切り線（旧サイトの投稿の <hr>）：区切り線のブロックは使えない（制作規約）ので、ブラウザの <hr> と同じ線のグループ */
html:root .ys-hr {
	display: block;
	overflow: hidden;
	height: 0;
	margin: 0.5em auto;
	border-style: inset;
	border-width: 1px;
	color: gray;
}

/* エディターでの、表示しないブロックの印 */
.ys-paradise-placeholder {
	padding: 16px;
	background-color: #f0f0f0;
	font-size: 14px;
}

/*
 * お問い合わせ（Snow Monkey Forms）。旧サイトの MW WP Form と同じ見た目にする。
 * ボタン：旧サイトの p.button_outline の中の input と同じ（master.css の .button_outline button の指定を、Snow Monkey Forms のボタンにも当てる）
 */
html:root .contact .smf-action {
	display: flex;
	flex-direction: column;
	text-align: center;
}
html:root .contact .smf-action .smf-button-control {
	display: block;
}
/* 確認の画面：旧サイトは「送信」の下に「戻る」（.contact .btn_previous。上の余白 40px） */
html:root .contact .smf-action .smf-button-control:has([data-action="back"]) {
	order: 2;
	margin-top: 40px;
}
html:root .contact .smf-action .smf-button-control__control {
	font-family: "Noto Serif JP", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", HGS明朝E, メイリオ, Meiryo, serif;
	cursor: pointer;
	position: relative;
	display: inline-block;
	border: solid 1px #000;
	border-radius: 0;
	line-height: 54px;
	font-size: 1.8rem;
	width: 100%;
	max-width: 420px;
	padding: 0;
	color: #000;
	background-color: transparent;
	background-image: none;
	transition: all 0.5s ease;
}
@media (max-width: 768px) {
	html:root .contact .smf-action .smf-button-control__control {
		font-size: 1.3rem;
		line-height: 45px;
	}
}
@media (min-width: 768px) {
	html:root .contact .smf-action .smf-button-control__control:hover {
		background-color: #000;
		color: #fff;
	}
}
/* 入力の画面：旧サイトは「入力内容の確認」の下に、確認の画面用の空の箱と「戻る」の箱（上の余白 40px）があった */
html:root .contact .snow-monkey-form[data-screen="input"] .smf-action {
	padding-bottom: 40px;
}
/* 内容のご入力：旧サイトは td の中に直に textarea があった（行の高さの分だけ下が空く） */
html:root .contact .smf-textarea-control {
	display: inline;
}
html:root .contact .smf-textarea-control .smf-textarea-control__control {
	display: inline-block;
	vertical-align: baseline;
}
/* 添付データ：旧サイトはブラウザの標準のファイルの欄（枠は .contact_table input の指定）。
   その後ろに MW WP Form の「×」（ファイルを選ぶまで見えない）が次の行にあった分、下が空く */
html:root .contact .smf-file-control,
html:root .contact .smf-file-control > label {
	display: block;
}
html:root .contact .smf-file-control > label::after {
	content: "";
	display: block;
	height: 37px;
}
html:root .contact .smf-file-control .smf-file-control__control {
	position: static;
	inset: auto;
	opacity: 1;
	width: 100%;
	height: 53px;
	padding: 10px 20px;
	border: solid 1px #000;
	box-sizing: border-box;
	font-size: 15px;
}
html:root .contact .smf-file-control .smf-file-control__label,
html:root .contact .smf-file-control .smf-file-control__filename {
	display: none;
}
/* 確認の画面では「再入力」の行と「必須」を出さない（旧サイトの .mw_wp_form_confirm と同じ） */
html:root .snow-monkey-form[data-screen="confirm"] .email_check,
html:root .snow-monkey-form[data-screen="confirm"] .required {
	display: none;
}
/* 入力の誤りの文（旧サイトの MW WP Form の .error と同じ赤い文字） */
html:root .contact .smf-error-messages {
	color: #b70000;
	font-size: 13px;
	display: block;
}
html:root .contact .smf-system-error-content-ready {
	color: #b70000;
	text-align: center;
	margin-bottom: 20px;
}

/*
 * 製品のスライダー（旧サイトは Smart Slider 3 Pro。assets/js/slider.js が動かす）。
 * 大きさは旧サイトの実測（カードは箱の幅で最大 940px・カードの間 60px。739px 以下は縦に並べる）。
 * 箱の外のカードも画面の端まで見える（外側のカバーの箱が画面の外を切る）。
 */
html:root .ys-slider {
	position: relative;
	clear: both; /* 旧サイトのスライダーの箱（n2_clear）と同じく、上の右寄せの写真の下から始める */
	padding: 19px 0 10px;
}
html:root .ys-slider:not(.is-ready) {
	display: flex;
	gap: 60px;
	overflow: hidden;
}
html:root .ys-slider__track {
	display: flex;
	gap: 60px;
	align-items: stretch;
	transition: transform 0.6s ease;
	will-change: transform;
}
html:root .ys-slide {
	position: relative;
	font-size: 16px; /* 旧サイトのスライダーの中の文字の大きさの元 */
	flex: 0 0 auto;
	width: min(940px, 100%);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	padding: 0 0 31px;
	background-color: #fff;
	box-shadow: 0 3px 6px #00000029;
}
/* 旧サイトのスライダーごとの高さ（PC） */
html:root .ys-slider--h405 .ys-slide {
	min-height: 405px;
}
html:root .ys-slider--h500 .ys-slide {
	min-height: 500px;
}
html:root .ys-slider--h540 .ys-slide {
	min-height: 540px;
}
html:root .ys-slider--h595 .ys-slide {
	min-height: 595px;
}
html:root .ys-slide > .Product-title {
	box-sizing: content-box;
	width: 100%; /* 旧サイトの追加 CSS の max-width: 800px（中身の幅）まで */
}
html:root .ys-slider h4.Product-title {
	color: #707070;
	font-size: 1.1em;
	font-weight: bold;
	max-width: none !important;
	margin: 0.33em 0 !important;
	padding: 0 0 0 1.5em !important;
	border-bottom: 0;
	line-height: 1.5;
}
html:root .ys-slider h4.Product-title:before {
	left: 10px;
}
html:root .ys-slide__body {
	display: flex;
	align-items: flex-start;
	padding: 29px 40px 0 68px;
}
html:root .ys-slide__img {
	flex: 0 0 198px;
	margin: 0;
}
html:root .ys-slide__img img {
	width: auto;
	height: 130px;
}
html:root .ys-slider .ys-slide__text {
	flex: 0 1 530px;
	max-height: 360px;
	overflow: auto;
	margin: 0;
	color: #666;
	font-size: 15px;
	line-height: 1.5;
}
html:root .ys-slide .p-btn {
	width: 170px;
	margin: 50px auto 0;
	text-align: center;
}
html:root .ys-slide .p-btn a {
	color: #fff;
	font-family: Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 24px;
	text-decoration: none;
}
/* 矢印（PC：カードの左右の端。739px 以下：カードの右下） */
html:root .ys-slider__arrow {
	position: absolute;
	top: calc(19px + var(--ys-slide-h, 595px) / 2 - 16px);
	margin: 0;
	z-index: 2;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent no-repeat center / 32px 32px;
	cursor: pointer;
	filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4));
}
html:root .ys-slider__arrow--prev {
	left: calc(var(--ys-slide-left, 30px) - 15px);
	background-image: url(../legacy/uploads/2022/08/l.png);
}
html:root .ys-slider__arrow--next {
	left: calc(var(--ys-slide-left, 30px) + var(--ys-slide-w, 940px) - 17px);
	background-image: url(../legacy/uploads/2022/08/l.png); /* 旧サイトも左向きの画像を左右反転して使っていた */
	transform: scaleX(-1);
}
html:root .ys-slide__nav {
	display: none;
}
@media (max-width: 739px) {
	html:root .ys-slider__arrow {
		display: none;
	}
	html:root .ys-slider .ys-slide {
		min-height: 0;
		padding-bottom: 81px;
	}
	html:root .ys-slide__body {
		flex-direction: column;
		align-items: stretch;
		padding: 18px 20px 0;
	}
	html:root .ys-slide__img {
		flex: none;
		text-align: center;
	}
	html:root .ys-slider .ys-slide__text {
		flex: none;
		max-height: 383px;
		margin-top: 40px;
	}
	html:root .ys-slide .p-btn {
		margin-top: 40px;
	}
	html:root .ys-slide__nav {
		position: absolute;
		right: 0;
		bottom: 0;
		display: flex;
	}
	html:root .ys-slide__nav button {
		width: 50px;
		height: 50px;
		padding: 0;
		border: 0;
		background: transparent no-repeat center / 50px 50px;
		cursor: pointer;
	}
	html:root .ys-slide__nav .ys-slider__prev {
		background-image: url(../legacy/uploads/2022/08/arrow-l-1.jpg);
	}
	html:root .ys-slide__nav .ys-slider__next {
		background-image: url(../legacy/uploads/2022/08/arrow-r-1.jpg);
	}
}
/* 480px 以下：説明の文の高さ（旧サイトの追加 CSS の .n2-ss-layer-row .Product-desc〜 と同じ） */
@media (max-width: 480px) {
	html:root .ys-slider .ys-slide__text {
		max-height: none;
		overflow: auto;
	}
	html:root .ys-slider .ys-slide__text.Product-desc,
	html:root .ys-slider .ys-slide__text.Product-desc2 {
		height: 280px;
		line-height: 1.4em;
	}
	html:root .ys-slider .ys-slide__text.Product-desc3 {
		height: 230px;
		line-height: 1.4em;
	}
}
