/**
 * SupportCandy Custom Ticket Fields Styles
 */

.wpsc-itw-custom-ticket-fields {
    border-radius: 4px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 0.5rem;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.wpsc-itw-custom-ticket-fields .wpsc-widget-body {
    padding: 15px;
}

.wpsc-itw-custom-ticket-fields .info-list-item {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.wpsc-itw-custom-ticket-fields .info-list-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wpsc-itw-custom-ticket-fields .info-label {
    color: #555;
}

.wpsc-itw-custom-ticket-fields .info-val {
    flex: 1;
}

/* Special styling for products and supplier data - override default flex layout */
.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item {
    display: block;
    align-items: unset;
    flex-wrap: unset;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item .info-label {
    display: block;
    min-width: unset;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item .info-val {
    display: block;
    flex: unset;
    color: #333;
    line-height: 1.8;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item .info-val > div {
    margin: 0;
    padding: 0;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item .info-val > div > div {
    margin-bottom: 4px;
    color: #6b7280;
}

.wpsc-itw-custom-ticket-fields .wpsc-widget-body .info-list-item.wpsc-ctf-special-item .info-val > div > div strong {
    font-weight: 500;

}

.wpsc-itw-custom-ticket-fields .wpsc-widget-default {
    text-align: center;
    color: #d5d4d4;
    padding: 5px 0;
}

/* Products Selection Section */
.wpsc-tff.wpsc-ctf-products-section,
.wpsc-ctf-products-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
}

.wpsc-ctf-products-section.read-only {
border: 1px solid #3b82f6;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-products-header h3 {
    color: #3b82f6;
}



/* Allow Used Quantity to be editable even in read-only mode */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-product-used-quantity,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-qty-btn[data-quantity-type="used"],
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-quantity-field .wpsc-ctf-product-used-quantity,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-quantity-field .wpsc-ctf-qty-btn[data-quantity-type="used"] {
    pointer-events: auto !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card input,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card button {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
}

/* Exclude Used Quantity from not-allowed cursor */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-product-used-quantity,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-qty-btn[data-quantity-type="used"],
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable input,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable button {
    cursor: default !important;
}

/* Override for Used Quantity inputs and buttons */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-product-used-quantity {
    background-color: #ffffff !important;
    cursor: text !important;
    border: 1px solid #3b82f6 !important;
    padding: 6px 0;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-qty-btn[data-quantity-type="used"] {
    background-color: #3b82f6 !important;
    cursor: pointer !important;
    color: white !important;
    padding: 8px 0 !important;
    border-radius: 12px;
}

/* Ensure the container div also has proper cursor */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable > div[style*="display: flex"],
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable div {
    cursor: default !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable > div[style*="display: flex"] > * {
    cursor: inherit !important;
}

/* Specific cursor styles for Used Quantity elements */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable input[type="number"] {
    cursor: text !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable button:not(:disabled) {
    cursor: pointer !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable button:disabled {
    cursor: not-allowed !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-qty-btn[data-quantity-type="used"]:hover:not(:disabled) {
    background-color: #135e96 !important;
}

.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-qty-btn[data-quantity-type="used"]:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Ensure the entire quantity field container for Used Quantity is interactive */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-quantity-field:has(.wpsc-ctf-product-used-quantity) {
    pointer-events: auto !important;
}

/* Fallback: Make sure all elements inside Used Quantity field are interactive */
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-quantity-field .wpsc-ctf-product-used-quantity,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-quantity-field .wpsc-ctf-qty-btn[data-quantity-type="used"],
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable,
.wpsc-ctf-products-section.read-only .wpsc-ctf-product-card .wpsc-ctf-used-quantity-editable * {
    pointer-events: auto !important;
}

.wpsc-ctf-read-only-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #3b82f6;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.wpsc-ctf-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3b82f6;
}

.wpsc-ctf-products-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wpsc-ctf-products-search input {
    flex: 1;
    min-width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wpsc-ctf-products-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wpsc-ctf-products-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wpsc-ctf-selected-products {
    background: #f0f6fc;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3d4e6;
}

.wpsc-ctf-selected-products h4 {
    margin: 0 0 10px 0;
    color: #3b82f6;
    font-size: 13px;
}

.wpsc-ctf-selected-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.wpsc-ctf-selected-badge {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wpsc-ctf-sync-products-btn,
.wpsc-ctf-sync-supplier-data-btn,
.wpsc-ctf-sync-contractor-data-btn {
    position: relative;
}

.wpsc-ctf-sync-products-btn:hover,
.wpsc-ctf-sync-supplier-data-btn:hover,
.wpsc-ctf-sync-contractor-data-btn:hover {
    transform: rotate(180deg);
}

.wpsc-ctf-sync-products-btn.loading,
.wpsc-ctf-sync-supplier-data-btn.loading,
.wpsc-ctf-sync-contractor-data-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.wpsc-ctf-sync-products-btn.loading svg,
.wpsc-ctf-sync-supplier-data-btn.loading svg,
.wpsc-ctf-sync-contractor-data-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wpsc-ctf-available-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
    
}

.wpsc-ctf-available-badge.in-stock {
    background: #d1e7dd;
    color: #0f5132;
    padding: 0.25rem 0.625rem;
}
.wpsc-ctf-available-badge.low-stock {
    background: #fef3c7 ;
    color: #d97706 ;
    padding: 0.25rem 0.625rem;
}

.wpsc-ctf-available-badge.out-of-stock {
    background: #f8d7da;
    color: #842029;
    padding: 0.25rem 0.625rem;
}

.wpsc-ctf-products-empty {
    text-align: center;
    padding: 40px 20px;
    color: #646970;
}

.wpsc-ctf-category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.wpsc-ctf-category-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #646970;
    transition: all 0.3s;
}

.wpsc-ctf-category-tab:hover {
    color: #3b82f6;
}

.wpsc-ctf-category-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.wpsc-ctf-category-content {
    display: none;
}

.wpsc-ctf-category-content.active {
    display: block;
}

/* Supplier Data Selection Section */
.wpsc-tff.wpsc-ctf-supplier-data-section,
.wpsc-ctf-supplier-data-section {
    margin-top: 20px;
    padding: 0 !important;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.wpsc-ctf-supplier-data-section.read-only {
border: 1px solid #3b82f6;
}

.wpsc-ctf-supplier-data-section.read-only .wpsc-ctf-products-header h3 {
    color: #3b82f6;
}



.wpsc-ctf-supplier-data-section.read-only .wpsc-ctf-product-card input,
.wpsc-ctf-supplier-data-section.read-only .wpsc-ctf-product-card button {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
}

/* Modal styles are handled by SupportCandy framework */
.wpsc-modal-body .wpsc-tff {
    padding: 15px !important;
}

/* Status Field Badge Styles */
.wpsc-ctf-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Sync Button - Enhanced */
.wpsc-ctf-sync-products-btn,
.wpsc-ctf-sync-supplier-data-btn,
.wpsc-ctf-sync-contractor-data-btn {
    background: #f0f0f0 !important;
    border: 1.5px solid #ddd !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #3b82f6 !important;
    transition: all 0.3s ease !important;
}

.wpsc-ctf-sync-products-btn:hover,
.wpsc-ctf-sync-supplier-data-btn:hover,
.wpsc-ctf-sync-contractor-data-btn:hover {
    background: #3b82f6 !important;
    color: #fff !important;
    border-color: #3b82f6 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
}

.wpsc-ctf-sync-products-btn.loading,
.wpsc-ctf-sync-supplier-data-btn.loading,
.wpsc-ctf-sync-contractor-data-btn.loading {
    opacity: 0.7;
    cursor: not-allowed !important;
}

/* Selected Count Badge */
.wpsc-ctf-selected-count {
    font-size: 13px !important;
    color: #646970 !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    background: #f0f0f0 !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
}

.wpsc-ctf-selected-count .selected-count,
.wpsc-ctf-selected-count .supplier-data-selected-count {
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

/* Check-in/Check-out Buttons */
.wpsc-ctf-checkin-buttons {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.wpsc-ctf-checkin-buttons > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Check-in Button - Active State */
.button.button-primary.wpsc-ctf-checkin-btn {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: #fff !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 163, 42, 0.2) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    width: 100%;
}

.button.button-primary.wpsc-ctf-checkin-btn:hover {
    background: #008a20 !important;
    border-color: #008a20 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 163, 42, 0.3) !important;
}

.button.button-primary.wpsc-ctf-checkin-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 163, 42, 0.2) !important;
}

.button.button-primary.wpsc-ctf-checkin-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.2) !important;
}

.button.button-primary.wpsc-ctf-checkin-btn.processing {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.button.button-primary.wpsc-ctf-checkin-btn .dashicons {
    font-size: 16px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    width: 16px !important;
    height: 16px !important;
}

/* Check-out Button - Active State */
.button.wpsc-ctf-checkout-btn:not(:disabled) {
    background: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(214, 54, 56, 0.2) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    width: 100%;
}

.button.wpsc-ctf-checkout-btn:not(:disabled):hover {
    background: #b32d2e !important;
    border-color: #b32d2e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(214, 54, 56, 0.3) !important;
}

.button.wpsc-ctf-checkout-btn:not(:disabled):active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(214, 54, 56, 0.2) !important;
}

.button.wpsc-ctf-checkout-btn:not(:disabled):focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.2) !important;
}

.button.wpsc-ctf-checkout-btn.processing {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Check-out Button - Disabled State */
.button.wpsc-ctf-checkout-btn:disabled {
    background: #dcdcde !important;
    border-color: #dcdcde !important;
    color: #8c8f94 !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    pointer-events: none !important;
    width: 100%;
}

.button.wpsc-ctf-checkout-btn:disabled .dashicons {
    color: #8c8f94 !important;
}

.button.wpsc-ctf-checkout-btn .dashicons {
    font-size: 16px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    width: 16px !important;
    height: 16px !important;
}

/* Completed States */
.wpsc-ctf-checkin-completed,
.wpsc-ctf-checkout-completed {
    padding: 10px 20px !important;
    background: #f0f0f1 !important;
    border: 1px solid #dcdcde !important;
    border-radius: 4px !important;
    color: #646970 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.5 !important;
    width: 100%;
}

.wpsc-ctf-checkin-completed .dashicons {
    font-size: 16px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    color: #00a32a !important;
    width: 16px !important;
    height: 16px !important;
}

.wpsc-ctf-checkout-completed .dashicons {
    font-size: 16px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    color: #d63638 !important;
    width: 16px !important;
    height: 16px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpsc-ctf-checkin-buttons > div {
        flex-direction: column;
    }
    
    .button.button-primary.wpsc-ctf-checkin-btn,
    .button.wpsc-ctf-checkout-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Check-out Modal */
#wpsc-ctf-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wpsc-ctf-checkout-modal > div {
    position: relative;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#wpsc-ctf-checkout-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2327;
    
}

#wpsc-ctf-checkout-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1d2327;
}

#wpsc-ctf-checkout-modal select,
#wpsc-ctf-checkout-modal input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s ease;
}

#wpsc-ctf-checkout-modal select:focus,
#wpsc-ctf-checkout-modal input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
    font-weight: 600;
}

#wpsc-ctf-checkout-modal .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

#wpsc-ctf-checkout-modal .button-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

#wpsc-ctf-checkout-modal .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.3);
}

#wpsc-ctf-checkout-modal .button-primary.processing {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Payment Installments Section Styles */
.wpsc-ctf-installments-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wpsc-ctf-installments-section h3 {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpsc-ctf-installments-section > div:first-of-type {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #d5d5d5;
    font-weight: 500;
}

.wpsc-ctf-installments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpsc-ctf-installment-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    flex-direction: column;
    gap: 10px;
}

.wpsc-ctf-installment-item > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpsc-ctf-installment-item > div:first-child strong {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.wpsc-ctf-installment-item > div:first-child span {
    color: #059669;
    font-weight: 600;
    font-size: 12px;
    background-color: #ecfdf5;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Payment Requests Section - Same styles as installments section */
.wpsc-ctf-payment-requests-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wpsc-ctf-payment-requests-section .wpsc-ctf-payment-requests-title {
    color: #5f5f5f;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpsc-ctf-payment-requests-section .wpsc-ctf-installments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Payment Request Item Styles - Same as installment-item */
.wpsc-ctf-payment-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 10px;
    flex-direction: row;
    gap: 10px;
}

/* Payment Request Item in Modal Body - Column layout */
.wpsc-modal-body .wpsc-ctf-payment-request-item {
    flex-direction: column;
}

.wpsc-ctf-payment-request-item > div:first-child {

}

.wpsc-ctf-payment-request-item > div:first-child strong {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    padding-right: 10px;
}

.wpsc-ctf-payment-request-item .wpsc-ctf-stage-view-image {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.wpsc-ctf-payment-request-item .wpsc-ctf-stage-view-image span {
    background: unset;
}

.wpsc-ctf-payment-request-item .wpsc-ctf-stage-view-image a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.wpsc-ctf-payment-request-item .wpsc-ctf-stage-view-image a:hover {
    text-decoration: underline;
    background: none !important;
}

.wpsc-ctf-installment-item .wpsc-ctf-status-paid {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #15803d !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    background-color: #dcfce7 !important;
    padding: 6px 12px !important;
    border-radius: 0.375rem !important;
    border: 1px solid #bbf7d0 !important;
    justify-content: center;
}

.wpsc-ctf-installment-item .wpsc-ctf-status-paid small {
    margin-left: 8px;
}

.wpsc-ctf-installment-item .wpsc-ctf-status-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #d97706 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    background-color: #fef3c7 !important;
    padding: 6px 12px !important;
    border-radius: 0.375rem  !important;
    border: 1px solid #fde68a !important;
}

.wpsc-ctf-installment-item .wpsc-ctf-status-invoiced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #3b82f6 !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    background-color: #eff6ff !important;
    padding: 6px 12px !important;
    border-radius: 0.375rem !important;
    border: 1px solid #93c5fd !important;
}

.wpsc-ctf-installments-section p {
    margin: 0;
    padding: 20px;
    color: #64748b;
    font-style: italic;
    text-align: center;
    background: #f8fafc;
    font-size: 14px;
}

/* Installments Management Section */
.wpsc-ctf-installments-management-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
}

.wpsc-ctf-installments-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.wpsc-ctf-installments-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.wpsc-ctf-installments-header p {
    margin: 5px 0 0 0;
    color: #646970;
    font-size: 13px;
    font-style: normal;
}

.wpsc-ctf-installments-count-section {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wpsc-ctf-installments-count-section label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

#wpsc_ctf_installments_count {
    width: 100px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-align: center;
}

#wpsc_ctf_installments_count:hover,
#wpsc_ctf_installments_count:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background-color: #f8fafc;
    outline: none;
}

#wpsc_ctf_new_payment_amount_widget {
    background-color: #f8fafc;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}
.wpsc-ctf-installments-count-section .description {
    margin-top: 5px;
    font-size: 12px;
    color: #646970;
    flex-basis: 100%;
}

.wpsc-ctf-installments-prices-section {
    margin-top: 20px;
}

.wpsc-ctf-installments-prices-section label {
    display: block;
    padding-bottom: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.wpsc-ctf-installment-price-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.wpsc-ctf-installment-price-item > div {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.wpsc-ctf-installment-price-item > div > div:first-child {
    flex: 1;
    min-width: 200px;
}

.wpsc-ctf-installment-price-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;}

.wpsc-ctf-installment-price-item > div > div:last-child label {
    width: 100%;
    text-align: center;
    font-weight: 600;
}

.wpsc-ctf-installment-price-item > div > div:first-child > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wpsc-ctf-installment-price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wpsc-ctf-installment-price-input[readonly] {
    background: #e8f5e9;
}

.wpsc-ctf-save-installment-price-btn {
    padding: 8px 15px;
    font-size: 13px;
    white-space: nowrap;
}

.wpsc-ctf-installment-price-item > div > div:last-child {
    flex: 0 0 auto;
}

.wpsc-ctf-installment-price-item .wpsc-ctf-status-badge-paid {
    display: inline-block;
    padding: 8px 28px;
    color: #15803d;
    font-weight: 500;
    font-size: 14px;
    background-color: #dcfce7;
    border-radius: 0.375rem;
    border: 1px solid #bbf7d0;
}

.wpsc-ctf-installment-price-item .wpsc-ctf-status-badge-pending {
    display: inline-block;
    padding: 8px 15px;
    background: #fef3c7;
    color: #d97706;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 14px;
}

.wpsc-ctf-installment-price-item .wpsc-ctf-status-badge-invoiced {
    display: inline-block;
    padding: 8px 20px;
    background: #eff6ff;
    color: #3b82f6;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #93c5fd;
}

/* Installments Confirmation Section */
.wpsc-ctf-installments-confirmation-section {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
}

.wpsc-ctf-installments-confirmation-list {
    margin-top: 10px;
}

.wpsc-ctf-installment-confirmation-item {
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #ddd;
    border-radius: 6px;
}

.wpsc-ctf-installment-confirmation-item > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.wpsc-ctf-installment-confirmation-item > div > div:first-child {
    flex: 1;
    min-width: 200px;
}

.wpsc-ctf-installment-confirmation-item strong {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.wpsc-ctf-installment-confirmation-item > div > div:first-child > div {
    margin-top: 5px;
    color: #059669;
    font-weight: 600;
    font-size: 12px;
    background-color: #ecfdf5;
    padding: 4px 8px;
    border-radius: 6px;
    width: max-content;
}

.wpsc-ctf-installment-confirmation-item > div > div:first-child > div:last-child {
    margin-top: 5px;
    color: #059669;
    font-weight: 600;
    font-size: 12px;
    background-color: #ecfdf5;
    padding: 4px 8px;
    border-radius: 6px;
    width: max-content;
}

.wpsc-ctf-installment-confirmation-item > div > div:last-child {
    display: contents;
}

.wpsc-ctf-installment-confirmation-item .wpsc-ctf-confirm-payment-btn {
    padding: 10px 20px;
    font-size: 14px;
}

.wpsc-ctf-installment-confirmation-item .wpsc-ctf-status-paid-badge {
    color: #15803d ;
    font-weight: 500 ;
    font-size: 14px ;
    background-color: #dcfce7 ;
    padding: 6px 12px ;
    border-radius: 0.375rem ;
    border: 1px solid #bbf7d0 ;
}

.wpsc-ctf-installment-confirmation-item .wpsc-ctf-status-Invoiced-badge {
    color: #3b82f6;
    font-weight: 500;
    font-size: 14px;
    background-color: #eff6ff;
    padding: 6px 12px;
    border-radius: 0.375rem;
    border: 1px solid #93c5fd;
    display: inline-block;
}

.wpsc-ctf-installment-confirmation-item .wpsc-ctf-approve-invoice-btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* Installments Read Only Section */
.wpsc-ctf-installments-read-only-section {
    margin-top: 20px;
    padding: 20px;
border: 1px solid #3b82f6;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.wpsc-ctf-installments-read-only-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
    border-radius: 10px 10px 0 0;
}

.wpsc-ctf-installments-read-only-section .wpsc-ctf-installments-header h3 {
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpsc-ctf-installments-read-only-section .wpsc-ctf-installment-confirmation-item {
    opacity: 0.95;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid #e2e8f0;
}

.wpsc-ctf-installments-read-only-section .wpsc-ctf-installment-confirmation-item button {
    display: none !important;
}

/* Read Only Section Styles */
.wpsc-ctf-read-only-section {
    margin-top: 40px;
    margin-bottom: 20px;
    padding: 25px;
border: 1px solid #3b82f6;
    border-radius: 10px;
    clear: both;
    position: relative;
    pointer-events: none;
}

.wpsc-ctf-read-only-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
    border-radius: 10px 10px 0 0;
}

/* Spacing between sections */
.wpsc-ctf-products-section + .wpsc-ctf-read-only-section,
.wpsc-ctf-supplier-data-section + .wpsc-ctf-read-only-section,
.wpsc-ctf-installments-management-section + .wpsc-ctf-read-only-section,
.wpsc-ctf-installments-confirmation-section + .wpsc-ctf-read-only-section {
    margin-top: 50px;
    border-top: 4px solid rgba(219, 166, 23, 0.3);
    padding-top: 35px;
    position: relative;
}

.wpsc-ctf-products-section + .wpsc-ctf-read-only-section::before,
.wpsc-ctf-supplier-data-section + .wpsc-ctf-read-only-section::before,
.wpsc-ctf-installments-management-section + .wpsc-ctf-read-only-section::before,
.wpsc-ctf-installments-confirmation-section + .wpsc-ctf-read-only-section::before {
    top: -4px;
}

.wpsc-ctf-read-only-section h3 {
    margin: 0 0 12px 0;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;

}

.wpsc-ctf-read-only-section h3 .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    color: #3b82f6;
}

.wpsc-ctf-read-only-section > p {
    margin: 0 0 25px 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.7;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wpsc-ctf-read-only-section .wpsc-tff {
    opacity: 0.98;
}



.wpsc-ctf-read-only-section .wpsc-tff input,
.wpsc-ctf-read-only-section .wpsc-tff select,
.wpsc-ctf-read-only-section .wpsc-tff textarea,
.wpsc-ctf-read-only-section .wpsc-tff .select2-container {
    background-color: #f8f8f8 !important;
    cursor: not-allowed !important;
    border-color: #d0d0d0 !important;
    color: #646970 !important;
    opacity: 0.9;
}

.wpsc-ctf-read-only-section .wpsc-tff input:focus,
.wpsc-ctf-read-only-section .wpsc-tff select:focus,
.wpsc-ctf-read-only-section .wpsc-tff textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #d0d0d0 !important;
}

/* Hide Select2 search field in Read Only section */
.wpsc-ctf-read-only-section .wpsc-tff .select2-search--inline,
.wpsc-ctf-read-only-section .wpsc-tff .select2-search__field {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.wpsc-ctf-read-only-section .wpsc-tff .select2-selection__rendered {
    padding-right: 5px !important;
}

.wpsc-ctf-read-only-section .wpsc-tff .select2-selection__choice__remove {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.wpsc-ctf-read-only-section .wpsc-tff-label {
    color: #646970;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.wpsc-ctf-read-only-section .wpsc-tff-label::after {
    content: ' (Read Only)';
    font-size: 11px;
    font-weight: 400;
    color: #3b82f6;
    font-style: italic;
    margin-left: 5px;
}

/* Real-time field visibility styles */
.wpsc-it-widget-custom-ticket-fields .wpsc-tff.wpsc-hidden {
    display: none !important;
}

.wpsc-it-widget-custom-ticket-fields .wpsc-tff.wpsc-visible {
    /* Allow CSS to control display property naturally - don't force block */
    /* The inline style removal in JS will handle this */
}

/* Product category visibility filtering */
.wpsc-ctf-product-card.wpsc-ctf-category-hidden {
    display: none !important;
}

.wpsc-ctf-visibility-loader {
    min-height: 20px;
    margin-bottom: 10px;
}

.wpsc-ctf-visibility-loader .wpsc-inline-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* -------------------------------------------------------------- */
/* Products Selection Redesign (Tailwind-inspired)                */
/* Mirrors the visual style from code.html while keeping markup   */
/* and JS hooks intact.                                           */
/* -------------------------------------------------------------- */

.wpsc-ctf-products-section {
    padding: 24px;
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f4f6 100%);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: visible;
}

.wpsc-ctf-products-section.read-only {
border: 1px solid #3b82f6;
}

.wpsc-ctf-products-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    position: sticky;
    z-index: 20;
}

.wpsc-ctf-products-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

.wpsc-ctf-products-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.wpsc-ctf-products-header > div:last-child {
    gap: 10px;
}

.wpsc-ctf-selected-count {
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #3b82f6!important;
    border-radius: 9999px !important;
}

.wpsc-ctf-selected-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #eff6ff80;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12);
}

.wpsc-ctf-selected-products h4 {
    font-size: 14px;
    font-weight: 500;
    color: #3b82f6;

}

.wpsc-ctf-selected-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.wpsc-ctf-selected-badge {

}

/* Styling for full product cards in selected list */
.wpsc-ctf-selected-list .wpsc-ctf-selected-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border: 1px solid #c3d4e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wpsc-ctf-selected-list .wpsc-ctf-selected-placeholder {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0f6fc;
    border: 1px solid #c3d4e6;
    border-radius: 6px;
}

.wpsc-ctf-products-search {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    padding: 14px 16px;
    margin: 0 0 16px 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.wpsc-ctf-search-input,
.wpsc-ctf-filter-select {
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 14px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
}

.wpsc-ctf-search-input {
    padding-left: 12px;
}

.wpsc-ctf-search-input:focus,
.wpsc-ctf-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.wpsc-ctf-filter-select {
    cursor: pointer;
}

.wpsc-ctf-products-grid {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    max-height: 65vh;
    overflow-y: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.wpsc-ctf-products-grid::-webkit-scrollbar {
    width: 8px;
}

.wpsc-ctf-products-grid::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.55);
    border-radius: 20px;
}

.wpsc-ctf-product-card {
    position: relative;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: all 0.25s ease;
}

.wpsc-ctf-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    border-radius: 14px 14px 0 0;
    transition: opacity 0.2s ease;
}

.wpsc-ctf-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(59, 130, 246, 0.12);
}

