/*
 * Live Mock Exams — frontend board
 * Base layout uses CSS Grid with named areas (info / time / action) so the
 * four list styles below can rearrange the same markup without any JS or
 * PHP branching — only grid-template-areas and spacing change per style.
 */

.lme-board {
	--lme-text: #111827;
	--lme-text-muted: #6b7280;
	--lme-border: #e5e7eb;
	--lme-surface: #ffffff;
	/* --lme-accent / --lme-live / --lme-urgent / --lme-upcoming are set
	   inline per-board from Settings → Colors; these are just the fallback
	   if that's ever missing. */
	--lme-accent: #4f46e5;
	--lme-accent-tint: #eef2ff;
	--lme-live: #059669;
	--lme-live-tint: #ecfdf5;
	--lme-urgent: #dc2626;
	--lme-urgent-tint: #fef2f2;
	--lme-upcoming: #64748b;
	--lme-upcoming-tint: #f1f5f9;
	--lme-radius: 8px;

	color: var(--lme-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	max-width: 100%;
	line-height: 1.4;
}

.lme-board *,
.lme-board *::before,
.lme-board *::after {
	box-sizing: inherit;
}

/* Summary strip */

.lme-summary {
	font-size: 12.5px;
	color: var(--lme-text-muted);
	margin-bottom: 10px;
}

.lme-summary-live,
.lme-summary-urgent,
.lme-summary-upcoming {
	font-weight: 700;
	color: var(--lme-text);
}

/* Controls row: category pills + optional sort dropdown */

.lme-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

.lme-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lme-platform-filter {
	margin-bottom: 14px;
}

.lme-tab {
	background: #f3f4f6;
	border: none;
	color: var(--lme-text-muted);
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 13px;
	border-radius: 100px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.lme-tab:hover {
	background: #e5e7eb;
	color: var(--lme-text);
}

.lme-tab.is-active {
	background: var(--lme-accent);
	color: #ffffff;
}

.lme-tab:focus-visible {
	outline: 2px solid var(--lme-accent);
	outline-offset: 2px;
}

.lme-sort {
	background: #f9fafb;
	border: 1px solid var(--lme-border);
	color: var(--lme-text);
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 6px;
	cursor: pointer;
}

/* List */

.lme-list {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.lme-row {
	display: grid;
	grid-template-columns: 1fr auto auto;
	grid-template-areas: "info time action";
	align-items: center;
	column-gap: 14px;
	background: var(--lme-surface);
	border: 1px solid var(--lme-border);
	border-left: 4px solid var(--lme-live);
	border-radius: var(--lme-radius);
	padding: 10px 14px;
	transition: box-shadow 0.15s ease;
}

.lme-row:hover {
	box-shadow: 0 1px 6px rgba(16, 24, 40, 0.07);
}

.lme-row.lme-urgent {
	border-left-color: var(--lme-urgent);
}

.lme-row.lme-upcoming {
	border-left-color: var(--lme-upcoming);
}

/* Row content */

.lme-row-info {
	grid-area: info;
	min-width: 0;
}

.lme-row-top {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 5px;
}

.lme-platform-logo-wrap {
	display: inline-flex;
	align-items: center;
}

.lme-platform-logo {
	height: 26px;
	width: auto;
	max-width: 120px;
	object-fit: contain;
	border-radius: 3px;
}

.lme-platform-badge {
	background: var(--lme-accent-tint);
	color: var(--lme-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 5px;
}

.lme-chip-cat {
	background: transparent;
	color: var(--lme-text-muted);
	font-size: 11px;
	font-weight: 600;
	padding: 2px 7px;
	border: 1px solid var(--lme-border);
	border-radius: 100px;
}

.lme-status-badge {
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 100px;
	background: var(--lme-live-tint);
	color: var(--lme-live);
	white-space: nowrap;
}

.lme-row.lme-urgent .lme-status-badge {
	background: var(--lme-urgent-tint);
	color: var(--lme-urgent);
}

.lme-row.lme-upcoming .lme-status-badge {
	background: var(--lme-upcoming-tint);
	color: var(--lme-upcoming);
}

.lme-row-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	word-break: break-word;
}

/* Countdown + end date */

.lme-row-time {
	grid-area: time;
	text-align: right;
	min-width: 92px;
}

.lme-time-label {
	display: block;
	font-size: 10px;
	color: var(--lme-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 1px;
}

.lme-time-value {
	display: block;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: 14px;
	color: var(--lme-live);
}

.lme-row.lme-urgent .lme-time-value {
	color: var(--lme-urgent);
}

.lme-row.lme-upcoming .lme-time-value {
	color: var(--lme-upcoming);
}

.lme-time-exact {
	display: block;
	font-size: 11px;
	color: var(--lme-text-muted);
	margin-top: 2px;
}

/* Action */

.lme-row-action {
	grid-area: action;
	display: flex;
	align-items: center;
	gap: 8px;
}

.lme-attempt-btn {
	display: inline-block;
	background: var(--lme-live);
	color: #ffffff;
	font-weight: 700;
	font-size: 13px;
	padding: 8px 16px;
	border-radius: 6px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.lme-attempt-btn:hover {
	filter: brightness(0.88);
	color: #ffffff;
}

.lme-attempt-btn:focus-visible {
	outline: 2px solid var(--lme-accent);
	outline-offset: 2px;
}

.lme-attempt-btn.is-disabled {
	background: var(--lme-upcoming-tint);
	color: var(--lme-upcoming);
	cursor: not-allowed;
	pointer-events: none;
}

.lme-calendar-btn {
	background: none;
	border: 1px solid var(--lme-border);
	color: var(--lme-text-muted);
	font-size: 12px;
	font-weight: 600;
	padding: 7px 12px;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
}

.lme-calendar-btn:hover {
	background: #f9fafb;
	color: var(--lme-text);
}

/* Load more */

.lme-load-more-wrap {
	text-align: center;
}

.lme-load-more-btn {
	background: #f3f4f6;
	border: none;
	color: var(--lme-text);
	font-size: 13px;
	font-weight: 600;
	padding: 9px 20px;
	border-radius: 100px;
	cursor: pointer;
}

.lme-load-more-btn:hover {
	background: #e5e7eb;
}

/* Empty state */

.lme-empty {
	list-style: none;
	text-align: center;
	color: var(--lme-text-muted);
	padding: 28px 16px;
	background: var(--lme-surface);
	border: 1px dashed var(--lme-border);
	border-radius: var(--lme-radius);
}

/* ---------------------------------------------------------------- */
/* List styles — same markup, different grid/spacing/type per style */
/* ---------------------------------------------------------------- */

/* Compact (default) uses the base rules above as-is. */

/* Cards: roomier, stacked, more breathing room */
.lme-board.lme-style-cards .lme-row {
	grid-template-columns: 1fr auto;
	grid-template-areas: "info info" "time action";
	row-gap: 12px;
	padding: 18px 20px;
	border-left-width: 5px;
}

.lme-board.lme-style-cards .lme-row-time {
	text-align: left;
}

.lme-board.lme-style-cards .lme-row-title {
	font-size: 16px;
}

.lme-board.lme-style-cards .lme-platform-logo {
	height: 32px;
	max-width: 140px;
}

.lme-board.lme-style-cards .lme-list {
	gap: 14px;
}

/* Minimal: slim table-like rows, no card chrome */
.lme-board.lme-style-minimal .lme-list {
	gap: 0;
}

.lme-board.lme-style-minimal .lme-row {
	border: none;
	border-bottom: 1px solid var(--lme-border);
	border-left: 3px solid var(--lme-live);
	border-radius: 0;
	padding: 8px 10px;
}

.lme-board.lme-style-minimal .lme-row.lme-urgent {
	border-left-color: var(--lme-urgent);
}

.lme-board.lme-style-minimal .lme-row.lme-upcoming {
	border-left-color: var(--lme-upcoming);
}

.lme-board.lme-style-minimal .lme-row:last-child {
	border-bottom: none;
}

.lme-board.lme-style-minimal .lme-row-title {
	font-size: 13px;
}

.lme-board.lme-style-minimal .lme-platform-badge,
.lme-board.lme-style-minimal .lme-chip-cat,
.lme-board.lme-style-minimal .lme-status-badge {
	font-size: 10px;
	padding: 1px 6px;
}

.lme-board.lme-style-minimal .lme-platform-logo {
	height: 18px;
	max-width: 80px;
}

.lme-board.lme-style-minimal .lme-time-value {
	font-size: 12px;
}

.lme-board.lme-style-minimal .lme-time-exact {
	font-size: 10px;
}

.lme-board.lme-style-minimal .lme-attempt-btn {
	padding: 6px 12px;
	font-size: 12px;
}

/* Bold: built to stand out — bigger everything */
.lme-board.lme-style-bold .lme-row {
	grid-template-columns: 1fr auto;
	grid-template-areas: "info info" "time action";
	row-gap: 14px;
	padding: 20px 22px;
	border-left-width: 6px;
}

.lme-board.lme-style-bold .lme-row-time {
	text-align: left;
}

.lme-board.lme-style-bold .lme-row-title {
	font-size: 18px;
}

.lme-board.lme-style-bold .lme-time-value {
	font-size: 22px;
}

.lme-board.lme-style-bold .lme-platform-logo {
	height: 42px;
	max-width: 170px;
}

.lme-board.lme-style-bold .lme-platform-badge {
	font-size: 12.5px;
	padding: 4px 10px;
}

.lme-board.lme-style-bold .lme-attempt-btn {
	padding: 12px 22px;
	font-size: 15px;
}

.lme-board.lme-style-bold .lme-list {
	gap: 16px;
}

/* Mobile: every style stacks into the same two-line shape */

@media (max-width: 560px) {
	.lme-board .lme-row {
		grid-template-columns: 1fr auto;
		grid-template-areas: "info info" "time action";
		row-gap: 8px;
	}

	.lme-board .lme-row-time {
		text-align: left;
	}

	.lme-board .lme-controls {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lme-board * {
		transition: none !important;
	}
}
