/* Fund Holdings — Public Styles */

/* ── Wrapper ── */
.fh-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1a1a2e;
    margin: 24px 0;
}

/* ── Header ── */
.fh-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
}

.fh-fund-name {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fh-ticker-badge {
    display: inline-block;
    background: #1565c0;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    letter-spacing: .5px;
}

.fh-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #555;
}

.fh-meta-synced {
    color: #888;
    font-style: italic;
}

/* ── Search ── */
.fh-search-wrap {
    flex-shrink: 0;
}

.fh-search {
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: border-color .2s;
}

.fh-search:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21,101,192,.12);
}

/* ── Notices ── */
.fh-notice {
    padding: 10px 14px;
    border-radius: 4px;
    margin: 12px 0;
    font-size: 13px;
    border-left: 4px solid transparent;
}

.fh-notice-info    { background: #e3f2fd; border-color: #1565c0; color: #0d47a1; }
.fh-notice-warning { background: #fff8e1; border-color: #f9a825; color: #6d4c00; }
.fh-notice-error   { background: #fdecea; border-color: #c62828; color: #b71c1c; }

/* ── Chart ── */
.fh-chart-wrap {
    margin-bottom: 20px;
    max-width: 420px;
}

.fh-chart {
    width: 100% !important;
    max-height: 280px;
}

/* ── Table Wrapper ── */
.fh-table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ── Table ── */
.fh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fh-table thead tr {
    background: #1565c0;
    color: #fff;
}

.fh-table thead th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}

.fh-table tbody tr {
    transition: background .15s;
}

.fh-table tbody tr:hover {
    background: #e8f0fe !important;
}

.fh-row-even { background: #fff; }
.fh-row-odd  { background: #f9fafb; }

.fh-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* ── Column-specific ── */
.fh-col-rank {
    width: 36px;
    color: #999;
    font-size: 12px;
    text-align: center;
}

.fh-col-name {
    min-width: 180px;
}

.fh-holding-name {
    display: block;
    font-weight: 500;
}

.fh-cusip {
    display: block;
    color: #999;
    font-size: 11px;
    margin-top: 2px;
}

.fh-col-ticker { width: 80px; }

.fh-hticker {
    display: inline-block;
    background: #e8f0fe;
    color: #1565c0;
    font-weight: 600;
    font-size: 12px;
    padding: 1px 7px;
    border-radius: 3px;
}

.fh-na { color: #ccc; }

/* ── Weight bar ── */
.fh-col-weight { min-width: 120px; }

.fh-weight-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fh-weight-val {
    font-weight: 600;
    font-size: 13px;
}

.fh-weight-bar-wrap {
    background: #e8e8e8;
    border-radius: 3px;
    height: 4px;
    width: 100%;
    overflow: hidden;
}

.fh-weight-bar {
    height: 100%;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    border-radius: 3px;
    transition: width .3s ease;
    min-width: 2px;
}

/* ── Asset Category badges ── */
.fh-asset-cat {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #f0f0f0;
    color: #555;
}

.fh-cat-ec   { background: #e8f5e9; color: #1b5e20; }
.fh-cat-dbt  { background: #e3f2fd; color: #0d47a1; }
.fh-cat-rf   { background: #fff3e0; color: #e65100; }
.fh-cat-stiv { background: #f3e5f5; color: #4a148c; }
.fh-cat-oth  { background: #f5f5f5; color: #616161; }

/* ── Footer ── */
.fh-footer {
    font-size: 11px;
    color: #aaa;
    margin-top: 10px;
    text-align: right;
}

.fh-footer a {
    color: #1565c0;
    text-decoration: none;
}

/* ── Error ── */
.fh-error {
    color: #c0392b;
    background: #fdecea;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #c0392b;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .fh-col-shares,
    .fh-col-type,
    .fh-col-ticker {
        display: none;
    }

    .fh-header {
        flex-direction: column;
    }

    .fh-search {
        width: 100%;
    }
}
