/**
 * Bulk Order Form Styles for QuarkCodeAI B2B Commerce Suite
 * Matches existing plugin design system and WooCommerce My Account pages
 */

/* ==================================================================
   BULK ORDER CONTAINER
   ================================================================== */

.qb2b-bulk-order-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #fff;
}

.woocommerce-MyAccount-content .qb2b-bulk-order-container {
    padding: 0;
    background: transparent;
}

/* Header Section */
.bulk-order-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.bulk-order-header .page-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.bulk-order-header .page-description {
    color: #666;
    font-size: 15px;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* Method Tabs */
.bulk-order-methods {
    margin-top: 20px;
}

.method-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.method-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
}

.method-tab:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f7fafc;
}

.method-tab.active {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.method-tab .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ==================================================================
   BULK ORDER METHODS
   ================================================================== */

.bulk-order-method {
    display: none;
    animation: fadeIn 0.3s ease;
}

.bulk-order-method.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Method Content */
.method-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}

/* ==================================================================
   FILE UPLOAD SECTION
   ================================================================== */

.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
}

/* Upload Instructions */
.upload-instructions h3 {
    font-size: 20px;
    margin: 0 0 15px 0;
    color: #333;
}

.upload-instructions h4 {
    font-size: 16px;
    margin: 20px 0 10px 0;
    color: #555;
}

.upload-instructions p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Template Downloads */
.template-downloads {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.template-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.template-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.template-link:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.template-link .dashicons {
    font-size: 18px;
}

/* Format Requirements */
.format-requirements {
    margin-top: 20px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.requirements-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.requirements-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.upload-limits {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 15px;
}

.upload-limits p {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.upload-limits ul {
    margin: 0;
    padding-left: 20px;
}

.upload-limits li {
    color: #856404;
    margin-bottom: 5px;
}

/* ==================================================================
   FILE UPLOAD AREA
   ================================================================== */

.file-upload-area {
    background: #fff;
}

#upload-zone {
    border: 3px dashed #d0d0d0;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

#upload-zone:hover,
#upload-zone.dragover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.upload-placeholder {
    text-align: center;
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #0073aa;
    opacity: 0.7;
}

.upload-placeholder h4 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}

.upload-placeholder p {
    color: #999;
    margin-bottom: 20px;
}

#browse-files-btn {
    margin-top: 10px;
}

