/* Modern CSS Reset and Base Styles */
.woocommerce-bulk-import * {
	box-sizing: border-box;
}

.woocommerce-bulk-import {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;
	max-width: 900px;
	margin: auto;
	background: white;
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
} /* Header */
.woocommerce-bulk-import .header {
	background: #343a40;
	color: white;
	padding: 2rem;
	text-align: center;
}

.woocommerce-bulk-import .header h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
	margin: 0;
	color: white;
}
.woocommerce-bulk-import .header p {
	opacity: 0.9;
	font-size: 1.1rem;
	margin: 0.5rem 0 0 0;
}

/* Main Content */
.woocommerce-bulk-import .content {
	padding: 2rem;
}

/* Instructions Section */
.woocommerce-bulk-import .instructions {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 12px;
	margin-bottom: 2rem;
	overflow: hidden;
}

.woocommerce-bulk-import .instructions-header {
	background: #343a40;
	color: white;
	padding: 1rem 1.5rem;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: all 0.3s ease;
	margin: 0;
}

.woocommerce-bulk-import .instructions-header:hover {
	background: #495057;
}

.woocommerce-bulk-import .instructions-header h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
	color: white;
}
.woocommerce-bulk-import .instructions-icon {
	font-size: 1rem;
	transition: transform 0.3s ease;
}

.woocommerce-bulk-import .instructions-icon.open {
	transform: rotate(90deg);
}

.woocommerce-bulk-import .instructions-content {
	padding: 1.5rem;
	display: none;
}

.woocommerce-bulk-import .instructions-content.open {
	display: block;
}

.woocommerce-bulk-import .instructions-content p {
	margin-bottom: 1rem;
	color: #495057;
	line-height: 1.6;
}

.woocommerce-bulk-import .format-example {
	background: #2d3748;
	color: #f3f4f6;
	padding: 1rem;
	border-radius: 8px;
	font-family: "Courier New", monospace;
	font-size: 0.9rem;
	margin-top: 1rem;
}

.woocommerce-bulk-import .limits-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1rem 0;
}

.woocommerce-bulk-import .limit-item {
	background: white;
	padding: 1rem;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	text-align: center;
}

.woocommerce-bulk-import .limit-value {
	font-size: 1.2rem;
	font-weight: 700;
	color: #343a40;
}

.woocommerce-bulk-import .warning-box {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 8px;
	padding: 1rem;
	margin: 1rem 0;
}

.woocommerce-bulk-import .warning-box strong {
	color: #856404;
}

/* Upload Section */
.woocommerce-bulk-import .upload-section {
	background: #f8f9fa;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin-bottom: 2rem;
	transition: all 0.3s ease;
}

.woocommerce-bulk-import .upload-section:hover {
	border-color: #343a40;
	background: #f1f3f4;
}

/* Drag & Drop Styling */
.woocommerce-bulk-import .upload-content {
	text-align: center;
	padding: 1rem;
}

.woocommerce-bulk-import .upload-text {
	margin: 1rem 0;
	color: #64748b;
	font-size: 0.9rem;
}

.woocommerce-bulk-import .upload-section.drag-over {
	border-color: #343a40;
	background: #e8f4fd;
	transform: scale(1.02);
}

.woocommerce-bulk-import .file-input {
	display: none;
}

.woocommerce-bulk-import .file-button {
	background: #343a40;
	color: white;
	border: none;
	padding: 1rem 2rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 14px rgba(52, 58, 64, 0.3);
}

.woocommerce-bulk-import .file-button:hover {
	background: #495057;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(52, 58, 64, 0.4);
}

.woocommerce-bulk-import .file-status {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-weight: 500;
}

.woocommerce-bulk-import .file-status.empty {
	background: #f1f5f9;
	color: #64748b;
}

