/* /www/orchardmetrics.ru/trends-categories/category-styles.css - CORRECTED VERSION */

/* Category Live Indicators */
.category-card[data-live="true"] {
    border-color: rgba(0, 255, 136, 0.3) !important;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.1) !important;
}

.category-card[data-live="true"]:hover {
    border-color: rgba(0, 255, 136, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2) !important;
}

.category-live-pulse {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 2;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 8px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* Category Modal */
.category-modal {
    max-width: 800px !important;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 100%) !important;
    border: 2px solid rgba(102, 126, 234, 0.5) !important;
}

.live-badge-large {
    background: linear-gradient(135deg, #00ff88, #667eea);
    color: #0a0a14;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-left: 15px;
    animation: pulse 2s infinite;
}

.demo-badge-large {
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-left: 15px;
}

/* Category Details */
.category-details {
    padding: 10px;
}

.details-header {
    margin-bottom: 30px;
}

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

.stat-card {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 30, 60, 0.9);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    color: white;
    font-size: 1.3rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--light);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.details-section {
    background: rgba(30, 30, 60, 0.7);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.details-section h3 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trends-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.trend-detail-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.trend-query {
    font-weight: bold;
    color: var(--light);
    font-size: 1.1rem;
}

.trend-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.trend-count {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
}

.trend-sample {
    color: var(--gray);
    font-size: 0.8rem;
    max-width: 300px;
    text-align: right;
}

.sentiment-chart-container {
    height: 150px;
    margin-top: 15px;
}

.sources-info {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 20px;
}

.source-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.source-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light);
}

.source-stat i {
    font-size: 1.2rem;
}

.live-sources {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--accent);
}

.demo-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ff9800;
}

.details-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-search-category,
.btn-refresh-category {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-search-category {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-search-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-refresh-category {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-refresh-category:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Animation for metric updates */
@keyframes metricUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.metric-updating {
    animation: metricUpdate 0.5s ease;
}

/* Status indicator in trends section header */
#trendsStatus .status-dot {
    background: #00ff88 !important;
    animation: pulse-dot 2s infinite !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .details-stats {
        grid-template-columns: 1fr;
    }
    
    .source-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .details-actions {
        flex-direction: column;
    }
    
    .trend-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .trend-metrics {
        align-items: flex-start;
    }
    
    .trend-sample {
        text-align: left;
    }
}

/* Modal search box styling */
.modal-search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modal-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.modal-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.modal-search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Live indicator pulse */
.live-pulse {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Ensure pulse animations work */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
    }
}

@keyframes pulse-dot {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.2);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fix for duplicate icons */
.category-icon {
    position: relative;
}

.category-icon .category-live-pulse {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 2;
}

/* Data freshness indicator */
.data-freshness {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.data-freshness.fresh {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.data-freshness.stale {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* Auto-refresh indicator */
.auto-refresh-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.3s ease;
}

/* Header Activity Indicator */
.header-activity-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    font-size: 0.9rem;
    color: #a0a0cc;
}

.header-activity-indicator .activity-pulse {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.header-activity-indicator .activity-level {
    color: #00ff88;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Mobile responsive for activity indicator */
@media (max-width: 768px) {
    .header-activity-indicator {
        display: none; /* Hide on mobile to save space */
    }
}