/* ============================================
   Geo Table - Sanity-inspired Design
   ============================================ */

.block-geo-table {
	padding: 4rem 0;
	background: #fff;
}

.block-geo-table .container-fluid {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 2rem;
}

/* ============================================
   Table Base Styles
   ============================================ */

.block-geo-table table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #1a1a1a;
}

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

.block-geo-table  .geo_table-top{
	position: sticky;
	top: 0;
	z-index: 10;
	background: #fff;
}

.block-geo-table .geo_table-top {
	border-bottom: 2px solid #e5e5e5;
}

.block-geo-table .geo_table-top th {
	padding: 1.25rem 1.5rem;
	text-align: left;
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
	background: #fafafa;
	border-bottom: 2px solid #e5e5e5;
}

.block-geo-table .geo_table-top .th_1 {
	width: 20%;
	border-right: 1px solid #e5e5e5;
}

.block-geo-table .geo_table-top .th_2,
.block-geo-table .geo_table-top .th_3 {
	width: 23.33%;
	border-right: 1px solid #e5e5e5;
}

.block-geo-table .geo_table-top .th_4 {
	width: 23.33%;
}

/* Screen reader only */
.block-geo-table .sr_only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ============================================
   Table Body
   ============================================ */

.block-geo-table tr {
	transition: background-color 0.15s ease;
}

.block-geo-table tr:hover {
	background-color: #f9f9f9;
}

/* Topic Headers (Subheadings) */
.block-geo-table .geo_table-subhead {
	position: sticky;
    top: 57px;
}

.th_empty {
	background: transparent !important;
	border: none !important;
}
.block-geo-table .th_subhead div {
	min-height: 3em;
	max-height: 3em;
}
.block-geo-table .th_subhead {
	padding: 1.5rem 1.5rem 0.75rem;
	font-weight: 700;
	font-size: 1.125rem;
	color: #1a1a1a;
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
	text-align: left;
}


.block-geo-table tr:first-child .th_subhead {
	border-top: none;
}

/* Table Cells */
.block-geo-table td {
	padding: 1.25rem 1.5rem;
	vertical-align: top;
	border-bottom: 1px solid #f0f0f0;
}

.block-geo-table .td_1 {
	font-weight: 600;
	color: #1a1a1a;
	border-right: 1px solid #f0f0f0;
}

.block-geo-table .td_2,
.block-geo-table .geo_table-top .th_2,
.block-geo-table .td_4,
.block-geo-table .geo_table-top .th_4 {
	background-color: #ccc
}
.block-geo-table .td_2,
.block-geo-table .td_3 {
	color: #4a4a4a;
	border-right: 1px solid #f0f0f0;
}


.block-geo-table .td_4 {
	color: #666;
	font-size: 0.875rem;
	line-height: 1.7;
}

.td_inline_headline {
	display: none;
}

.block-geo-table .td_4 {
	font-style: italic;
}

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

@media (max-width: 1024px) {
	.block-geo-table .container-fluid {
		padding: 0 1.5rem;
	}

	.block-geo-table table {
		font-size: 0.875rem;
	}

	.block-geo-table th,
	.block-geo-table td {
		padding: 1rem 1.25rem;
	}

	.block-geo-table .th_subhead {
		padding: 1.25rem 1.25rem 0.5rem;
		font-size: 1rem;

	}
}

