/**
 * DevHub Project Hub — Blocks tab.
 *
 * Per-target sections showing discovered blocks with library overlay
 * status. Visual language matches the Connections tab (dark theme,
 * #1a1d21 panels, 8px radius, #68de7c accent).
 *
 * @since plan #194 step 2
 */

.tf-blocks {
	max-width: 980px;
}

.tf-blocks__intro {
	color: #d4d4d4;
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 24px;
}

.tf-blocks__intro strong {
	color: #e0e0e0;
	font-weight: 600;
}

.tf-blocks__intro a {
	color: #68de7c;
	text-decoration: none;
	border-bottom: 1px solid rgba(104, 222, 124, 0.3);
}

.tf-blocks__intro a:hover,
.tf-blocks__intro a:focus-visible {
	border-bottom-color: #68de7c;
}

.tf-blocks--no-targets,
.tf-blocks--unavailable {
	max-width: 700px;
}

.tf-blocks__env {
	margin-bottom: 32px;
}

.tf-blocks__env-header {
	margin-bottom: 12px;
}

.tf-blocks__env-title {
	color: #e0e0e0;
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.tf-blocks__target {
	margin-bottom: 20px;
	background: #1a1d21;
	border: 1px solid #2a2d31;
	border-radius: 8px;
	padding: 16px 20px;
}

.tf-blocks__target-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #2a2d31;
}

.tf-blocks__target-id {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tf-blocks__target-name {
	color: #e0e0e0;
	font-size: 14px;
	font-weight: 600;
}

.tf-blocks__target-url {
	color: #888;
	font-size: 12px;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tf-blocks__target-url:hover,
.tf-blocks__target-url:focus-visible {
	color: #68de7c;
}

.tf-blocks__target-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.tf-blocks__target-last-fetched {
	color: #888;
	font-size: 12px;
}

.tf-blocks__refresh {
	background: #1f2429;
	border: 1px solid #2f3439;
	color: #d4d4d4;
	font-family: inherit;
	font-size: 12px;
	padding: 5px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.tf-blocks__refresh:hover,
.tf-blocks__refresh:focus-visible {
	background: #262b30;
	border-color: rgba(104, 222, 124, 0.4);
	color: #e0e0e0;
}

.tf-blocks__refresh:disabled {
	opacity: 0.5;
	cursor: progress;
}

.tf-blocks__counts {
	color: #d4d4d4;
	font-size: 12px;
	margin: 12px 0 16px;
}

.tf-blocks__counts strong {
	color: #e0e0e0;
	font-weight: 600;
}

.tf-blocks__counts-gaps {
	color: #f4c430;
}

.tf-blocks__empty {
	color: #ff6b6b;
	font-size: 13px;
	margin: 12px 0 4px;
	padding: 10px 12px;
	background: rgba(255, 107, 107, 0.06);
	border: 1px solid rgba(255, 107, 107, 0.2);
	border-radius: 6px;
}

.tf-blocks__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tf-blocks__table thead th {
	color: #888;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: left;
	padding: 6px 10px;
	border-bottom: 1px solid #2a2d31;
}

.tf-blocks__table tbody td {
	padding: 8px 10px;
	border-bottom: 1px solid #1f2226;
	color: #d4d4d4;
	vertical-align: middle;
}

.tf-blocks__table tbody tr:last-child td {
	border-bottom: 0;
}

.tf-blocks__col-name {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}

.tf-blocks__namespace {
	color: #888;
}

.tf-blocks__slug {
	color: #e0e0e0;
}

.tf-blocks__col-title {
	color: #d4d4d4;
}

.tf-blocks__col-status {
	font-size: 12px;
	white-space: nowrap;
}

.tf-blocks__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 8px;
	border-radius: 999px;
	font-size: 11px;
	line-height: 1.4;
}

.tf-blocks__chip--enriched {
	background: rgba(104, 222, 124, 0.08);
	color: #68de7c;
	border: 1px solid rgba(104, 222, 124, 0.25);
}

.tf-blocks__chip--gap {
	background: rgba(244, 196, 48, 0.06);
	color: #f4c430;
	border: 1px solid rgba(244, 196, 48, 0.2);
}

.tf-blocks__tier {
	color: #e0e0e0;
	font-weight: 600;
}

.tf-blocks__col-action {
	text-align: right;
	white-space: nowrap;
}

.tf-blocks__action {
	display: inline-block;
	background: #1f2429;
	border: 1px solid #2f3439;
	color: #d4d4d4;
	font-family: inherit;
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
}

.tf-blocks__action:hover,
.tf-blocks__action:focus-visible {
	background: #262b30;
	border-color: rgba(104, 222, 124, 0.4);
	color: #e0e0e0;
}

.tf-blocks__action:disabled {
	opacity: 0.5;
	cursor: progress;
}

.tf-blocks__action--create {
	border-color: rgba(244, 196, 48, 0.3);
	color: #f4c430;
}

.tf-blocks__action--create:hover,
.tf-blocks__action--create:focus-visible {
	border-color: #f4c430;
	color: #f4c430;
}

@media (max-width: 720px) {

	.tf-blocks__target-header {
		flex-direction: column;
	}

	.tf-blocks__target-controls {
		width: 100%;
		justify-content: space-between;
	}

	.tf-blocks__table thead {
		display: none;
	}

	.tf-blocks__table,
	.tf-blocks__table tbody,
	.tf-blocks__table tr,
	.tf-blocks__table td {
		display: block;
		width: 100%;
	}

	.tf-blocks__table tr {
		padding: 8px 0;
		border-bottom: 1px solid #2a2d31;
	}

	.tf-blocks__col-action {
		text-align: left;
		padding-top: 4px;
	}
}
