/* ==========================================================================
   Price Request PRO - Frontend Styles v1.4.1
   ========================================================================== */

/* --- Body Classes (Added via PHP) --- */
/* body.request-price-pro-active (Always added when PRO active) */
/* body.request-price-active (Added ONLY if Global RP Setting is ON) */
/* div.product.rp-is-request-price-product (Added via PHP filter for specific RP products) */

/* ==========================================================================
   HIDE Default Prices (Optional - Uncomment lines below if needed)
   ========================================================================== */
/* Add !important if uncommenting */
/*
html body.single-product div.product.rp-is-request-price-product .summary > p.price,
html body ul.products li.product.rp-is-request-price-product .price,
html body ol.products li.product.rp-is-request-price-product .price,
html body .wc-block-grid__products .wc-block-grid__product.rp-is-request-price-product .woocommerce-product-price {
    display: none !important;
}
*/


/* ==========================================================================
   HIDE Default Add to Cart Elements (PRO Version Logic)
   ========================================================================== */

/* --- SINGLE PRODUCT PAGE (Conditional Hiding based on Product Setting) --- */
/* Hide form/button/qty ONLY if product has 'rp-is-request-price-product' class */
html body.single-product div.product.rp-is-request-price-product .summary form.cart {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}
html body.single-product div.product.rp-is-request-price-product .summary button.single_add_to_cart_button:not(.rp-request-price-button),
html body.single-product div.product.rp-is-request-price-product .summary a.single_add_to_cart_button:not(.rp-request-price-button),
html body.single-product div.product.rp-is-request-price-product .summary .quantity {
    display: none !important;
}
/* IMPORTANT: NO general rule hides ATC on ALL single products when PRO is active */


/* --- LOOPS / ARCHIVES / RELATED / UPSELLS etc. (Global Hiding Approach for Loops) --- */
/* Hide default ATC buttons in loops aggressively when PRO *might* be used. */
/* We rely on PHP filter 'woocommerce_loop_add_to_cart_link' in pro-frontend-hooks.php */
/* to replace the button HTML with RP button OR return original ATC HTML. */
/* This CSS hides the default button *just in case* the filter fails or is bypassed */
/* by a theme/block, OR if the filter returns the original ATC HTML when RP is OFF for the product. */



/* ==========================================================================
   Ensure YOUR Buttons ARE Displayed WHEN RP IS ACTIVE FOR THE PRODUCT (PRO)
   ========================================================================== */
/* Single Product (Button added via template filter replacing default form) */
body.single-product div.product.rp-is-request-price-product .rp-button-wrap,
body.single-product div.product.rp-is-request-price-product .rp-login-prompt {
    display: block !important; margin-top: 1em !important; margin-bottom: 1em !important; clear: both !important; visibility: visible !important; height: auto !important; opacity: 1 !important;
}

/* Loops (Button added via PHP filter 'woocommerce_loop_add_to_cart_link') */
/* Ensure buttons output by the helper are visible in various loop contexts */
body.request-price-pro-active ul.products li.product .rp-request-price-button,
body.request-price-pro-active ol.products li.product .rp-request-price-button,
body.request-price-pro-active ul.products li.product .rp-login-prompt-button,
body.request-price-pro-active ol.products li.product .rp-login-prompt-button,
body.request-price-pro-active .wc-block-grid__products .wc-block-grid__product .rp-request-price-button,
body.request-price-pro-active .wc-block-grid__products .wc-block-grid__product .rp-login-prompt-button {
    display: inline-block !important; clear: both; margin-top: 0.5em !important; visibility: visible !important; height: auto !important; opacity: 1 !important;
}


/* ==========================================================================
   Theme Specific Overrides (Add more based on testing popular themes)
   ========================================================================== */
