/* Current Order List Modern Styling */
.current-order-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.order-items-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Header Styling */
.order-items-table thead th {
    background: linear-gradient(135deg, #667eea 0%, #4346e9 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: center !important;
}

.order-items-table thead th:first-child {
    border-top-left-radius: 12px;
}

.order-items-table thead th:last-child {
    border-top-right-radius: 12px;
}

/* Row Styling */
.order-items-table tbody tr {
    border: none;
    transition: all 0.2s ease;
    background: #ffffff;
}

.order-items-table tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

.order-items-table tbody tr:hover {
    background: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-items-table tbody td {
    border: none;
    padding: 16px 12px;
    vertical-align: middle;    border-bottom: 1px solid #f1f3f4;
}

/* Item Name and Details */
.order-item-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 4px;
}

.order-item-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.size-badge {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
}

.discount-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
}

/* Price Display */
.price-container {
    text-align: right;
}

.original-price {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: line-through;
    display: block;
    margin-bottom: 2px;
}

.current-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.total-price {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

/* Quantity Badge */
.quantity-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    min-width: 40px;
    text-align: center;
}

/* Discount Display */
.discount-display {
    text-align: right;
}

.discount-percentage {
    color: #28a745;
    font-weight: 700;
    font-size: 1rem;
}

.no-discount {
    color: #6c757d;
    font-style: italic;
}

/* Action Buttons */
.order-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.order-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.order-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.order-action-btn.decrease-btn:hover {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
}

.order-action-btn.increase-btn:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.order-action-btn.remove-btn:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Empty State */
.empty-order-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.empty-order-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #dee2e6;
}

.empty-order-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

/* Order Items List Container - Enhanced for Images */
.order-items-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0;
    background: #ffffff;
}

/* Order List Container - Works with both structures */
.order-list-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

/* Table styling for both containers */
.order-items-list .order-list-table,
.order-list-container .order-list-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

/* Header Styling for both */
.order-items-list .order-list-header th,
.order-list-container .order-list-header th {
    background: #3888c3;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 16px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: left;
}

.order-items-list .order-list-header th:first-child,
.order-list-container .order-list-header th:first-child {
    border-top-left-radius: 12px;
}

.order-items-list .order-list-header th:last-child,
.order-list-container .order-list-header th:last-child {
    border-top-right-radius: 12px;
}

/* Column Widths */
.col-image { width: 60px; text-align: center; }
.col-item { width: auto; min-width: 120px; }
.col-price { width: 90px; text-align: right; }
.col-qty { width: 60px; text-align: center; }
.col-discount { width: 80px; text-align: right; }
.col-total { width: 90px; text-align: right; }
.col-actions { width: 120px; text-align: center; }

/* Row Styling */
.order-list-body tr {
    border: none;
    transition: all 0.2s ease;
    background: #ffffff;
    height: 35px;
}

.order-list-body tr:nth-child(odd) {
    background: #f8f9fa;
}

.order-list-body tr:hover {
    background: #e3f2fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-list-body td {
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

/* Image Styling - UNIFIED and Enhanced Specificity */
.order-item-image,
.order-items-list .order-item-image,
.order-list-container .order-item-image,
#currentOrderItems .order-item-image {
    width: 40px !important;
    height: 40px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

.order-item-image:hover,
.order-items-list .order-item-image:hover,
.order-list-container .order-item-image:hover,
#currentOrderItems .order-item-image:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.image-placeholder,
.order-items-list .image-placeholder,
.order-list-container .image-placeholder,
#currentOrderItems .image-placeholder {
    width: 40px !important;
    height: 40px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Item Details */
.item-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.item-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Badge Styling */
.size-badge {
    background: linear-gradient(135deg, #da0909 0%, #f60303 100%);
    color: white;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.discount-badge {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

/* Price Styling */
.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 2px;
}

.final-price {
    font-weight: 700;
    color: #27ae60;
    font-size: 0.875rem;
}

.total-price {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.875rem;
}

/* Quantity Badge */
.qty-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Discount Value */
.discount-value {
    color: #27ae60;
    font-weight: 700;
    font-size: 0.875rem;
}

.no-discount {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.decrease-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.decrease-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.increase-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.increase-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f4e79 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.remove-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.remove-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .order-list-table {
        font-size: 0.8rem;
    }
    
    .col-image { width: 40px; }
    .col-price { width: 70px; }
    .col-qty { width: 50px; }
    .col-discount { width: 60px; }
    .col-total { width: 70px; }
    .col-actions { width: 100px; }
    
    .action-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .order-item-image,
    .image-placeholder {
        width: 28px;
        height: 28px;
    }
}

/* Scrollbar Styling */
.order-list-container::-webkit-scrollbar {
    width: 6px;
}

.order-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.order-list-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.order-list-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
