/* J&S Motorsports Events - front-end styles */

.jse-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: 40px 20px;
}

.jse-archive-header {
	text-align: center;
	margin-bottom: 30px;
}

.jse-archive-header h1 {
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.jse-intro {
	color: #666;
}

/* Schedule table */
.jse-schedule-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 24px;
}

.jse-schedule-table thead th {
	text-align: left;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #222;
	padding: 10px 12px;
}

.jse-schedule-table tbody td {
	padding: 14px 12px;
	border-bottom: 1px solid #e2e2e2;
	vertical-align: middle;
}

.jse-schedule-table tbody tr:hover {
	background: #f7f7f7;
}

.jse-col-action {
	text-align: right;
	white-space: nowrap;
}

.jse-btn-details {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #222;
	border-radius: 3px;
	text-decoration: none;
	font-size: 13px;
	color: #222;
}

.jse-btn-details:hover {
	background: #222;
	color: #fff;
}

.jse-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: #ddd;
	color: #333;
}

.jse-badge-race {
	background: #d32f2f;
	color: #fff;
}

.jse-badge-practice {
	background: #1976d2;
	color: #fff;
}

.jse-pagination {
	text-align: center;
	margin-top: 20px;
}

/* Single event page */
.jse-back-link {
	margin-bottom: 20px;
}

.jse-back-link a {
	text-decoration: none;
}

.jse-event-header h1 {
	margin: 8px 0 20px;
}

.jse-event-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 24px;
}

.jse-event-meta-box {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	background: #f7f7f7;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 24px;
}

.jse-meta-item {
	display: flex;
	flex-direction: column;
	min-width: 120px;
}

.jse-meta-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #777;
	margin-bottom: 4px;
}

.jse-meta-value {
	font-size: 16px;
	font-weight: 600;
}

.jse-event-content {
	line-height: 1.7;
}

.jse-time {
	display: block;
	font-size: 12px;
	color: #888;
}

.jse-badge-qualifying {
	background: #f9a825;
	color: #333;
}

.jse-badge-test.day,
.jse-badge-test {
	background: #616161;
	color: #fff;
}

.jse-section-title {
	margin-top: 40px;
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 18px;
	border-bottom: 2px solid #222;
	padding-bottom: 8px;
}

.jse-event-location {
	color: #666;
	margin-top: -12px;
}

/* Driver grid (used on Event page, Driver archive, and [js_race_team] shortcode) */
.jse-driver-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.jse-driver-card {
	display: block;
	text-decoration: none;
	color: inherit;
	text-align: center;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	padding: 16px 10px;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.jse-driver-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.jse-driver-photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 4px;
	margin-bottom: 10px;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jse-driver-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jse-driver-photo-placeholder {
	color: #999;
	font-size: 13px;
}

.jse-driver-name {
	font-weight: 700;
}

.jse-driver-number {
	color: #d32f2f;
	font-weight: 700;
	font-size: 14px;
}

/* Single driver profile page */
.jse-driver-profile-header {
	display: flex;
	gap: 24px;
	align-items: flex-start;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.jse-driver-profile-photo {
	width: 180px;
	flex: 0 0 180px;
	border-radius: 6px;
	overflow: hidden;
}

.jse-driver-profile-photo img {
	width: 100%;
	height: auto;
	display: block;
}

.jse-driver-profile-number {
	color: #d32f2f;
	font-weight: 700;
	font-size: 20px;
	margin: 4px 0;
}

.jse-driver-profile-meta {
	color: #666;
	margin: 2px 0;
}

.jse-driver-bio {
	line-height: 1.7;
	margin-bottom: 20px;
}

.jse-driver-events-list {
	list-style: disc;
	padding-left: 20px;
}

/* Admin: sessions repeater table */
.jse-sessions-table td {
	vertical-align: middle;
	padding: 6px 8px;
}

.jse-remove-session {
	color: #b32d2e;
	font-size: 16px;
}

/* Responsive: stack table on small screens */
@media (max-width: 600px) {
	.jse-schedule-table thead {
		display: none;
	}
	.jse-schedule-table tbody tr {
		display: block;
		border-bottom: 2px solid #e2e2e2;
		padding: 10px 0;
	}
	.jse-schedule-table tbody td {
		display: flex;
		justify-content: space-between;
		border-bottom: none;
		padding: 6px 12px;
	}
	.jse-schedule-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #777;
		margin-right: 12px;
	}
	.jse-col-action {
		justify-content: flex-end;
	}
}
