/**
 * WAPD Seek - Frontend Styles
 * Enfold Theme Compatible
 */

.wapd-seek-jobs {
	margin: 20px 0;
}

/* List Layout */
.wapd-seek-layout-list .wapd-seek-job-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wapd-seek-layout-list .wapd-seek-job-item {
	padding: 15px 0;
	border-bottom: 1px solid #e0e0e0;
}

.wapd-seek-layout-list .wapd-seek-job-item:last-child {
	border-bottom: none;
}

.wapd-seek-layout-list .wapd-seek-job-title {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
	color: #333;
}

.wapd-seek-layout-list .wapd-seek-job-link {
	text-decoration: none;
	color: inherit;
	transition: color 0.3s ease;
}

.wapd-seek-layout-list .wapd-seek-job-link:hover {
	color: #0073aa;
}

.wapd-seek-layout-list .wapd-seek-job-link:hover .wapd-seek-job-title {
	color: #0073aa;
}

.wapd-seek-layout-list .wapd-seek-job-location {
	display: inline-block;
	margin-right: 15px;
	color: #666;
	font-size: 14px;
}

.wapd-seek-layout-list .wapd-seek-job-description {
	margin: 8px 0 5px;
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

.wapd-seek-layout-list .wapd-seek-job-date {
	display: inline-block;
	color: #999;
	font-size: 12px;
}

/* Card Layout */
.wapd-seek-layout-card .wapd-seek-job-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 12px;
	margin: 0;
}

/* Column Options */
.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-1 {
	grid-template-columns: 1fr;
}

.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.wapd-seek-job-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 5px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	display: flex;
	flex-direction: column;
}

.wapd-seek-job-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.wapd-seek-job-card .wapd-seek-job-header {
	display: block;
	margin-bottom: 12px;
}

.wapd-seek-job-card .wapd-seek-job-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #333;
	line-height: 1.3;
}

.wapd-seek-job-card .wapd-seek-job-link {
	text-decoration: none;
	color: inherit;
}

.wapd-seek-job-card .wapd-seek-job-link:hover .wapd-seek-job-title {
	color: #0073aa;
}

.wapd-seek-job-card .wapd-seek-job-location {
	margin-bottom: 10px;
	color: #666;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.wapd-seek-job-card .wapd-seek-job-description {
	margin: 0 0 15px;
	color: #555;
	font-size: 14px;
	line-height: 1.6;
	flex-grow: 1;
}

.wapd-seek-job-card .wapd-seek-job-date {
	margin-bottom: 15px;
	color: #999;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.wapd-seek-job-card .wapd-seek-job-actions {
	margin-top: auto;
	display: block;
}

/* Single column layout - button inline with title */
.wapd-seek-single-column .wapd-seek-job-card .wapd-seek-job-header {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 0px;
	flex-wrap: nowrap;
}

.wapd-seek-single-column .wapd-seek-job-card .wapd-seek-job-title {
	margin: 0;
	flex: 1;
	min-width: 0; /* Allow title to shrink if needed */
}

.wapd-seek-single-column .wapd-seek-job-card .wapd-seek-job-actions-inline {
	margin-top: 0;
	flex-shrink: 0;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	width: auto;
	height: auto;
}

.wapd-seek-single-column .wapd-seek-job-card .wapd-seek-job-actions-inline .wapd-seek-job-button {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative;
	white-space: nowrap;
}

.wapd-seek-single-column .wapd-seek-job-card .wapd-seek-job-actions {
	display: none; /* Hide the bottom button in single column */
}

.wapd-seek-job-button {
	display: inline-block !important;
	padding: 10px 20px;
	background-color: #0073aa;
	color: #fff !important;
	text-decoration: none;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.3s ease;
	visibility: visible !important;
	opacity: 1 !important;
}

.wapd-seek-job-button:hover {
	background-color: #005a87;
	color: #fff;
}

/* Empty State */
.wapd-seek-empty {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.wapd-seek-empty-message {
	font-size: 16px;
	margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
	.wapd-seek-layout-card .wapd-seek-job-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	/* Override column classes on mobile - always single column */
	.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-2,
	.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-3,
	.wapd-seek-layout-card .wapd-seek-job-grid.wapd-seek-columns-4 {
		grid-template-columns: 1fr;
	}
	
	.wapd-seek-job-card {
		padding: 15px;
	}
	
	.wapd-seek-layout-list .wapd-seek-job-title {
		font-size: 16px;
	}
}

/* Enfold Theme Compatibility */
.avia-content .wapd-seek-jobs,
.entry-content .wapd-seek-jobs {
	margin: 20px 0;
}

/* Use Enfold's color scheme if available */
.avia-content .wapd-seek-job-button,
.entry-content .wapd-seek-job-button {
	/* background-color: var(--av-primary-color, #0073aa); */
}

.avia-content .wapd-seek-job-link:hover,
.entry-content .wapd-seek-job-link:hover {
	color: var(--av-primary-color, #0073aa);
}

/* Icon placeholders (can be replaced with actual icons) */
.wapd-seek-icon-location::before {
	content: "📍 ";
}

.wapd-seek-icon-date::before {
	content: "📅 ";
}

