/**
 * Price on Application (POA) - Frontend Styles
 *
 * Styles for POA message display on product pages.
 */

/* POA Message Container - Single Product Page */
.cfw-poa-message {
    padding: 20px;
    margin: 15px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.cfw-poa-message p {
    margin: 0 0 10px 0;
}

.cfw-poa-message p:last-child {
    margin-bottom: 0;
}

.cfw-poa-message a {
    color: #0073aa;
    text-decoration: underline;
}

.cfw-poa-message a:hover {
    color: #005177;
}

/* POA Message in Product Loop (Shop/Category Pages) */
.cfw-poa-message-loop {
    padding: 10px 15px;
    margin: 10px 0 0 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: #555;
}

.cfw-poa-message-loop p {
    margin: 0;
}

/* Hide price for POA products (fallback if PHP filter doesn't catch it) */
/* Note: Excludes MSRP display which uses .cfw-product-msrp */
.cfw-poa-product .price:not(.cfw-product-msrp .price),
.cfw-poa-product > .woocommerce-Price-amount,
.cfw-poa-product .summary > .woocommerce-Price-amount {
    display: none !important;
}

/* Ensure MSRP is always visible for POA products */
.cfw-poa-product .cfw-product-msrp,
.cfw-poa-product .cfw-product-msrp .woocommerce-Price-amount {
    display: block !important;
}

/* Body class for POA product pages */
.cfw-poa-product-page .single_add_to_cart_button,
.cfw-poa-product-page .cart {
    display: none !important;
}

/* Quote Button Fallback */
.cfw-poa-quote-fallback {
    margin: 15px 0;
}

.cfw-poa-request-quote-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cfw-poa-request-quote-btn:hover {
    background-color: #005177;
    color: #fff !important;
}

/* Ensure POA message displays nicely with RFQ plugin buttons */
.cfw-poa-message + .afrfqbt,
.cfw-poa-message + .yith-ywraq-add-to-quote {
    margin-top: 15px;
}

/* POA Variation Handling */
/* Hide specific cart elements for POA variations */
/* IMPORTANT: We hide specific elements, NOT the entire wrapper */
/* This preserves RFQ plugin buttons (Add to Quote, etc.) */
.cfw-poa-hidden {
    display: none !important;
}

/* Variation POA message styling */
.cfw-poa-variation-message {
    margin: 15px 0;
}

/* When a POA variation is selected, hide price and cart elements */
/* DO NOT hide .woocommerce-variation-add-to-cart wrapper - RFQ buttons live there */
.cfw-poa-variation-selected .woocommerce-variation-price.cfw-poa-hidden,
.cfw-poa-variation-selected .single_add_to_cart_button.cfw-poa-hidden,
.cfw-poa-variation-selected .quantity.cfw-poa-hidden,
.cfw-poa-variation-selected .ct-cart-actions.cfw-poa-hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cfw-poa-message {
        padding: 15px;
        font-size: 13px;
    }

    .cfw-poa-message-loop {
        padding: 8px 12px;
        font-size: 11px;
    }
}
