/* ============================================
   VisitorAnalytics 1.0 - Journey & Flow Styles
   Journey badges, tables, paths, anomaly, dwell
   ============================================ */

/* ============ Journey Badge ============ */
.journey-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.journey-badge.badge-primary {
    background-color: rgba(78, 205, 196, 0.2);
    color: #4ECDC4;
}

.journey-badge.badge-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.journey-badge.badge-success {
    background-color: rgba(61, 214, 140, 0.2);
    color: #3DD68C;
}

.journey-badge.badge-warning {
    background-color: rgba(255, 204, 0, 0.2);
    color: #FFCC00;
}

/* ============ Journey Table ============ */
.journey-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.journey-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.journey-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.journey-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.journey-table .location-name {
    font-weight: 500;
    color: white;
}

.light .journey-table th {
    color: #6b7280;
    border-bottom-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

.light .journey-table td {
    color: #374151;
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.light .journey-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.light .journey-table .location-name {
    color: #1f2937;
}

/* ============ Flow Table ============ */
.flow-table-container {
    max-height: 300px;
    overflow-y: auto;
}

.flow-arrow {
    color: var(--va-accent);
    font-weight: bold;
    text-align: center;
    width: 40px;
}

.flow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

/* ============ Path Display ============ */
.path-display {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.path-node {
    background: rgba(78, 205, 196, 0.2);
    color: var(--va-accent);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.path-arrow {
    color: #9ca3af;
    font-size: 0.75rem;
    margin: 0 0.125rem;
}

.path-rank {
    font-weight: 600;
    color: var(--va-accent);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .path-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .path-arrow {
        transform: rotate(90deg);
        margin: 0.25rem 0;
    }
}

/* ============ Anomaly Analysis ============ */
.anomaly-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.anomaly-item {
    background: var(--va-card);
    border-radius: 8px;
    padding: 0.75rem;
    border-left: 4px solid;
}

.anomaly-item.severity-critical { border-left-color: #EF4444; }
.anomaly-item.severity-warning  { border-left-color: var(--va-warning); }
.anomaly-item.severity-info     { border-left-color: var(--va-info); }

.anomaly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.anomaly-date {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--va-text);
}

.anomaly-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.anomaly-type-badge.anomaly-type-high {
    background: rgba(61, 214, 140, 0.2);
    color: var(--va-success);
}

.anomaly-type-badge.anomaly-type-low {
    background: rgba(255, 204, 0, 0.2);
    color: var(--va-warning);
}

.anomaly-body {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.anomaly-stat {
    text-align: center;
}

.anomaly-stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--va-text-muted);
    margin-bottom: 0.2rem;
}

.anomaly-stat-value {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--va-text);
}

.light .anomaly-item {
    background: #f8fafc;
}

.light .anomaly-date {
    color: #1e293b;
}

.light .anomaly-stat-value {
    color: #1e293b;
}

/* ============ Dwell Badge ============ */
.dwell-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.dwell-badge.badge-primary {
    background-color: rgba(78, 205, 196, 0.2);
    color: #4ECDC4;
}

.dwell-badge.badge-info {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.dwell-badge.badge-success {
    background-color: rgba(61, 214, 140, 0.2);
    color: #3DD68C;
}

.dwell-badge.badge-warning {
    background-color: rgba(255, 204, 0, 0.2);
    color: #FFCC00;
}
