/* Request for Price Badge */

.rfp-badge {

    display: inline-block;

    background-color: #f39c12;

    color: #fff;

    padding: 5px 10px;

    font-size: 12px;

    font-weight: bold;

    border-radius: 3px;

    margin-bottom: 10px;

}



/* Modal Styles */

.rfp-modal {

    display: none;

    position: fixed;

    z-index: 9999;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    overflow: auto;

    background-color: rgba(0, 0, 0, 0.5);

}



.rfp-modal-content {

    background-color: #fefefe;

    margin: 5% auto;

    padding: 20px;

    border: 1px solid #888;

    width: 80%;

    max-width: 600px;

    border-radius: 5px;

    position: relative;

    max-height: 90vh;

    overflow-y: auto;

}



.rfp-close {

    color: #aaa;

    float: right;

    font-size: 28px;

    font-weight: bold;

    cursor: pointer;

    line-height: 1;

}



.rfp-close:hover,

.rfp-close:focus {

    color: black;

    text-decoration: none;

}



.rfp-form-row {

    margin-bottom: 15px;

}



.rfp-form-row label {

    display: block;

    margin-bottom: 5px;

    font-weight: bold;

}



.rfp-form-row input,

.rfp-form-row textarea {

    width: 100%;

    padding: 8px;

    border: 1px solid #ddd;

    border-radius: 4px;

}



.rfp-cart-items {

    width: 100%;

    border-collapse: collapse;

    margin-bottom: 20px;

}



.rfp-cart-items th,

.rfp-cart-items td {

    padding: 8px;

    border: 1px solid #ddd;

}



.rfp-cart-items th {

    background-color: #f5f5f5;

    text-align: left;

}



.rfp-cart-items .rfp-item {

    background-color: #fffbea;

}



.rfp-form-actions {

    margin-top: 20px;

    text-align: right;

}



.rfp-success {

    color: #2ecc71;

    font-weight: bold;

}



.rfp-error {

    color: #e74c3c;

    font-weight: bold;

}



.rfp-pending {

    color: #f39c12;

    font-weight: bold;

}



/* Admin Styles */

.rfp-admin-details {

    margin-top: 20px;

}



.rfp-admin-box {

    background: #fff;

    border: 1px solid #ccd0d4;

    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);

    padding: 15px;

    margin-bottom: 20px;

}



.rfp-status {

    display: inline-block;

    padding: 3px 8px;

    border-radius: 3px;

    font-size: 12px;

    font-weight: bold;

}



.rfp-status-pending {

    background-color: #f39c12;

    color: #fff;

}



.rfp-status-approved {

    background-color: #2ecc71;

    color: #fff;

}



.rfp-status-rejected {

    background-color: #e74c3c;

    color: #fff;

}



.rfp-actions {

    margin-top: 20px;

    text-align: right;

}



.rfp-button-wrap {

    margin: 15px 0;

}



button.rfp-request-product-btn,

a.rfp-request-product-btn-loop {

    background-color: #f39c12;

    color: #fff;

    border: none;

}



button.rfp-request-product-btn:hover,

a.rfp-request-product-btn-loop:hover {

    background-color: #e67e22;

    color: #fff;

}



/* Dashboard widget */

.rfp-widget-footer {

    margin-top: 10px;

    padding-top: 10px;

    border-top: 1px solid #eee;

    text-align: right;

}



/* Responsive styles */

@media screen and (max-width: 782px) {

    .rfp-modal-content {

        width: 95%;

        margin: 10% auto;

    }

    

    .rfp-cart-items {

        font-size: 14px;

    }

}



/* Request Status Table Styles */

.rfp-status-table {

    width: 100%;

    border-collapse: collapse;

    margin-bottom: 20px;

}



.rfp-status-table th,

.rfp-status-table td {

    padding: 10px;

    border: 1px solid #ddd;

    text-align: left;

}



.rfp-status-table th {

    background-color: #f5f5f5;

    font-weight: bold;

}



.rfp-status-check-container {

    max-width: 600px;

    margin: 0 auto;

    padding: 20px;

    background: #f9f9f9;

    border: 1px solid #ddd;

    border-radius: 4px;

}



.rfp-status-check-container h3 {

    margin-top: 0;

}



.rfp-status-check-container .rfp-form-row {

    margin-bottom: 15px;

}



.rfp-status-check-container label {

    display: block;

    margin-bottom: 5px;

}



.rfp-status-check-container input {

    width: 100%;

    padding: 8px;

}



.rfp-status-check-container button {

    background-color: #f39c12;

    color: #fff;

    border: none;

}



.rfp-status-check-container button:hover {

    background-color: #e67e22;

}