.wpsc-ctf-product-card:hover::before {
    opacity: 0.7;
}

.wpsc-ctf-product-card.selected {
    border: 2px solid #3b82f6;
}

.wpsc-ctf-product-name {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

.wpsc-ctf-product-name span {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
}

.wpsc-ctf-product-info {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.wpsc-ctf-product-info span {
    padding: 4px 0 4px 10px;
    border-left: 2px solid #e5e7eb;
    margin-bottom: 4px;
    font-weight: 600;
}

.wpsc-ctf-available-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wpsc-ctf-available-badge.in-stock {
    background: #e0f2f1;
    color: #0f766e;
    border-color: #99f6e4;
    padding: 0.25rem 0.625rem;
}

.wpsc-ctf-available-badge.low-stock {
    background: #fef3c7;
    color: #a16207;
    border-color: #fcd34d;
    padding: 0.25rem 0.625rem;
}

.wpsc-ctf-available-badge.out-of-stock {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
    padding: 0.25rem 0.625rem;
}

.wpsc-ctf-product-quantity-controls {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    font-weight: 500;
    font-size: 0.875rem;
}

.wpsc-ctf-quantity-field label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.2px;
}

.wpsc-ctf-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #111827;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    border-radius: 0;
}

.wpsc-ctf-qty-btn:hover:not(:disabled) {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.wpsc-ctf-qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wpsc-ctf-qty-input {
    width: 74px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: #ffffff;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    transition: all 0.15s ease;
    padding: 0 6px;
}

.wpsc-ctf-qty-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Ensure both requested and used quantity inputs share the same look */
.wpsc-ctf-product-quantity,
.wpsc-ctf-product-used-quantity {
    background: #ffffff;
    color: #111827;
    font-weight: 700;
}

/* Hide number spinners for consistent styling */
.wpsc-ctf-product-quantity::-webkit-outer-spin-button,
.wpsc-ctf-product-quantity::-webkit-inner-spin-button,
.wpsc-ctf-product-used-quantity::-webkit-outer-spin-button,
.wpsc-ctf-product-used-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.wpsc-ctf-product-quantity[type=number],
.wpsc-ctf-product-used-quantity[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.wpsc-ctf-product-quantity-controls .wpsc-ctf-quantity-field > div {
    display: flex;
    gap: 0;
    justify-content: center;
    margin-top: 10px;
    
}

/* Rounded group styling to mirror mockup */
.wpsc-ctf-product-quantity-controls .wpsc-ctf-quantity-field > div .wpsc-ctf-qty-btn:first-child {
    border-radius: 10px 0 0 10px;
}

.wpsc-ctf-product-quantity-controls .wpsc-ctf-quantity-field > div .wpsc-ctf-qty-btn:last-child {
    border-radius: 0 10px 10px 0;
}

.wpsc-ctf-product-quantity-controls .wpsc-ctf-quantity-field > div .wpsc-ctf-qty-input {
    border-radius: 0;
    width: 100%;
    background: #fff;
    height: 36px !important;
    border-radius: 0px !important;
    border: 1px solid #e5e7eb !important;
}

/* Remaining quantity display */
.wpsc-ctf-remaining-quantity-container {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.wpsc-ctf-products-empty {
    background: #ffffff;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    color: #6b7280;
}

.wpsc-ctf-products-section .description {
    margin-top: 18px !important;
    padding: 14px 16px !important;
    border-radius: 12px;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #4b5563 !important;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

/* Approve return block: stack status text and button vertically */
.wpsc-ctf-approve-return-container-inline {
    display: block !important;
    margin-top: 8px !important;
    width: 100%;
}

.wpsc-ctf-approve-return-container-inline .wpsc-ctf-approve-return-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Ensure status line and approve button stack vertically when parent is flex */
.wpsc-ctf-product-card div:has(> .wpsc-ctf-approve-return-container-inline) {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

/* Return requested notice */
.wpsc-ctf-return-request {
    margin-top: 8px;
    padding: 8px 12px;
    background: #d0e7ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    font-size: 12px;
    color: #1d4ed8;
    flex-direction: column;
}

.wpsc-ctf-return-request__title {
    display: block;
    font-weight: 700;
    color: inherit;
}

.wpsc-ctf-return-request__status {
    margin-top: 4px;
    font-size: 11px;
    color: inherit;
}

.wpsc-ctf-return-request__quantity {
    margin-top: 6px;
    font-size: 12px;
    color: inherit;
}

.wpsc-ctf-return-request__actions {
    margin-top: 8px;
}

@media (max-width: 782px) {
    .wpsc-ctf-products-section {
        padding: 18px;
    }
    .wpsc-ctf-products-header {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .wpsc-ctf-products-grid {
        max-height: none;
    }
    .wpsc-ctf-products-search {
        display: flex;
        flex-direction: column-reverse;    }
}

/* Read-Only Section in Widget Body */
.wpsc-widget-body .wpsc-ctf-read-only-section {
    margin-top: 5px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    clear: both;
    position: relative;
    pointer-events: all;
}

.wpsc-widget-body .wpsc-ctf-read-only-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
    border-radius: 8px 8px 0 0;
}

.wpsc-widget-body .wpsc-ctf-read-only-section h3 {
    margin: 0 0 10px 0;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.wpsc-widget-body .wpsc-ctf-read-only-section h3 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #3b82f6;
}

.wpsc-widget-body .wpsc-ctf-read-only-section > p {
    margin: 0 0 20px 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.6;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wpsc-widget-body .wpsc-ctf-read-only-section .info-list-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.wpsc-widget-body .wpsc-ctf-read-only-section .info-list-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wpsc-widget-body .wpsc-ctf-read-only-section .info-label {
    color: #646970;
    font-weight: 600;
}

.wpsc-widget-body .wpsc-ctf-read-only-section .info-val {
    color: #1d2327;
}

/* Toggle Switch for Read-Only Sections */
.wpsc-ctf-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.wpsc-ctf-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wpsc-ctf-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.wpsc-ctf-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.wpsc-ctf-toggle-switch input:checked + .wpsc-ctf-toggle-slider {
    background-color: #3b82f6;
}

.wpsc-ctf-toggle-switch input:checked + .wpsc-ctf-toggle-slider:before {
    transform: translateX(20px);
}

.wpsc-ctf-toggle-switch input:focus + .wpsc-ctf-toggle-slider {
    box-shadow: 0 0 1px #3b82f6;
}
