/**
 * グリべ似合わせカラーガイド - 専用スタイル
 */

/* タブバー */
.gbc-tab-bar {
	display: flex;
	gap: 8px;
	padding: 20px 20px 0;
	justify-content: center;
}

.gbc-tab-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: var(--color-bg);
	border: 2px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text-secondary);
	font-family: var(--font-display);
}

.gbc-tab-btn:hover {
	border-color: #6B8E6B;
	color: var(--color-text);
}

.gbc-tab-btn.active {
	background: #6B8E6B;
	border-color: #6B8E6B;
	color: #fff;
}

/* タブアイコン: カラードット */
.gbc-tab-btn-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.gbc-tab-btn.active .gbc-tab-btn-dot {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* タブコンテンツ */
.gbc-tab-content {
	padding: 20px;
}

.gbc-tab-pane {
	display: none;
}

.gbc-tab-pane.active {
	display: block;
}

/* カテゴリセクション */
.gbc-category-section {
	margin-bottom: 24px;
}

.gbc-category-section:last-child {
	margin-bottom: 0;
}

.gbc-category-title {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 6px;
}

.gbc-category-tip {
	font-size: 13px;
	color: var(--color-text-muted);
	line-height: 1.7;
	margin-bottom: 14px;
}

/* カラーグリッド */
.gbc-color-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.gbc-color-item {
	text-align: center;
	cursor: pointer;
	transition: transform 0.15s ease;
}

.gbc-color-item:hover {
	transform: translateY(-2px);
}

.gbc-color-item:active {
	transform: scale(0.97);
}

.gbc-color-swatch {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	margin-bottom: 6px;
	position: relative;
}

.gbc-color-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--color-text);
	line-height: 1.4;
	margin-bottom: 2px;
}

.gbc-color-hex {
	font-size: 11px;
	color: var(--color-text-muted);
	line-height: 1.4;
	font-family: monospace;
}

.gbc-color-desc {
	font-size: 11px;
	color: var(--color-text-muted);
	line-height: 1.4;
}

/* コピー通知 */
.gbc-color-copied {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	animation: gbcToastIn 0.3s ease, gbcToastOut 0.3s ease 0.8s forwards;
}

@keyframes gbcToastIn {
	from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
	to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes gbcToastOut {
	from { opacity: 1; }
	to { opacity: 0; }
}

/* 避けたい色セクション */
.gbc-avoid-section {
	margin: 0 20px 20px;
	padding: 20px;
	background: #FFF8F6;
	border-radius: var(--radius);
	border: 1px solid #FFE0D6;
}

.gbc-avoid-title {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 700;
	color: #C04040;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* 警告アイコン: CSS三角形 + ! */
.gbc-avoid-warning-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 0;
	height: 0;
	border-left: 10px solid transparent;
	border-right: 10px solid transparent;
	border-bottom: 18px solid #C04040;
	position: relative;
	flex-shrink: 0;
}

.gbc-avoid-warning-icon::after {
	content: '!';
	position: absolute;
	top: 4px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}

.gbc-avoid-desc {
	font-size: 13px;
	color: var(--color-text-muted);
	line-height: 1.7;
	margin-bottom: 14px;
}

.gbc-avoid-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.gbc-avoid-item {
	text-align: center;
}

.gbc-avoid-swatch {
	width: 100%;
	aspect-ratio: 1;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	margin-bottom: 6px;
	position: relative;
}

/* バツマーク: CSS疑似要素による線描画 */
.gbc-avoid-x {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 28px;
	height: 28px;
	pointer-events: none;
}

.gbc-avoid-x::before,
.gbc-avoid-x::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 28px;
	height: 3px;
	background: rgba(200, 60, 60, 0.7);
	border-radius: 2px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gbc-avoid-x::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.gbc-avoid-x::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.gbc-avoid-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--color-text);
	line-height: 1.4;
	margin-bottom: 2px;
}

.gbc-avoid-reason {
	font-size: 11px;
	color: #C04040;
	line-height: 1.4;
}

/* アクションセクション */
.gbc-action-section {
	display: flex;
	justify-content: center;
	gap: 10px;
	padding: 16px 20px 20px;
	flex-wrap: wrap;
}

/* Xシェアボタン */
.gbc-action-section .btn-share {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	background: #1DA1F2;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.2s ease;
}

.gbc-action-section .btn-share:hover {
	background: #1a8cd8;
}

/* クロスリンク */
.gbc-crosslink {
	margin: 20px;
	padding: 16px;
	background: var(--color-bg);
	border-radius: var(--radius);
	text-align: center;
}

.gbc-crosslink-text {
	font-size: 13px;
	color: var(--color-text-secondary);
	margin-bottom: 10px;
}

.gbc-crosslink-btn {
	display: inline-block;
	padding: 10px 24px;
	background: #6B8E6B;
	color: #fff;
	border-radius: var(--radius);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s ease;
}

.gbc-crosslink-btn:hover {
	background: #5A7A5A;
}

/* インラインリンク */
.gbc-inline-link {
	color: #6B8E6B;
	text-decoration: none;
	font-weight: 500;
}

.gbc-inline-link:hover {
	text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 600px) {
	.gbc-tab-bar {
		padding: 16px 16px 0;
		gap: 6px;
	}

	.gbc-tab-btn {
		padding: 8px 14px;
		font-size: 13px;
		gap: 6px;
	}

	.gbc-tab-btn-dot {
		width: 10px;
		height: 10px;
	}

	.gbc-tab-content {
		padding: 16px;
	}

	.gbc-color-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.gbc-color-name {
		font-size: 11px;
	}

	.gbc-color-desc {
		font-size: 10px;
	}

	.gbc-avoid-section {
		margin: 0 16px 16px;
		padding: 16px;
	}

	.gbc-avoid-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.gbc-action-section {
		padding: 12px 16px 16px;
	}

	.gbc-action-section .btn-share,
	.gbc-action-section .btn-primary {
		flex: 1 1 auto;
		min-width: 140px;
	}
}
