/* Component: Homepage market snapshot component. Rules are plugin-scoped (.cbah-*). */
/* Dynamic Market Snap shot **/

.cbah-marketdata-date {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	font-size: 12px;
	color: #64748b;
	margin-bottom: 8px;
}

.cbah-marketdata-date .dashicons {
	margin-right: 4px;
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.cbah-marketdata-date .mkt-date {
	margin-left: 4px;
}

.cbah-home-snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    padding: 24px 30px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    align-items: center;
    overflow: hidden;
    font-family: var(--cbah-body-font, "Josefin Sans", sans-serif);
}

.cbah-snap-item {
    min-width: 0;
    padding: 0 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cbah-snap-item:first-child {
    padding-left: 0;
}

.cbah-snap-item:last-child {
    padding-right: 0;
}

.cbah-snap-label {
    display: block;
    margin: 0 0 6px;
    font-family: var(--cbah-heading-font, "Josefin Sans", sans-serif);
    font-size: 0.72rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.8px;
}

.cbah-snap-value {
    display: block;
    margin: 0 0 2px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
}

.cbah-snap-price {
    display: inline;
    font-family: inherit;
    font-size: 0.85em;
    line-height: inherit;
    font-weight: 400;
    margin-left: 4px;
    opacity: 0.9;
}

.cbah-snap-turnover {
    font-size: 14px;
}

.cbah-txt-muted {
    color: #64748b;
}

.cbah-snap-change {
    display: flex;
    align-items: center;
    margin: 0;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 600;
}

.cbah-snap-change .dashicons {
    flex: 0 0 auto;
    margin-right: 4px;
    font-size: 16px;
    line-height: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive snapshot and ticker behavior */
.cbah-home-snapshot.cbah-snapshot-has-market-cap {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 900px) {
    .cbah-home-snapshot {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 20px;
        padding: 20px;
    }

    .cbah-snap-item {
        padding: 0 14px;
    }

    .cbah-snap-item:nth-child(odd) {
        padding-left: 0;
    }

    .cbah-snap-item:nth-child(even) {
        padding-right: 0;
    }
}

@media (max-width: 600px) {
    .cbah-home-snapshot {
        grid-template-columns: 1fr;
        row-gap: 14px;
        padding: 18px;
    }

    .cbah-snap-item,
    .cbah-snap-item:nth-child(odd),
    .cbah-snap-item:nth-child(even) {
        width: 100%;
        padding: 0 0 12px;
        border-bottom: 1px solid #f1f5f9;
    }

    .cbah-snap-item:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .cbah-ticker-date {
        padding-left: 12px;
        padding-right: 12px;
    }
}

