/* Price Monitor - Frontend Styles */

.price-comparison-widget {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.price-comparison-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .price-cards {
        grid-template-columns: 1fr;
    }
}

.price-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.store-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-main {
    font-size: 24px;
    color: #2e7d32;
    margin: 10px 0;
    font-weight: 600;
}

.currency {
    font-size: 16px;
    vertical-align: top;
    margin-right: 2px;
}

.price-unavailable {
    font-size: 14px;
    color: #999;
    font-weight: normal;
}

.price-change {
    font-size: 12px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-change.down {
    color: #2e7d32;
}

.price-change.up {
    color: #d32f2f;
}

.old-price {
    text-decoration: line-through;
    color: #999;
}

.change-percent {
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
}

.price-change.down .change-percent {
    background: rgba(46, 125, 50, 0.1);
}

.price-change.up .change-percent {
    background: rgba(211, 47, 47, 0.1);
}

.installments {
    font-size: 13px;
    color: #666;
    margin: 10px 0;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
}

.buy-button {
    display: block;
    width: 100%;
    padding: 10px 8px;
    background: #1976d2;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    margin-top: auto;
    transition: background 0.2s;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-button:hover {
    background: #1565c0;
    color: white;
    text-decoration: none;
}

.buy-button:active {
    transform: scale(0.98);
}

/* Loading state */
.price-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.price-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #1976d2;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Price history chart container */
.price-history-chart {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-history-chart canvas {
    max-height: 300px;
}