/* AE Progress – tick and button */
.ae-progress-tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	color: #15803d;
	font-weight: bold;
	font-size: 1em;
}

/* Progress percentage for categories and subcategories */
.ae-progress-count {
	font-size: 0.9em;
	font-weight: 500;
	color: #c2410c;
}

/* Main category: title left, percentage right (space-between) */
.theory-main-category-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.theory-main-category-title .ae-progress-count {
	font-weight: 600;
	flex-shrink: 0;
}

/* Accordion summary: title left, percentage immediately next to arrow on the right */
.theory-accordion-summary .ae-progress-count {
	margin-left: auto;
	flex-shrink: 0;
	margin-right: 0;
	vertical-align: middle;
}

/* When percentage is present, keep chevron right next to it (remove gap from ::after's margin-left: auto) */
.theory-accordion-summary:has(.ae-progress-count)::after {
	margin-left: 0;
}

/* Completed post: highlight link + tick, bullets stay aligned */
.theory-posts-list li.ae-progress-completed .ae-progress-completed-inner {
	display: inline-block;
	background: #e3f0ea;
	padding: 2px 6px 2px 6px;
	border-radius: 4px;
}

.theory-posts-list li.ae-progress-completed .ae-progress-completed-inner a.theory-post-link {
	color: #48956c;
	font-weight: 500;
}

.theory-posts-list li.ae-progress-completed .ae-progress-completed-inner .ae-progress-tick {
	color: #48956c;
	margin-left: 4px;
}

/* Match article action button styling */
.article-actions .ae-progress-toggle,
.article-actions .ae-progress-feedback-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 220px;
	gap: 6px;
	padding: 10px 16px;
	font-size: var(--font-size-sm, 15px);
	font-weight: 700;
	border-radius: 17px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.article-actions .ae-progress-toggle:hover,
.article-actions .ae-progress-feedback-trigger:hover {
	background: rgba(255, 255, 255, 0.24);
	border-color: rgba(255, 255, 255, 0.6);
	color: #fff;
}

.article-actions .ae-progress-toggle .ae-progress-toggle-icon {
	font-weight: 700;
	color: #fff;
}

.article-actions .ae-progress-toggle.is-completed,
.article-actions .ae-progress-toggle.is-completed:hover {
	background: rgb(0 255 159 / 47%);
	border-color: rgb(43 254 169 / 35%);
	color: #fff;
}

.ae-progress-feedback-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.ae-progress-feedback-modal.is-open {
	display: block;
}

.ae-progress-feedback-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.ae-progress-feedback-dialog {
	position: relative;
	max-width: 560px;
	margin: 10vh auto 0;
	background: #fff;
	border: 1px solid var(--color-border, #e5e5e5);
	border-radius: 10px;
	padding: 18px;
	z-index: 1;
}

.ae-progress-feedback-close {
	position: absolute;
	right: 10px;
	top: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid #4f46e5;
	border-radius: 8px;
	background: #4f46e5;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	font-weight: 700;
}

.ae-progress-feedback-close:hover {
	background: #4338ca;
	border-color: #4338ca;
	color: #fff;
}

/* Override generic .article-actions button styles for modal close */
.article-actions .ae-progress-feedback-modal .ae-progress-feedback-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 1px solid #4f46e5;
	border-radius: 8px;
	background: #4f46e5;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
}

.ae-progress-feedback-title {
	margin: 0 0 12px;
}

.ae-progress-feedback-form label {
	display: block;
	margin-bottom: 10px;
}

.ae-progress-feedback-form select,
.ae-progress-feedback-form textarea,
.ae-progress-feedback-form input[type="text"],
.ae-progress-feedback-form input[type="email"] {
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;
	border: 1px solid var(--color-border, #e5e5e5);
	border-radius: 8px;
	font: inherit;
}

.ae-progress-feedback-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	padding: 10px 16px;
	border: 1px solid #4f46e5;
	border-radius: 8px;
	background: #4f46e5;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

.ae-progress-feedback-submit:hover {
	background: #4338ca;
	border-color: #4338ca;
	color: #fff;
}

/* Override generic .article-actions button styles for modal submit */
.article-actions .ae-progress-feedback-modal .ae-progress-feedback-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: auto;
	padding: 10px 16px;
	border: 1px solid #4f46e5;
	border-radius: 8px;
	background: #4f46e5;
	color: #fff;
	font-weight: 700;
}

.article-actions .ae-progress-feedback-modal .ae-progress-feedback-submit:hover {
	background: #4338ca;
	border-color: #4338ca;
	color: #fff;
}

.ae-progress-feedback-message {
	min-height: 1.2em;
	margin: 4px 0 10px;
	font-size: var(--font-size-sm, 15px);
}

.ae-progress-feedback-message.is-success {
	color: #166534;
}

.ae-progress-feedback-message.is-error {
	color: #b91c1c;
}
