/* ========================================
   Price History Chart — Sneakerpricer
   Mobile-first, BEM naming
   ======================================== */

.price-history {
    padding: 32px 0 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 24px;
}

.price-history-ttl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a1a1a;
}

.price-history-ttl svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* --- Time range controls --- */
.price-history-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.price-history-btn {
    padding: 6px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f5f5f5;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.price-history-btn:hover {
    background: #e8e8e8;
}

.price-history-btn.__active {
    background: #FF6600;
    color: #fff;
    border-color: #FF6600;
}

/* --- Chart wrapper --- */
.price-history-chart-wrap {
    position: relative;
    height: 200px;
    margin-bottom: 20px;
}

.price-history-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* --- Stats bar --- */
.price-history-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.price-history-stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-history-stats-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.price-history-stats-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.price-history-stats-value.__below {
    color: #FF6600;
}

.price-history-stats-value.__above {
    color: #C0392B;
}

/* --- Tracked since --- */
.price-history-tracked {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* --- Anchor link --- */
.price-history-anchor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #FF6600;
    text-decoration: none;
    transition: color 0.2s;
}

.price-history-anchor:hover {
    color: #1a5a96;
}

.price-history-anchor svg {
    width: 16px;
    height: 16px;
}

/* --- Empty state --- */
.price-history-empty {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: 14px;
}

.price-history-note {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin: 8px 0 0;
}

/* --- Desktop (>=768px) --- */
@media (min-width: 768px) {
    .price-history-chart-wrap {
        height: 300px;
    }

    .price-history-stats {
        flex-direction: row;
    }

    .price-history-stats-item {
        flex: 1;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .price-history-stats-item + .price-history-stats-item {
        border-left: 1px solid #e0e0e0;
    }
}
