/**
 * Price History Frontend Styles
 * Clean, professional styling without unnecessary effects
 */

/* Container för historik */
.price-history-container {
    margin: 30px 0;
}

/* Huvudtabell - ren och professionell */
.price-history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.price-history-table th,
.price-history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.price-history-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;

}

.price-history-table tbody tr:hover {
    background: #fafafa;
}

.price-history-table td strong {
    color: #000;
    font-weight: 600;
}

/* Notice för lägsta pris */
.price-history-notice {
    background: #f7f7f7;
    padding: 15px 20px;
    margin: 20px 0;
	font-size:14px;
}

.price-history-notice p {
    margin: 0;
    color: #333;
    line-height: 1.6;
}

.price-history-notice strong {
    color: #000;
}

.price-history-notice .woocommerce-Price-amount {
    font-size: 17px;
    font-weight: 600;
    color: #2271b1;
}

/* Graf-container */
.price-history-chart-container {
    margin: 25px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

#price-history-chart,
[id^="price-history-chart-"] {
    max-width: 100%;
    height: 300px;
}

/* Lägsta pris-visning på produktsida */
.price-history-lowest-price {
    
}

.price-history-lowest-price .lowest-price-label {
    color: #666;
    margin-right: 5px;
}

.price-history-lowest-price .lowest-price-value {
    font-weight: 600;
    color: #000;
}

/* Shortcode styling */
.price-history-lowest-price-shortcode {
    margin: 15px 0;
    font-size: 14px;
    color: #333;
}

.price-history-lowest-price-shortcode .price-history-lowest-label {
    color: #666;
    margin-right: 5px;
}

.price-history-lowest-price-shortcode .price-history-lowest-value {
    font-weight: 600;
    color: #000;
    font-size: 16px;
}

/* WooCommerce-integrering */
.woocommerce div.product .price-history-lowest-price,
.woocommerce div.product .price-history-lowest-price-shortcode {
    clear: both;
    margin: 15px 0;
}

/* WooCommerce tabs - matcha temastil */
.woocommerce-tabs .price-history-table {
    margin-top: 0;
}

/* Loading state - enkel spinner */
.price-history-loading {
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-history-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: price-history-spin 0.8s linear infinite;
}

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

/* Responsiv design */
@media (max-width: 768px) {
    .price-history-table {
        font-size: 13px;
    }
    
    .price-history-table th,
    .price-history-table td {
        padding: 10px 12px;
    }
    
    .price-history-notice {
        padding: 12px 15px;
    }
    
    .price-history-notice p {
        font-size: 14px;
    }
    
    .price-history-lowest-price,
    .price-history-lowest-price-shortcode {
        font-size: 13px;
    }
    
    #price-history-chart,
    [id^="price-history-chart-"] {
        height: 250px;
    }
}

/* Mindre skärmar - kompakt visning */
@media (max-width: 480px) {
    .price-history-table th,
    .price-history-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .price-history-table th {
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .price-history-chart-container {
        page-break-inside: avoid;
    }
    
    .price-history-table {
        font-size: 11px;
    }
    
    .price-history-notice {
        border: 1px solid #000;
        background: #f0f0f0;
    }
}

/* Tema-kompatibilitet */
/* Divi-specifika justeringar */
.et-db #et-boc .et-l .price-history-table th,
.et-db #et-boc .et-l .price-history-table td {
    padding: 8px 14px;
}

.et_pb_module .price-history-lowest-price-shortcode {
    margin: 15px 0;
}

/* Elementor-justeringar */
.elementor-widget .price-history-table {
    margin: 20px 0;
}

.elementor-widget .price-history-lowest-price-shortcode {
    display: block;
}

/* Astra-justeringar */
.ast-woocommerce-container .price-history-table {
    font-family: inherit;
}

/* GeneratePress-justeringar */
.generate-columns .price-history-container {
    margin: 20px 0;
}