/* --- Astra --- */
/* Hide single product form/qty CONDITIONALLY */
html body.theme-astra.single-product div.product.rp-is-request-price-product .summary form.cart { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; margin: 0 !important; padding: 0 !important; }
html body.theme-astra.single-product div.product.rp-is-request-price-product .summary .quantity { display: none !important; }
/* Hide related product loop ATC AGGRESSIVELY (rely on PHP filter to add RP button) */
html body.theme-astra.request-price-pro-active section.related.products ul.products li.product .add_to_cart_button:not(.rp-request-price-button):not(.rp-login-prompt-button) { display: none !important; }

/* --- Storefront --- */
html body.theme-storefront.request-price-pro-active section.storefront-sticky-add-to-cart { display: none !important; visibility: hidden !important; }
/* Add specific loop hiding for Storefront if the general rules fail */
/* html body.theme-storefront.request-price-pro-active ul.products li.product .add_to_cart_button:not(.rp-request-price-button):not(.rp-login-prompt-button) { display: none !important; } */

/* --- Blocksy (Requires Inspection - Add Specific Rules Here) --- */
/* Add specific rule if needed */
/* html body.theme-blocksy.request-price-pro-active [data-products-layout*="grid"] .product-card .ct-add-to-cart-button.button:not(.rp-request-price-button):not(.rp-login-prompt-button) { display: none !important; } */


/* ==========================================================================
   Modal, Vendor, Customer Page Styles (Keep As Is from User CSS)
   ========================================================================== */
