/* カテゴリ分類関連のスタイル */

.badge-manual {
    background-color: #22c55e;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
}

.badge-auto {
    background-color: #3b82f6;
    color: white;
    position: relative;
}

.badge-auto-sub {
    background-color: #6366f1;
    color: white;
    font-size: 0.7rem;
}

.confidence-score {
    opacity: 0.8;
    font-size: 0.65rem;
    margin-left: 4px;
}

.badge-reclassify {
    background-color: #f59e0b;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.7rem;
    padding: 2px 6px;
    margin-left: 4px;
}

.badge-reclassify:hover {
    background-color: #d97706;
    transform: scale(1.1);
}

/* 分類統計ダッシュボード */
.classification-stats {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.category-distribution {
    margin-top: 20px;
}

.distribution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.distribution-bar {
    height: 8px;
    background: #3b82f6;
    border-radius: 4px;
    margin-top: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .badge-container {
        flex-wrap: wrap;
    }
    
    .badge-reclassify {
        margin-top: 4px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .confidence-score {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .classification-stats {
        background: #1f2937;
        color: white;
    }
    
    .stat-card {
        background: #374151;
    }
    
    .stat-value {
        color: white;
    }
    
    .distribution-item {
        border-bottom-color: #4b5563;
    }
}

/* アニメーション効果 */
.badge-auto {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-reclassify:active {
    transform: scale(0.95);
}

/* ツールチップスタイル */
.badge-auto[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 4px;
}

.badge-auto[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}
