/* 
 * WooCommerce Multi Store Locations - Sale Products Pricing CSS
 * 
 * This file controls pricing information display for the plugin.
 * The inline PHP CSS has been disabled to use this external file instead.
 * 
 * Version: 1.3.2
 * Last Updated: July 30, 2025
 */

/* ========================================
   MODAL FUNCTIONALITY CSS
   ======================================== */

/* Mandatory Location Modal - Main Container */
#wc-msl-mandatory-location-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(5px) !important;
}

/* Modal container */
.wc-msl-modal-container {
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    position: relative !important;
    animation: modalSlideIn 0.3s ease-out !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal header */
.wc-msl-modal-header {
    padding: 30px 30px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid #eee !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 20px 20px 0 0 !important;
}

.wc-msl-modal-header h2 {
    margin: 0 0 10px !important;
    color: #333 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
}

.wc-msl-modal-header p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Modal body */
.wc-msl-modal-body {
    padding: 20px 30px !important;
}

/* Location options */
.wc-msl-location-options {
    margin-bottom: 30px !important;
}

.wc-msl-location-option {
    border: 2px solid #e5e5e5 !important;
    border-radius: 15px !important;
    padding: 20px 25px !important;
    margin-bottom: 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    background: #fafafa !important;
}

.wc-msl-location-option:hover {
    border-color: #0073aa !important;
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.15) !important;
    transform: translateY(-3px) !important;
    background: #fff !important;
}

/* Location info */
.wc-msl-location-info {
    flex: 1 !important;
}

.wc-msl-location-info h3 {
    margin: 0 !important;
    color: #333 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
}

/* Location actions */
.wc-msl-location-actions {
    margin-left: 20px !important;
}

.wc-msl-select-location-btn {
    background: #1d1d1d !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.wc-msl-select-location-btn:hover {
    background: #333 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(29, 29, 29, 0.3) !important;
}

/* Geolocation section */
.wc-msl-geolocation-section {
    text-align: center !important;
}

.wc-msl-divider {
    position: relative !important;
    margin: 20px 0 !important;
    color: #999 !important;
    font-size: 14px !important;
}

.wc-msl-divider::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: #ddd !important;
    z-index: 1 !important;
}

.wc-msl-divider span {
    background: white !important;
    padding: 0 15px !important;
    position: relative !important;
    z-index: 2 !important;
}

