/* analysis-tabs.css - 탭 UI 스타일 (최적화 버전) */

/* 스와이프 애니메이션 */
@keyframes swipeArrowLeft {
	0%, 100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(-5px);
	}
}

@keyframes swipeArrowRight {
	0%, 100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(5px);
	}
}

/* 탭 컨테이너 기본 스타일 */
.ig-style-tab-container {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* 탭 네비게이션 */
.ig-tab-navigation {
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	margin-bottom: 20px;
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 614px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	min-height: 60px; /* 최소 높이 보장 */
}

.ig-tab-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	flex: 1;
	display: flex;
	justify-content: flex-start; /* 왼쪽 정렬로 변경 */
	width: 100%;
	max-width: 100%;
	padding: 0;
	box-sizing: border-box;
	scroll-behavior: smooth;
}

.ig-tab-scroll::-webkit-scrollbar {
	display: none;
}

.ig-tab-list {
	display: flex;
	padding: 0;
	margin: 0;
	min-width: fit-content;
	justify-content: flex-start; /* 왼쪽 정렬로 변경 */
	flex-shrink: 0;
	gap: 0;
	align-items: center;
}

/* 탭 버튼 */
.ig-tab {
	padding: 18px 16px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	color: #8e8e8e;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	position: relative;
	white-space: nowrap;
	flex-shrink: 0;
	min-width: 72px;
}

.ig-tab:hover {
	color: #262626;
}

.ig-tab.active {
	color: #262626;
}

.ig-tab.active::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: #262626;
}

.tab-icon {
	font-size: 40px;
}

.tab-label {
	font-size: 18px;
	font-weight: 700;
}

/* 탭 네비게이션 버튼 */
.tab-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	z-index: 10;
	transition: all 0.2s ease;
}

