/**
 * AFP Flows & Funds CSS
 * Styles for flow analysis and fund explorer pages
 */

/* ============================================================================
   NAVIGATION BADGES
   ============================================================================ */

.afp-page-nav-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: hsl(var(--primary-foreground));
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.afp-page-nav-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    color: hsl(var(--primary-foreground));
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.afp-page-nav-badge.active {
    background: rgba(255, 255, 255, 0.35);
    color: hsl(var(--primary-foreground));
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.afp-page-nav-badge.active:hover {
    background: rgba(255, 255, 255, 0.4);
    color: hsl(var(--primary-foreground));
    border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   FLOWS TABLE
   ============================================================================ */

.afp-flows-container {
    max-width: 1400px;
    margin: 0 auto;
}

.flows-table {
    font-size: 0.9375rem;
}

.flows-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.flows-table thead th {
    font-weight: 600;
    color: #374151;
    padding: 1rem;
    vertical-align: middle;
}

.flows-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

.flows-table tbody tr:hover {
    background-color: #f9fafb;
}

.flows-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Hierarchical row indentation */
.flows-table .level-1 {
    background-color: #f9fafb;
}

.flows-table .level-2 {
    background-color: #f3f4f6;
}

.flows-table .ps-5 {
    padding-left: 3rem !important;
}

.flows-table .ps-7 {
    padding-left: 5rem !important;
}

/* Expand/collapse icons */
.expand-icon {
    cursor: pointer;
    transition: transform 0.2s ease;
    color: #6b7280;
    font-size: 0.75rem;
}

.expand-icon:hover {
    color: #3b82f6;
}

/* ============================================================================
   FUNDS TABLE
   ============================================================================ */

.afp-funds-container {
    max-width: 1400px;
    margin: 0 auto;
}

.funds-table {
    font-size: 0.9375rem;
}

.funds-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.funds-table thead th {
    font-weight: 600;
    color: #374151;
    padding: 1rem;
    vertical-align: middle;
}

.funds-table thead th a.sort-link {
    color: #374151;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.funds-table thead th a.sort-link:hover {
    color: #3b82f6;
}

.funds-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s ease;
}

.funds-table tbody tr:hover {
    background-color: #f9fafb;
}

.funds-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.fund-name {
    font-weight: 500;
    color: #111827;
}

/* ============================================================================
   FUND DETAIL PAGE
   ============================================================================ */

.afp-fund-detail-container {
    max-width: 1400px;
    margin: 0 auto;
}

.metric-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #6b7280;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* ============================================================================
   RESPONSIVE — Celular (<768px — ver _breakpoints.css)
   ============================================================================ */

@media (max-width: 767.98px) {
    .flow-nav-buttons {
        flex-direction: column;
    }

    .flow-nav-btn {
        width: 100%;
        justify-content: center;
    }

    .flows-table,
    .funds-table {
        font-size: 0.875rem;
    }

    .flows-table thead th,
    .flows-table tbody td,
    .funds-table thead th,
    .funds-table tbody td {
        padding: 0.75rem;
    }
}