/* File Selected State */
.file-selected {
    padding: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.file-icon {
    font-size: 48px;
}

.file-icon:before {
    content: "📄";
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-size {
    font-size: 13px;
    color: #666;
}

.file-status {
    font-size: 13px;
    margin-top: 5px;
}

.file-status.success {
    color: #28a745;
}

.file-status.error {
    color: #dc3545;
}

.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Upload Options */
.upload-options {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.option-group {
    margin-bottom: 25px;
}

.option-group h4 {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #333;
}

.checkbox-label {
    display: block;
    padding: 10px 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.option-group label[for="order_notes"] {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.option-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

/* ==================================================================
   MANUAL ENTRY SECTION
   ================================================================== */

.manual-entry-section {
    padding: 20px 0;
}

.manual-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.manual-entry-header h3 {
    margin: 0;
    font-size: 20px;
}

/* Bulk Order Table */
.bulk-order-table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
}

.bulk-order-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 800px;
}

.bulk-order-table thead {
    background: #f8f9fa;
}

.bulk-order-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.bulk-order-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.bulk-order-table tbody tr:hover {
    background: #f8f9fa;
}

.bulk-order-table tfoot {
    background: #f8f9fa;
    font-weight: 600;
}

.bulk-order-table tfoot td {
    padding: 15px 12px;
    border-top: 2px solid #e0e0e0;
}

/* Table Inputs */
.bulk-order-table input[type="text"],
.bulk-order-table input[type="number"],
.bulk-order-table select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bulk-order-table input[type="text"]:focus,
.bulk-order-table input[type="number"]:focus,
.bulk-order-table select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Product Search Input */
.product-search-wrapper {
    position: relative;
}

.product-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-sku {
    font-weight: 600;
    color: #0073aa;
}

.suggestion-name {
    font-size: 13px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* Quantity Controls */
.bulk-quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border-left: none;
    border-right: none;
}

/* Remove Row Button */
.remove-row-btn {
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: color 0.2s ease;
}

.remove-row-btn:hover {
    color: #c82333;
}

.add-row-btn {
    margin-top: 15px;
}

/* ==================================================================
   VALIDATION PREVIEW
   ================================================================== */

.validation-preview {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.validation-preview h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.validation-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.summary-card {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.summary-card.success {
    border-left: 4px solid #28a745;
}

.summary-card.error {
    border-left: 4px solid #dc3545;
}

.summary-card.warning {
    border-left: 4px solid #ffc107;
}

.summary-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.summary-card.success .summary-value {
    color: #28a745;
}

.summary-card.error .summary-value {
    color: #dc3545;
}

.summary-card.warning .summary-value {
    color: #ffc107;
}

.summary-label {
    font-size: 14px;
    color: #666;
}

/* Preview Table */
.preview-table-container {
    overflow-x: auto;
    max-height: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.preview-table thead {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-table th,
.preview-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.preview-table tr.error {
    background: #fff5f5;
}

.preview-table tr.warning {
    background: #fffbf0;
}

.preview-table tr.success {
    background: #f0fff4;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

/* ==================================================================
   ORDER SUMMARY
   ================================================================== */

.order-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.order-summary h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.summary-rows {
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    padding-top: 15px;
    border-top: 2px solid #333;
    margin-top: 10px;
}

.summary-row .summary-label {
    color: #666;
}

.summary-row .summary-value {
    font-weight: 600;
    color: #333;
}

.summary-row.total .summary-value {
    color: #0073aa;
}

/* ==================================================================
   ACTION BUTTONS
   ================================================================== */

.bulk-order-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

.bulk-order-actions .button {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #0073aa;
    text-decoration: none;
    display: inline-block;
}

.bulk-order-actions .button-primary {
    background: #0073aa;
    color: #fff;
}

.bulk-order-actions .button-primary:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.bulk-order-actions .button-secondary {
    background: #fff;
    color: #0073aa;
}

.bulk-order-actions .button-secondary:hover {
    background: #f7fafc;
    transform: translateY(-2px);
}

.bulk-order-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==================================================================
   MESSAGES & ALERTS
   ================================================================== */

.bulk-order-messages {
    margin-top: 20px;
}

.message-alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-alert .dashicons {
    font-size: 20px;
    margin-top: 2px;
}

.message-alert.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message-alert.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message-alert.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.message-alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}



/* ==================================================================
   MODAL
   ================================================================== */
/*
.qb2b-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.qb2b-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb2b-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.qb2b-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qb2b-modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.qb2b-modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.qb2b-modal-close:hover {
    color: #333;
}

.qb2b-modal-body {
    padding: 30px;
}

.qb2b-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
*/
/* ==================================================================
   RESPONSIVE
   ================================================================== */

@media (max-width: 768px) {
    .qb2b-bulk-order-container {
        padding: 15px;
    }
    
    .bulk-order-header .page-title {
        font-size: 24px;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .method-tab {
        width: 100%;
        justify-content: center;
    }
    
    .upload-section {
        grid-template-columns: 1fr;
    }
    
    .template-links {
        flex-direction: column;
    }
    
    .template-link {
        width: 100%;
        justify-content: center;
    }
    
    .bulk-order-actions {
        flex-direction: column;
    }
    
    .bulk-order-actions .button {
        width: 100%;
        text-align: center;
    }
    
    .validation-summary {
        grid-template-columns: 1fr;
    }
}

/* ==================================================================
   PRINT STYLES
   ================================================================== */

@media print {
    .bulk-order-methods,
    .bulk-order-actions,
    .method-tab,
    .upload-options,
    .file-actions {
        display: none;
    }
}

/* ==================================================================
   MANUAL ENTRY METHOD - COMPLETE STYLES
   ================================================================== */

/* Section Headers */
.manual-entry-section .section-header {
    margin-bottom: 30px;
}

.manual-entry-section .section-header h3 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

.manual-entry-section .section-header p {
    color: #666;
    font-size: 15px;
    margin: 0;
}

/* Product Search Section */
.product-search-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.search-controls {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.search-bar input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.search-btn {
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-filters select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-width: 150px;
}

/* Manual Search Results */
.manual-search-results {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    min-height: 100px;
}

.manual-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 15px 0;
}

.manual-search-results.active {
    display: block;
}

/* Manual Order List Section */
.manual-order-list-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.section-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-subheader h4 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.list-actions {
    display: flex;
    gap: 10px;
}

/* Manual Product Card */

.manual-product-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.manual-product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.manual-product-card .product-image {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.manual-product-card .product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.manual-product-card .no-image {
    color: #999;
    font-size: 14px;
}

.manual-product-card .product-info {
    flex: 1;
}

.manual-product-card .product-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.manual-product-card .product-sku {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.manual-product-card .product-price {
    font-size: 18px;
    font-weight: bold;
    color: #2271b1;
    margin: 10px 0;
}

.manual-product-card .stock-info {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.manual-product-card .stock-info.in-stock {
    background: #d4edda;
    color: #155724;
}

.manual-product-card .stock-info.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.manual-product-card .product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.manual-product-card .manual-add-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.manual-product-card .add-to-manual-order {
    flex: 1;
    padding: 8px 12px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.manual-product-card .add-to-manual-order:hover:not(:disabled) {
    background: #135e96;
}

.manual-product-card .add-to-manual-order:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Manual Order Table */
.manual-order-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.manual-order-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.manual-order-table thead {
    background: #f8f9fa;
}

.manual-order-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.manual-order-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.manual-order-table tbody tr:hover {
    background: #f8f9fa;
}

/* Drag Handle */
.drag-handle-col {
    width: 30px;
    cursor: move;
}

.drag-handle {
    font-size: 18px;
    color: #999;
    cursor: move;
}

/* Product Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: #f0f0f0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.product-meta {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-control button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    transition: all 0.2s ease;
}

.quantity-control button:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.quantity-control input {
    width: 60px;
    text-align: center;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Item Notes */
.item-notes {
    width: 100%;
    max-width: 200px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

/* Remove Item Button */
.remove-item-btn {
    color: #dc3545;
    background: transparent;
    border: 1px solid #dc3545;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Empty State */
.empty-state-bulk {
    padding: 60px 20px !important;
}

.empty-message {
    text-align: center;
    color: #999;
}

.empty-message .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.empty-message p {
    font-size: 16px;
    margin: 0;
}

/* Totals Row */
.totals-row {
    background: #f8f9fa;
    font-weight: 600;
}

.totals-row td {
    padding: 15px 12px;
    border-top: 2px solid #e0e0e0;
}

.total-amount {
    font-size: 18px;
    color: #0073aa;
}

/* ===== CRITICAL: MANUAL ORDER ACTION BUTTONS ===== */
.manual-order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.actions-left,
.actions-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.actions-right .button {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-manual-draft {
    background: #fff;
    color: #0073aa;
    border: 1px solid #0073aa;
}

#save-manual-draft:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

#create-manual-order {
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
}

#create-manual-order:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.bulk-quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-quantity-controls label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.bulk-quantity-controls .small-text {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Cart Import Section */
.cart-import-section .section-header h3 {
    font-size: 22px;
    margin: 0 0 10px 0;
    color: #333;
}

.cart-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 200px;
}

.cart-import-options {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.cart-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Processing Status Overlay */
.processing-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-content {
    max-width: 600px;
    width: 90%;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.status-title {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.status-message {
    color: #666;
    margin: 0 0 25px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .search-controls {
        flex-direction: column;
    }
    
    .search-bar {
        width: 100%;
        min-width: auto;
    }
    
    .manual-order-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions-left,
    .actions-right {
        width: 100%;
        flex-direction: column;
    }
    
    .actions-right .button {
        width: 100%;
    }
}

/* Search Results */
.manual-search-results {
    margin-top: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-results-list {
    padding: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.result-sku {
    font-size: 13px;
    color: #0073aa;
    margin-bottom: 3px;
}

.result-price {
    font-size: 15px;
    font-weight: 600;
    color: #28a745;
    margin-bottom: 3px;
}

.result-stock {
    font-size: 12px;
}

.result-stock.instock {
    color: #28a745;
}

.result-stock.outofstock {
    color: #dc3545;
}

.result-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading-results,
.no-results,
.error-results {
    padding: 30px;
    text-align: center;
    color: #666;
}

.error-results {
    color: #dc3545;
}

/* Validation Results Section */
.validation-results {
    margin: 30px 0;
    padding: 25px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Results Header */
.results-header {
    margin-bottom: 25px;
}

.results-header h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
}

/* Results Summary (Top Cards) */
.results-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.results-summary .summary-item {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 140px;
    transition: transform 0.2s;
}

.results-summary .summary-item:hover {
    transform: translateY(-2px);
}

.results-summary .summary-item.valid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #b1dfbb;
}

.results-summary .summary-item.errors {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #f1b0b7;
}

.results-summary .summary-item.warnings {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffe484;
}

.results-summary .summary-item .count {
    display: block;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 8px;
}

.results-summary .summary-item.valid .count {
    color: #155724;
}

.results-summary .summary-item.errors .count {
    color: #721c24;
}

.results-summary .summary-item.warnings .count {
    color: #856404;
}

.results-summary .summary-item .label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

/* Results Content */
.results-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

/* Results Filters */
.results-filters {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.results-filters .filter-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
}

.results-filters .filter-btn:hover {
    background: #f8f9fa;
    border-color: #2271b1;
    color: #2271b1;
}

.results-filters .filter-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.3);
}

/* Results Table Container */
.results-table-container {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: #2c3e50;
    color: #fff;
}

.results-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #333;
    vertical-align: top;
}

.results-table tbody tr {
    transition: background-color 0.2s;
}

.results-table tbody tr:hover {
    background: #f1f3f5;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

/* Row Status Styling */
.results-table tbody tr.validation-row.valid {
    background: #f1f9f3;
}

.results-table tbody tr.validation-row.valid:hover {
    background: #e8f5e9;
}

.results-table tbody tr.validation-row.error {
    background: #fef5f6;
}

.results-table tbody tr.validation-row.error:hover {
    background: #fde8ea;
}

.results-table tbody tr.validation-row.warning {
    background: #fffbf0;
}

.results-table tbody tr.validation-row.warning:hover {
    background: #fff8e1;
}

/* Status Badges */
.results-table .status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table .status-badge.valid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.results-table .status-badge.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.results-table .status-badge.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Validation Messages */
.results-table .validation-messages {
    margin: 0;
    padding: 0;
    list-style: none;
}

.results-table .validation-messages li {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.results-table .validation-messages li.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.results-table .validation-messages li.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.results-table .validation-messages li.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px;
    background: #fff;
    border-radius: 6px;
}

.results-actions .button {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.results-actions .button-primary {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.3);
}

.results-actions .button-primary:hover:not(:disabled) {
    background: #135e96;
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.4);
    transform: translateY(-1px);
}

.results-actions .button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.results-actions .button-secondary {
    background: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.results-actions .button-secondary:hover {
    background: #2271b1;
    color: #fff;
    transform: translateY(-1px);
}

/* Price Column */
.results-table .woocommerce-Price-amount {
    font-weight: 600;
    color: #2271b1;
}

/* Empty State */
.results-table tbody:empty::after {
    content: "No validation results to display";
    display: block;
    padding: 40px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-summary {
        flex-direction: column;
    }
    
    .results-filters {
        flex-direction: column;
    }
    
    .results-filters .filter-btn {
        width: 100%;
    }
    
    .results-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .results-table {
        min-width: 800px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .validation-results {
        padding: 15px;
    }
    
    .results-summary .summary-item .count {
        font-size: 28px;
    }
}

/* Validation Results CSS - Inline for immediate loading */
.validation-results {
    margin: 30px 0 !important;
    padding: 25px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.results-header {
    margin-bottom: 25px !important;
}

.results-header h3 {
    margin: 0 0 20px 0 !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

.results-summary {
    display: flex !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
    flex-wrap: wrap !important;
}

.results-summary .summary-item {
    flex: 1 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    text-align: center !important;
    min-width: 140px !important;
}

.results-summary .summary-item.valid {
    background: #d4edda !important;
    border: 2px solid #c3e6cb !important;
}

.results-summary .summary-item.errors {
    background: #f8d7da !important;
    border: 2px solid #f5c6cb !important;
}

.results-summary .summary-item.warnings {
    background: #fff3cd !important;
    border: 2px solid #ffeaa7 !important;
}

.results-summary .summary-item .count {
    display: block !important;
    font-size: 36px !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
}

.results-summary .summary-item.valid .count {
    color: #155724 !important;
}

.results-summary .summary-item.errors .count {
    color: #721c24 !important;
}

.results-summary .summary-item.warnings .count {
    color: #856404 !important;
}

.results-summary .summary-item .label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    color: #666 !important;
}

.results-content {
    background: #f8f9fa !important;
    padding: 20px !important;
    border-radius: 6px !important;
}

.results-filters {
    margin-bottom: 20px !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.results-filters .filter-btn {
    padding: 10px 20px !important;
    border: 2px solid #ddd !important;
    background: #fff !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #666 !important;
}

.results-filters .filter-btn:hover {
    border-color: #2271b1 !important;
    color: #2271b1 !important;
}

.results-filters .filter-btn.active {
    background: #2271b1 !important;
    color: #fff !important;
    border-color: #2271b1 !important;
}

.results-table-container {
    background: #fff !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    margin-bottom: 20px !important;
}

.results-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.results-table thead {
    background: #2c3e50 !important;
    color: #fff !important;
}

.results-table thead th {
    padding: 15px 12px !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
}

.results-table tbody td {
    padding: 14px 12px !important;
    border-bottom: 1px solid #e9ecef !important;
    font-size: 14px !important;
    color: #333 !important;
}

.results-table tbody tr:hover {
    background: #f1f3f5 !important;
}

.results-table tbody tr.validation-row.valid {
    background: #f1f9f3 !important;
}

.results-table tbody tr.validation-row.error {
    background: #fef5f6 !important;
}

.results-table tbody tr.validation-row.warning {
    background: #fffbf0 !important;
}

.results-table .status-badge {
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.results-table .status-badge.valid {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.results-table .status-badge.error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

.results-table .status-badge.warning {
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

.results-table .validation-messages {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.results-table .validation-messages li {
    padding: 8px 12px !important;
    margin: 4px 0 !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

.results-table .validation-messages li.error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border-left: 4px solid #dc3545 !important;
}

.results-table .validation-messages li.warning {
    background: #fff3cd !important;
    color: #856404 !important;
    border-left: 4px solid #ffc107 !important;
}

.results-actions {
    display: flex !important;
    gap: 15px !important;
    justify-content: flex-end !important;
    padding: 20px !important;
    background: #fff !important;
    border-radius: 6px !important;
}

.results-actions .button {
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.results-actions .button-primary {
    background: #2271b1 !important;
    color: #fff !important;
}

.results-actions .button-primary:hover:not(:disabled) {
    background: #135e96 !important;
}

.results-actions .button-primary:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.results-actions .button-secondary {
    background: #fff !important;
    color: #2271b1 !important;
    border: 2px solid #2271b1 !important;
}

.results-actions .button-secondary:hover {
    background: #2271b1 !important;
    color: #fff !important;
}

@media (max-width: 768px) {
    .results-summary {
        flex-direction: column !important;
    }
    
    .results-actions {
        flex-direction: column !important;
    }
    
    .results-actions .button {
        width: 100% !important;
    }
}

/* From Cart Tab Styling */
#cart-method {
    padding: 20px 0;
}

.cart-import-section {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-import-section .section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.cart-import-section .section-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-import-section .section-header p {
    margin: 0;
    font-size: 15px;
    color: #666;
}

/* Cart Preview Section */
.cart-preview {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    min-height: 200px;
}

.cart-preview:empty::before {
    content: "Loading cart contents...";
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    font-style: italic;
}

/* Cart Items Table */
.cart-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-preview-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.cart-preview-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.cart-preview-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.cart-preview-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-preview-table tbody tr:hover {
    background: #f8f9fa;
}

/* Cart Item Image */
.cart-item-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Cart Item Details */
.cart-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.cart-item-sku {
    font-size: 13px;
    color: #6c757d;
}

/* Cart Item Price */
.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
}

/* Cart Item Quantity */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-quantity input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.cart-item-quantity .update-qty {
    padding: 6px 12px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.cart-item-quantity .update-qty:hover {
    background: #135e96;
}

/* Cart Item Subtotal */
.cart-item-subtotal {
    font-size: 17px;
    font-weight: bold;
    color: #2c3e50;
}

/* Cart Item Remove */
.cart-item-remove {
    padding: 8px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    background: #c82333;
}

/* Cart Summary */
.cart-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
}

.cart-summary-row.total {
    border-top: 2px solid #dee2e6;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.cart-summary-label {
    color: #6c757d;
}

.cart-summary-value {
    font-weight: 600;
    color: #2271b1;
}

.cart-summary-row.total .cart-summary-value {
    color: #2c3e50;
    font-size: 22px;
}

/* Empty Cart Message */
.cart-empty-message {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty-message .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #ddd;
    margin-bottom: 15px;
}

.cart-empty-message h4 {
    margin: 15px 0 10px 0;
    font-size: 20px;
    color: #6c757d;
}

.cart-empty-message p {
    margin: 0;
    color: #adb5bd;
}

.cart-empty-message .button {
    margin-top: 20px;
}

/* Cart Import Options */
.cart-import-options {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
}

.cart-import-options .option-group {
    margin-bottom: 25px;
}

.cart-import-options .option-group h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.cart-import-options .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-import-options .checkbox-label:hover {
    background: #e9ecef;
}

.cart-import-options .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cart-actions .button {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-actions .button-primary {
    background: #2271b1;
    color: #fff;
    border: none;
}

.cart-actions .button-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.cart-actions .button-secondary {
    background: #fff;
    color: #2271b1;
    border: 2px solid #2271b1;
}

.cart-actions .button-secondary:hover {
    background: #f8f9fa;
}

/* Loading State */
.cart-preview.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.cart-preview.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-preview-table {
        font-size: 13px;
    }
    
    .cart-preview-table thead th,
    .cart-preview-table tbody td {
        padding: 8px;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .button {
        width: 100%;
    }
}

/* Order Items from Cart Import - Additional Styling */
.manual-order-table tr.order-item-bulk {
    background: #fff;
}

.manual-order-table tr.order-item-bulk:hover {
    background: #f8f9fa;
}

.manual-order-table tr.order-item-bulk .product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.manual-order-table tr.order-item-bulk .product-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.manual-order-table tr.order-item-bulk .product-meta {
    font-size: 12px;
    color: #6c757d;
}

.manual-order-table tr.order-item-bulk .item-price {
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
}

/* Quantity Control with +/- Buttons */
.manual-order-table .quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.manual-order-table .quantity-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.manual-order-table .quantity-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.manual-order-table .quantity-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.manual-order-table .quantity-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.manual-order-table tr.order-item-bulk .row-total {
    font-size: 17px;
    font-weight: bold;
    color: #2c3e50;
}

.manual-order-table tr.order-item-bulk .item-notes {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.manual-order-table tr.order-item-bulk .item-notes:focus {
    border-color: #2271b1;
    outline: none;
}

.manual-order-table tr.order-item-bulk .remove-item-btn {
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.manual-order-table tr.order-item-bulk .remove-item-btn:hover {
    background: #c82333;
}

/* Make manually added items (.manual-order-row) match cart items */
.manual-order-table tr.manual-order-row .product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 12px;
    border-radius: 4px;
}

.manual-order-table tr.manual-order-row .product-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.manual-order-table tr.manual-order-row .product-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.manual-order-table tr.manual-order-row .remove-manual-item {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.manual-order-table tr.manual-order-row .remove-manual-item:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Bulk Order Details Modal */

.qb2b-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.qb2b-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #ccc;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.qb2b-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qb2b-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.qb2b-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    background: none;
    border: none;
    cursor: pointer;
}

.qb2b-modal-close:hover {
    color: #000;
}

.qb2b-modal-body {
    padding: 20px;
}

.bulk-order-details-wrapper {
    font-size: 14px;
}

.details-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.summary-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.details-stats {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    flex: 1;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
}

.stat-box.success {
    background: #d4edda;
}

.stat-box.failed {
    background: #f8d7da;
}

.stat-box.pending {
    background: #fff3cd;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
}

.details-actions {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.details-actions .button {
    margin-right: 10px;
}

.details-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin: 20px 0;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

.tab-button.active {
    border-bottom-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.status-completed,
.status-processed,
.status-success {
    background: #d4edda;
    color: #155724;
}

.status-failed,
.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-pending,
.status-processing {
    background: #fff3cd;
    color: #856404;
}
    

/* ==================================================================
   PROGRESS INDICATOR
   ================================================================== */

.upload-progress {
    margin-top: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar { 
    transition: width 0.3s ease;
    /* display: flex;
    height: 100%; 
    background: linear-gradient(90deg, #0073aa, #4a9fd1);*/
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Spinner */
.spinner-container {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f0f0f0;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fix modal z-index to appear above everything */
.qb2b-modal {
    z-index: 999999 !important;
}

.qb2b-modal-content {
    position: relative;
    z-index: 1000000 !important;
}

/* Ensure modal tabs don't conflict with main page tabs */
.bulk-order-details-wrapper .details-tabs {
    border-bottom: 2px solid #ddd;
    margin: 20px 0 10px 0;
}

.bulk-order-details-wrapper .tab-button {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.bulk-order-details-wrapper .tab-button:hover {
    background: #f5f5f5;
}

.bulk-order-details-wrapper .tab-button.active {
    border-bottom-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

.bulk-order-details-wrapper .tab-content {
    display: none;
    padding: 20px 0;
}

.bulk-order-details-wrapper .tab-content.active {
    display: block;
}

/* Pagination styles */
.qb2b-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #ddd;
    margin-top: 15px;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

.pagination-btn.button-primary {
    cursor: default;
}

.pagination-btn:not(.button-primary):hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Fix for WooCommerce My Account page hiding method content */
.woocommerce-MyAccount-content .method-content,
.woocommerce-account .method-content,
#cart-method .method-content,
#upload-method .method-content,
#manual-method .method-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* But still respect tab switching - hide non-active tabs */
.bulk-order-method {
    display: none;
}

.bulk-order-method[style*="display: block"] {
    display: block !important;
}

.bulk-order-method[style*="display: block"] .method-content {
    display: block !important;
}

