#gosendex-upload-container {
	width: 176px;
	display: inline-flex;
	align-items: center;
	margin-right: 1rem;
}

/* Wrapper for horizontal scrolling */
#gse-uploaded-files-wrapper {
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	margin-top: 10px;
}

#gse-uploaded-files {
	width: auto;
	min-width: 100%;
	table-layout: auto;
	border-collapse: collapse;
}

/* Center all content in table cells */
#gse-uploaded-files td {
	text-align: center;
	vertical-align: middle;
	white-space: normal;
	word-wrap: break-word;
	word-break: break-word;
	padding: 8px;
	border: 1px solid #ddd;
}

/* Property label column (first column) */
#gse-uploaded-files td.gse-property-label {
	font-weight: bold;
	background-color: #f5f5f5;
	text-align: left;
	padding-left: 12px;
	white-space: nowrap;
	min-width: 100px;
	position: sticky;
	left: 0;
	z-index: 10;
	border-right: 2px solid #999;
}

/* File columns (all columns except first) */
#gse-uploaded-files td:not(.gse-property-label) {
	min-width: 150px;
	max-width: 250px;
}

/* Specific row styling */
#gse-uploaded-files tr[data-property="thumbnail"] td:not(.gse-property-label) {
	height: 100px;
	padding: 5px;
}

#gse-uploaded-files tr[data-property="drag"] td:not(.gse-property-label) {
	cursor: col-resize;
	background-color: #fafafa;
}

#gse-uploaded-files tr[data-property="remove"] td:not(.gse-property-label) {
	background-color: #fff5f5;
}

.gse-thumbnail {
	max-width: 80px;
	max-height: 80px;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 3px;
}

/* Sortable table styles - now for columns */
#gse-uploaded-files tr[data-property="drag"] td:not(.gse-property-label) {
	cursor: col-resize;
	transition: background-color 0.2s ease;
}

#gse-uploaded-files tr[data-property="drag"] td:not(.gse-property-label):hover {
	background-color: #e8e8e8;
}

/* Style for the drag handle - rotated for horizontal drag */
.gse-drag-handle {
	display: inline-block;
	font-size: 24px;
	line-height: 1;
	color: #999;
	cursor: col-resize;
	vertical-align: middle;
	transform: rotate(90deg);
	user-select: none;
}

/* Style for the merge PDFs button */
#merge-pdfs-button {
	margin-top: 15px;
	margin-bottom: 15px;
	background-color: #4CAF50;
	color: white;
	padding: 10px 15px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: bold;
	display: block;
	width: 100%;
	max-width: 300px;
}

#merge-pdfs-button:hover {
	background-color: #45a049;
}

#merge-pdfs-button:disabled {
	background-color: #cccccc;
	cursor: not-allowed;
}

/* PDF Preview Container Styles */
#pdf-preview-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 9999;
	display: flex;
	flex-direction: column;
}

#pdf-preview-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px;
	background-color: #333;
	color: white;
}

#pdf-preview-title {
	font-size: 18px;
	font-weight: bold;
}

#pdf-preview-close {
	background-color: #f44336;
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 4px;
	cursor: pointer;
}

#pdf-preview-close:hover {
	background-color: #d32f2f;
}

#pdf-preview-content {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	background-color: #f5f5f5;
}

.pdf-pages {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
}

.pdf-page {
	background-color: white;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	padding: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.pdf-page canvas {
	max-width: 100%;
	height: auto;
}

.pdf-page-number {
	margin-top: 10px;
	font-size: 14px;
	color: #666;
}

/* PDF Dimensions Table Styles */
.pdf-dimensions-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	font-size: 14px;
}

.pdf-dimensions-table th,
.pdf-dimensions-table td {
	padding: 8px;
	border-bottom: 1px solid #ddd;
}

.pdf-dimensions-table thead th {
	background-color: #f5f5f5;
	font-weight: bold;
	text-align: center;
}

.pdf-dimensions-table tbody td {
	text-align: center;
}

.pdf-dimensions-table tfoot th {
	background-color: #f5f5f5;
	font-weight: bold;
	border-top: 2px solid #ddd;
	border-bottom: none;
	text-align: center;
}

/* Horizontal layout class */
.pdf-pages.horizontal {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    width: max-content;
}

/* Change content overflow based on layout */
#pdf-preview-content.horizontal {
    overflow-x: auto;
    overflow-y: hidden;
}

#pdf-preview-content.vertical {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Responsive styles for transposed table */
@media (max-width: 768px) {
	#gse-uploaded-files td:not(.gse-property-label) {
		min-width: 120px;
		max-width: 180px;
		font-size: 13px;
	}
	
	#gse-uploaded-files td.gse-property-label {
		min-width: 80px;
		font-size: 13px;
		padding-left: 8px;
	}
	
	.gse-thumbnail {
		max-width: 60px;
		max-height: 60px;
	}
	
	#gse-uploaded-files tr[data-property="thumbnail"] td:not(.gse-property-label) {
		height: 80px;
	}
}

@media (max-width: 480px) {
	#gse-uploaded-files td:not(.gse-property-label) {
		min-width: 100px;
		max-width: 150px;
		font-size: 12px;
	}
	
	#gse-uploaded-files td.gse-property-label {
		min-width: 70px;
		font-size: 12px;
	}
	
	.gse-thumbnail {
		max-width: 50px;
		max-height: 50px;
	}
	
	#gse-uploaded-files tr[data-property="thumbnail"] td:not(.gse-property-label) {
		height: 70px;
	}
}

/* Drag-and-drop visual feedback */
#gse-uploaded-files td[draggable="true"] {
	cursor: col-resize;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

#gse-uploaded-files td[draggable="true"]:hover {
	background-color: #f0f0f0;
}

/* Column being dragged */
#gse-uploaded-files td.gse-column-dragging {
	opacity: 0.5;
	background-color: #e3f2fd;
	border: 2px dashed #2196F3;
}

/* Drop target column */
#gse-uploaded-files td.gse-column-drop-target {
	background-color: #fff3e0;
	border-left: 3px solid #ff9800;
	border-right: 3px solid #ff9800;
}

/* Drag handle in drag row should be more prominent */
#gse-uploaded-files tr[data-property="drag"] td:not(.gse-property-label) {
	background-color: #fafafa;
	transition: background-color 0.2s ease;
}

#gse-uploaded-files tr[data-property="drag"] td:not(.gse-property-label):hover {
	background-color: #e8e8e8;
}

/* Add a subtle grab cursor hint */
.gse-drag-handle {
	cursor: grab;
}

.gse-drag-handle:active {
	cursor: grabbing;
}
