/* =========================================================
   Dashboard plugin lists
   ========================================================= */

/* Compatibility fallback for WPJM-generated dashboard tables inside owned wrappers. */
.tr-candidate-dashboard__surface,
.tr-plugin-list {
	display: grid;
	gap: 1rem;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.tr-plugin-list :is(#job-manager-alerts, #resume-manager-candidate-dashboard, .job-manager-applications, .job-manager-application-dashboard) {
	display: grid;
	gap: 1rem;
	min-width: 0;
	max-width: 100%;
}

.tr-plugin-list :is(.job-manager-message, .job-manager-error, .job-manager-info, .woocommerce-message, .woocommerce-info, .woocommerce-error) {
	margin: 0;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(0, 109, 119, 0.14);
	border-radius: 14px;
	background: rgba(237, 246, 249, 0.74);
	color: var(--tr-text);
	line-height: 1.5;
}

.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid rgba(0, 109, 119, 0.14);
	border-radius: 16px;
	background: #FFFFFF;
	box-shadow: var(--tr-shadow-sm);
}

.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) th {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid rgba(0, 43, 48, 0.08);
	background: #F8FCFC;
	color: var(--tr-text);
	font-size: 0.82rem;
	font-weight: 850;
	text-align: left;
}

.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td {
	padding: 1rem;
	border-bottom: 1px solid rgba(0, 43, 48, 0.08);
	color: var(--tr-text);
	vertical-align: top;
}

.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) tr:last-child td {
	border-bottom: 0;
}

.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td[colspan] {
	padding: 1.2rem;
	color: var(--tr-muted);
	font-weight: 650;
}

.tr-plugin-list :is(.job-alert-actions, .candidate-dashboard-actions, .job-dashboard-actions),
.tr-plugin-list :is(ul.candidate-dashboard-actions, ul.job-dashboard-actions) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.5rem 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.tr-plugin-list :is(.job-alert-actions, .candidate-dashboard-actions, .job-dashboard-actions) li {
	margin: 0 !important;
	padding: 0 !important;
}

.tr-plugin-list :is(a.button, .button, ul.candidate-dashboard-actions a, ul.job-dashboard-actions a) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0.55rem 0.8rem !important;
	border: 1px solid rgba(0, 109, 119, 0.18) !important;
	border-radius: 10px !important;
	background: #FFFFFF !important;
	color: var(--tr-primary) !important;
	font-size: 0.88rem !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

.tr-plugin-list :is(a.button, .button, ul.candidate-dashboard-actions a, ul.job-dashboard-actions a):hover,
.tr-plugin-list :is(a.button, .button, ul.candidate-dashboard-actions a, ul.job-dashboard-actions a):focus {
	border-color: var(--tr-primary) !important;
	background: rgba(0, 109, 119, 0.06) !important;
	color: var(--tr-primary-hover) !important;
}

.tr-plugin-list :is(form, .job-manager-form) {
	min-width: 0;
	max-width: 100%;
}

.tr-plugin-list :is(input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], select, textarea) {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	padding: 0.72rem 0.85rem;
	border: 1px solid rgba(0, 109, 119, 0.18);
	border-radius: 12px;
	background: #FFFFFF;
	color: var(--tr-text);
}


/* Compatibility fallback for raw shortcode table columns inside owned wrappers. */
/* Hide location column in Resume Dashboard */
.tr-plugin-list .resume-manager-resumes th.candidate-location,
.tr-plugin-list .resume-manager-resumes td:nth-child(3):not([colspan]) {
	display: none !important;
}

/* Hide status column in applications dashboards */
.tr-plugin-list table.job-manager-applications th.status,
.tr-plugin-list table.job-manager-applications th.application-status,
.tr-plugin-list table.job-manager-applications td.status,
.tr-plugin-list table.job-manager-applications td.application-status,
.tr-plugin-list table.job-manager-past-applications th.status,
.tr-plugin-list table.job-manager-past-applications th.application-status,
.tr-plugin-list table.job-manager-past-applications td.status,
.tr-plugin-list table.job-manager-past-applications td.application-status {
	display: none !important;
}

