/**
 * ポップアップモーダル・フローティングバナー用スタイル
 *
 * @package jstork19
 */

/* ==========================================================================
   ポップアップモーダル
   ========================================================================== */

.popup-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

.popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

.popup-modal {
	background-color: white;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
	max-width: 700px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	transform: scale(0.9) translateY(20px);
	transition: all 0.3s ease;
}

.popup-overlay.active .popup-modal {
	transform: scale(1) translateY(0);
}

.popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-block: 0.5rem;
	padding-inline: 1rem;
	border-block-end: 1px solid #e0e0e0;
}

.popup-header h2 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #2c3e50;
	width: 100%;
	text-align: center;
	margin-block: 4px;
}

.popup-close {
	background: none;
	border: none;
	font-size: 40px;
	color: #7f8c8d;
	cursor: pointer;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	inset-inline-end: 8px;
}

.popup-image-container {
	position: relative;
	width: 100%;
}

.popup-image {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 0 0 12px 12px;
}

.popup_arrow_r {
	display: block;
	position: absolute;
	top: 78%;
	inset-inline: 0;
	margin-inline: auto;
	width: 100%;
	max-width: 248px;
	padding: 1rem;
	text-align: center;
	font-size: 1.3rem;
	font-weight: bold;
	color: #fff;
	text-decoration: none;
	border-radius: 8px;
	background: linear-gradient(180deg, #38CD76 0%, #3CB46E 100%);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup_arrow_r:hover {
	transform: translateY(-2px);
	background: linear-gradient(180deg, #40E082 0%, #42C474 100%);
	color: #FFF;
}

/* ==========================================================================
   スターくん用ポップアップモーダル
   ========================================================================== */

.popup-modal--starkun {
	position: relative;
	overflow: hidden;
}

.popup-modal--starkun .popup-close {
	top: 8px;
	inset-inline-end: 8px;
	z-index: 10;
	background-color: rgba(255, 255, 255, 0.8);
	border-radius: 50%;
}

.popup-starkun {
	position: relative;
}

/* ヘッダー */
.popup-starkun__header {
	padding-block: 40px 30px;
	text-align: center;
	background-image: url('../images/popup/bg-house.png');
	background-repeat: repeat-x;
	background-position: center bottom;
	background-size: contain;
}

.popup-starkun__title {
	font-size: clamp(18px, 10.57px + 1.98vw, 28px);
	font-weight: 700;
	color: #000;
	margin: 0;
	letter-spacing: 0.4px;
}

.popup-starkun__logo {
	display: block;
	margin-block-start: 8px;
}

.popup-starkun__logo-img {
	height: 24px;
	width: auto;
	display: block;
	margin-inline: auto;
}

/* 街並みイラスト */
.popup-starkun__cityscape {
	position: relative;
	height: 43px;
	overflow: hidden;
}

.popup-starkun__cityscape-img {
	width: 100%;
	height: auto;
	display: block;
}

/* ピンク帯 */
.popup-starkun__pink-band {
	background-color: #eb6ea5;
	padding-block: 28px;
	padding-inline: 10px;
}

.popup-starkun__catch {
	font-size: clamp(21px, 10.6px + 2.77vw, 35px);
	font-weight: 700;
	color: #fff;
	text-align: center;
	margin: 0;
	letter-spacing: 3px;
	line-height: 1;
}

/* CTAエリア */
.popup-starkun__cta-area {
	padding-block: 20px 30px;
	padding-inline: 20px;
	text-align: center;
}

.popup-starkun__sub-text {
	font-size: clamp(18px, 17.51px + 0.13vw, 20px);
	font-weight: 700;
	color: #073a1c;
	margin: 0 0 16px;
	letter-spacing: 0.4px;
}

.popup-starkun__cta-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 40px;
}

.popup-starkun__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding-block: 21px;
	padding-inline: 80px 90px;
	background: linear-gradient(180deg, #38cd76 0%, #3cb46e 100%);
	color: #fff;
	font-size: clamp(18px, 15.03px + 0.79vw, 22px);
	font-weight: 700;
	text-decoration: none;
	border-radius: 8px;
	letter-spacing: 2px;
	line-height: 1;
	transition: transform 0.2s, box-shadow 0.2s;
	overflow: hidden;
	position: relative;
}

.popup-starkun__btn::after {
	animation: btn-shine 2s 0s linear infinite;
	background: linear-gradient(to right, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 75%);
	content: '';
	height: 100%;
	left: -100%;
	position: absolute;
	top: 0;
	transform: skewX(-15deg);
	width: 100%;
}

@keyframes btn-shine {
	20% {
		left: 100%;
	}
	100% {
		left: 100%;
	}
}

.popup-starkun__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(56, 205, 118, 0.4);
	color: #fff;
}

