/*
 * Paylocity Job Feed – Minimal layout styles.
 * Colors, fonts, border-radius, and button styles all inherit from your theme.
 * Only structural / spacing / layout rules are defined here.
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.pjobs-wrapper {
	width: 100%;
}

/* ── Controls row ────────────────────────────────────────────────────────── */
.pjobs-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
	margin-bottom: 1.25rem;
}

.pjobs-control {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

/* Search grows to fill remaining space */
.pjobs-control--search {
	flex: 1 1 14rem;
}

.pjobs-control--department,
.pjobs-control--sort {
	flex: 0 1 13rem;
}

.pjobs-label {
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.7;
}

/* Inherit input / select appearance from theme; just ensure consistent sizing */
.pjobs-search,
.pjobs-department,
.pjobs-sort {
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.4;
	border: 1px solid currentColor;
	border-radius: inherit;           /* picks up theme border-radius if set */
	background: transparent;
	color: inherit;
	box-sizing: border-box;
}

/* ── Count line ──────────────────────────────────────────────────────────── */
.pjobs-count {
	font-size: 0.9rem;
	opacity: 0.65;
	margin-bottom: 1rem;
}

/* ── Job list ────────────────────────────────────────────────────────────── */
.pjobs-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ── Individual job card ─────────────────────────────────────────────────── */
.pjobs-item {
	padding: 1.25rem 1.5rem;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: inherit;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pjobs-item:hover {
	border-color: rgba( 0, 0, 0, 0.25 );
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.08 );
}

/* Summary description */
.pjobs-item__summary {
	margin: 0.35rem 0 0.75rem;
	font-size: 0.95rem;
	line-height: 1.55;
	opacity: 0.85;
}

/* Header: title + department badge */
.pjobs-item__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin-bottom: 0.5rem;
}

.pjobs-item__title {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
}

.pjobs-item__title a {
	text-decoration: none;
	color: inherit;
}

.pjobs-item__title a:hover {
	text-decoration: underline;
}

.pjobs-item__department {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.2em 0.6em;
	border-radius: 2em;
	opacity: 0.75;
	border: 1px solid currentColor;
	white-space: nowrap;
}

/* Meta row: type, salary, date */
.pjobs-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
	font-size: 0.875rem;
	opacity: 0.7;
	margin-bottom: 1rem;
}

.pjobs-item__meta span::before {
	margin-right: 0.3em;
}

.pjobs-item__type::before   { content: "⏱"; }
.pjobs-item__salary::before { content: "💵"; }
.pjobs-item__date::before   { content: "📅"; }

/* Action buttons */
.pjobs-item__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/*
 * Button styles: we give just enough to make them look like buttons, but use
 * the theme's link color so they integrate naturally. Themes that define
 * .wp-block-button__link or similar will not conflict because we use our own
 * class names.
 */
.pjobs-btn {
	display: inline-block;
	padding: 0.45em 1.1em;
	font-size: 0.9rem;
	font-weight: 600;
	font-family: inherit;
	text-decoration: none;
	border-radius: inherit;
	border: 2px solid currentColor;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	line-height: 1.4;
}

.pjobs-btn--apply {
	background: currentColor;
	color: inherit;
	/* Invert trick: text shows as page background color */
	-webkit-text-fill-color: var( --wp--preset--color--background, #fff );
	text-fill-color: var( --wp--preset--color--background, #fff );
}

.pjobs-btn--apply:hover {
	opacity: 0.85;
}

.pjobs-btn--details {
	background: transparent;
}

.pjobs-btn--details:hover {
	background: currentColor;
	-webkit-text-fill-color: var( --wp--preset--color--background, #fff );
	text-fill-color: var( --wp--preset--color--background, #fff );
}

/* ── No-results block ────────────────────────────────────────────────────── */
.pjobs-no-results {
	text-align: center;
	padding: 2rem 1rem;
	opacity: 0.7;
}

.pjobs-reset {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
	color: inherit;
}

/* ── Error / empty states ────────────────────────────────────────────────── */
.pjobs-error,
.pjobs-empty {
	padding: 1rem;
	opacity: 0.7;
	font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.pjobs-control--department,
	.pjobs-control--sort {
		flex: 1 1 100%;
	}

	.pjobs-item {
		padding: 1rem;
	}

	.pjobs-item__header {
		flex-direction: column;
		gap: 0.35rem;
	}
}
