/* Sun Table CSS - Public View */

.sun-table-container {
	margin: 24px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid rgba(226, 232, 240, 0.8);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
	overflow: hidden;
}

.sun-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.sun-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 0;
	padding: 0;
	text-align: left;
}

/* Header Styling */
.sun-table thead {
	background: #f8fafc;
	border-bottom: 2px solid #f1f5f9;
}

.sun-table th {
	padding: 18px 24px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
}

/* Body Styling */
.sun-table tbody tr {
	border-bottom: 1px solid #f1f5f9;
	transition: background-color 0.2s ease;
}

.sun-table tbody tr:last-child {
	border-bottom: none;
}

.sun-table tbody tr:hover {
	background-color: rgba(248, 250, 252, 0.8);
}

.sun-table td {
	padding: 16px 24px;
	vertical-align: middle;
	color: #334155;
	font-size: 15px;
}

/* File Name & Info Layout */
.sun-file-info {
	display: flex;
	align-items: center;
	gap: 16px;
}

.sun-file-icon-wrapper {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sun-icon {
	width: 24px;
	height: 24px;
	stroke-width: 2px;
}

/* File Icon Theme Colors (Modern Glassy look) */
.sun-table tr:hover .sun-file-icon-wrapper {
	transform: scale(1.05);
	transition: transform 0.2s ease;
}

.sun-file-icon-wrapper:has(.icon-pdf) {
	background-color: rgba(239, 68, 68, 0.08);
}
.sun-file-icon-wrapper:has(.icon-zip) {
	background-color: rgba(245, 158, 11, 0.08);
}
.sun-file-icon-wrapper:has(.icon-doc) {
	background-color: rgba(59, 130, 246, 0.08);
}
.sun-file-icon-wrapper:has(.icon-xls) {
	background-color: rgba(16, 185, 129, 0.08);
}
.sun-file-icon-wrapper:has(.icon-image) {
	background-color: rgba(139, 92, 246, 0.08);
}
.sun-file-icon-wrapper:has(.icon-audio) {
	background-color: rgba(236, 72, 153, 0.08);
}
.sun-file-icon-wrapper:has(.icon-video) {
	background-color: rgba(99, 102, 241, 0.08);
}
.sun-file-icon-wrapper:has(.icon-default) {
	background-color: rgba(20, 184, 166, 0.08);
}
.sun-file-icon-wrapper:has(.icon-drive) {
	background-color: rgba(66, 133, 244, 0.08);
}

/* Details and Badges */
.sun-file-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sun-file-title {
	font-weight: 600;
	color: #0f172a;
	line-height: 1.4;
}

.sun-file-format-badge {
	align-self: flex-start;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 2px 6px;
	border-radius: 4px;
	background: #f1f5f9;
	color: #64748b;
}

/* File Size column */
.sun-file-size {
	font-weight: 500;
	color: #64748b;
}

/* Download Button Styling */
.sun-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	color: #d4af37 !important; /* Gold text */
	background: #1e1e1e; /* Matte black */
	border: 1px solid #d4af37; /* Gold border */
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.08);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
}

.sun-download-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
	background: linear-gradient(135deg, #f59e0b, #d4af37); /* Gold gradient */
	color: #111111 !important; /* Black text */
	border-color: transparent;
}

.sun-download-btn:active {
	transform: translateY(0);
}

.sun-btn-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

/* Footer Credit */
.sun-table-footer {
	padding: 12px 24px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
	text-align: right;
}

.sun-credit-text {
	font-size: 11px;
	color: #94a3b8;
}

.sun-credit-text a {
	color: #64748b;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s ease;
}

.sun-credit-text a:hover {
	color: #3b82f6;
	text-decoration: underline;
}

/* Empty Table View */
.sun-table-empty {
	padding: 30px;
	text-align: center;
	color: #64748b;
	font-weight: 500;
}

/* Column Width Constraints */
.col-filename {
	width: 60%;
}
.col-filesize {
	width: 20%;
}
.col-action {
	width: 20%;
	text-align: right;
}

.sun-table th.col-action {
	text-align: right;
}

/* Responsive Styles for Mobile Viewports */
@media screen and (max-width: 768px) {
	.sun-table-container {
		border-radius: 12px;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
	}

	.sun-table, 
	.sun-table thead, 
	.sun-table tbody, 
	.sun-table th, 
	.sun-table td, 
	.sun-table tr {
		display: block;
	}

	/* Hide the table headers */
	.sun-table thead tr {
		position: absolute;
		top: -9999px;
		left: -9999px;
	}

	.sun-table tbody tr {
		border-bottom: 8px solid #f8fafc;
		padding: 16px;
	}

	.sun-table tbody tr:last-child {
		border-bottom: none;
	}

	.sun-table td {
		border: none;
		padding: 10px 0;
		position: relative;
		width: 100% !important;
		box-sizing: border-box;
	}

	/* Main file info cell on mobile */
	.sun-table td.col-filename {
		padding-top: 0;
		padding-bottom: 12px;
		border-bottom: 1px solid #f1f5f9;
	}

	/* Table cells that collapse as label-value rows */
	.sun-table td.col-filesize,
	.sun-table td.col-action {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: right;
	}

	/* Insert responsive labels using data-label attribute */
	.sun-table td.col-filesize::before,
	.sun-table td.col-action::before {
		content: attr(data-label);
		font-weight: 600;
		color: #64748b;
		font-size: 13px;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		text-align: left;
	}

	.sun-download-btn {
		width: auto;
		padding: 8px 14px;
		font-size: 13px;
	}
}
