/* =============================================================
   リフレ採用サイト — 採用職種モーダル（横スライド型）
   施工管理職＝オレンジ／法人営業職＝ネイビー
   ============================================================= */

:root {
	--refre-modal-accent: #e87e0d;
	--refre-modal-text: #333;
	--refre-modal-sub: #666;
}

/* ===== オーバーレイ（中央配置） ===== */
.refre-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
}

.refre-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

/* モーダル表示中は背面スクロールを固定 */
body.refre-modal-open {
	overflow: hidden;
}

.refre-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 32, .62);
}

/* ===== ダイアログ（縦：ヘッダー / スライド / ナビ） ===== */
.refre-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 720px;
	/* ダイアログに確定高さを与える（max-height だけだとスライドの height:100% が
	   内容高さに解決され、スライドがスクロールコンテナにならず見切れるため） */
	height: 88vh;
	height: min(88dvh, 680px);
	max-height: 88vh;
	max-height: 88dvh;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
	animation: refre-modal-in .25s ease;
}

@keyframes refre-modal-in {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ===== 閉じるボタン（正円） ===== */
.refre-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	/* テーマ側の button グローバルスタイル（min-width 等）に引き伸ばされて
	   楕円になるのを防ぐため、サイズを !important で固定し正円にする */
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	max-width: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-sizing: border-box;
	aspect-ratio: 1 / 1;
	background: rgba(255, 255, 255, .9);
	color: #333;
	box-shadow: none;
	cursor: pointer;
	transition: background .2s ease;
}

.refre-modal__close:hover {
	background: #fff;
}

.refre-modal__close svg {
	display: block;
}

/* ===== ヘッダー（全スライド共通） ===== */
.refre-modal__head {
	flex: 0 0 auto;
	padding: 24px 56px 18px 28px;
	background: var(--refre-modal-accent);
	color: #fff;
}

.refre-modal__jobtag {
	display: inline-block;
	margin-bottom: 10px;
	padding: 4px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .2);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
}

.refre-modal__catch {
	margin: 0;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
}

/* ===== スライド表示領域 ===== */
.refre-modal__viewport {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.refre-modal__track {
	display: flex;
	height: 100%;
	transition: transform .3s ease;
	will-change: transform;
}

.refre-modal-slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-y;
	padding: 22px 28px 26px;
	box-sizing: border-box;
}

.refre-modal-slide .refre-modal-sec {
	padding: 0;
	border: 0;
}

/* ===== ナビゲーション（前へ／カウンター／次へ） ===== */
.refre-modal__nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.refre-modal__navbtn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 42px;
	padding: 0 18px;
	border: 1px solid var(--refre-modal-accent);
	border-radius: 999px;
	background: #fff;
	color: var(--refre-modal-accent);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .2s ease, background .2s ease, filter .2s ease;
}

.refre-modal__navbtn--next {
	background: var(--refre-modal-accent);
	color: #fff;
}

.refre-modal__navbtn--next:hover {
	filter: brightness(1.07);
}

.refre-modal__navbtn--prev:hover {
	background: #f7f7f7;
}

.refre-modal__navbtn svg {
	display: block;
}

.refre-modal__navbtn:disabled {
	opacity: .35;
	cursor: default;
	filter: none;
}

.refre-modal__counter {
	font-size: 13px;
	font-weight: 700;
	color: #999;
	white-space: nowrap;
}

/* ===== 各セクションの中身 ===== */
.refre-modal-sec__title {
	margin: 0 0 12px;
	padding-left: 12px;
	border-left: 4px solid var(--refre-modal-accent);
	color: var(--refre-modal-text);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
}

.refre-modal-sec__title--center {
	margin-top: 24px;
	padding-left: 0;
	border-left: 0;
	text-align: center;
	font-size: 18px;
}

.refre-modal-sec__lead {
	margin: 0 0 12px;
	color: var(--refre-modal-accent);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.7;
}

.refre-modal-sec__text {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.85;
}

.refre-modal-sec__text:last-child {
	margin-bottom: 0;
}

.refre-modal-sec__note {
	margin: 12px 0 0;
	padding: 14px 16px;
	border-radius: 8px;
	background: #faf6f0;
	color: var(--refre-modal-sub);
	font-size: 13.5px;
	line-height: 1.8;
}

.refre-modal-sec__marktitle {
	margin: 0 0 12px;
	color: var(--refre-modal-accent);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
}

.refre-modal-sec__subhead {
	margin: 18px 0 8px;
	font-size: 15px;
	font-weight: 700;
	color: var(--refre-modal-text);
}

/* ===== 給与ブロック（モーダル3） ===== */
.refre-modal-salary {
	margin: 14px 0 0;
}

.refre-modal-salary__row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
	color: var(--refre-modal-text);
}

.refre-modal-salary__row:last-child {
	margin-bottom: 0;
}