/* Resume table specific styling */
.tr-plugin-list table.resume-manager-resumes th.resume-title {
	width: 25%;
}

.tr-plugin-list table.resume-manager-resumes th.candidate-title {
	width: 50%;
}

.tr-plugin-list table.resume-manager-resumes th.date,
.tr-plugin-list table.resume-manager-resumes td.date {
	width: 25%;
	text-align: left;
}

/* Applications table specific styling */
.tr-plugin-list table.job-manager-applications th:nth-child(1),
.tr-plugin-list table.job-manager-past-applications th:nth-child(1),
.tr-plugin-list table.job-manager-applications-applied-jobs th:nth-child(1) {
	width: 25%;
}

.tr-plugin-list table.job-manager-applications th:nth-child(2),
.tr-plugin-list table.job-manager-past-applications th:nth-child(2),
.tr-plugin-list table.job-manager-applications-applied-jobs th:nth-child(2) {
	width: 25%;
}

.tr-plugin-list table.job-manager-applications th:nth-child(3),
.tr-plugin-list table.job-manager-past-applications th:nth-child(3),
.tr-plugin-list table.job-manager-applications-applied-jobs th:nth-child(3),
.tr-plugin-list table.job-manager-applications th:nth-child(4),
.tr-plugin-list table.job-manager-past-applications th:nth-child(4),
.tr-plugin-list table.job-manager-applications-applied-jobs th:nth-child(4) {
	width: 50%;
}


@media (max-width: 700px) {
	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) {
		display: block;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		overflow: visible;
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) thead {
		display: none;
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) tbody {
		display: grid;
		gap: 0.85rem;
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) tr {
		display: grid;
		gap: 0.55rem;
		padding: 0.95rem;
		border: 1px solid rgba(0, 109, 119, 0.14);
		border-radius: 14px;
		background: #FFFFFF;
		box-shadow: var(--tr-shadow-sm);
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td {
		display: grid;
		grid-template-columns: minmax(7rem, 0.38fr) minmax(0, 1fr);
		gap: 0.75rem;
		align-items: start;
		padding: 0 !important;
		border: 0 !important;
		overflow-wrap: anywhere;
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td::before {
		content: attr(data-title);
		color: var(--tr-muted);
		font-size: 0.76rem;
		font-weight: 850;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.tr-plugin-list table.job-manager-alerts td:nth-child(1)::before {
		content: "Alert";
	}

	.tr-plugin-list table.job-manager-alerts td:nth-child(2)::before {
		content: "Search";
	}

	.tr-plugin-list table.job-manager-alerts td:nth-child(3)::before {
		content: "Frequency";
	}

	.tr-plugin-list table.job-manager-alerts td:nth-child(4)::before {
		content: "Status";
	}

	.tr-plugin-list table.job-manager-alerts td:nth-child(5)::before {
		content: "Actions";
	}

	.tr-plugin-list :is(table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications) td:nth-child(1)::before,
	.tr-plugin-list table.resume-manager-resumes td:nth-child(1)::before {
		content: "Role";
	}

	.tr-plugin-list :is(table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications) td:nth-child(2)::before,
	.tr-plugin-list table.resume-manager-resumes td:nth-child(2)::before {
		content: "Details";
	}

	.tr-plugin-list :is(table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications) td:nth-child(3)::before,
	.tr-plugin-list table.resume-manager-resumes td:nth-child(3)::before {
		content: "Date";
	}

	.tr-plugin-list :is(table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications) td:nth-child(4)::before,
	.tr-plugin-list table.resume-manager-resumes td:nth-child(4)::before {
		content: "Actions";
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td[colspan] {
		display: block;
		padding: 1rem !important;
	}

	.tr-plugin-list :is(table.job-manager-alerts, table.job-manager-applications, table.job-manager-applications-applied-jobs, table.job-manager-past-applications, table.resume-manager-resumes) td[colspan]::before {
		display: none;
	}

}