@media (max-width: 780px) {
	.block-geo-table {
		padding: 2rem 0;
	}

	.td_inline_headline {
		display: block;
		font-weight: 700;
	}

	.block-geo-table .container-fluid {
		padding: 0 1rem;
		overflow-x: visible;
	}

	.block-geo-table table {
		display: block;
		min-width: 0;
		font-size: 0.875rem;
	}

	.block-geo-table .geo_table-top {
		display: block;
	}

	.block-geo-table tbody {
		display: block;
	}

	/* Each row becomes a block */
	.block-geo-table .geo_table-top,	.block-geo-table .geo_table-row {
		display: flex;
		flex-wrap: wrap;
		margin-bottom: 1.5rem;
		border: 1px solid #e5e5e5;
		border-radius: 2px;
		overflow: hidden;
	}

	/* Topic headers span full width */
	.block-geo-table .geo_table-subhead {
		display: block;
		margin-bottom: 0.5rem;
	}

	.block-geo-table .th_subhead {
		display: block;
		width: 100%;
		padding: 1rem;
		background: #fafafa;
		border-bottom: 2px solid #e5e5e5;
		border-radius: 2px 2px 0 0;
		font-size: 1rem;
	}

	/* First column (label) - full width */
	.block-geo-table .td_1 {
		width: 100%;
		padding: 1rem;
		background: #fafafa;
		font-weight: 700;
		border-right: none;
		border-bottom: 2px solid #e5e5e5;
	}

	/* Second and third columns - 50/50 side by side */
	.block-geo-table .th_2,
	.block-geo-table .td_2,
	.block-geo-table .th_3,
	.block-geo-table .td_3 {
		width: 50% !important;
		padding: 1rem;
		border-right: none;
		border-bottom: 1px solid #e5e5e5;
	}


	.block-geo-table .td_2 {
		border-right: 1px solid #e5e5e5;
	}

	/* Fourth column - full width */
	.block-geo-table .td_4 {
		width: 100%;
		padding: 1rem;
		border-right: none;
		border-bottom: none;
		font-size: 0.875rem;
	}

	/* Hide table header on mobile */
	.block-geo-table .geo_table-top .th_4,
	.block-geo-table .geo_table-top .th_empty {
		display: none;
	}
	
	.block-geo-table .geo_table-subhead {
		top: 89px;
	}

	.block-geo-table .geo_table-subhead .th_subhead div {
		min-height: 0;
		max-height: none;
	}
}

/* ============================================
   Enhanced Features (Optional)
   ============================================ */

/* Zebra striping for better readability */
.block-geo-table tr:nth-child(even):not([class*="th_subhead"]) {
	background-color: #fafafa;
}

.block-geo-table tr:nth-child(even):hover {
	background-color: #f5f5f5;
}

/* Highlight important cells */
.block-geo-table .td_2 strong,
.block-geo-table .td_3 strong {
	color: #1a1a1a;
	font-weight: 700;
}

/* Add subtle shadow to sticky header - Pure CSS */
.block-geo-table {
	box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0);
	transition: box-shadow 0.2s ease;
}

/* Shadow appears when scrolled */
.block-geo-table table {
	background:
		linear-gradient(white 30%, rgba(255,255,255,0)),
		linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
		radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.1), rgba(0,0,0,0)),
		radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.1), rgba(0,0,0,0)) 0 100%;
	background-repeat: no-repeat;
	background-color: white;
	background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
	background-attachment: local, local, scroll, scroll;
}

/* Smooth scrolling for mobile */
.block-geo-table .container-fluid {
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: #ccc #f5f5f5;
}

.block-geo-table .container-fluid::-webkit-scrollbar {
	height: 8px;
}

.block-geo-table .container-fluid::-webkit-scrollbar-track {
	background: #f5f5f5;
	border-radius: 4px;
}

.block-geo-table .container-fluid::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

.block-geo-table .container-fluid::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Print styles */
@media print {
	.block-geo-table {
		padding: 0;
	}

	.block-geo-table {
		position: static;
	}

	.block-geo-table tr {
		page-break-inside: avoid;
	}

	.block-geo-table .th_subhead {
		page-break-after: avoid;
	}
}

/* ============================================
   Copy to Clipboard Button
   ============================================ */

.copy-table-wrapper {
	position: relative;
	margin: 1rem 0;
}

.copy-table-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.copy-table-btn:hover:not(:disabled) {
	background: #333;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-table-btn:active:not(:disabled) {
	transform: translateY(0);
}

.copy-table-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.copy-table-btn.copied {
	background: #10b981;
}

.copy-table-btn.copied:hover {
	background: #059669;
}

.copy-table-btn svg {
	flex-shrink: 0;
}

@media (max-width: 780px) {
	.copy-table-btn {
		width: 100%;
		justify-content: center;
	}
}
