/**
 * Override all theme styles - Force simple select box
 */

/* FORCE remove ALL styling from container */
.wc-meter-pricing-selector,
div.wc-meter-pricing-selector,
.woocommerce .wc-meter-pricing-selector,
.woocommerce-page .wc-meter-pricing-selector,
.single-product .wc-meter-pricing-selector,
form.cart .wc-meter-pricing-selector {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 15px 0 !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

/* Remove any pseudo elements */
.wc-meter-pricing-selector::before,
.wc-meter-pricing-selector::after {
    content: none !important;
    display: none !important;
}

/* Simple label styling */
.wc-meter-pricing-selector label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin-bottom: 6px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Simple select box - just the dropdown */
#meter-length-select,
select#meter-length-select,
.wc-meter-pricing-selector select {
    width: 100% !important;
    max-width: 250px !important;
    padding: 8px 35px 8px 12px !important;
    font-size: 14px !important;
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 10px center !important;
    background-size: 16px !important;
}

/* RTL support */
body.rtl #meter-length-select,
body.rtl select#meter-length-select,
[dir="rtl"] #meter-length-select {
    padding: 8px 12px 8px 35px !important;
    background-position: right 10px center !important;
}

/* Hover and focus states */
#meter-length-select:hover {
    border-color: #aaa !important;
}

#meter-length-select:focus {
    border-color: #0073aa !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Price info - simple text only */
.meter-pricing-info {
    margin-top: 12px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.meter-pricing-info p {
    margin: 6px 0 !important;
    font-size: 13px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.meter-pricing-info .base-price {
    color: #666 !important;
    font-size: 12px !important;
}

.meter-pricing-info .calculated-price {
    font-size: 15px !important;
    color: #333 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.meter-pricing-info .price-amount {
    color: #0073aa !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

/* Remove all theme conflicts */
.woocommerce div.product form.cart .wc-meter-pricing-selector,
.woocommerce-page div.product form.cart .wc-meter-pricing-selector {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 15px 0 !important;
}

/* Shop page - "Select Meter" button styling */
.woocommerce ul.products li.product .button.product_type_simple,
.woocommerce-page ul.products li.product .button.product_type_simple {
    /* Keep default WooCommerce button styling */
}

/* Optional: Add icon or different style for meter products */
.woocommerce ul.products li.product a.button:not(.ajax_add_to_cart)::before,
.woocommerce-page ul.products li.product a.button:not(.ajax_add_to_cart)::before {
    content: "📏 ";
    margin-left: 5px;
}

/* Single product page - Price label styling */
.wc-meter-single-price {
    display: inline-block;
}

.wc-meter-single-price .price-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 400;
    margin-left: 5px;
}

/* Make sure the price is displayed inline */
.woocommerce div.product p.price .wc-meter-single-price,
.woocommerce div.product span.price .wc-meter-single-price {
    display: inline;
}

/* RTL support for price label */
body.rtl .wc-meter-single-price .price-label,
[dir="rtl"] .wc-meter-single-price .price-label {
    margin-left: 0;
    margin-right: 5px;
}

/* ============================================
   METER SELECTOR IN SHOP LOOP
   ============================================ */

.wc-meter-loop-selector {
    margin-top: 10px;
    padding: 0;
    clear: both;
    width: 100%;
    display: block;
}

.wc-meter-loop-selector .meter-loop-select {
    width: 100%;
    padding: 10px 35px 10px 12px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color 0.2s;
    display: block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 16px;
}

.wc-meter-loop-selector .meter-loop-select:focus {
    outline: none;
    border-color: #0073aa;
}

.wc-meter-loop-selector .meter-add-to-cart {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
    display: block;
    margin: 0;
    box-sizing: border-box;
}

.wc-meter-loop-selector .meter-add-to-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* RTL Support */
body.rtl .wc-meter-loop-selector .meter-loop-select,
[dir="rtl"] .wc-meter-loop-selector .meter-loop-select {
    padding: 10px 12px 10px 35px;
    background-position: right 10px center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wc-meter-loop-selector {
        margin-top: 12px;
    }
    
    .wc-meter-loop-selector .meter-loop-select {
        padding: 12px 35px 12px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        margin-bottom: 10px;
    }
    
    .wc-meter-loop-selector .meter-add-to-cart {
        padding: 14px 15px;
        font-size: 15px;
    }
    
    body.rtl .wc-meter-loop-selector .meter-loop-select,
    [dir="rtl"] .wc-meter-loop-selector .meter-loop-select {
        padding: 12px 12px 12px 35px;
    }
}

@media (max-width: 480px) {
    .wc-meter-loop-selector .meter-loop-select {
        font-size: 16px;
        padding: 14px 35px 14px 14px;
    }
    
    .wc-meter-loop-selector .meter-add-to-cart {
        padding: 15px;
        font-size: 16px;
    }
}

/* Modal CSS removed - not used anymore */