.rfp-status-pending {

    background-color: #f39c12;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



.rfp-status-approved {

    background-color: #2ecc71;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



.rfp-status-rejected {

    background-color: #e74c3c;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



/* Custom styling for "Request for Price" text */

.rfp-custom-price {

    font-size: 1.41575em;

    margin-bottom: 1em;

}



.rfp-price-text {

    display: inline-block;

    font-weight: 700;

    color: #f39c12;

    background-color: #fffaec;

    padding: 5px 12px;

    border-radius: 3px;

    border: 1px solid #f8e2a9;

}



/* Style for the badge */

.rfp-badge {

    display: inline-block;

    background-color: #f39c12;

    color: #fff;

    padding: 5px 10px;

    font-size: 12px;

    font-weight: bold;

    border-radius: 3px;

    margin-bottom: 10px;

}



/* Cart styling */

.cart .rfp-price-text {

    background: none;

    border: none;

    padding: 0;

}



.rfp-reset-notice {

    background-color: #f8f9fa;

    border: 1px solid #dee2e6;

    padding: 15px;

    margin-bottom: 20px;

    border-radius: 4px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

}



.rfp-reset-notice p {

    margin: 0 15px 0 0;

    flex: 1;

}



.rfp-reset-notice .button {

    margin-left: auto;

}



@media (max-width: 768px) {

    .rfp-reset-notice {

        flex-direction: column;

        align-items: flex-start;

    }

    

    .rfp-reset-notice p {

        margin-bottom: 10px;

        width: 100%;

    }

    

    .rfp-reset-notice .button {

        margin-left: 0;

    }

}



.pdf-download-container {

    margin-bottom: 20px;

    position: relative;

}



.download-button {

    display: inline-flex;

    align-items: center;

    background-color: #4CAF50;

    color: white;

    padding: 10px 15px;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    font-size: 16px;

    transition: background-color 0.3s;

}



.download-button:hover {

    background-color: #45a049;

}



.download-icon {

    width: 20px;

    height: 20px;

    margin-right: 8px;

}



#loader-download {

    display: none;

    margin-left: 10px;

    vertical-align: middle;

}



#loader-download img {

    width: 24px;

    height: 24px;

}



/* Classes for PDF generation */

.pdf-page-break {

    page-break-before: always;

    clear: both;

}



.pdf-sqwire-logo {

    position: absolute;

    top: 15px;

    right: 30px;

    max-height: 30px;

    z-index: 9999;

}



/* Achievement section specific styling for PDF */

.pdf-achievements-wrapper {

    margin-top: 40px; /* Default margin that can be adjusted by JS */

    padding-top: 20px;

    position: relative;

}



/* Add this section to handle duplicate elements */

/* Prevent duplicate Request for Price elements */

.rfp-price-container:not(:first-of-type),

.rfp-price-text:not(:first-of-type) {

    display: none !important;

}



/* Ensure only one Request for Price badge is displayed per product */

.products .product .rfp-badge:not(:first-of-type) {

    display: none !important;

}



/* Make sure only one price container is shown on single product page */

.single-product .rfp-price:not(#rfp-price) {

    display: none !important;

}



/* Add proper structure for RFP elements */

.rfp-price-container {

    display: block;

    margin: 1em 0;

}



/* Product archive/shop page styles */

.products .product .rfp-price-container {

    display: block;

    margin: 0.5em 0;

    text-align: center;

}



/* Cart page styles */

.cart .rfp-price-text {

    display: inline-block;

    font-weight: 700;

    color: #f39c12;

    background-color: #fffaec;

    padding: 5px 12px;

    border-radius: 3px;

    border: 1px solid #f8e2a9;

}



/* End duplicate elements handling */



.rfp-status-check-container button:hover {

    background-color: #e67e22;

}



.rfp-status-pending {

    background-color: #f39c12;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



.rfp-status-approved {

    background-color: #2ecc71;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



.rfp-status-rejected {

    background-color: #e74c3c;

    color: #fff;

    padding: 3px 6px;

    border-radius: 3px;

    font-size: 12px;

}



/* Custom styling for "Request for Price" text */

.rfp-custom-price {

    font-size: 1.41575em;

    margin-bottom: 1em;

}



.rfp-price-text {

    display: inline-block;

    font-weight: 700;

    color: #f39c12;

    background-color: #fffaec;

    padding: 5px 12px;

    border-radius: 3px;

    border: 1px solid #f8e2a9;

}



/* Style for the badge */

.rfp-badge {

    display: inline-block;

    background-color: #f39c12;

    color: #fff;

    padding: 5px 10px;

    font-size: 12px;

    font-weight: bold;

    border-radius: 3px;

    margin-bottom: 10px;

}



/* Cart styling - keeping original price text but adding visibility rules */

.cart .rfp-price-text {

    background: none;

    border: none;

    padding: 0;

}



/* Response container for messages */

#rfp-response-container {

    margin: 1em 0;

    padding: 10px;

    border-radius: 4px;

}



#rfp-response-container .rfp-notice {

    padding: 10px;

    margin-bottom: 10px;

    border-radius: 4px;

}



#rfp-response-container .rfp-notice.success {

    background-color: #d4edda;

    border: 1px solid #c3e6cb;

    color: #155724;

}



#rfp-response-container .rfp-notice.error {

    background-color: #f8d7da;

    border: 1px solid #f5c6cb;

    color: #721c24;

}



