/**
 * APS Global Indices — responsive grid for [aps_global_indices].
 *
 * This file only provides the grid wrapper + a couple of small additions. The cards
 * themselves reuse the shared .aps-share-price* rules from aps-ticker.css (declared as
 * a style dependency), so they match [aps_share_price] exactly. Mobile / tablet /
 * desktop are handled by an auto-fit grid plus a single small-screen breakpoint.
 */

.aps-global-indices {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
}

/* Cards stretch to fill their grid cell (overrides the inline-block/min-width card base). */
.aps-global-indices .aps-share-price {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    margin: 0;
}

/* Currency code shown next to the value, e.g. "754.83 USD". */
.aps-global-indices__ccy {
    font-size: 13px;
    font-weight: 500;
    color: #6b7a99;
    margin-left: 4px;
}

/* "via tracking ETF (SPY)" — clarifies the value is the proxy, not the index level. */
.aps-global-indices__note {
    font-size: 11px;
    color: #6b7a99;
    margin-top: 6px;
}

/* Inline / minimal styles read better as a horizontal wrap than a rigid grid. */
.aps-global-indices--inline,
.aps-global-indices--minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.aps-global-indices--inline .aps-share-price,
.aps-global-indices--minimal .aps-share-price {
    width: auto;
}

/* Tablet: keep at least two comfortable columns. */
@media (max-width: 900px) {
    .aps-global-indices {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }
}

/* Mobile: single column, full-width cards. */
@media (max-width: 600px) {
    .aps-global-indices {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aps-global-indices--inline,
    .aps-global-indices--minimal {
        flex-direction: column;
    }
}
