/**
 * Elementor Widget CSS for WooCommerce Custom Cart Button
 * 
 * @package WooCommerce Custom Cart Button
 * @since 2.0
 */

/* ===================================
   Product Custom Button Widget Styles
   =================================== */

.catcbll-product-widget {
    text-align: center;
    margin: 20px 0;
}



.catcbll-product-info {
    margin-bottom: 15px;
}

.catcbll-product-image {
    margin-bottom: 10px;
}

.catcbll-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.catcbll-product-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.catcbll-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.catcbll-product-title a:hover {
    color: #0073aa;
}

.catcbll-product-price {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 15px;
}

.catcbll-product-price .amount {
    font-weight: 700;
    color: #0073aa;
}

.catcbll-product-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.catcbll-product-buttons a{
    display: block;
}



/* Ensure WooCommerce add-to-cart form displays properly */
.catcbll-default-button-wrapper .woocommerce-variation-add-to-cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catcbll-default-button-wrapper .single_add_to_cart_button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid #0073aa;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    min-width: 120px;
}

.catcbll-default-button-wrapper .single_add_to_cart_button:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.catcbll-default-button-wrapper .quantity {
    margin-bottom: 10px;
}

.catcbll-default-button-wrapper .variations {
    margin-bottom: 15px;
}

.catcbll-default-button-wrapper .variations td {
    padding: 5px 0;
}

.catcbll-default-button-wrapper .variations label {
    font-weight: 500;
    margin-right: 10px;
}

.catcbll-custom-buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

/* Match archive.php button styling */
.catcbll_preview_button {
    margin-bottom: 8px;
}

.catcbll_preview_button a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid #0073aa;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    min-width: 120px;
}

.catcbll_preview_button a:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.catcbll_preview_button i {
    margin-left: 5px;
}

.catcbll_preview_button a i:first-child {
    margin-left: 0;
    margin-right: 5px;
}

/* Button positioning based on plugin settings */
.catcbll-product-buttons.catcbll-position-left {
    align-items: flex-start;
    flex-direction: row;
}

.catcbll-product-buttons.catcbll-position-right {
    align-items: flex-end;
    flex-direction: row;
}

.catcbll-product-buttons.catcbll-position-center {
    align-items: center;
}

/* Button alignment based on plugin settings */
.catcbll-product-buttons.catcbll-alignment-left {
    text-align: left;
}

.catcbll-product-buttons.catcbll-alignment-right {
    text-align: right;
}

.catcbll-product-buttons.catcbll-alignment-center {
    text-align: center;
}

.catcbll-product-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid #0073aa;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    min-width: 120px;
}

.catcbll-product-button:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Error Messages & Editor Notices
   =================================== */

.catcbll-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
}

.catcbll-editor-notice {
    background-color: #e7f3ff;
    color: #0c5460;
    padding: 15px;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.4;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .catcbll-product-title {
        font-size: 16px;
    }
    
    .catcbll-product-price {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .catcbll-product-button {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .catcbll-product-title {
        font-size: 16px;
    }
    
    .catcbll-product-price {
        font-size: 16px;
    }
}

/* ===================================
   Plugin Integration Styles
   =================================== */

/* Inherit plugin button styles when available */
.catcbll-product-button.catcbll {
    /* Plugin styles will be applied via inline CSS */
}

/* ===================================
   Accessibility Improvements
   =================================== */

.catcbll-product-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.catcbll-product-title a:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .catcbll-product-button {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
} 