/**
 * AJAX Add to Cart Popup Styles
 * 
 * Styles for the AJAX add to cart popup functionality.
 * Designed to match the Belvedo theme aesthetics.
 * Using popmc_ prefix to avoid conflicts with other styles.
 */

/* Popup Container */
.popmc_ajax_cart_popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popmc_ajax_cart_popup.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay with blur effect */
.popmc_ajax_cart_popup_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Popup Content */
.popmc_ajax_cart_popup_content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 10;
}

.popmc_ajax_cart_popup.active .popmc_ajax_cart_popup_content {
    transform: translateY(0);
    opacity: 1;
}

/* Popup Header */
.popmc_ajax_cart_popup_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f1f1f1;
    background-color: #f9f9f9;
}

.popmc_ajax_cart_popup_header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.popmc_ajax_cart_popup_close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popmc_ajax_cart_popup_close:hover {
    color: #DA251C;
}

/* Popup Body */
.popmc_ajax_cart_popup_body {
    padding: 25px;
}

/* Product Information */
.popmc_ajax_cart_popup_product {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f1f1;
}

.popmc_ajax_cart_popup_image {
    width: 100px;
    flex-shrink: 0;
    margin-right: 20px;
}

.popmc_ajax_cart_popup_image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.popmc_ajax_cart_popup_details {
    flex-grow: 1;
}

.popmc_ajax_cart_popup_title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.popmc_ajax_cart_popup_price {
    font-size: 16px;
    font-weight: 600;
    color: #DA251C;
    margin-bottom: 10px;
}

.popmc_ajax_cart_popup_quantity {
    font-size: 14px;
    color: #666;
}

/* Cart Summary */
.popmc_ajax_cart_popup_summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #f1f1f1;
    margin-bottom: 20px;
}

.popmc_ajax_cart_popup_count {
    font-size: 14px;
    color: #666;
}

.popmc_ajax_cart_popup_total {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Popup Footer */
.popmc_ajax_cart_popup_footer {
    display: flex;
    justify-content: space-between;
    padding: 0 25px 25px;
    gap: 15px;
}

.popmc_ajax_cart_popup_continue,
.popmc_ajax_cart_popup_checkout {
    padding: 12px 20px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popmc_ajax_cart_popup_continue {
    border-radius: 10px !important;
    background: #f1f1f1 !important;
    color: #333 !important;
    text-align: center;
    font-family: "Montserrat";
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 23px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
       height: 32.465px;
    display: flex !important;
}

.popmc_ajax_cart_popup_continue:hover {
    background-color: #e5e5e5 !important;
}

.popmc_ajax_cart_popup_checkout {
    border-radius: 10px !important;
    background: #B6C0C3 !important;
    color: #000 !important;
    text-align: center;
    font-family: "Montserrat";
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 23px !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    height: 32.465px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.popmc_ajax_cart_popup_checkout:hover {
    background-color: #a0aaad !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .popmc_ajax_cart_popup_content {
        width: 95%;
        max-width: 450px;
    }
    
    .popmc_ajax_cart_popup_product {
        flex-direction: column;
    }
    
    .popmc_ajax_cart_popup_image {
        width: 80px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .popmc_ajax_cart_popup_footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .popmc_ajax_cart_popup_continue,
    .popmc_ajax_cart_popup_checkout {
        width: 100%;
        height: 53.465px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .popmc_ajax_cart_popup_header {
        padding: 15px 20px;
    }
    
    .popmc_ajax_cart_popup_header h3 {
        font-size: 18px;
    }
    
    .popmc_ajax_cart_popup_body {
        padding: 20px;
    }
    
    .popmc_ajax_cart_popup_summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .popmc_ajax_cart_popup_footer {
        padding: 0 20px 20px;
    }
}



/**
 * Improved Add to Cart Button Spinner
 * 
 * This file contains styles for an improved loading spinner and button animations
 * for the add to cart buttons in the Belvedo theme.
 */

/* Button base styles */
.add_to_cart_button,
.single_add_to_cart_button {
    position: relative;
}

/* Custom spinner styles */
.mc-spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.mc-spinner-container.active {
    opacity: 1;
    visibility: visible;
}

.mc-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #B6C0C3;
    border-radius: 50%;
    animation: mc-spin 1s linear infinite;
}

.mc-spinner-text {
    position: absolute;
    margin-top: 70px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

@keyframes mc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide the default WooCommerce spinner */
.add_to_cart_button.loading::after,
.single_add_to_cart_button.loading::after {
    display: none !important;
}

/* Hide the "Zobacz koszyk" link that appears after adding to cart */
.added_to_cart.wc-forward {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Subtle pulsing animation for "Dodaję..." text */
@keyframes subtle-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Apply animation via JavaScript instead of CSS selector */
.pulsing-text {
    animation: subtle-pulse 1s infinite ease-in-out;
    background-color: rgba(182, 192, 195, 0.3) !important; /* Subtelne tło w kolorze zbliżonym do przycisku "Zamawiam" */
    transition: background-color 0.3s ease-in-out !important;
}