/* Deild Table - Public styles
   Visual design matches the reference: yellow header, alternating zebra rows,
   right-aligned numbers, click-to-sort headers. */

.deild-table-wrapper {
	width: 100%;
	overflow-x: auto;
	margin: 1.5em 0;
	-webkit-overflow-scrolling: touch;
}

.deild-table {
	width: 100%;
	border: none;
	border-collapse: collapse;
	border-spacing: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.4;
	color: #2f2f2f;
	background: #ffffff;
}

/* Header */
.deild-table thead th {
	background: #f4c800;          /* Yellow header */
	color: #1b1b1b;
	font-weight: 700;
	text-align: left;
	padding: 14px 18px;
	border: none;
	white-space: nowrap;
	user-select: none;
	-webkit-user-select: none;
	letter-spacing: 0.01em;
}

.deild-table thead th.deild-num {
	text-align: right;
}

.deild-table thead th.deild-sortable {
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.deild-table thead th.deild-sortable:hover,
.deild-table thead th.deild-sortable:focus {
	background: #e8bd00;
	outline: none;
}

.deild-table .deild-th-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.deild-table .deild-sort-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 4px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	opacity: 0;
	transition: opacity 0.15s ease;
}

/* Default subtle hint of sortability on hover */
.deild-table thead th.deild-sortable:hover .deild-sort-arrow {
	opacity: 0.35;
	border-bottom: 5px solid #1b1b1b;
}

/* Active sort indicators */
.deild-table thead th.deild-sort-asc .deild-sort-arrow {
	opacity: 1;
	border-bottom: 5px solid #1b1b1b;
	border-top: none;
}
.deild-table thead th.deild-sort-desc .deild-sort-arrow {
	opacity: 1;
	border-top: 5px solid #1b1b1b;
	border-bottom: none;
}

/* Body */
.deild-table tbody td {
	padding: 14px 18px;
	border: none;
	vertical-align: middle;
	font-variant-numeric: tabular-nums;
}

.deild-table tbody td.deild-num {
	text-align: right;
	white-space: nowrap;
}

/* Zebra striping like the reference */
.deild-table tbody tr {
	background: #ffffff;
	transition: background-color 0.12s ease;
}
.deild-table tbody tr:nth-child(even) {
	background: #f6f6f6;
}
.deild-table tbody tr:hover {
	background: #efefef;
}

/* Responsive: card layout on small screens */
@media (max-width: 640px) {
	.deild-table-wrapper {
		overflow-x: visible;
	}

	.deild-table {
		font-size: 14px;
	}

	.deild-table thead {
		display: none;
	}

	.deild-table tbody,
	.deild-table tbody tr,
	.deild-table tbody td {
		display: block;
		width: 100%;
	}

	.deild-table tbody tr {
		margin-bottom: 14px;
		border: 1px solid #e5e5e5;
		border-radius: 6px;
		overflow: hidden;
		background: #ffffff;
	}
	.deild-table tbody tr:nth-child(even) {
		background: #ffffff;
	}

	.deild-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px 14px;
		text-align: right;
		border-bottom: 1px solid #f0f0f0;
	}
	.deild-table tbody td:last-child {
		border-bottom: none;
	}
	.deild-table tbody td.deild-num {
		text-align: right;
	}

	.deild-table tbody td::before {
		content: attr(data-label);
		font-weight: 700;
		text-align: left;
		color: #1b1b1b;
		margin-right: 14px;
		flex: 0 0 auto;
	}

	/* First cell (Deild name) styled like a card header */
	.deild-table tbody td:first-child {
		background: #f4c800;
		color: #1b1b1b;
		font-weight: 700;
		font-size: 15px;
		justify-content: flex-start;
		padding: 12px 14px;
	}
	.deild-table tbody td:first-child::before {
		display: none;
	}
}

/* Sort controls toggle for mobile users — keep header tappable area large */
@media (max-width: 640px) {
	.deild-table-mobile-sort {
		display: block;
		margin: 0 0 12px;
	}
}
