/* ========================================
   TRAFFIC.CSS - Traffic sources page
   ======================================== */

.traffic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.chart-card canvas {
    max-height: 300px;
    width: 100%;
}

.full-width {
    grid-column: span 2;
}

/* Traffic Details */
.traffic-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.traffic-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
    transition: all 0.3s;
    flex-wrap: wrap;
}

.traffic-detail-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.traffic-detail-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.traffic-detail-name i {
    width: 35px;
    height: 35px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.traffic-detail-stats {
    text-align: right;
}

.traffic-detail-percent {
    font-size: 20px;
    font-weight: bold;
    color: #1e293b;
}

.traffic-detail-count {
    font-size: 12px;
    color: #64748b;
}

.progress-bar-full {
    width: 200px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill-full {
    height: 100%;
    background: #3b82f6;
    border-radius: 10px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .traffic-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .full-width {
        grid-column: span 1;
    }
    
    .chart-card canvas {
        max-height: 250px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .traffic-grid {
        gap: 20px;
    }
    
    .traffic-detail-item {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .traffic-detail-stats {
        text-align: center;
        width: 100%;
    }
    
    .traffic-detail-name {
        justify-content: center;
        width: 100%;
    }
    
    .progress-bar-full {
        width: 100%;
        max-width: 200px;
        margin: 8px auto 0;
    }
    
    .chart-card canvas {
        max-height: 220px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .stats-card {
        padding: 15px;
    }
    
    .stats-card h3 {
        font-size: 16px;
    }
    
    .traffic-detail-item {
        padding: 12px;
    }
    
    .traffic-detail-name {
        font-size: 14px;
        gap: 8px;
    }
    
    .traffic-detail-name i {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .traffic-detail-percent {
        font-size: 18px;
    }
    
    .traffic-detail-count {
        font-size: 11px;
    }
    
    .progress-bar-full {
        max-width: 150px;
    }
    
    .chart-card canvas {
        max-height: 180px;
    }
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

body.dark-mode .traffic-detail-item {
    background: #1e293b;
}

body.dark-mode .traffic-detail-item:hover {
    background: #334155;
}

body.dark-mode .traffic-detail-name {
    color: #f1f5f9;
}

body.dark-mode .traffic-detail-percent {
    color: #f1f5f9;
}

body.dark-mode .traffic-detail-count {
    color: #94a3b8;
}

body.dark-mode .progress-bar-full {
    background: #334155;
}

body.dark-mode .traffic-detail-name i {
    background: #0f172a;
}