/**
 * EFL — Community submission confirmation.
 *
 * Scoped entirely under .efl-submitted so nothing here can leak into the rest of the theme.
 * Type deliberately inherits the theme's family; the personality comes from scale, weight and
 * spacing rather than a grafted-on typeface.
 */

/* Neutralise the plugin's own notice chrome — our card is the card. */
.tribe-community-notice:has(.efl-submitted) {
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
}

.efl-submitted {
	--efl-brand: #d81f26;
	--efl-ink: #1b1b1f;
	--efl-muted: #6c6c76;
	--efl-rule: #e7e7ec;
	--efl-done: #1a7f43;

	max-width: 46rem;
	margin: 2rem auto;
	padding: 2.25rem 2.25rem 2rem;
	background: #fff;
	border: 1px solid var(--efl-rule);
	border-top: 3px solid var(--efl-brand);
	border-radius: 4px;
	color: var(--efl-ink);
	text-align: left;
}

.efl-submitted__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--efl-brand);
}

.efl-submitted__title {
	margin: 0 0 0.6rem;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--efl-ink);
}

.efl-submitted__body {
	margin: 0;
	max-width: 34rem;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--efl-muted);
}

.efl-submitted__body + .efl-submitted__body {
	margin-top: 0.5rem;
}

/* --- the review track ------------------------------------------------- */

.efl-track {
	display: flex;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--efl-rule);
	padding-top: 1.25rem;
}

.efl-track__step {
	flex: 1;
	position: relative;
	/* Dots sit ABOVE the labels — running the connector alongside the text struck
	   through it. */
	padding: 1.5rem 1rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--efl-muted);
}

/* The dot. */
.efl-track__step::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	box-sizing: border-box;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	border: 2px solid var(--efl-rule);
	background: #fff;
}

/* The connector, drawn between dots rather than after the last one. */
.efl-track__step:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 1.125rem;
	top: 0.375rem;
	right: 0.75rem;
	height: 1px;
	background: var(--efl-rule);
}

.efl-track__step--done {
	color: var(--efl-ink);
}

.efl-track__step--done::before {
	border-color: var(--efl-done);
	background: var(--efl-done);
}

.efl-track__step--current {
	color: var(--efl-ink);
	font-weight: 600;
}

.efl-track__step--current::before {
	border-color: var(--efl-brand);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(216, 31, 38, 0.14);
}

.efl-track__label {
	display: block;
}

.efl-track__note {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--efl-muted);
}

/* --- actions ----------------------------------------------------------- */

.efl-submitted__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	margin-top: 1.75rem;
}

.efl-submitted__actions a {
	text-decoration: none;
}

.efl-btn {
	display: inline-block;
	padding: 0.6rem 1.25rem;
	background: var(--efl-brand);
	color: #fff !important;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 3px;
	transition: background-color 0.15s ease;
}

.efl-btn:hover,
.efl-btn:focus {
	background: #b5161c;
	color: #fff !important;
}

.efl-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--efl-brand) !important;
	border-bottom: 1px solid currentColor;
	padding-bottom: 1px;
}

.efl-link:hover,
.efl-link:focus {
	color: #b5161c !important;
}

/* Keyboard focus must stay obvious on both. */
.efl-submitted a:focus-visible {
	outline: 2px solid var(--efl-brand);
	outline-offset: 3px;
}

/* --- responsive -------------------------------------------------------- */

@media (max-width: 640px) {
	.efl-submitted {
		margin: 1rem 0;
		padding: 1.5rem 1.25rem;
	}

	.efl-submitted__title {
		font-size: 1.25rem;
	}

	/* Stack vertically: dot on the left, label beside it. */
	.efl-track {
		display: block;
	}

	.efl-track__step {
		padding: 0 0 1rem 1.5rem;
	}

	.efl-track__step:last-child {
		padding-bottom: 0;
	}

	.efl-track__step::before {
		top: 0.05rem;
	}

	/* Vertical connector on narrow screens. */
	.efl-track__step:not(:last-child)::after {
		left: 0.375rem;
		top: 1rem;
		right: auto;
		bottom: 0.2rem;
		width: 1px;
		height: auto;
	}
}
