/**
 * Price By Meter - Styles Frontend
 * Compatible thème Warehouse et autres thèmes PrestaShop 8
 * @version 2.1.0
 */

/* Container principal */
#pricebymeter-selector {
    background: rgba(0,0,0,0.10);
    border: 0px solid #dee2e6;
    border-radius: px;
    padding: 25px;
    margin: 15px 0;
}

#pricebymeter-selector.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Header */
.pbm-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.pbm-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
    text-transform: uppercase;
}

.pbm-title i,
.pbm-title .material-icons {
    color: #007bff;
    font-size: 20px;
}

/* Affichage de la valeur */
.pbm-value-display {
    text-align: center;
    margin-bottom: 15px;
}

.pbm-current-value {
    font-size: 42px;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
}

.pbm-unit {
    font-size: 18px;
    color: #6c757d;
    margin-left: 5px;
}

/* Container du slider */
.pbm-slider-container {
    margin-bottom: 20px;
}

/* Slider personnalisé */
.pbm-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #007bff 0%, #d3d3d3 0%);
    outline: none;
    cursor: pointer;
    margin: 10px 0;
}

.pbm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pbm-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.pbm-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid #fff;
    transition: transform 0.15s ease;
}

.pbm-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Labels min/max */
.pbm-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Affichage du prix */
.pbm-price-display {
    background: #F5F5F5;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.pbm-price-label {
    font-size: 14px;
    color: #6c757d;
	text-transform: uppercase;
	font-weight: 700;
    margin-bottom: 5px;
}

.pbm-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #da251d;
}

.pbm-price-value .pbm-currency {
    font-size: 20px;
    margin-left: 3px;
}

.pbm-price-base {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #dee2e6;
}

.pbm-price-base small {
    display: block;
    margin-top: -5px;
    font-style: italic;
}

/* Bouton d'ajout au panier */
.pbm-add-to-cart {
    margin-top: 15px;
}

#pbm-add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#pbm-add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

#pbm-add-to-cart-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#pbm-add-to-cart-btn.loading {
    background: #6c757d;
    border-color: #6c757d;
}

#pbm-add-to-cart-btn i,
#pbm-add-to-cart-btn .material-icons {
    font-size: 20px;
}

/* Animation de rotation pour le loading */
@keyframes pbm-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#pbm-add-to-cart-btn .rotating {
    animation: pbm-rotate 1s linear infinite;
}

/* Messages de feedback */
.pbm-feedback {
    padding: 12px 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pbm-feedback-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pbm-feedback-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pbm-feedback-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.pbm-feedback-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Infos dans le panier */
.pricebymeter-cart-info {
    margin-top: 5px;
    padding: 5px 10px;
    background: #e3f2fd;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pricebymeter-cart-info small {
    color: #1565c0;
    font-size: 12px;
}

.pricebymeter-cart-info .material-icons {
    font-size: 14px;
    color: #1976d2;
}

/* Infos dans le checkout et commandes */
.pbm-order-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.pbm-order-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pbm-order-info h5 .material-icons {
    color: #007bff;
    font-size: 18px;
}

.pbm-order-info table {
    width: 100%;
    font-size: 13px;
}

.pbm-order-info table td {
    padding: 5px 10px;
    border-bottom: 1px solid #e9ecef;
}

.pbm-order-info table tr:last-child td {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 767px) {
    #pricebymeter-selector {
        padding: 15px;
        margin: 10px 0;
    }
    
    .pbm-current-value {
        font-size: 36px;
    }
    
    .pbm-price-value {
        font-size: 24px;
    }
    
    .pbm-slider::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    .pbm-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* Thème Warehouse - Ajustements spécifiques */
.product-container #pricebymeter-selector,
.product-information #pricebymeter-selector {
    margin-top: 20px;
}

/* Mode sombre (si supporté) */
@media (prefers-color-scheme: dark) {
   
}
