/* ======================================================================
   Price & Rating Trends — firm detail page
   White-card theme · dark text · brand-purple/green/amber line series
   ====================================================================== */

.firm-trends {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px 24px 20px;
    margin: 24px 0 28px;
    box-shadow: 0 4px 18px rgba(31, 28, 82, 0.05);
}

.firm-trends__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.firm-trends__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.firm-trends__title i {
    color: #6366f1;
    font-size: 22px;
}

.firm-trends__subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.firm-trends__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.firm-trends__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.firm-trend-card {
    background: #fafbff;
    border: 1px solid #eceff5;
    border-radius: 12px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.firm-trend-card:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.firm-trend-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.firm-trend-card__label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.firm-trend-delta {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.firm-trend-delta--up {
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
}

.firm-trend-delta--down {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.12);
}

.firm-trend-delta--flat,
.firm-trend-delta--neutral {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.1);
}

.firm-trend-card__chart {
    position: relative;
    height: 120px;
    max-height: 120px;
    margin: 4px 0 8px;
}

.firm-trend-card__chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.firm-trend-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 12px;
    font-style: italic;
}

.firm-trend-card__foot {
    font-size: 12px;
    color: #666;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
}

.firm-trend-card__foot strong {
    color: #1a1a2e;
    font-weight: 700;
}

.firm-trends__disclaimer {
    margin: 16px 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Responsive — stack on mobile */
@media (max-width: 880px) {
    .firm-trends__grid {
        grid-template-columns: 1fr;
    }
    .firm-trend-card__chart {
        height: 140px;
        max-height: 140px;
    }
}

@media (max-width: 560px) {
    .firm-trends {
        padding: 18px 16px 14px;
    }
    .firm-trends__header {
        flex-direction: column;
    }
    .firm-trends__title {
        font-size: 16px;
    }
}
