/**
 * Herbago Private Site - Hide Elements CSS
 * 
 * This stylesheet hides WooCommerce pricing, cart, and purchase elements
 * when the body has the "private-mode" class. Elements are shown again
 * via JavaScript inline styles when the access cookie is present.
 */

/* Hide price elements */
body.private-mode .price,
body.private-mode .amount,
body.private-mode .woocommerce-Price-amount,
body.private-mode .woocommerce-price-suffix,
body.private-mode ins .amount,
body.private-mode del .amount {
    display: none !important;
}

/* Hide add to cart buttons on shop/archive pages */
body.private-mode .add_to_cart_button,
body.private-mode .product_type_simple,
body.private-mode .product_type_variable,
body.private-mode .product_type_grouped,
body.private-mode .product_type_external,
body.private-mode #payment-method-message {
    display: none !important;
}



/* Hide add to cart button on single product pages */
body.private-mode .single_add_to_cart_button,
body.private-mode form.cart,
body.private-mode .cart {
    display: none !important;
}

/* Hide cart widget in header/sidebar */
body.private-mode .widget_shopping_cart,
body.private-mode .woocommerce-mini-cart,
body.private-mode .cart-contents,
body.private-mode .cart-customlocation {
    display: none !important;
}

/* Hide cart link in menus */
body.private-mode .menu-item-type-post_type.menu-item-object-page a[href*="cart"],
body.private-mode a.cart-contents,
body.private-mode a[href*="/cart/"] {
    display: none !important;
}

/* Hide cart icon/count in header */
body.private-mode .header-cart,
body.private-mode .site-header-cart,
body.private-mode .cart-count,
body.private-mode .cart-icon {
    display: none !important;
}

/* Hide variations and quantity selectors (part of cart form) */
body.private-mode .variations,
body.private-mode .variations_form,
body.private-mode .quantity,
body.private-mode .single_variation_wrap {
    display: none !important;
}

/* Hide sale badges that indicate pricing */
body.private-mode .onsale,
body.private-mode .woocommerce-onsale {
    display: none !important;
}

/* Hide stock status that may reveal pricing context */
body.private-mode .stock,
body.private-mode .out-of-stock,
body.private-mode .in-stock {
    display: none !important;
}

/* Access Request Form Styles */
/* Hide button for logged-in users (no private-mode class on body) */
body:not(.private-mode) .herbago-private-site-access-wrapper {
    display: none !important;
}

/* Show button for non-logged users (private-mode class on body) */
body.private-mode .herbago-private-site-access-wrapper {
    display: block !important;
    margin: 20px 0;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.herbago-private-site-access-button {
    display: inline-block;
    padding: 12px 24px;
    background: #e67802;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: bold;
}

.herbago-private-site-access-button:hover {
    background: #bf6301;
}

.herbago-private-site-email-form {
    margin-top: 15px;
}

.herbago-private-site-email-input {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.herbago-private-site-email-submit {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.herbago-private-site-email-submit:hover {
    background: #005177;
}

.herbago-private-site-email-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.herbago-private-site-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.herbago-private-site-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.herbago-private-site-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
