/**
 * HOWCONTENT 플로팅 혜택바 - 프론트엔드 스타일
 * 
 * 사이트 하단에 표시되는 플로팅 바의 스타일을 정의합니다.
 * 반응형 디자인을 지원하며, PC와 모바일에서 각각 최적화된 레이아웃을 제공합니다.
 * 
 * © 2025 HOWCONTENT. All rights reserved.
 */

/* 플로팅 바 래퍼 */
.howcontent-fob-wrapper {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 999999;
	pointer-events: none;
	padding: 0 20px 20px;
	max-width: 100%;
	box-sizing: border-box;
}

/* 플로팅 카드 */
.howcontent-fob-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	pointer-events: auto;
	max-width: 55%;
	margin: 0 auto;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 카드 위치별 정렬 */
.howcontent-fob-position-center {
	margin: 0 auto;
}

.howcontent-fob-position-left {
	margin: 0 auto 0 0;
}

.howcontent-fob-position-right {
	margin: 0 0 0 auto;
}

/* 카드 내용 영역 */
.howcontent-fob-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

/* 텍스트 영역 */
.howcontent-fob-text-area {
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
}

.howcontent-fob-main-text {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	margin-bottom: 5px;
}

.howcontent-fob-sub-text {
	font-size: 14px;
	line-height: 1.4;
	opacity: 0.9;
}

/* 버튼 영역 */
.howcontent-fob-button-area {
	flex-shrink: 0;
	box-sizing: border-box;
}

.howcontent-fob-button {
	display: inline-block;
	padding: 12px 30px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	transition: all 0.3s ease;
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.howcontent-fob-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	text-decoration: none;
}

.howcontent-fob-button:active {
	transform: translateY(0);
}

/* 말풍선 */
.howcontent-fob-button-area {
	position: relative;
}

.howcontent-fob-tooltip {
	position: absolute;
	top: -64px;
	right: 0;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 10;
	pointer-events: none;
}

.howcontent-fob-tooltip::after {
	content: '';
	position: absolute;
	bottom: -6px;
	right: 20px;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid var(--tooltip-bg-color, currentColor);
}

/* 날짜 스타일 (볼드) */
.howcontent-fob-tooltip .howcontent-fob-date {
	font-weight: bold;
}

/* 숫자 스타일 (카드 배경색, 볼드) */
.howcontent-fob-tooltip .howcontent-fob-number {
	font-weight: bold;
}

/* 닫기 버튼 */
.howcontent-fob-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: none;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	padding: 0;
	line-height: 1;
}

.howcontent-fob-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.howcontent-fob-close-icon {
	font-size: 24px;
	font-weight: 300;
	color: currentColor;
	line-height: 1;
}

/* 숨김 상태 */
.howcontent-fob-wrapper.hidden {
	display: none;
}

/* 반응형: 태블릿 이하 */
@media screen and (max-width: 768px) {
	.howcontent-fob-wrapper {
		padding: 0 15px 15px;
	}
	
	.howcontent-fob-card {
		padding: 10px 15px;
		max-width: 90%;
	}
	
	.howcontent-fob-content {
		gap: 10px;
	}
	
	.howcontent-fob-text-area {
		flex: 0 1 calc(70% - 5px);
		width: calc(70% - 5px);
		max-width: calc(70% - 5px);
		min-width: 0;
	}
	
	.howcontent-fob-button-area {
		flex: 0 1 calc(30% - 5px);
		width: calc(30% - 5px);
		max-width: calc(30% - 5px);
		min-width: 0;
	}
	
	.howcontent-fob-main-text {
		font-size: 16px;
	}
	
	.howcontent-fob-sub-text {
		font-size: 13px;
	}
	
	.howcontent-fob-button {
		padding: 12px 15px;
		font-size: 15px;
		width: 100%;
		box-sizing: border-box;
	}
	
	.howcontent-fob-tooltip {
		top: -45px;
		right: 0;
		font-size: 13px;
		padding: 6px 10px;
		min-width: 180px;
		white-space: normal;
	}
	
	.howcontent-fob-close {
		top: 8px;
		right: 8px;
		width: 28px;
		height: 28px;
	}
	
	.howcontent-fob-close-icon {
		font-size: 20px;
	}
}

/* 반응형: 작은 모바일 */
@media screen and (max-width: 480px) {
	.howcontent-fob-wrapper {
		padding: 0 10px 10px;
	}
	
	.howcontent-fob-card {
		padding: 10px 12px;
		border-radius: 10px;
		max-width: 95%;
	}
	
	.howcontent-fob-content {
		gap: 8px;
	}
	
	.howcontent-fob-text-area {
		flex: 0 1 calc(70% - 4px);
		width: calc(70% - 4px);
		max-width: calc(70% - 4px);
		min-width: 0;
	}
	
	.howcontent-fob-button-area {
		flex: 0 1 calc(30% - 4px);
		width: calc(30% - 4px);
		max-width: calc(30% - 4px);
		min-width: 0;
	}
	
	.howcontent-fob-main-text {
		font-size: 15px;
	}
	
	.howcontent-fob-sub-text {
		font-size: 12px;
	}
	
	.howcontent-fob-button {
		padding: 10px 12px;
		font-size: 14px;
		width: 100%;
		box-sizing: border-box;
	}
	
	.howcontent-fob-tooltip {
		top: -54px;
        right: 0;
        font-size: 13px;
        padding: 6px 10px;
        white-space: normal;
        min-width: 136px;
	}
}

/* 푸터와 겹치지 않도록 여백 조정 */
body.admin-bar .howcontent-fob-wrapper {
	bottom: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .howcontent-fob-wrapper {
		bottom: 46px;
	}
}

/* 애니메이션: 나타나기 */
@keyframes howcontent-fob-slide-up {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.howcontent-fob-wrapper {
	animation: howcontent-fob-slide-up 0.4s ease-out;
}

