.woo-mini-cart-wrapper {
    /* position: fixed; */
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    transition: right 0.3s ease-in-out;
}

.woo-mini-cart-wrapper.active {
    right: 0;
}

.woo-mini-cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woo-mini-cart-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.woo-mini-cart-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

#invoices-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

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

/* Invoice Table Mobile Responsive CSS */

/* Base table styles */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

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

.invoice-table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

/* Table container for horizontal scrolling */
#invoice-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-open {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Button styles */
.invoice-table .button {
    font-size: 12px;
    padding: 4px 8px;
    margin: 2px;
    white-space: nowrap;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ddd;
}

.invoice-table .button-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.invoice-table .button:hover {
    opacity: 0.8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Make container scrollable */
    #invoice-table-container {
		overflow-x: auto;
  		-webkit-overflow-scrolling: touch;
    }
	
	.invoices-btn {
		display: contents;
	}
    
    /* Adjust table for mobile */
    .invoice-table {
        min-width: 800px; /* Minimum width to maintain readability */
        font-size: 13px;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    /* Adjust specific columns */
    .invoice-table th:first-child,
    .invoice-table td:first-child {
        width: 40px;
        text-align: center;
    }
    
    .invoice-table th:nth-child(2),
    .invoice-table td:nth-child(2) {
        min-width: 150px;
    }
    
    .invoice-table th:nth-child(3),
    .invoice-table td:nth-child(3) {
        min-width: 100px;
    }
    
    .invoice-table th:nth-child(4),
    .invoice-table td:nth-child(4),
    .invoice-table th:nth-child(5),
    .invoice-table td:nth-child(5) {
        min-width: 90px;
    }
    
    .invoice-table th:nth-child(6),
    .invoice-table td:nth-child(6) {
        min-width: 80px;
        text-align: right;
    }
    
    .invoice-table th:nth-child(7),
    .invoice-table td:nth-child(7) {
        min-width: 70px;
        text-align: center;
    }
    
    .invoice-table th:nth-child(8),
    .invoice-table td:nth-child(8) {
        min-width: 120px;
        text-align: center;
    }
    
    /* Smaller buttons on mobile */
    .invoice-table .button {
        font-size: 10px;
        padding: 3px 6px;
        margin: 1px;
    }
    
    /* Header adjustments */
    .invoice-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .invoice-totals {
        display: flex;
        justify-content: space-between;
        gap: 5px;
        width: 100%;
		flex-direction:column;
    }
    
    /* Filter form mobile adjustments */
    .invoice-filters > div {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .invoice-filters input,
    .invoice-filters select,
    .invoice-filters button {
        width: 100% !important;
    }
    
    /* Pagination mobile adjustments */
    .pagination-controls-top,
    .pagination-controls-bottom {
        flex-direction: column;
        gap: 10px;
        align-items: stretch !important;
    }
    
    .per-page-selector {
        text-align: center;
    }
    
    .pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 6px 10px !important;
        margin: 2px !important;
        font-size: 12px;
    }
    
    /* Bulk payment section mobile */
    #bulk-payment-section {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    #bulk-payment-section > div:last-child {
        flex-direction: column;
        gap: 10px;
        align-items: stretch !important;
    }
    
    #bulk-payment-section button {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .invoice-table {
        min-width: 700px;
        font-size: 12px;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
    
    /* Even smaller buttons */
    .invoice-table .button {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    /* Stack action buttons vertically */
    .invoice-table td:last-child {
        white-space: normal;
    }
    
    .invoice-table td:last-child .button {
        display: block;
        width: 100%;
        margin: 1px 0;
    }
}

/* Scrollbar styling for webkit browsers */
.invoice-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.invoice-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.invoice-table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.invoice-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading state */
.invoice-loader {
    display: none;
    text-align: center;
    padding: 40px;
    color: #666;
    font-weight: 500;
}

.invoice-loader.loading {
    display: block;
}

/* No results message */
.no-invoices-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .invoice-table-wrapper {
        -webkit-overflow-scrolling: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .invoice-table th,
    .invoice-table td {
        border: 2px solid #000;
    }
    
    .status-badge {
        border: 2px solid;
    }
}

/* No results message */
.no-invoices-message {
	text-align: center;
	padding: 40px;
	color: #666;
	background: white;
	border: 1px solid #ddd;
	border-radius: 5px;
}

/* Action buttons */
.action-buttons {
	display: flex;
	gap: 5px;
	justify-content: center;
}

.action-btn {
	padding: 5px 8px;
	color: white;
	text-decoration: none;
	border-radius: 3px;
	font-size: 12px;
	transition: opacity 0.3s ease;
}

.action-btn:hover {
	opacity: 0.8;
	color: white;
}

.btn-pdf { background: #0073aa; }
.btn-view { background: #28a745; }
.btn-pay { background: #dc3545; }

@media (max-width: 768px) {
    .woo-mini-cart-wrapper {
        width: 100%;
        right: -100%;
    }
} 
