/* ==========================================================================
   Panel del Cliente - Archivos de Impresión
   Color base: #198fd9
   ========================================================================== */

.wc-print-workflow-customer-panel {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* Header
   ========================================================================== */

.print-files-header {
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #198fd9;
}

.print-files-header h2 {
	margin: 0 0 10px 0;
	color: #333333;
	font-size: 28px;
	font-weight: 600;
}

.print-files-header .description {
	margin: 0;
	color: #666666;
	font-size: 15px;
	line-height: 1.6;
}

/* Estado vacío
   ========================================================================== */

.print-files-empty-state {
	text-align: center;
	padding: 60px 20px;
	background: #f9f9f9;
	border-radius: 12px;
	border: 2px dashed #e0e0e0;
}

.print-files-empty-state .empty-icon {
	font-size: 64px;
	margin-bottom: 20px;
	opacity: 0.5;
}

.print-files-empty-state h3 {
	margin: 0 0 10px 0;
	color: #333333;
	font-size: 20px;
	font-weight: 600;
}

.print-files-empty-state p {
	margin: 0 0 25px 0;
	color: #666666;
	font-size: 15px;
}

.print-files-empty-state .button {
	background: #198fd9;
	color: #ffffff;
	border: none;
	padding: 12px 30px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
	transition: all 0.3s ease;
}

.print-files-empty-state .button:hover {
	background: #1565c0;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(25, 143, 217, 0.3);
}

/* Tarjeta de pedido
   ========================================================================== */

.print-files-order-card {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	margin-bottom: 25px;
	overflow: hidden;
	transition: all 0.3s ease;
	border-left: 4px solid #198fd9;
}

.print-files-order-card.status-rejected {
	border-left-color: #f44336;
}

.print-files-order-card.status-accepted {
	border-left-color: #4caf50;
}

.print-files-order-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

/* Header de la tarjeta */

.order-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%);
	border-bottom: 1px solid #e0e0e0;
}

.order-card-header .order-info {
	flex: 1;
}

.order-card-header .order-number {
	margin: 0 0 5px 0;
	font-size: 20px;
	font-weight: 600;
	color: #333333;
}

.order-card-header .order-date {
	color: #666666;
	font-size: 14px;
}

.order-status-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 25px;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
}

.order-status-badge.status-pending {
	background: #e3f2fd;
	color: #0277bd;
}

.order-status-badge.status-rejected {
	background: #ffebee;
	color: #c62828;
}

.order-status-badge.status-accepted {
	background: #e8f5e9;
	color: #2e7d32;
}

.order-status-badge .status-icon {
	font-size: 18px;
}

/* Resumen de archivos */

.order-files-summary {
	display: flex;
	gap: 20px;
	padding: 15px 25px;
	background: #fafafa;
	border-bottom: 1px solid #e0e0e0;
	flex-wrap: wrap;
}

.summary-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.summary-item .summary-label {
	color: #666666;
	font-weight: 500;
}

.summary-item .summary-value {
	color: #333333;
	font-weight: 600;
}

.summary-item .summary-icon {
	font-size: 16px;
}

.summary-item.summary-accepted {
	color: #2e7d32;
}

.summary-item.summary-rejected {
	color: #c62828;
}

.summary-item.summary-pending {
	color: #f57c00;
}

/* Lista de archivos */

.order-files-list {
	padding: 20px 25px;
}

.file-item {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
	margin-bottom: 15px;
	border-left: 3px solid #e0e0e0;
	transition: all 0.3s ease;
	flex-wrap: wrap;
	gap: 15px;
}

.file-item:hover {
	background: #f5f5f5;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.file-item.file-status-accepted {
	border-left-color: #4caf50;
	background: #f1f8f4;
}

.file-item.file-status-rejected {
	border-left-color: #f44336;
	background: #fff5f5;
}

.file-item.file-status-pending {
	border-left-color: #ff9800;
	background: #fffbf5;
}

.file-item:last-child {
	margin-bottom: 0;
}

.file-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
}

.file-icon {
	font-size: 28px;
	flex-shrink: 0;
}

.file-details {
	flex: 1;
	min-width: 0;
}

.file-name {
	font-weight: 600;
	color: #333333;
	font-size: 15px;
	margin-bottom: 4px;
	word-break: break-word;
}

.file-product {
	color: #666666;
	font-size: 13px;
}

.file-status-info {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-wrap: wrap;
}

.file-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.file-status-badge.file-status-pending {
	background: #fff8e1;
	color: #f57c00;
}

.file-status-badge.file-status-accepted {
	background: #e8f5e9;
	color: #2e7d32;
}

.file-status-badge.file-status-rejected {
	background: #ffebee;
	color: #c62828;
}

.file-status-badge .status-icon {
	font-size: 14px;
}

/* Motivo de rechazo */

