/**
 * 公式LINEのポップアップ。
 *
 * ・スマホでも画面を覆いきらない大きさにする（周囲に背景が見える）
 * ・最初から画面に重ねて置くので、表示しても文字が動かない（CLSが起きない）
 */

.sl-line-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(0, 0, 0, 0.72);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.24s ease, visibility 0.24s ease;
}

.sl-line-popup[hidden] {
	display: none;
}

.sl-line-popup.is-open {
	opacity: 1;
	visibility: visible;
}

/* --- 本体 --- */

.sl-line-popup__dialog {
	position: relative;
	width: min(360px, 86vw);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	border-radius: 16px;
	background: #111;
	color: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
	transform: translateY(12px) scale(0.98);
	transition: transform 0.24s ease;
	-webkit-overflow-scrolling: touch;
}

.sl-line-popup.is-open .sl-line-popup__dialog {
	transform: none;
}

/* --- 画像 --- */

.sl-line-popup__visual {
	display: block;
	margin: 0;
	line-height: 0;
}

.sl-line-popup__visual img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px 16px 0 0;
}

/* 画像を入れるまでの仮のデザイン。 */
.sl-line-popup__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border-radius: 16px 16px 0 0;
	background: #06c755;
	color: #fff;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

/* --- 本文 --- */

.sl-line-popup__body {
	padding: 16px 18px 20px;
}

.sl-line-popup__title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.5;
}

.sl-line-popup__text {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.78);
}

.sl-line-popup__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	padding: 12px 18px;
	border-radius: 999px;
	background: #06c755;
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
	transition: filter 0.2s ease;
}

.sl-line-popup__cta:hover,
.sl-line-popup__cta:focus-visible {
	filter: brightness(1.08);
	color: #fff;
}

/* 割引の条件など、小さく添える注意書き。 */
.sl-line-popup__note {
	margin: 12px 0 0;
	font-size: 11px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.6);
}

.sl-line-popup__later {
	display: block;
	width: 100%;
	margin: 10px 0 0;
	padding: 8px;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, 0.55);
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}

/* --- 閉じるボタン --- */

.sl-line-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.62);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}

.sl-line-popup__close:hover,
.sl-line-popup__close:focus-visible {
	background: rgba(0, 0, 0, 0.85);
}

.sl-line-popup__dialog:focus {
	outline: none;
}

.sl-line-popup__close:focus-visible,
.sl-line-popup__cta:focus-visible,
.sl-line-popup__later:focus-visible {
	outline: 2px solid #ff6a00;
	outline-offset: 2px;
}

/* --- ポップアップが出ているあいだは、下の固定バナーを隠す --- */

body.sl-line-popup-open .sl-line-banner {
	display: none !important;
}

/* --- 動きを控えめにする設定のとき --- */

@media (prefers-reduced-motion: reduce) {
	.sl-line-popup,
	.sl-line-popup__dialog {
		transition: none;
	}

	.sl-line-popup__dialog {
		transform: none;
	}
}
