
/**
 * PriceWise Calculator Pro - WooCommerce Integration Styles
 * 
 * Table of Contents:
 * 1. Shop Button Styles
 * 2. Cart Locked Quantity Styles
 * 3. Responsive Adjustments
 */

/* ========================================
   1. Shop Button Styles
   ======================================== */

/*
 * The button carries `button` and `wp-element-button`, so the theme has already
 * given it padding, type and shape, and it should match the theme's own Add to
 * Cart button on the tile next to it. Setting padding or a radius here would
 * fight that and make it the odd one out: against a theme with square corners it
 * was the only rounded button on the shop page.
 *
 * So this only does what no theme will do for it. Nothing cosmetic.
 */
.pwcp-shop-quote-button {
    display: inline-block;
    width: auto;
    text-align: center;
    text-decoration: none;
    /*
     * WooCommerce sets border-box on its own elements, so the Add to Cart button
     * beside this one gets it and this one did not, leaving two different box
     * models on the same row. Harmless while nothing sets a height, and a button
     * of the wrong size the moment a theme does.
     */
    box-sizing: border-box;
}

.pwcp-quote-link {
    color: white !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pwcp-quote-link:hover {
    color: white;
    opacity: 0.9;
}

.pwcp-quote-icon {
    flex-shrink: 0;
}

/* ========================================
   2. Cart Locked Quantity Styles
   ======================================== */

.pwcp-locked-quantity-wrapper {
    display: inline-block;
}

.pwcp-locked-quantity {
    display: inline-block;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 600;
    color: #333;
}

.pwcp-locked-notice {
    display: block;
    color: #666;
    margin-top: 4px;
    font-size: 12px;
}

/* Hide quantity controls for locked items in cart */
.woocommerce-cart-form .pwcp-locked-quantity-wrapper .quantity-nav,
.woocommerce-cart-form .pwcp-locked-quantity-wrapper button {
    display: none;
}

/* ========================================
   3. Cart "Edit options" link
   ======================================== */

.pwcp-cart-edit-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #844CA9;
    text-decoration: none;
    line-height: 1.3;
}

.pwcp-cart-edit-link::before {
    content: "\270E"; /* pencil */
    margin-right: 4px;
    font-size: 12px;
}

.pwcp-cart-edit-link:hover,
.pwcp-cart-edit-link:focus {
    color: #6d3c8c;
    text-decoration: underline;
}

/* ========================================
   4. Responsive Adjustments
   ======================================== */

/*
 * The shop button used to get a smaller padding here. It takes the theme's own
 * button padding now, which is already responsive, so overriding it on a phone
 * only made it disagree with the Add to Cart button beside it.
 */

/* ========================================
   5. Product page title
   ======================================== */

/*
 * This file is enqueued on WooCommerce pages only (see
 * pwcp_enqueue_frontend_styles), and the rule below is scoped to a single
 * product page, so it can never touch a blog post, a landing page or the shop
 * archive.
 *
 * An earlier version of this file hid every h1.wp-block-post-title on the whole
 * site, which removed the main heading from every page of any block theme.
 *
 * Which title is hidden is now the shop owner's choice, set in
 * PriceWise > Settings > Design. The class below is added to the body only when
 * they have asked for it.
 */
.pwcp-hide-product-title.single-product h1.wp-block-post-title,
.pwcp-hide-product-title.single-product .product_title {
    display: none;
}

.pwcp-hide-calculator-title.single-product .pwcp-calculator-header .pwcp-calculator-title,
.pwcp-hide-calculator-title.single-product .pwcp-calculator-header .pwcp-calculator-description {
    display: none;
}