/* --- Modal Styling --- */
.rp-modal-hidden { display: none; } .rp-modal { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 100000; overflow-y: auto; background-color: rgba(0, 0, 0, 0.6); -webkit-overflow-scrolling: touch; } .rp-modal-content { position: relative; background-color: #ffffff !important; margin: 8vh auto; padding: 25px 30px; border: 1px solid #ccc; width: 90%; max-width: 500px; z-index: 100001 !important; box-shadow: 0 5px 15px rgba(0,0,0,.5); box-sizing: border-box; border-radius: 4px; } .rp-modal-close { position: absolute; top: 10px; right: 15px; font-size: 1.8em; line-height: 1; font-weight: bold; color: #888; background: none; border: none; cursor: pointer; padding: 0; z-index: 100002; } .rp-modal-close:hover { color: #333; } .rp-modal-title { margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 1px solid #eee; font-size: 1.4em; line-height: 1.4; font-weight: 600; } .rp-modal-body strong { font-weight: 600; } .rp-modal-body p:last-child { margin-bottom: 0; } .rp-request-form .form-row { margin-bottom: 15px; } .rp-request-form label { display: block; margin-bottom: 5px; font-weight: 600; } .rp-request-form textarea.input-text, .rp-request-form input.input-text { width: 100%; padding: 8px 10px; box-sizing: border-box; border: 1px solid #ddd; } .rp-modal-body .rp-request-form textarea#rp_message_archive, .rp-modal-body .rp-request-form textarea[id^="rp_message_"] { min-height: 80px; font-size: 1em; line-height: 1.5; } .rp-form-feedback { padding: 10px 15px; margin: 10px 0 15px 0; border-radius: 4px; border: 1px solid transparent; font-size: 0.95em; display: none; } .rp-form-feedback.success { background-color: #dff0d8; border-color: #d6e9c6; color: #3c763d; display: block; } .rp-form-feedback.error { background-color: #f2dede; border-color: #ebccd1; color: #a94442; display: block; } .rp-form-submit-wrap { margin-top: 20px; } .rp-spinner.spinner { display: none; visibility: visible; float: none; vertical-align: middle; margin-left: 8px; opacity: 0.7; } .rp-request-form.loading .rp-spinner { display: inline-block; } .rp-request-form.loading button[type="submit"] { opacity: 0.7; cursor: default; } body.rp-modal-open { overflow: hidden; } .rp-modal-footer-note { margin-top: 20px; padding-top: 15px; border-top: 1px solid #eee; font-size: 0.9em; color: #777; }

/* --- File Upload Styling --- */

/* Wrapper for the custom file input experience */
.rp-file-input-wrapper {
    display: flex;
    align-items: center;
    margin-top: 5px; /* Adjust as needed */
}

/* Hide the actual browser default file input completely but keep it functional */
.rp-file-input-actual { /* This class should be on your <input type="file"> */
    width: 0.1px !important;
    height: 0.1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    z-index: -1 !important;
}

/* Style your custom visible button */
.rp-file-input-button { /* This class should be on your <button type="button"> */
    /* Inherit theme button styles or define your own */
    /* Example based on your screenshot's blue "Submit Request" button */
    padding: 10px 20px; /* Adjust padding */
    background-color: #0073e6; /* WordPress blue or your theme's primary button color */
    color: white;
    border: none;
    border-radius: 4px; /* Match your other buttons */
    cursor: pointer;
    display: inline-block;
    font-size: 1em; /* Or inherit */
    line-height: normal; /* Or inherit */
    text-decoration: none; /* If it's an <a> styled as a button */
    text-align: center;
    white-space: nowrap;
}

.rp-file-input-button:hover,
.rp-file-input-button:focus {
    background-color: #005a9e; /* Darker shade for hover/focus */
    color: white;
}

/* Style for the selected file name display (generated by your JS) */
.rp-file-info {
    display: inline-block; /* Allows it to sit next to the button */
    margin-left: 10px;
    font-style: italic;
    color: #333; /* Or your theme's text color */
    font-size: 0.9em; /* Slightly smaller */
    vertical-align: middle; /* Align with the button */
}


/* --- Vendor & Customer Page Shared --- */
.rp-page-container { max-width: 1140px !important; margin-left: auto !important; margin-right: auto !important; padding: 20px 0 !important; box-sizing: border-box !important; width: 100%; float: none !important; clear: both; }
.rp-page-container > main, .rp-page-container .rp-myaccount-container { font-size: 14px; line-height: 1.6; }
.rp-page-container header.rp-page-header, .rp-page-container .rp-myaccount-container > h2:first-of-type { font-size: 1.6em !important; margin-top: 0 !important; margin-bottom: 1em !important; padding-bottom: 0.5em !important; border-bottom: 1px solid #ddd !important; line-height: 1.3 !important; font-weight: 600 !important; }
.rp-status-filters-buttons { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin-bottom: 1.5em !important; padding-bottom: 1em !important; border-bottom: 1px solid #eee !important; line-height: 1 !important; clear: both !important; } .rp-filter-button { padding: 6px 12px !important; font-size: 0.95em !important; line-height: 1.5 !important; text-decoration: none !important; border-width: 1px !important; border-style: solid !important; border-radius: 3px !important; cursor: pointer; white-space: nowrap; text-align: center; flex-grow: 0; flex-shrink: 0; } a.rp-filter-button { border-color: #ccc !important; background-color: #f7f7f7 !important; color: #0073aa !important; } a.rp-filter-button:hover, a.rp-filter-button:focus { background-color: #f0f0f0 !important; border-color: #bbb !important; color: #333 !important; } button.rp-filter-button.current { background-color: #0073aa !important; border-color: #0073aa !important; color: #fff !important; font-weight: bold !important; opacity: 1 !important; cursor: default !important; }
.rp-message { padding: 1em 1.2em !important; margin: 1.5em 0 !important; border: 1px solid !important; border-radius: 4px !important; } .rp-message p:last-child { margin-bottom: 0 !important; } .rp-message.rp-success { background-color: #dff0d8 !important; border-color: #d6e9c6 !important; color: #3c763d !important; } .rp-message.rp-error { background-color: #f2dede !important; border-color: #ebccd1 !important; color: #a94442 !important; } .rp-message.rp-info { background-color: #d9edf7 !important; border-color: #bce8f1 !important; color: #31708f !important; }

/* --- Vendor Page Specific --- */
.rp-vendor-inquiries-page table.dokan-table th, .rp-vendor-inquiries-page table.dokan-table td { vertical-align: middle !important; }
.rp-vendor-inquiries-page table.form-table { border: none !important; width: 100%; margin-bottom: 1em; } .rp-vendor-inquiries-page table.form-table th, .rp-vendor-inquiries-page table.form-table td { border: none !important; background: none !important; font-size: inherit; padding: 8px 0 !important; } .rp-vendor-inquiries-page table.form-table th { width: 200px !important; font-weight: 600 !important; vertical-align: top; padding-top: 12px !important; text-align: left !important;} .rp-vendor-inquiries-page table.form-table td { padding-left: 10px !important; } .rp-vendor-inquiries-page table.form-table td.form-field { padding-top: 8px; }
.rp-vendor-inquiries-page .rp-status { font-weight: bold !important; }
.rp-vendor-inquiries-page .rp-single-inquiry-wrap { border: 1px solid #e5e5e5; padding: 25px; margin-top: 1.5em; background: #fff; box-shadow: 0 1px 1px rgba(0,0,0,.04); } .rp-vendor-inquiries-page .rp-back-link { margin-bottom: 1.5em; font-size: 0.95em; } .rp-vendor-inquiries-page .rp-request-details h3, .rp-vendor-inquiries-page .rp-reply-form h3, .rp-vendor-inquiries-page .rp-previous-reply h3 { margin-top: 1.5em; margin-bottom: 0.8em; padding-bottom: 0.3em; border-bottom: 1px solid #eee; font-size: 1.2em; font-weight: 600; }
.rp-vendor-inquiries-page td.form-field.rp-price-field .rp-input-group { display: flex; align-items: center; flex-wrap: nowrap; max-width: 250px; }
.rp-vendor-inquiries-page td.form-field.rp-price-field .rp-currency-symbol { padding-right: 5px; font-weight: bold; line-height: 1.5; padding-top: 5px; }
.rp-vendor-inquiries-page td.form-field.rp-price-field input.rp-price-input { flex-grow: 1; min-width: 120px; padding: 6px 8px !important; line-height: 1.5 !important; height: auto; }
.rp-vendor-inquiries-page td.form-field.rp-price-field p.description { clear: both; padding-top: 5px; margin-left: 0; width: 100%; font-size: 0.9em !important; color: #666 !important; margin-top: 5px !important;}
.rp-vendor-inquiries-page td.form-field.rp-price-field p.description.error { color: red !important; font-weight: bold; width: 100%; }

/* --- START: FINAL STYLES FOR ADD-ON REPEATER ALIGNMENT --- */
.rp-vendor-reply-form .rp-addon-fields-wrapper {
    display: flex;       /* Lays out the name and price columns in a row */
    flex-direction: row;
    flex-wrap: wrap;     /* Allows columns to wrap on small screens if needed */
    gap: 15px;           /* Space between the name column and price column */
    align-items: flex-start; /* Aligns the top of the name and price columns */
    margin-bottom: 10px; /* Space before the "Remove Add-on" button */
}

.rp-vendor-reply-form .rp-addon-name-field,
.rp-vendor-reply-form .rp-addon-price-field {
    display: flex;           /* Makes the label and input/input-group stack vertically */
    flex-direction: column;
}

.rp-vendor-reply-form .rp-addon-name-field {
    flex: 2 1 200px;     /* Name column: grow 2, shrink 1, basis 200px */
}

.rp-vendor-reply-form .rp-addon-price-field {
    flex: 1 1 150px;     /* Price column: grow 1, shrink 1, basis 150px */
}

.rp-vendor-reply-form .rp-addon-fields-wrapper label {
    margin-bottom: 5px;  /* Space between label and its input/input-group */
    font-weight: normal; /* Or your desired font weight */
}

.rp-vendor-reply-form .rp-addon-name-field .dokan-form-control,
.rp-vendor-reply-form .rp-addon-price-field .dokan-input-group {
    width: 100%;         /* Input/input-group takes full width of its column */
    box-sizing: border-box;
}

.rp-vendor-reply-form .rp-addon-item .rp-remove-addon {
    margin-top: 10px;    /* Space above the remove button */
    /* display: block; /* Not strictly necessary if it's the last element in .rp-addon-item */
}
/* --- END: FINAL STYLES FOR ADD-ON REPEATER ALIGNMENT --- */

.rp-vendor-inquiries-page .pagination-wrap { margin-top: 2em; text-align: center; clear: both; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers { display: inline-block; padding-left: 0; margin: 0; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.05); } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li { display: inline; margin: 0; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li .page-numbers { float: left; padding: 8px 12px; line-height: 1.5; text-decoration: none; color: #0073aa; background-color: #fff; border: 1px solid #ddd; margin-left: -1px; white-space: nowrap; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li:first-child .page-numbers { border-top-left-radius: 4px; border-bottom-left-radius: 4px; margin-left: 0; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li:last-child .page-numbers { border-top-right-radius: 4px; border-bottom-right-radius: 4px; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li .page-numbers:hover, .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li .page-numbers:focus { z-index: 2; color: #005177; background-color: #eee; border-color: #ddd; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li .page-numbers.current { z-index: 3; color: #fff; background-color: #0073aa; border-color: #0073aa; cursor: default; font-weight: bold; } .rp-vendor-inquiries-page .pagination-wrap ul.page-numbers li .page-numbers.dots { cursor: default; background-color: #fff; border-color: #ddd; padding: 8px 10px; }

/* --- Customer My Account Page Specific --- */
.rp-myaccount-container { padding: 0 0 20px 0 !important; }
.woocommerce-account .woocommerce-MyAccount-content table.rp-customer-inquiries { /* Inherit */ }
.woocommerce-account .woocommerce-MyAccount-content table.rp-customer-inquiries th,
.woocommerce-account .woocommerce-MyAccount-content table.rp-customer-inquiries td { vertical-align: middle !important; padding: 12px 15px !important; }
.rp-customer-inquiries .rp-customer-message-toggle summary { cursor: pointer; font-size: 0.9em; color: #555; margin-top: 8px; }
.rp-customer-inquiries .rp-customer-message-toggle summary:hover { color: #000; }
.rp-customer-inquiries .rp-customer-message-toggle p { margin-top: 5px; padding: 8px 0 0 15px; border-left: none; font-size: 0.9em; color: #666; }
.rp-myaccount-filters { margin-bottom: 1.5em; border-bottom: 1px solid #ddd; padding-bottom: 0; display: flex; gap: 0; flex-wrap: wrap; }
.rp-myaccount-filters .rp-filter-button { padding: 8px 15px !important; border: 1px solid transparent; border-bottom: none; margin-bottom: -1px; border-radius: 4px 4px 0 0 !important; background-color: #f7f7f7 !important; color: #555 !important; font-size: 0.95em !important; font-weight: normal !important; opacity: 0.8; text-decoration: none !important; }
.rp-myaccount-filters .rp-filter-button:hover { background-color: #eee !important; color: #333 !important; opacity: 1; }
.rp-myaccount-filters .rp-filter-button.current,
.rp-myaccount-filters .rp-filter-button.active { background-color: #fff !important; border-color: #ddd #ddd transparent #ddd !important; color: #333 !important; font-weight: bold !important; opacity: 1 !important; cursor: default !important; }
.rp-customer-inquiries .rp-status-badge { display: inline-block; padding: 4px 8px; font-size: 0.9em; font-weight: bold; border-radius: 4px; line-height: 1.4; text-align: center; white-space: nowrap; border: 1px solid transparent; }
.rp-customer-inquiries .status-pending .rp-status-badge { background-color: #f8dda7; color: #94660c; border-color: #f5cc7f; }
.rp-customer-inquiries .status-replied .rp-status-badge { background-color: #d9edf7; color: #31708f; border-color: #bce8f1; }
.rp-customer-inquiries .status-accepted .rp-status-badge { background-color: #dff0d8; color: #3c763d; border-color: #d6e9c6; }
.rp-customer-inquiries .status-declined .rp-status-badge { background-color: #f2dede; color: #a94442; border-color: #ebccd1; }
.rp-customer-inquiries .status-completed .rp-status-badge { background-color: #e5e5e5; color: #555; border-color: #dcdcdc; font-style: normal; }
.rp-customer-inquiries .request-details { font-size: 0.95em; }
.rp-customer-inquiries .rp-customer-actions { margin-top: 10px !important; padding-top: 10px !important; border-top: 1px solid #eee; }
.rp-customer-inquiries .rp-customer-actions button { margin-bottom: 5px !important; margin-right: 8px !important;}
.rp-customer-inquiries .woocommerce-button.rp-buy-now { margin-top: 10px; }
.rp-customer-inquiries .woocommerce-button.view { margin-top: 5px; }
/* --- Style for Vendor Attachment Download Link in My Account --- */
.rp-customer-inquiries .rp-vendor-attachment-download a.rp-download-vendor-attachment {
    padding: 5px 12px;          /* Adjust padding to make it smaller */
    font-size: 0.9em;           /* Make text smaller */
    line-height: 1.5;           /* Ensure text and icon align well */
    display: inline-block;      /* Prevent it from taking full width */
    width: auto;                /* Allow it to size based on content */
    text-decoration: none;      /* Ensure no underline if it's an <a> tag */
    /* You can keep or remove the 'button' and 'button-small' classes from the HTML
       depending on how much you want to inherit from default button styles.
       If you keep them, these CSS rules will override them. */
}

.rp-customer-inquiries .rp-vendor-attachment-download a.rp-download-vendor-attachment .dashicons {
    vertical-align: middle;
    margin-top: -3px; /* Fine-tune icon vertical alignment */
    margin-right: 3px; /* Space between icon and text */
}
/* --- End Style for Vendor Attachment --- */
.woocommerce-account .woocommerce-pagination { margin-top: 2em; }

/* --- Status Badges & Button Consistency --- */
/* ... (Keep As Is from User CSS) ... */


/* --- Responsive Adjustments Shared --- */
@media screen and (max-width: 768px) { .rp-page-container { padding: 15px !important; } .rp-page-container table.rp-requests-table td:before, .rp-page-container table.rp-customer-inquiries td:before { display: block; content: attr(data-title); float: left; font-weight: 600; margin-right: 10px;} .rp-page-container table.rp-requests-table td, .rp-page-container table.rp-customer-inquiries td { display: block; width: 100%; box-sizing: border-box; text-align: right !important; padding-left: 50% !important; position: relative; border-bottom: 1px dotted #eee; } .rp-page-container table.rp-requests-table td:last-child, .rp-page-container table.rp-customer-inquiries td:last-child { border-bottom: 1px solid #e0e0e0; } .rp-page-container table.rp-requests-table td:before { position: absolute; top: 12px; left: 15px; width: 45%; padding-right: 10px; white-space: nowrap; text-align: left !important; font-weight: bold; } .rp-page-container table.rp-customer-inquiries td:before { position: absolute; top: 12px; left: 15px; width: 45%; padding-right: 10px; white-space: nowrap; text-align: left !important; font-weight: bold; } .rp-page-container table.rp-requests-table thead, .rp-page-container table.rp-customer-inquiries thead { display: none; } .rp-vendor-inquiries-page table.form-table th, .rp-vendor-inquiries-page table.form-table td { display: block; width: 100%; text-align: left !important; padding-left: 0 !important; } .rp-vendor-inquiries-page table.form-table th { width: 100% !important; padding-bottom: 0 !important; } .rp-status-filters-buttons { justify-content: flex-start;} .rp-myaccount-filters { justify-content: flex-start; } .rp-customer-inquiries td[data-title="Vendor Reply / Action"] { text-align: left !important; padding-left: 15px !important;} .rp-customer-inquiries td[data-title="Vendor Reply / Action"]:before { display: none; } }

/* --- End of File --- */