.popup-starkun__btn-arrow {
	width: 24px;
	height: auto;
}

/* スターくんキャラクター */
.popup-starkun__character {
	flex-shrink: 0;
}

.popup-starkun__character-img {
	max-width: clamp(36px, 27.09px + 2.37vw, 48px);
	height: auto;
	display: block;
}

/* ==========================================================================
   フランチャイズ用ポップアップ
   ========================================================================== */

.popup-modal--franchise .popup-starkun__cta-area {
	padding-block: 30px 0;
	padding-inline: 20px;
}

.popup-modal--franchise .popup-starkun__cta-wrapper {
	gap: 0;
	margin-left: 88px;
}

.popup-modal--franchise .popup-starkun__character-img {
	max-width: 110px;
}

/* フランチャイズ用フローティングバナー */
.floating-banner--franchise .character-icon img {
	transform: scale(1.8) translateY(15%);
}

.floating-banner--franchise .speech-bubble:hover .character-icon img {
	transform: scale(2) translateY(15%);
}

/* スターくん SP */
@media (max-width: 600px) {
	.popup-starkun__pink-band {
		padding-block: 16px;
	}

	.popup-starkun__catch {
		letter-spacing: 1px;
	}

	.popup-starkun__cta-wrapper {
		flex-direction: column;
		gap: 12px;
	}

	.popup-starkun__btn {
		padding-block: 16px;
		padding-inline: 40px;
	}

	.popup-modal--franchise .popup-starkun__character-img {
		max-width: 80px;
	}

	.popup-modal--franchise .popup-starkun__cta-wrapper {
		margin-left: 0;
	}
}

/* ==========================================================================
   フローティングバナー・通知バナー
   ========================================================================== */

/* 通知バナー（黒） */
.notification-banner {
	display: none;
	position: fixed;
	z-index: 1001;
	background-color: #333;
	color: white;
	padding-block: 12px;
	padding-inline: 15px;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	line-height: 1.4;
	width: 100%;
	border-radius: 12px;
	box-sizing: border-box;
}

/* フローティングバナー（吹き出し） */
.floating-banner {
	position: fixed;
	z-index: 1000;
	background: transparent;
	width: 100%;
	box-sizing: border-box;
}

/* チェックアイコン */
.check-icon {
	background-color: #38CD76;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.check-icon::before {
	content: "\2713";
	color: white;
	font-size: 12px;
	font-weight: bold;
}

/* 閉じるボタン */
.close-button {
	background: none;
	border: none;
	color: white;
	font-size: 18px;
	cursor: pointer;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s;
	padding: 0;
	position: absolute;
	inset-inline-end: 8px;
}

/* 吹き出し */
.speech-bubble {
	background-color: #fdf2f8;
	padding: 15px;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	transition: box-shadow 0.2s;
	text-decoration: none;
	color: inherit;
}

.speech-bubble:hover {
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.speech-bubble img {
	transition: transform 0.4s ease;
}

.speech-bubble:hover img {
	transform: scale(1.1);
	opacity: 1;
}

/* キャラクターアイコン */
.character-icon {
	width: 40px;
	height: 40px;
	background-color: #eb6ea5;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
}

/* メッセージテキスト */
.message-text {
	flex: 1;
	color: #333;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
}

.message-title {
	font-size: 14px;
	margin-block-end: 2px;
}

.message-link {
	font-size: 16px;
	font-weight: 500;
	text-decoration: underline;
}

/* PC表示 */
@media (min-width: 768px) {
	.notification-banner {
		bottom: 160px;
		inset-inline-end: 10px;
		max-width: 320px;
	}

	.floating-banner {
		bottom: 80px;
		inset-inline-end: 10px;
		inset-inline-start: auto;
		animation: slideInFromRight 0.5s ease-out;
		max-width: 320px;
	}

	@keyframes slideInFromRight {
		from {
			transform: translateX(100%);
			opacity: 0;
		}
		to {
			transform: translateX(0);
			opacity: 1;
		}
	}
}

/* SP表示 */
@media (max-width: 767px) {
	.notification-banner {
		bottom: 87px;
		inset-inline-start: 4px;
		width: 90%;
		max-width: 300px;
		border-radius: 8px;
	}

	.floating-banner {
		bottom: 0;
		inset-inline: 0;
		animation: slideInFromBottomSP 0.5s ease-out;
		width: 100%;
		max-width: 300px;
		border-radius: 0;
	}

	.speech-bubble {
		border-radius: 0;
	}

	@keyframes slideInFromBottomSP {
		from {
			transform: translateY(100%);
			opacity: 0;
		}
		to {
			transform: translateY(0);
			opacity: 1;
		}
	}
}
