/*
 * 404 Cenxus Blocks — scoped CSS.
 *
 * Every rule is qualified under a `.cenxus404-*` class — no bare
 * element selectors, no global overrides of Theme/core styles.
 * Deliberately simple and compatible with the existing ~480px app
 * shell (a single column by default; grids only widen at wider
 * viewports, never forcing horizontal scroll on mobile).
 */

.cenxus404-block-empty {
	padding: 20px 16px;
	text-align: center;
	color: #666;
	font-size: 13px;
}
.cenxus404-block-empty--login { display: flex; flex-direction: column; gap: 10px; align-items: center; }

.cenxus404-btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
}
.cenxus404-btn--primary { background: #2F6FED; color: #fff; }
.cenxus404-btn--secondary { background: transparent; color: inherit; border: 1px solid currentColor; }

.cenxus404-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.cenxus404-badge--free { background: #E8F6EC; color: #1E8E3E; }

/* Grids: single column by default (mobile-first, matches the app
   shell), widening only at a tablet breakpoint and only as far as the
   block's own --cenxus404-columns custom property says. */
.cenxus404-course-grid,
.cenxus404-my-courses,
.cenxus404-learning-packages {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}
@media (min-width: 640px) {
	.cenxus404-course-grid,
	.cenxus404-my-courses,
	.cenxus404-learning-packages {
		grid-template-columns: repeat(var(--cenxus404-columns, 2), 1fr);
	}
}

.cenxus404-course-grid__card,
.cenxus404-my-courses__card,
.cenxus404-learning-packages__card {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 14px;
}

.cenxus404-course-grid__image,
.cenxus404-my-courses__image,
.cenxus404-learning-packages__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.cenxus404-course-grid__image img,
.cenxus404-my-courses__image img,
.cenxus404-learning-packages__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cenxus404-course-grid__title,
.cenxus404-my-courses__title,
.cenxus404-learning-packages__title {
	font-size: 15px;
	font-weight: 700;
	margin: 0;
	padding: 0 14px;
}
.cenxus404-course-grid__title a,
.cenxus404-my-courses__title a,
.cenxus404-learning-packages__title a { color: inherit; text-decoration: none; }

.cenxus404-course-grid__excerpt { font-size: 12.5px; color: #666; margin: 0; padding: 0 14px; }
.cenxus404-course-grid__price,
.cenxus404-learning-packages__price { padding: 0 14px; font-size: 14px; font-weight: 700; }
.cenxus404-learning-packages__count { padding: 0 14px; font-size: 12px; color: #666; margin: 0; }
.cenxus404-course-grid .cenxus404-btn,
.cenxus404-my-courses .cenxus404-btn,
.cenxus404-learning-packages .cenxus404-btn { margin: 4px 14px 0; }

.cenxus404-my-courses__progress-text { padding: 0 14px; font-size: 11.5px; color: #666; margin: 0; }
/* "View all my courses" under the list: the companion Theme sizes the button (.c404t-course-row__more); this keeps
   the same spacing without it. */
.cenxus404-my-courses__all { display: flex; justify-content: center; margin: 16px 0 0; }

/* Progress bar — rendered inside two different blocks (My Courses'
   own card, and Course Progress), each block owns its own scoped
   rule rather than a shared bare .cenxus404-progress-bar selector, so
   this module can never accidentally style an unrelated element that
   happens to reuse the same class name elsewhere on a page. */
.cenxus404-my-courses__card .cenxus404-progress-bar,
.cenxus404-course-progress .cenxus404-progress-bar {
	height: 6px;
	border-radius: 999px;
	background: #eee;
	overflow: hidden;
}
.cenxus404-my-courses__card .cenxus404-progress-bar { margin: 0 14px; }
.cenxus404-my-courses__card .cenxus404-progress-bar__fill,
.cenxus404-course-progress .cenxus404-progress-bar__fill { height: 100%; background: #2F6FED; border-radius: 999px; }

.cenxus404-course-progress { display: flex; align-items: center; gap: 10px; }
.cenxus404-course-progress .cenxus404-progress-bar { flex: 1; margin: 0; }
.cenxus404-course-progress__percentage { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cenxus404-course-progress__steps { font-size: 12px; color: #666; white-space: nowrap; }

.cenxus404-continue-learning {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
	padding: 16px;
	border-radius: 10px;
	background: #f7f6f3;
}
.cenxus404-continue-learning__course { font-size: 13px; color: #666; margin: 0; }

/* Hero */
.cenxus404-hero {
	padding: 40px 24px;
	border-radius: 12px;
	background-color: #f7f6f3;
}
.cenxus404-hero__eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 8px; }
.cenxus404-hero__heading { font-size: 26px; font-weight: 800; margin: 0 0 10px; line-height: 1.2; }
.cenxus404-hero__text { font-size: 15px; margin: 0 0 18px; max-width: 640px; }
.cenxus404-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===================== Round 2 ===================== */

/* Featured Courses reuses .cenxus404-course-grid / __card / __image /
   __title / __excerpt / __price above — only its own wrapper/heading
   are new. */
.cenxus404-featured-courses__heading { font-size: 18px; font-weight: 800; margin: 0 0 14px; }

/* Course Curriculum */
.cenxus404-curriculum__heading { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.cenxus404-curriculum__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cenxus404-curriculum__item { border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; }
.cenxus404-curriculum__item.is-done { border-color: #1E8E3E; }
.cenxus404-curriculum__item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.cenxus404-curriculum__item summary::-webkit-details-marker { display: none; }
.cenxus404-curriculum__title { flex: 1; min-width: 0; overflow-wrap: break-word; }
.cenxus404-curriculum__link { font-size: 12px; font-weight: 700; color: #2F6FED; white-space: nowrap; flex-shrink: 0; }
.cenxus404-curriculum__topics { list-style: none; margin: 0; padding: 4px 14px 12px 34px; display: flex; flex-direction: column; gap: 6px; }
.cenxus404-curriculum__topic { font-size: 13px; }
.cenxus404-curriculum__topic.is-done a { color: #1E8E3E; }
.cenxus404-curriculum__topic a { color: inherit; text-decoration: none; }
.cenxus404-curriculum__quiz-badge { margin-left: 8px; font-size: 11px; color: #666; white-space: nowrap; }

/* Package Comparison */
.cenxus404-package-comparison__heading { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.cenxus404-package-comparison__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) {
	.cenxus404-package-comparison__grid { grid-template-columns: repeat(var(--cenxus404-columns, 3), 1fr); }
}
.cenxus404-package-comparison__col { border: 1px solid #e2e2e2; border-radius: 10px; padding: 18px 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.cenxus404-package-comparison__name { font-size: 16px; font-weight: 800; margin: 0; }
.cenxus404-package-comparison__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-top: 1px solid #f0f0f0; padding-top: 8px; }
.cenxus404-package-comparison__label { color: #666; }
.cenxus404-package-comparison__value { font-weight: 700; }

/* Course Filter — form reuses .cenxus404-btn above; results reuse
   .cenxus404-course-grid above. Only the form row itself is new. */
.cenxus404-course-filter__form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cenxus404-course-filter__form select {
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 13px;
}
/* The search field uses the site search look (Theme .c404t-search); here only its place in the row and a neutral fallback. */
.cenxus404-course-filter__search { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; align-self: center; gap: 8px; }
.cenxus404-course-filter__search input[type="search"] { flex: 1 1 auto; min-width: 0; }
.cenxus404-course-filter .cenxus404-course-filter__clear { margin: -10px 0 16px; } /* 8px under the filter row (the form keeps 18px below), whatever the stylesheet order. */
:where(.cenxus404-course-filter__clear) a { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 4px 10px; border: 1px solid #d0d4dc; border-radius: 999px; font-size: 12.5px; text-decoration: none; }
.cenxus404-course-filter__search .c404t-search__submit { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }

/* ===================== Round 3 ===================== */

/* Account Summary */
.cenxus404-account-summary { padding: 16px; border-radius: 10px; background: #f7f6f3; display: flex; flex-direction: column; gap: 12px; }
.cenxus404-account-summary__welcome { font-size: 15px; font-weight: 700; margin: 0; }
.cenxus404-account-summary__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Learning Overview */
.cenxus404-learning-overview { display: flex; flex-direction: column; gap: 14px; }
.cenxus404-learning-overview__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cenxus404-learning-overview__stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border: 1px solid #e2e2e2; border-radius: 10px; background: #fff; }
.cenxus404-learning-overview__number { font-size: 22px; font-weight: 800; }
.cenxus404-learning-overview__label { font-size: 11.5px; color: #666; }

/* Section Header */
.cenxus404-section-header { padding: 8px 0 20px; }
.cenxus404-section-header__eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 6px; color: #2F6FED; }
.cenxus404-section-header__heading { font-size: 24px; font-weight: 800; margin: 0 0 8px; line-height: 1.25; }
.cenxus404-section-header__description { font-size: 14px; color: #444; margin: 0 0 14px; }
.cenxus404-section-header__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Feature Grid */
.cenxus404-feature-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) {
	.cenxus404-feature-grid { grid-template-columns: repeat(var(--cenxus404-columns, 3), 1fr); }
}
.cenxus404-feature-item { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 10px; background: #fff; border: 1px solid #e2e2e2; }
.cenxus404-feature-item__icon { font-size: 24px; line-height: 1; }
.cenxus404-feature-item__heading { font-size: 15px; font-weight: 700; margin: 0; }
.cenxus404-feature-item__description { font-size: 13px; color: #666; margin: 0; }

/* FAQ Accordion — native <details>/<summary>, no frontend JS */
.cenxus404-faq__heading { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.cenxus404-faq__list { display: flex; flex-direction: column; gap: 8px; }
.cenxus404-faq-item { border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; }
.cenxus404-faq-item__question { padding: 14px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.cenxus404-faq-item__question::-webkit-details-marker { display: none; }
.cenxus404-faq-item__answer { padding: 0 14px 14px; font-size: 13.5px; color: #444; }

/* Stats / Metrics */
.cenxus404-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) {
	.cenxus404-stats { grid-template-columns: repeat(var(--cenxus404-columns, 3), 1fr); }
}
.cenxus404-stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; text-align: center; }
.cenxus404-stat-item__value { font-size: 22px; font-weight: 800; }
.cenxus404-stat-item__label { font-size: 11.5px; color: #666; }