.tab-nav-btn:hover {
	background: #f8f9fa;
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tab-nav-prev {
	left: 8px;
}

.tab-nav-next {
	right: 8px;
}

/* 인디케이터 섹션 */
.tab-indicators-section {
	text-align: center;
	padding: 16px 0;
	margin: 0 auto;
	max-width: 614px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

/* 스와이프 힌트 */
.swipe-hint-text {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #8e8e8e;
	font-weight: 600;
	padding: 6px 16px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 20px;
	border: 1px solid #dbdbdb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.swipe-arrow {
	font-size: 14px;
	color: #dd2a7b;
	font-weight: bold;
}

.swipe-arrow.left {
	animation: swipeArrowLeft 1.5s ease-in-out infinite;
}

.swipe-arrow.right {
	animation: swipeArrowRight 1.5s ease-in-out infinite;
}

@keyframes swipeArrowLeft {
	0%, 100% { transform: translateX(0); opacity: 1; }
	50% { transform: translateX(-5px); opacity: 0.6; }
}

@keyframes swipeArrowRight {
	0%, 100% { transform: translateX(0); opacity: 1; }
	50% { transform: translateX(5px); opacity: 0.6; }
}

/* 탭 인디케이터 */
.tab-indicators {
	display: inline-flex;
	gap: 6px;
	align-items: center;
}

.tab-indicator {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #dbdbdb;
	transition: all 0.3s ease;
	cursor: pointer;
}

.tab-indicator.active {
	width: 24px;
	border-radius: 4px;
	background: linear-gradient(45deg, #f58529, #dd2a7b);
}

/* 콘텐츠 영역 */
.ig-content-area {
	min-height: 400px;
	transition: opacity 0.2s ease;
	touch-action: pan-y pinch-zoom;
	user-select: none;
	box-sizing: border-box;
	position: relative;
	width: 100%;
	max-width: 614px;
	margin: 0 auto;
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	padding: 30px;
	margin-bottom: 20px;
}

/* 탭 콘텐츠 패널 */
.tab-content-panel {
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.tab-content-panel.active {
	display: block;
	opacity: 1;
}

/* 콘텐츠 그리드 */
.ig-content-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

/* 카드 스타일 */
.ig-card {
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

.ig-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ig-card-header {
	padding: 18px 24px;
	border-bottom: 1px solid #efefef;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fafafa;
}

.header-icon {
	font-size: 26px;
}

.header-title {
	font-size: 16px;
	font-weight: 700;
	color: #262626;
}

.ig-card-body {
	padding: 24px;
	width: 100%;
	box-sizing: border-box;
}

/* 점수 스타일 */
.score-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	width: 100%;
}

.score-item {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.score-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.score-label {
	font-size: 14px;
	color: #8e8e8e;
	font-weight: 600;
}

.score-value {
	font-size: 28px;
	font-weight: 700;
	background: linear-gradient(45deg, #f58529, #dd2a7b);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.score-bar {
	height: 6px;
	background: #efefef;
	border-radius: 3px;
	overflow: hidden;
	width: 100%;
}

.score-fill {
	height: 100%;
	background: linear-gradient(90deg, #f58529, #dd2a7b);
	transition: width 0.8s ease;
}

/* 키워드 클라우드 컨테이너 */
.keyword-cloud-container {
	width: 100%;
	height: 350px;
	margin: 0 auto;
}

/* 분석 텍스트 */
.analysis-text {
	font-size: 15px;
	line-height: 1.8;
	color: #262626;
	text-align: center;
	padding: 12px;
	background: #fafafa;
	border-radius: 12px;
}

/* 나이 정보 */
.age-info {
	text-align: center;
}

.age-value {
	font-size: 36px;
	font-weight: bold;
	color: #8134af;
	margin-bottom: 8px;
}

.age-range {
	font-size: 16px;
	color: #262626;
	margin-bottom: 8px;
}

.mental-age {
	padding: 8px;
	background: #fafafa;
	border-radius: 8px;
}

.mental-label {
	font-size: 12px;
	color: #8e8e8e;
}

.mental-value {
	font-size: 18px;
	font-weight: 600;
	color: #17a2b8;
}

/* 주식 정보 */
.stock-info {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	width: 100%;
}

.stock-price {
	text-align: center;
	padding: 20px;
	background: linear-gradient(135deg, #f5f5f5, #fafafa);
	border-radius: 12px;
	border: 1px solid #efefef;
}

.price-label {
	display: block;
	font-size: 12px;
	color: #8e8e8e;
	margin-bottom: 8px;
}

.price-value {
	display: block;
	font-size: 36px;
	font-weight: 700;
	background: linear-gradient(45deg, #28a745, #20c997);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.stock-trend {
	text-align: center;
	padding: 8px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}

.stock-trend.up {
	background: #d4edda;
	color: #155724;
}

.stock-trend.down {
	background: #f8d7da;
	color: #721c24;
}

/* 투자 미터 */
.investment-meter {
	display: grid;
	gap: 8px;
}

.meter-label {
	font-size: 13px;
	color: #8e8e8e;
}

.meter-bar {
	height: 8px;
	background: #efefef;
	border-radius: 4px;
	overflow: hidden;
}

.meter-fill {
	height: 100%;
	background: linear-gradient(90deg, #28a745, #20c997);
	transition: width 0.8s ease;
}

.meter-value {
	font-size: 18px;
	font-weight: 600;
	color: #262626;
	text-align: right;
}

/* 생명 정보 (전생) */
.life-info {
	text-align: center;
	padding: 20px;
}

.life-job,
.next-job {
	font-size: 24px;
	font-weight: 700;
	color: #262626;
	margin-bottom: 12px;
}

.next-country {
	font-size: 20px;
	color: #8e8e8e;
	margin-bottom: 8px;
}

.life-desc {
	font-size: 14px;
	color: #8e8e8e;
	line-height: 1.6;
	margin-bottom: 16px;
}

.karma-info {
	padding: 12px;
	background: #fafafa;
	border-radius: 8px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.karma-label {
	font-size: 13px;
	color: #8e8e8e;
}

.karma-score {
	font-size: 20px;
	font-weight: 600;
	color: #262626;
}

/* 하단 네비게이션 */
.content-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 614px;
	margin: 20px auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.content-nav-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #262626;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.content-nav-btn:hover:not(:disabled) {
	background: #f8f9fa;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
	transform: translateY(-1px);
}

.content-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.nav-icon {
	font-size: 18px;
}

.nav-label {
	font-size: 14px;
}

.nav-spacer {
	flex: 1;
	max-width: 120px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
	.ig-tab-navigation,
	.ig-content-area,
	.content-navigation,
	.tab-indicators-section {
		max-width: 100%;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}
	
	/* 모바일에서 탭 스크롤 컨테이너 */
	.ig-tab-scroll {
		padding: 0;
		justify-content: flex-start;
	}
	
	.ig-tab-list {
		padding-left: 10px;
		padding-right: 10px;
	}
	
	.ig-tab {
		padding: 16px 14px;
		min-width: 68px;
	}

	.tab-icon {
		font-size: 32px;
	}

	.tab-label {
		font-size: 15px;
		font-weight: 700;
	}
	
	.ig-content-area {
		padding: 15px;
	}
	
	.tab-nav-btn {
		display: none;
	}
}