#rfp-response-container .rfp-notice.info {

    background-color: #d1ecf1;

    border: 1px solid #bee5eb;

    color: #0c5460;

}



#rfp-response-container .rfp-notice.submitting {

    background-color: #fff3cd;

    border: 1px solid #ffeeba;

    color: #856404;

}



.rfp-reset-notice {

    background-color: #f8f9fa;

    border: 1px solid #dee2e6;

    padding: 15px;

    margin-bottom: 20px;

    border-radius: 4px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

}



.rfp-reset-notice p {

    margin: 0 15px 0 0;

    flex: 1;

}



.rfp-reset-notice .button {

    margin-left: auto;

}



@media (max-width: 768px) {

    .rfp-reset-notice {

        flex-direction: column;

        align-items: flex-start;

    }

    

    .rfp-reset-notice p {

        margin-bottom: 10px;

        width: 100%;

    }

    

    .rfp-reset-notice .button {

        margin-left: 0;

    }

}



.pdf-download-container {

    margin-bottom: 20px;

    position: relative;

}



/* Cart pending price styles */

.rfp-pending-note {

    display: inline-block;

    color: #856404;

    background-color: #fff3cd;

    font-size: 0.85em;

    padding: 3px 8px;

    border-radius: 3px;

    margin-left: 5px;

    border: 1px solid #ffeeba;

    white-space: nowrap;

    margin: 0;

    min-width: 120px;

    text-align: center;

}



.cart_totals tr.cart-subtotal td:empty, 

.cart_totals tr.order-total td:empty {

    position: relative;

    min-height: 24px;

}



.cart_totals tr.cart-subtotal td:empty:after, 

.cart_totals tr.order-total td:empty:after {

    content: '';

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

    background-color: #fff3cd;

    border-radius: 3px;

    animation: pulse 1.5s infinite;

}



@keyframes pulse {

    0% { opacity: 0.6; }

    50% { opacity: 0.8; }

    100% { opacity: 0.6; }

}



.cart .product-subtotal .rfp-pending-note {

    margin: 0;

}



/* Ensure cart totals are always visible */

.cart_totals tr.cart-subtotal td,

.cart_totals tr.order-total td {

    min-height: 24px;

    min-width: 100px;

}



.rfp-status-badge {

    display: inline-block;

    font-size: 11px;

    padding: 2px 6px;

    border-radius: 3px;

    margin-left: 5px;

    font-weight: normal;

    vertical-align: middle;

}



.rfp-status-badge.pending {

    color: #856404;

    background-color: #fff3cd;

    border: 1px solid #ffeeba;

}



.rfp-status-badge.approved {

    color: #155724;

    background-color: #d4edda;

    border: 1px solid #c3e6cb;

}



/* Cart status indicators for RFP products */

.rfp-price-container {

    display: inline-block;

}



.rfp-price-container.pending {

    background-color: #fff3cd;

    border: 1px solid #ffeeba;

    padding: 3px 8px;

    border-radius: 3px;

}



.rfp-price-container.approved {

    background-color: #d4edda;

    border: 1px solid #c3e6cb;

    padding: 3px 8px;

    border-radius: 3px;

}



.rfp-cart-status {

    display: inline-block;

    font-size: 11px;

    padding: 2px 6px;

    border-radius: 3px;

    margin-left: 5px;

    font-weight: normal;

    vertical-align: middle;

}



.rfp-cart-status.pending {

    color: #856404;

    background-color: #fff3cd;

    border: 1px solid #ffeeba;

}



.rfp-cart-status.approved {

    color: #155724;

    background-color: #d4edda;

    border: 1px solid #c3e6cb;

}



/* Improve checkout button styles for Request for Price */

#rfp-request-button {

    width: 100%;

    margin-top: 10px;

}



/* Request for Price Single Product Label */

.rfp-single-product-label {

    display: inline-block;

    background-color: #f8f8f8;

    color: #333;

    padding: 8px 15px;

    border-radius: 4px;

    font-weight: 600;

    margin-bottom: 15px;

    border: 1px solid #ddd;

    box-shadow: 0 1px 3px rgba(0,0,0,0.1);

}



.rfp-single-product-label:before {

    display: inline-block;

    background-color: #ff6b6b;

    color: white;

    width: 20px;

    height: 20px;

    border-radius: 50%;

    text-align: center;

    line-height: 20px;

    margin-right: 8px;

    font-weight: bold;

}



/* Admin styles */

.rfp-price-input.price-error {

    border: 2px solid #dc3232 !important;

    background-color: rgba(220, 50, 50, 0.08) !important;

}



/* Ensure the error stands out in the admin UI */

.widefat input.rfp-price-input.price-error {

    box-shadow: 0 0 0 1px #dc3232;

}



/* Empty price warning message */

.empty-price-warning {

    color: #dc3232;

    font-size: 12px;

    display: block;

    margin-top: 5px;

    font-style: italic;

}



body.single-product .rfp-status.approved {

    display: none !important;

}


.dashicons, .dashicons-before:before {line-height: 1.5 !important;}