.refre-modal-salary__label {
	flex: 0 0 auto;
	min-width: 64px;
	padding: 3px 10px;
	border-radius: 6px;
	background: var(--refre-modal-accent);
	color: #fff;
	font-size: 13px;
	text-align: center;
}

.refre-modal-income {
	margin: 14px 0 0;
	padding: 14px 16px;
	border: 1px solid #eee;
	border-radius: 8px;
}

.refre-modal-income__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--refre-modal-accent);
}

.refre-modal-income p {
	margin: 2px 0;
	font-size: 15px;
	line-height: 1.7;
}

.refre-modal-income p:not(.refre-modal-income__title) {
	font-weight: 700;
}

/* ===== 枠線ラベル（枠線・白抜き背景） ===== */
.refre-modal-label {
	display: inline-block;
	margin-bottom: 14px;
	padding: 6px 18px;
	border: 2px solid var(--refre-modal-accent);
	border-radius: 6px;
	background: #fff;
	color: var(--refre-modal-accent);
	font-size: 16px;
	font-weight: 700;
}

/* ===== リスト ===== */
.refre-modal-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.refre-modal-list li {
	position: relative;
	padding: 5px 0 5px 22px;
	font-size: 15px;
	line-height: 1.7;
}

/* ・ 用：アクセント色の丸 */
.refre-modal-list li::before {
	content: "";
	position: absolute;
	top: 13px;
	left: 4px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--refre-modal-accent);
}

/* ◆ 用 */
.refre-modal-list--diamond li::before {
	content: "◆";
	top: 5px;
	left: 0;
	width: auto;
	height: auto;
	border-radius: 0;
	background: none;
	color: var(--refre-modal-accent);
	font-size: 13px;
}

/* ◇ 用 */
.refre-modal-list--diamond-open li::before {
	content: "◇";
	top: 5px;
	left: 0;
	width: auto;
	height: auto;
	border-radius: 0;
	background: none;
	color: var(--refre-modal-accent);
	font-size: 14px;
}

/* ===== CTA ===== */
.refre-modal-sec--cta {
	text-align: center;
}

.refre-modal-cta {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 18px;
}

.refre-modal-cta__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 12px 20px;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	transition: filter .2s ease, background .2s ease, color .2s ease;
}

.refre-modal-cta__btn--primary {
	background: var(--refre-modal-accent);
	color: #fff;
}

.refre-modal-cta__btn--primary:hover {
	filter: brightness(1.07);
	color: #fff;
}

.refre-modal-cta__btn--outline {
	background: #fff;
	border: 2px solid var(--refre-modal-accent);
	color: var(--refre-modal-accent);
}

.refre-modal-cta__btn--outline:hover {
	background: #fff7ef;
	color: var(--refre-modal-accent);
}

/* ===== 仕事の流れ（番号付きステップ） ===== */
.refre-modal-flow {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: refre-flow;
}

.refre-modal-flow > li {
	position: relative;
	padding: 0 0 18px 44px;
	counter-increment: refre-flow;
}

.refre-modal-flow > li:last-child {
	padding-bottom: 0;
}

.refre-modal-flow > li::before {
	content: counter(refre-flow);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--refre-modal-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.refre-modal-flow > li::after {
	content: "";
	position: absolute;
	top: 32px;
	left: 14px;
	width: 2px;
	height: calc(100% - 34px);
	background: #e2e2e2;
}

.refre-modal-flow > li:last-child::after {
	display: none;
}

.refre-modal-flow__label {
	display: block;
	margin: 4px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--refre-modal-text);
}

.refre-modal-flow__desc {
	display: block;
	font-size: 14px;
	line-height: 1.8;
	color: var(--refre-modal-sub);
}

/* =========================================================
   法人営業職モーダル：アクセント色をネイビーに切り替え
   （オレンジに戻す場合はこのブロックを削除）
   ========================================================= */
.refre-modal--eigyo {
	--refre-modal-accent: #163b5c;
}

.refre-modal--eigyo .refre-modal-sec__note {
	background: #f1f4f8;
}

.refre-modal--eigyo .refre-modal-cta__btn--outline:hover {
	background: #eef3f9;
}

/* =========================================================
   SP（≤768px）：ボトムシート化＋セーフエリア対応で
   応募ボタンが切れないようにする
   ========================================================= */
@media screen and (max-width: 768px) {
	.refre-modal.is-open {
		padding: 0;
		align-items: flex-end;
	}

	.refre-modal__dialog {
		max-width: none;
		/* SPは確定高さ（ボトムシート）。スライド内が縦スクロールできるようにする */
		height: 92vh;
		height: 92dvh;
		max-height: 92dvh;
		border-radius: 14px 14px 0 0;
	}

	.refre-modal__head {
		padding: 20px 52px 16px 20px;
	}

	.refre-modal__catch {
		font-size: 17px;
	}

	.refre-modal-slide {
		padding: 18px 20px 22px;
	}

	.refre-modal__nav {
		padding: 10px 12px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom));
	}

	.refre-modal__navbtn {
		padding: 0 14px;
	}
}
