/* YouthPlug Opportunities – Frontend (theme-agnostic base styles) */

.yp-opportunities-directory {
	margin-bottom: 2rem;
}

.yp-filters-form {
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #f8f9fa;
	border-radius: 6px;
}

.yp-filters-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
	align-items: end;
}

.yp-filter-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
	font-size: 0.875rem;
}

.yp-filter-group input,
.yp-filter-group select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ced4da;
	border-radius: 4px;
}

.yp-filter-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

.yp-results-count {
	margin-bottom: 1rem;
	font-weight: 600;
}

.yp-opportunities-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.yp-opportunity-card {
	border: 1px solid #e9ecef;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.yp-opportunity-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.yp-card-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.yp-card-body {
	padding: 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.yp-card-title {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	line-height: 1.3;
}

.yp-card-title a {
	text-decoration: none;
	color: inherit;
}

.yp-card-org {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	color: #6c757d;
}

.yp-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
	font-size: 0.8rem;
}

.yp-card-meta span {
	background: #e9ecef;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
}

.yp-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 3px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
}

.yp-badge-closing-soon {
	background: #fff3cd;
	color: #664d03;
}

.yp-card-excerpt {
	flex: 1;
	font-size: 0.9rem;
	margin-bottom: 0.75rem;
}

.yp-card-actions {
	margin: 0;
}

.yp-btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	border: 1px solid transparent;
	cursor: pointer;
	background: #0d6efd;
	color: #fff;
}

.yp-btn:hover {
	background: #0b5ed7;
	color: #fff;
}

.yp-btn-secondary {
	background: #6c757d;
}

.yp-btn-secondary:hover {
	background: #5c636a;
}

.yp-pagination {
	margin-top: 2rem;
	text-align: center;
}

.yp-pagination ul {
	display: inline-flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0.25rem;
}

.yp-pagination li a,
.yp-pagination li span {
	display: block;
	padding: 0.4rem 0.75rem;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	text-decoration: none;
}

.yp-pagination li span.current {
	background: #0d6efd;
	color: #fff;
	border-color: #0d6efd;
}

/* Single opportunity */
.yp-opportunity-summary {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	padding: 1rem;
	background: #f8f9fa;
	border-radius: 6px;
}

.yp-meta-item {
	font-size: 0.9rem;
}

.yp-meta-label {
	font-weight: 600;
	color: #495057;
}

.yp-section {
	margin-bottom: 1.5rem;
}

.yp-section h3 {
	margin-bottom: 0.5rem;
	font-size: 1.15rem;
}

.yp-expired-notice {
	text-align: center;
	padding: 2rem;
	background: #f8d7da;
	border-radius: 8px;
	margin-bottom: 2rem;
}

.yp-expired-notice h2 {
	color: #842029;
	margin-top: 0;
}

/* Ads */
.yp-ad {
	margin: 1.5rem 0;
	text-align: center;
}

.yp-ad-sticky {
	position: sticky;
	bottom: 0;
	z-index: 100;
}

/* Loading state for AJAX */
.yp-loading {
	opacity: 0.5;
	pointer-events: none;
}

.yp-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: #6c757d;
}
