/* Main Container */
.woocommerce-bulk-order-form-pro {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.bulk-order-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-order-table th,
.bulk-order-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.product-search {
    width: 100%;
    padding: 5px;
}

.search-loading {
    display: none;
    margin-left: 5px;
    color: #888;
}

.ui-autocomplete {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ui-autocomplete li {
    padding: 5px 10px;
    cursor: pointer;
}

.ui-autocomplete li:hover {
    background-color: #f0f0f0;
}

.product-suggestion {
    display: flex;
    justify-content: space-between;
}

.product-main, .product-meta {
    display: block;
}

.product-title {
    font-weight: bold;
}

.product-sku {
    color: #666;
    margin-left: 5px;
}

.stock-badge.instock { color: green; }
.stock-badge.outofstock { color: red; }
/* CSV Section */
.csv-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.csv-upload-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.csv-upload-button:hover {
    background: #0056b3;
}

.csv-template {
    display: inline-block;
    padding: 10px 15px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-left: 15px;
    transition: background 0.3s ease;
}

.csv-template:hover {
    background: #218838;
}

.csv-upload-status {
    margin-top: 10px;
    color: #666;
}

/* Table Styles */
.bulk-order-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.bulk-order-table th,
.bulk-order-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.bulk-order-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Product Search */
.search-container {
    position: relative;
}

.product-search {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-loading {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

.ui-autocomplete-loading + .search-loading {
    display: block;
}

/* Product Info */
.product-info {
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.sku-display {
    display: block;
    color: #333;
}

.stock-status {
    display: block;
    font-weight: bold;
}

.stock-status.success {
    color: #28a745;
}

.stock-status.error {
    color: #dc3545;
}

/* Quantity Input */
.quantity {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Price Display */
.price-display,
.subtotal,
.grand-total {
    font-weight: bold;
    color: #333;
}

/* Actions */
.remove-row {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.remove-row:hover {
    background: #c82333;
}

/* Form Actions */
.form-actions {
    margin-top: 25px;
    text-align: right;
}

.add-row {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-row:hover {
    background: #218838;
}

.submit-bulk-order {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s ease;
}

.submit-bulk-order:hover {
    background: #0056b3;
}

/* Discount Section */
.discount-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.discount-message {
    margin-top: 10px;
}

.discount-applied {
    color: #28a745;
    font-weight: bold;
}

/* Feedback Messages */
.bulk-order-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.bulk-order-feedback.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.bulk-order-feedback.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}





/* Loading indicator */
.search-loading {
    display: none;
    width: 16px;
    height: 16px;
    background: url('path-to-loading-gif.gif') no-repeat center;
    vertical-align: middle;
    margin-left: 5px;
}

/* Autocomplete dropdown */
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ddd;
    background: #fff;
}

.product-suggestion {
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.product-main, .product-meta {
    display: block;
}

.product-sku { color: #666; margin-left: 5px; }
.product-price { font-weight: bold; }
.stock-badge.instock { color: green; }
.stock-badge.outofstock { color: red; }
.ui-helper-hidden-accessible {
    display: none;
}
span.stock-status.success {
    display: none;
}


/* Responsive Design */
@media (max-width: 768px) {
    .bulk-order-table {
        display: block;
        overflow-x: auto;
    }

    .form-actions {
        text-align: center;
    }

    .form-actions button {
        width: 100%;
        margin: 5px 0;
    }
}