/* PNEUOMA Labs Analytics Dashboard Styles */

/* Analytics Container */
#analytics-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    z-index: 200;
    pointer-events: none;
}

#analytics-container.hidden {
    display: none;
}

/* Analytics Panel */
.analytics-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    bottom: 20px;
    width: 350px;
    background: linear-gradient(145deg, rgba(26, 24, 56, 0.98), rgba(15, 13, 36, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    pointer-events: all;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 242, 0.1);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.analytics-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0;
}

.analytics-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.analytics-close:hover {
    color: #ec4899;
}

.analytics-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #00fff2;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Frequency Stats */
.frequency-stats {
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.frequency-stats h4 {
    font-size: 0.85rem;
    color: #a855f7;
    margin: 0 0 12px 0;
}

.freq-stat-row {
    display: flex;
    gap: 15px;
}

.freq-stat {
    flex: 1;
    text-align: center;
}

.freq-stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e5e7eb;
    font-family: 'JetBrains Mono', monospace;
}

.freq-stat-label {
    display: block;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 3px;
}

/* Favorites Section */
.favorites-section {
    margin-bottom: 25px;
}

.favorites-section h4 {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.favorites-grid {
    display: flex;
    gap: 10px;
}

.favorite-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.favorite-icon {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.favorite-label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Charts Section */
.charts-section {
    margin-bottom: 25px;
}

.charts-section h4 {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.charts-section canvas {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    width: 100%;
}

/* Distribution Section */
.distribution-section {
    margin-bottom: 25px;
}

.distribution-section h4 {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.distribution-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.distribution-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.distribution-bar-container {
    display: flex;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.distribution-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    transition: all 0.3s ease;
}

.distribution-segment:nth-child(1) { background: rgba(0, 255, 242, 0.3); }
.distribution-segment:nth-child(2) { background: rgba(168, 85, 247, 0.3); }
.distribution-segment:nth-child(3) { background: rgba(236, 72, 153, 0.3); }
.distribution-segment:nth-child(4) { background: rgba(249, 115, 22, 0.3); }

.segment-icon {
    font-size: 0.8rem;
}

/* Recent Sessions */
.recent-section {
    margin-bottom: 25px;
}

.recent-section h4 {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

.recent-sessions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.session-time {
    display: flex;
    flex-direction: column;
}

.session-date {
    font-size: 0.8rem;
    color: #e5e7eb;
}

.session-hour {
    font-size: 0.7rem;
    color: #6b7280;
}

.session-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.session-duration {
    font-size: 0.85rem;
    color: #00fff2;
    font-family: 'JetBrains Mono', monospace;
}

.session-interactions {
    font-size: 0.7rem;
    color: #6b7280;
}

.no-data {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
}

/* Analytics Actions */
.analytics-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.analytics-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
}

.analytics-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.analytics-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Analytics Toggle Button */
.analytics-toggle {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(15, 13, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    color: #9ca3af;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.analytics-toggle:hover {
    background: rgba(0, 255, 242, 0.1);
    border-color: rgba(0, 255, 242, 0.3);
    color: #00fff2;
}

.analytics-toggle.active {
    background: rgba(0, 255, 242, 0.15);
    border-color: rgba(0, 255, 242, 0.4);
    color: #00fff2;
}

.analytics-toggle svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 900px) {
    #analytics-container {
        width: 100%;
    }
    
    .analytics-panel {
        top: 60px;
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
    }
    
    .analytics-toggle {
        top: auto;
        bottom: 80px;
        right: 15px;
        padding: 12px;
    }
    
    .analytics-toggle span {
        display: none;
    }
}

/* Scrollbar Styling */
.analytics-content::-webkit-scrollbar {
    width: 6px;
}

.analytics-content::-webkit-scrollbar-track {
    background: transparent;
}

.analytics-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.analytics-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

