/* EIDF Plugin - Frontend Styles */

/* Masquer prix et stock pour les produits à devis */
.eidf-hide-price .price,
.eidf-hide-price .woocommerce-price-suffix,
.eidf-hide-price .stock,
.eidf-hide-price .product_meta .posted_in,
.eidf-hide-price .single_add_to_cart_button,
.eidf-hide-price .button.alt.eidf-quote-button {
    display: none !important;
}

/* Masquer TOUS les éléments avec prix 0€ */
.price:contains("0,00"),
.price:contains("0.00"),
*[class*="price"]:contains("0,00"),
*[class*="price"]:contains("0.00"),
.woocommerce-product-details__short-description + .price,
.product_title + .price,
h1 + .price {
    display: none !important;
}

/* Masquer subtotal et totaux à 0€ */
.woocommerce-product-attributes-item__value:contains("0,00"),
.amount:contains("0,00"),
.amount:contains("0.00"),
tr:contains("Subtotal"):contains("0,00") {
    display: none !important;
}

/* CSS général pour masquer tous les prix 0 */
body.eidf-hide-price .price,
body.eidf-hide-price .amount {
    display: none !important;
}

/* Styles pour les formulaires de devis */
.eidf-quote-form {
    max-width: 100%;
    margin: 20px 0;
}

.eidf-customer-fields {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.eidf-customer-fields h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.eidf-quote-form .form-row {
    margin-bottom: 15px;
}

.eidf-quote-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.eidf-quote-form .required {
    color: #d63638;
}

.eidf-quote-form input[type="text"],
.eidf-quote-form input[type="email"],
.eidf-quote-form input[type="tel"],
.eidf-quote-form input[type="number"],
.eidf-quote-form select,
.eidf-quote-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.eidf-quote-form input:focus,
.eidf-quote-form select:focus,
.eidf-quote-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.eidf-product-options {
    margin: 20px 0;
}

.eidf-product-options .wc-pao-addon-container {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.eidf-product-options .wc-pao-addon-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

/* Image swatches spécifique à votre site */
.image-swatch {
    display: inline-block;
    margin: 5px;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.image-swatch:hover {
    border-color: #0073aa;
}

.image-swatch input[type="radio"] {
    display: none;
}

.image-swatch input[type="radio"]:checked + img {
    border: 2px solid #0073aa;
}

.image-swatch img {
    display: block;
    max-width: 60px;
    max-height: 60px;
    margin-bottom: 5px;
    border-radius: 3px;
}

.image-swatch span {
    display: block;
    font-size: 12px;
    color: #666;
}

.quantity {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.quantity label {
    margin-bottom: 10px;
}

.eidf-submit-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.eidf-quote-submit {
    background-color: #0073aa;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 250px;
}

.eidf-quote-submit:hover {
    background-color: #005a87;
}

.eidf-quote-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.eidf-loading {
    margin: 15px 0;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-style: italic;
}

.eidf-message {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    display: none;
}

.eidf-message.success {
    background: #28a745;
    color: white;
    border: 2px solid #1e7e34;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.eidf-message.error {
    background: #dc3545;
    color: white;
    border: 2px solid #bd2130;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.eidf-loading {
    text-align: center;
    padding: 15px;
    background: #007cba;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .eidf-customer-fields,
    .eidf-product-options .wc-pao-addon-container,
    .eidf-submit-section {
        padding: 15px;
    }
    
    .image-swatch {
        margin: 3px;
        padding: 8px;
    }
    
    .image-swatch img {
        max-width: 50px;
        max-height: 50px;
    }
    
    .eidf-quote-submit {
        min-width: 200px;
        padding: 12px 25px;
        font-size: 15px;
    }
}