/* サジェストトレンド分析用スタイル */

.version-tag {
	background-color: #3498db;
	color: white;
	font-size: 0.8rem;
	padding: 3px 8px;
	border-radius: 10px;
	display: inline-block;
	margin-top: 5px;
}

.trend-option {
	margin-top: 12px;
	padding: 8px;
	background-color: #f5f8fa;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.trend-option label {
	cursor: pointer;
	display: flex;
	align-items: center;
	font-weight: 500;
	color: #2c3e50;
}

.trend-option input[type="checkbox"] {
	margin-right: 8px;
}

.trend-tooltip {
	font-size: 0.8rem;
	color: #7f8c8d;
	margin-left: 10px;
	font-style: italic;
}

.trend-container {
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 20px;
	margin: 20px 0;
	animation: fadeIn 0.5s ease-in-out;
}

.loading-trend {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px;
}

.trend-summary {
	margin-bottom: 20px;
}

.trend-summary h3 {
	color: #2c3e50;
	margin-bottom: 10px;
	border-bottom: 2px solid #f5f5f5;
	padding-bottom: 8px;
}

.trend-chart-container {
	margin: 20px 0;
	height: 400px;
	position: relative;
}

/* Google Trendsスタイル */
.google-trends-summary {
	background-color: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
	border-left: 4px solid #4285F4; /* Googleカラー */
}

.google-trends-summary h4 {
	color: #4285F4;
	margin-bottom: 15px;
	font-size: 1.2rem;
}

.google-trends-chart-container {
	margin: 20px 0;
	height: 300px;
	position: relative;
}

.trends-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 20px;
}

.trend-stat {
	display: flex;
	align-items: center;
	padding: 10px 15px;
	border-radius: 6px;
	font-weight: 500;
}

.trend-stat.positive {
	background-color: rgba(46, 204, 113, 0.1);
	color: #27ae60;
}

.trend-stat.negative {
	background-color: rgba(231, 76, 60, 0.1);
	color: #c0392b;
}

.trend-stat.neutral {
	background-color: rgba(52, 152, 219, 0.1);
	color: #2980b9;
}

.trend-label {
	margin-right: 8px;
	font-weight: normal;
}

.trend-value {
	font-weight: bold;
}

/* 関連クエリスタイル */
.related-queries-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.related-queries-section {
	background-color: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.related-queries-section h4 {
	color: #2c3e50;
	margin-bottom: 15px;
	font-size: 1.1rem;
	text-align: center;
}

.related-queries-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.related-query-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	background-color: #f8f9fa;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.related-query-item:hover {
	background-color: #e9f5ff;
	transform: translateY(-2px);
}

.related-query-text {
	font-weight: 500;
	color: #2c3e50;
}

.related-query-value {
	font-weight: bold;
	color: #7f8c8d;
	background-color: rgba(0, 0, 0, 0.05);
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.9rem;
}

.rising-item {
	border-left: 3px solid #e74c3c;
}

.breakout {
	color: #e74c3c;
	font-weight: bold;
}

.rising {
	color: #e67e22;
}

/* 内部データセクション */
.internal-trends-section {
	background-color: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
	border-left: 4px solid #3498db;
}

.internal-trends-section h4 {
	color: #3498db;
	margin-bottom: 15px;
	font-size: 1.2rem;
}

.trend-changes {
	margin: 30px 0;
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trend-changes h4 {
	color: #2c3e50;
	margin-bottom: 15px;
	font-size: 1.1rem;
}

.trend-changes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.trend-up, .trend-down, .trend-same {
	padding: 10px;
	border-radius: 6px;
}

.trend-up {
	background-color: rgba(46, 204, 113, 0.1);
	border-left: 4px solid #2ecc71;
}

.trend-down {
	background-color: rgba(231, 76, 60, 0.1);
	border-left: 4px solid #e74c3c;
}

.trend-same {
	background-color: rgba(52, 152, 219, 0.1);
	border-left: 4px solid #3498db;
}

.trend-list {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.trend-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.trend-list li:last-child {
	border-bottom: none;
}

.trend-text {
	flex-grow: 1;
	margin-right: 10px;
	font-weight: 500;
}

.trend-rank-change {
	font-weight: bold;
	display: flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 4px;
	white-space: nowrap;
}

.trend-rank-change.positive {
	color: #27ae60;
	background-color: rgba(46, 204, 113, 0.1);
}

.trend-rank-change.negative {
	color: #c0392b;
	background-color: rgba(231, 76, 60, 0.1);
}

.trend-rank-change.neutral {
	color: #3498db;
	background-color: rgba(52, 152, 219, 0.1);
}

.trend-rank-change small {
	font-size: 0.8rem;
	margin-left: 5px;
	opacity: 0.8;
}

.trend-additions-removals {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.trend-additions, .trend-removals {
	background-color: #fff;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.trend-additions h4, .trend-removals h4 {
	color: #2c3e50;
	margin-bottom: 10px;
	font-size: 1.1rem;
}

.trend-new-badge {
	background-color: #2ecc71;
	color: white;
	font-size: 0.7rem;
	padding: 2px 6px;
	border-radius: 3px;
	margin-right: 5px;
}

.trend-removed-badge {
	background-color: #e74c3c;
	color: white;
	font-size: 0.7rem;
	padding: 2px 6px;
	border-radius: 3px;
	margin-right: 5px;
}

.trend-error, .trend-notice {
	padding: 20px;
	background-color: #f8f9fa;
	border-radius: 8px;
	text-align: center;
}

.trend-error h3, .trend-notice h3 {
	color: #e74c3c;
	margin-bottom: 10px;
}

.trend-notice h3 {
	color: #3498db;
}

.trend-explanation {
	margin-top: 30px;
	font-size: 0.9rem;
	color: #7f8c8d;
	padding: 10px;
	background-color: #f8f9fa;
	border-radius: 4px;
	font-style: italic;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
	.trend-changes-grid, 
	.trend-additions-removals, 
	.related-queries-container {
			grid-template-columns: 1fr;
	}
	
	.trend-chart-container,
	.google-trends-chart-container {
			height: 300px;
	}
	
	.trend-option {
			flex-direction: column;
	}
	
	.trend-tooltip {
			margin-left: 0;
			margin-top: 5px;
	}
	
	.trends-stats {
			flex-direction: column;
			gap: 10px;
	}
}