.wc-msl-geolocation-btn {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.wc-msl-geolocation-btn:hover {
    background: #218838 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.wc-msl-geolocation-btn .dashicons {
    font-size: 18px !important;
}

/* Status messages */
.wc-msl-status-message {
    margin-top: 15px !important;
    padding: 10px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

.wc-msl-status-message.success {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.wc-msl-status-message.error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

.wc-msl-status-message.info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 1px solid #bee5eb !important;
}

/* Loading spinner */
.wc-msl-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    z-index: 1000000 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-msl-spinner {
    border: 4px solid #f3f3f3 !important;
    border-top: 4px solid #0073aa !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    animation: spin 1s linear infinite !important;
    margin-bottom: 20px !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body class when modal is open */
body.wc-msl-modal-open {
    overflow: hidden !important;
}

/* Force hide modal when closing */
#wc-msl-mandatory-location-modal.wc-msl-modal-closed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Modal fade out animation for graceful closing */
#wc-msl-mandatory-location-modal.wc-msl-modal-closing {
    animation: modalFadeOut 0.3s ease-out forwards !important;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .wc-msl-modal-container {
        width: 95% !important;
        max-height: 90vh !important;
        border-radius: 15px !important;
    }
    
    .wc-msl-modal-header {
        padding: 20px 20px 15px !important;
        border-radius: 15px 15px 0 0 !important;
    }
    
    .wc-msl-modal-header h2 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .wc-msl-modal-header p {
        font-size: 14px !important;
    }
    
    .wc-msl-modal-body {
        padding: 15px 20px !important;
    }
    
    .wc-msl-location-option {
        padding: 15px 20px !important;
        border-radius: 12px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    .wc-msl-location-actions {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .wc-msl-select-location-btn {
        width: 100% !important;
        text-align: center !important;
    }
    
    .wc-msl-geolocation-btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   PRICING DISPLAY CSS
   ======================================== */

/* Basic pricing visibility - uncomment and customize as needed */

/*
.woocommerce .price,
.woocommerce .price ins,
.woocommerce .price del,
.woocommerce-Price-amount,
.woocommerce-Price-currencySymbol,
.product .price,
.products .price,
ul.products li.product .price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
*/

/* ========================================
   PRODUCT GRID LAYOUT FOR SALE PAGES
   ======================================== */

/* Fix product card widths on sale pages - consistent width regardless of quantity */
body.wc-msl-sale-context .woocommerce ul.products,
body.wc-msl-sale-filtered .woocommerce ul.products,
.woocommerce.wc-msl-sale-context ul.products,
.woocommerce.wc-msl-sale-filtered ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

/* Individual product cards - fixed width */
body.wc-msl-sale-context .woocommerce ul.products li.product,
body.wc-msl-sale-filtered .woocommerce ul.products li.product,
.woocommerce.wc-msl-sale-context ul.products li.product,
.woocommerce.wc-msl-sale-filtered ul.products li.product {
    width: calc(33.333% - 15px) !important;
    max-width: 320px !important;
    min-width: 280px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
    body.wc-msl-sale-context .woocommerce ul.products li.product,
    body.wc-msl-sale-filtered .woocommerce ul.products li.product,
    .woocommerce.wc-msl-sale-context ul.products li.product,
    .woocommerce.wc-msl-sale-filtered ul.products li.product {
        width: calc(50% - 10px) !important;
        max-width: 350px !important;
        min-width: 260px !important;
    }
}

@media (max-width: 768px) {
    body.wc-msl-sale-context .woocommerce ul.products li.product,
    body.wc-msl-sale-filtered .woocommerce ul.products li.product,
    .woocommerce.wc-msl-sale-context ul.products li.product,
    .woocommerce.wc-msl-sale-filtered ul.products li.product {
        width: 100% !important;
        max-width: 400px !important;
        min-width: 250px !important;
        margin: 0 auto 20px auto !important;
    }
    
    body.wc-msl-sale-context .woocommerce ul.products,
    body.wc-msl-sale-filtered .woocommerce ul.products,
    .woocommerce.wc-msl-sale-context ul.products,
    .woocommerce.wc-msl-sale-filtered ul.products {
        justify-content: center !important;
    }
}

/* Product card styling improvements */
body.wc-msl-sale-context .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce.wc-msl-sale-context ul.products li.product .woocommerce-loop-product__title,
.woocommerce.wc-msl-sale-filtered ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    height: auto !important;
    min-height: 44px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Product image container */
body.wc-msl-sale-context .woocommerce ul.products li.product .woocommerce-loop-product__link,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce.wc-msl-sale-context ul.products li.product .woocommerce-loop-product__link,
.woocommerce.wc-msl-sale-filtered ul.products li.product .woocommerce-loop-product__link {
    display: block !important;
    position: relative !important;
}

/* Product images - consistent aspect ratio */
body.wc-msl-sale-context .woocommerce ul.products li.product img,
body.wc-msl-sale-filtered .woocommerce ul.products li.product img,
.woocommerce.wc-msl-sale-context ul.products li.product img,
.woocommerce.wc-msl-sale-filtered ul.products li.product img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    transition: transform 0.3s ease !important;
}

/* Hover effect for images */
body.wc-msl-sale-context .woocommerce ul.products li.product:hover img,
body.wc-msl-sale-filtered .woocommerce ul.products li.product:hover img,
.woocommerce.wc-msl-sale-context ul.products li.product:hover img,
.woocommerce.wc-msl-sale-filtered ul.products li.product:hover img {
    transform: scale(1.05) !important;
}

/* Sale badge styling */
body.wc-msl-sale-context .woocommerce ul.products li.product .onsale,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .onsale,
.woocommerce.wc-msl-sale-context ul.products li.product .onsale,
.woocommerce.wc-msl-sale-filtered ul.products li.product .onsale {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: #e74c3c !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 15px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    z-index: 2 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Price styling for consistency */
body.wc-msl-sale-context .woocommerce ul.products li.product .price,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .price,
.woocommerce.wc-msl-sale-context ul.products li.product .price,
.woocommerce.wc-msl-sale-filtered ul.products li.product .price {
    font-size: 18px !important;
    font-weight: bold !important;
    margin-top: 10px !important;
    text-align: center !important;
}

/* Strike-through regular price */
body.wc-msl-sale-context .woocommerce ul.products li.product .price del,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .price del,
.woocommerce.wc-msl-sale-context ul.products li.product .price del,
.woocommerce.wc-msl-sale-filtered ul.products li.product .price del {
    color: #999 !important;
    font-size: 14px !important;
}

/* Sale price highlight */
body.wc-msl-sale-context .woocommerce ul.products li.product .price ins,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .price ins,
.woocommerce.wc-msl-sale-context ul.products li.product .price ins,
.woocommerce.wc-msl-sale-filtered ul.products li.product .price ins {
    color: #e74c3c !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

/* Add to cart button styling */
body.wc-msl-sale-context .woocommerce ul.products li.product .button,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .button,
.woocommerce.wc-msl-sale-context ul.products li.product .button,
.woocommerce.wc-msl-sale-filtered ul.products li.product .button {
    width: 100% !important;
    margin-top: 15px !important;
    padding: 10px !important;
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    border-radius: 5px !important;
    transition: background-color 0.3s ease !important;
}

body.wc-msl-sale-context .woocommerce ul.products li.product .button:hover,
body.wc-msl-sale-filtered .woocommerce ul.products li.product .button:hover,
.woocommerce.wc-msl-sale-context ul.products li.product .button:hover,
.woocommerce.wc-msl-sale-filtered ul.products li.product .button:hover {
    background: #005a87 !important;
}

/* Card padding and border */
body.wc-msl-sale-context .woocommerce ul.products li.product,
body.wc-msl-sale-filtered .woocommerce ul.products li.product,
.woocommerce.wc-msl-sale-context ul.products li.product,
.woocommerce.wc-msl-sale-filtered ul.products li.product {
    padding: 15px !important;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* Card hover effect */
body.wc-msl-sale-context .woocommerce ul.products li.product:hover,
body.wc-msl-sale-filtered .woocommerce ul.products li.product:hover,
.woocommerce.wc-msl-sale-context ul.products li.product:hover,
.woocommerce.wc-msl-sale-filtered ul.products li.product:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    transform: translateY(-2px) !important;
}

/* ========================================
   COMPATIBILITY WITH POPULAR THEMES
   ======================================== */

/* Astra Theme Compatibility */
.ast-woocommerce-container .wc-msl-sale-context ul.products li.product,
.ast-woocommerce-container .wc-msl-sale-filtered ul.products li.product {
    width: calc(33.333% - 15px) !important;
    max-width: 320px !important;
    min-width: 280px !important;
}

/* Storefront Theme Compatibility */
.storefront .wc-msl-sale-context ul.products li.product,
.storefront .wc-msl-sale-filtered ul.products li.product {
    width: calc(33.333% - 15px) !important;
    max-width: 320px !important;
    min-width: 280px !important;
}

/* Oceanwp Theme Compatibility */
.oceanwp .wc-msl-sale-context ul.products li.product,
.oceanwp .wc-msl-sale-filtered ul.products li.product {
    width: calc(33.333% - 15px) !important;
    max-width: 320px !important;
    min-width: 280px !important;
}

/* Add your custom pricing CSS here */