.woocommerce-bulk-import .file-status.selected {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.woocommerce-bulk-import .submit-button {
	background: #343a40;
	color: white;
	border: none;
	padding: 1rem 2rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 14px rgba(52, 58, 64, 0.3);
	width: 100%;
	margin-top: 1rem;
}

.woocommerce-bulk-import .submit-button:hover:not(:disabled) {
	background: #495057;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(52, 58, 64, 0.4);
}

.woocommerce-bulk-import .submit-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Loading Spinner */
.woocommerce-bulk-import .spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #343a40;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-left: 0.5rem;
}

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

/* Results Section */
.woocommerce-bulk-import .results {
	margin-top: 2rem;
}

.woocommerce-bulk-import .result-section {
	margin-bottom: 1.5rem;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.woocommerce-bulk-import .result-header {
	padding: 1rem 1.5rem;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.woocommerce-bulk-import .success-section .result-header {
	background: #28a745;
	color: white;
}

.woocommerce-bulk-import .warning-section .result-header {
	background: #ffc107;
	color: #212529;
}

.woocommerce-bulk-import .error-section .result-header {
	background: #dc3545;
	color: white;
}

.woocommerce-bulk-import .result-count {
	background: rgba(255, 255, 255, 0.2);
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.9rem;
}

.woocommerce-bulk-import .warning-section .result-count {
	background: rgba(0, 0, 0, 0.1);
}

.woocommerce-bulk-import .result-table {
	width: 100%;
	background: white;
}

.woocommerce-bulk-import .result-table th,
.woocommerce-bulk-import .result-table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid #f1f5f9;
}

.woocommerce-bulk-import .result-table th {
	background: #f8fafc;
	font-weight: 600;
	color: #374151;
}

.woocommerce-bulk-import .result-table tr:hover {
	background: #f8fafc;
}

/* Ensure no underlines on any links in tables */
.woocommerce-bulk-import .result-table a {
	text-decoration: none !important;
}

.woocommerce-bulk-import .result-table a:hover {
	text-decoration: none !important;
}

/* Product Link Icons */
.woocommerce-bulk-import .product-link-icon {
	display: inline-block;
	font-size: 1.2rem;
	text-decoration: none;
	color: #343a40;
	transition: all 0.2s ease;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-weight: bold;
}

.woocommerce-bulk-import .product-link-icon:hover {
	background: #343a40;
	color: white;
	transform: scale(1.1);
	text-decoration: none;
}

/* Link column styling - only for tables with links */
.woocommerce-bulk-import .success-section .result-table th:last-child,
.woocommerce-bulk-import .success-section .result-table td:last-child,
.woocommerce-bulk-import .warning-section .result-table th:last-child,
.woocommerce-bulk-import .warning-section .result-table td:last-child {
	width: 60px;
	text-align: center;
}

/* Consistent column widths across all tables */
/* SKU column - same width, gray background for all tables */
.woocommerce-bulk-import .result-table th:first-child {
	width: 120px;
	background-color: #e2e8f0 !important;
	font-weight: bold;
}

.woocommerce-bulk-import .result-table td:first-child {
	width: 120px;
	background-color: #f1f5f9 !important;
	font-weight: bold;
}

/* Success table column widths */
.woocommerce-bulk-import .success-section .result-table th:nth-child(2),
.woocommerce-bulk-import .success-section .result-table td:nth-child(2) {
	width: 350px; /* Nazwa produktu */
}

.woocommerce-bulk-import .success-section .result-table th:nth-child(3),
.woocommerce-bulk-import .success-section .result-table td:nth-child(3) {
	width: 80px; /* Ilość */
	text-align: center;
}

.woocommerce-bulk-import .success-section .result-table th:nth-child(4),
.woocommerce-bulk-import .success-section .result-table td:nth-child(4) {
	width: 100px; /* Cena */
	text-align: right;
}

/* Warning table column widths */
.woocommerce-bulk-import .warning-section .result-table th:nth-child(2),
.woocommerce-bulk-import .warning-section .result-table td:nth-child(2) {
	width: 200px; /* Nazwa produktu - węższa */
}

.woocommerce-bulk-import .warning-section .result-table th:nth-child(3),
.woocommerce-bulk-import .warning-section .result-table td:nth-child(3) {
	width: 80px; /* Zamówiono */
	text-align: center;
}

.woocommerce-bulk-import .warning-section .result-table th:nth-child(4),
.woocommerce-bulk-import .warning-section .result-table td:nth-child(4) {
	width: 80px; /* Będzie dodane */
	text-align: center;
	white-space: nowrap; /* Zapobiega łamaniu "Będzie dodane" */
}

.woocommerce-bulk-import .warning-section .result-table th:nth-child(5),
.woocommerce-bulk-import .warning-section .result-table td:nth-child(5) {
	width: 100px; /* Cena */
	text-align: right;
}

/* Error table column widths */
.woocommerce-bulk-import .error-section .result-table th:nth-child(2),
.woocommerce-bulk-import .error-section .result-table td:nth-child(2) {
	width: auto; /* Powód odrzucenia - reszta miejsca */
}

/* Confirmation Section */
.woocommerce-bulk-import .confirmation {
	background: #e7f3ff;
	border: 1px solid #007bff;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin-top: 2rem;
}

.woocommerce-bulk-import .confirmation h3 {
	color: #004085;
	margin-bottom: 1rem;
	font-size: 1.3rem;
}

.woocommerce-bulk-import .confirmation-buttons {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-top: 1.5rem;
}

.woocommerce-bulk-import .btn-confirm {
	background: #007bff;
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.woocommerce-bulk-import .btn-confirm:hover {
	background: #0056b3;
	transform: translateY(-1px);
}

.woocommerce-bulk-import .btn-cancel {
	background: white;
	color: #64748b;
	border: 1px solid #cbd5e1;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.woocommerce-bulk-import .btn-cancel:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
}

/* Success Message */
.woocommerce-bulk-import .success-message {
	background: #d4edda;
	border: 1px solid #28a745;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin-top: 2rem;
}

.woocommerce-bulk-import .success-message h3 {
	color: #155724;
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.woocommerce-bulk-import .cart-button {
	background: #28a745;
	color: white;
	text-decoration: none !important;
	padding: 1rem 2rem;
	border-radius: 8px;
	font-weight: 600;
	display: inline-block;
	transition: all 0.3s ease;
	margin-top: 1rem;
	border: none;
	cursor: pointer;
}

.woocommerce-bulk-import .cart-button:hover {
	background: #218838;
	color: white;
	text-decoration: none !important;
	transform: translateY(-1px);
}

.woocommerce-bulk-import .cart-button:focus,
.woocommerce-bulk-import .cart-button:active,
.woocommerce-bulk-import .cart-button:visited {
	text-decoration: none !important;
	color: white;
} /* Error Section */
.woocommerce-bulk-import .error-message {
	margin-top: 1.5rem;
}

.woocommerce-bulk-import .error-message .error-section {
	border-radius: 12px;
	overflow: hidden;
}

.woocommerce-bulk-import .error-message .error-section .result-header {
	background: #dc3545;
	color: white;
}

.woocommerce-bulk-import .error-content {
	background: white;
	padding: 1.5rem;
	color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
	.woocommerce-bulk-import {
		margin: 1rem;
	}

	.woocommerce-bulk-import .header {
		padding: 1.5rem;
	}

	.woocommerce-bulk-import .header h2 {
		font-size: 1.5rem;
	}

	.woocommerce-bulk-import .content {
		padding: 1.5rem;
	}

	.woocommerce-bulk-import .limits-grid {
		grid-template-columns: 1fr;
	}

	.woocommerce-bulk-import .confirmation-buttons {
		flex-direction: column;
	}

	.woocommerce-bulk-import .result-table {
		font-size: 0.9rem;
	}

	.woocommerce-bulk-import .result-table th,
	.woocommerce-bulk-import .result-table td {
		padding: 0.75rem 0.5rem;
	}
}