.file-rejection-reason {
	width: 100%;
	display: flex;
	gap: 12px;
	margin-top: 10px;
	padding: 12px;
	background: #ffffff;
	border-radius: 6px;
	border: 1px solid #ffcdd2;
}

.file-rejection-reason .reason-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.file-rejection-reason .reason-content {
	flex: 1;
}

.file-rejection-reason strong {
	display: block;
	color: #c62828;
	font-size: 14px;
	margin-bottom: 5px;
}

.file-rejection-reason p {
	margin: 0;
	color: #666666;
	font-size: 14px;
	line-height: 1.5;
}

/* Botón de resubir */

.button-resubmit {
	background: #198fd9;
	color: #ffffff;
	border: none;
	padding: 8px 18px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.button-resubmit:hover {
	background: #1565c0;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(25, 143, 217, 0.3);
	color: #ffffff;
}

/* Footer de la tarjeta */

.order-card-footer {
	padding: 15px 25px;
	background: #f9f9f9;
	border-top: 1px solid #e0e0e0;
	text-align: right;
}

.view-order-link {
	color: #198fd9;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
}

.view-order-link:hover {
	color: #1565c0;
	text-decoration: underline;
}

/* Modal de resubida
   ========================================================================== */

.wc-print-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
}

.wc-print-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

.wc-print-modal-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow: auto;
}

.wc-print-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 25px;
	border-bottom: 2px solid #198fd9;
	background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
}

.wc-print-modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #333333;
}

.wc-print-modal-close {
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #666666;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.wc-print-modal-close:hover {
	background: #f44336;
	color: #ffffff;
	transform: rotate(90deg);
}

.wc-print-modal-body {
	padding: 25px;
}

.resubmit-file-name {
	margin: 0 0 20px 0;
	padding: 12px;
	background: #e3f2fd;
	border-left: 3px solid #198fd9;
	border-radius: 4px;
	font-size: 14px;
	color: #0277bd;
	font-weight: 500;
}

.resubmit-upload-area {
	text-align: center;
	padding: 30px;
	background: #f9f9f9;
	border: 2px dashed #e0e0e0;
	border-radius: 8px;
	margin-bottom: 20px;
}

.resubmit-upload-area .button-primary {
	background: #198fd9;
	border: none;
	color: #ffffff;
	padding: 12px 30px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.resubmit-upload-area .button-primary:hover {
	background: #1565c0;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(25, 143, 217, 0.3);
}

.upload-hint {
	margin: 15px 0 0 0;
	font-size: 13px;
	color: #666666;
}

.resubmit-selected-file {
	padding: 15px;
	background: #e8f5e9;
	border-radius: 8px;
	border: 1px solid #4caf50;
}

.selected-file-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.selected-file-info .file-icon {
	font-size: 24px;
}

.selected-file-info .selected-file-name {
	flex: 1;
	font-weight: 600;
	color: #333333;
	font-size: 14px;
	word-break: break-word;
}

.selected-file-info .remove-file {
	background: #f44336;
	color: #ffffff;
	border: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.selected-file-info .remove-file:hover {
	background: #d32f2f;
	transform: scale(1.1);
}

.wc-print-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 20px 25px;
	background: #f9f9f9;
	border-top: 1px solid #e0e0e0;
}

.wc-print-modal-footer .button {
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
}

.wc-print-modal-footer .button:not(.button-primary) {
	background: #e0e0e0;
	color: #333333;
}

.wc-print-modal-footer .button:not(.button-primary):hover {
	background: #bdbdbd;
}

.wc-print-modal-footer .button-primary {
	background: #198fd9;
	color: #ffffff;
}

.wc-print-modal-footer .button-primary:hover:not(:disabled) {
	background: #1565c0;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(25, 143, 217, 0.3);
}

.wc-print-modal-footer .button-primary:disabled {
	background: #bdbdbd;
	cursor: not-allowed;
	opacity: 0.6;
}

/* Mensaje de éxito */

.wc-print-success-message {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #4caf50;
	color: #ffffff;
	padding: 15px 25px;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	z-index: 9999999;
	font-weight: 600;
	display: none;
}

/* Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.wc-print-workflow-customer-panel {
		padding: 15px;
	}

	.print-files-header h2 {
		font-size: 24px;
	}

	.order-card-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}

	.order-status-badge {
		align-self: flex-start;
	}

	.order-files-summary {
		flex-direction: column;
		gap: 10px;
	}

	.file-item {
		flex-direction: column;
	}

	.file-status-info {
		width: 100%;
		justify-content: space-between;
	}

	.wc-print-modal-content {
		width: 95%;
	}

	.wc-print-modal-footer {
		flex-direction: column;
	}

	.wc-print-modal-footer .button {
		width: 100%;
	}
}

body.wc-print-modal-open {
	overflow: hidden;
}
