/*
 * market-pulse.css — Live Market Pulse Strip
 * Batch 40: 4 neighborhood signals with mock seed data.
 *
 * Load order: base.css → market-pulse.css
 * All tokens sourced from base.css. Zero hardcoded colors.
 */

/* ============================================================
   MARKET PULSE STRIP — #lf-market-pulse
   ============================================================ */

#lf-market-pulse {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    background: var(--surface-card);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    margin-bottom: 8px;
    padding: 0 12px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Hidden in landing state */
body.lf-state-landing #lf-market-pulse {
    display: none;
}

/* Visible in intel + workspace states */
body.lf-state-intel #lf-market-pulse,
body.lf-state-workspace #lf-market-pulse {
    display: flex;
}

/* ============================================================
   CHIP — INDIVIDUAL SIGNAL UNIT
   ============================================================ */

.mp-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 12px;
    border-right: 1px solid var(--glass-border);
    opacity: 0;
    transition: opacity 200ms ease;
}

.mp-chip:last-of-type {
    border-right: none;
}

/* Chip inner row — icon/label + value + trend */
.mp-chip-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

/* ============================================================
   CHIP STATES — FADE-IN
   ============================================================ */

.mp-chip--loading {
    opacity: 0;
}

.mp-chip--loaded {
    opacity: 1;
    transition: opacity 200ms ease;
}

/* ============================================================
   CHIP TYPOGRAPHY
   ============================================================ */

.mp-value {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    white-space: nowrap;
    line-height: 1.2;
}

.mp-label {
    font-size: 0.6rem;
    font-family: var(--font-body);
    font-weight: var(--weight-regular);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-align: center;
    margin-top: 2px;
}

/* ============================================================
   TREND INDICATORS
   ============================================================ */

.mp-trend {
    font-size: 0.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.mp-trend-up {
    color: var(--color-positive);
}

.mp-trend-down {
    color: var(--color-negative);
}

.mp-trend-neutral {
    color: var(--text-muted);
}

/* ============================================================
   SIGNAL INDICATORS — RENT-TO-PRICE & NEIGHBORHOOD
   ============================================================ */

.mp-signal {
    font-size: 0.6rem;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.mp-signal-strong {
    color: var(--color-positive);
}

.mp-signal-fair {
    color: var(--color-warning);
}

.mp-signal-weak {
    color: var(--color-negative);
}

/* Neighborhood score dot */
.mp-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mp-dot-green {
    background: var(--color-positive);
    box-shadow: 0 0 4px var(--color-positive);
}

.mp-dot-amber {
    background: var(--color-warning);
    box-shadow: 0 0 4px var(--gold-alpha-50);
}

.mp-dot-red {
    background: var(--color-negative);
    box-shadow: 0 0 4px var(--color-negative-bg);
}

/* ============================================================
   SIMULATED DATA BADGE
   ============================================================ */

.mp-badge-simulated {
    font-size: 0.6rem;
    font-family: var(--font-body);
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 12px;
    align-self: center;
}

/* ============================================================
   MOBILE — ≤640px: HORIZONTAL SCROLL, NO WRAP
   ============================================================ */

@media (max-width: 640px) {
    #lf-market-pulse {
        min-height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding: 4px 8px;
        -webkit-overflow-scrolling: touch;
    }

    .mp-chip {
        flex: 0 0 auto;
        min-width: 88px;
        padding: 4px 10px;
    }

    .mp-badge-simulated {
        flex: 0 0 auto;
        padding-left: 8px;
    }
}
