/* Price History Styles */

.price-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.control-group select {
    font-size: 0.85rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border-radius: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    max-width: 260px;
}

/* Chart */
.chart-section {
    margin-bottom: 3rem;
    position: relative;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 400px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    max-height: 400px;
}

.chart-loading,
.chart-empty {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Price Changes */
.price-changes-section {
    margin-bottom: 3rem;
}

.price-changes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.price-change-card {
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price-change-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.price-change-icon.down {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.price-change-icon.up {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.price-change-icon.stable {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-tertiary);
}

.price-change-icon svg {
    width: 18px;
    height: 18px;
}

.price-change-info {
    flex: 1;
    min-width: 0;
}

.price-change-model {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-change-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.price-change-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    flex-shrink: 0;
}

.price-change-badge.down {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.price-change-badge.up {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .price-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group select {
        max-width: 100%;
    }
    
    .chart-container {
        padding: 1rem;
        min-height: 300px;
    }
}
