/* ARX Dashboard Widgets — shared base styles.
   Elementor's own Style-tab controls override these per-instance;
   this file only sets sane cohesive defaults so cards look right
   before any customization. */

/* --arx-accent matches ARX Course Catalogue's / ARX Reporting's brand blue
   (#559fc5) - this used to be #2563eb, a harsher/more saturated blue
   unique to this plugin, which visibly clashed against the other two
   plugins' accent wherever a dashboard widget sat next to a catalogue/
   reporting one on the same page. */
.arx-dashboard-widget {
	--arx-accent: #4b9bce;
	--arx-text: #111111;
	--arx-muted: #6b6f76;
	--arx-border: #e3e3e3;
	--arx-card-bg: #ffffff;
	font-family: inherit;
	color: var( --arx-text );
}

.arx-dashboard-widget.arx-empty-state {
	padding: 24px;
	text-align: center;
	color: var( --arx-muted );
	background: var( --arx-card-bg );
	border: 1px dashed var( --arx-border );
	border-radius: 4px;
}

/* Every widget that represents "one card" on the dashboard shares this
   exact background/border/radius/padding, so nothing floats unstyled
   next to widgets that do have it. */
.arx-current-lesson,
.arx-todays-challenge,
.arx-continue-learning-list,
.arx-leaderboard,
.arx-recent-achievements,
.arx-recommended-for-you,
.arx-upcoming-live-sessions,
.arx-course-categories-card,
.arx-progress-donut,
.arx-recently-added,
.arx-badges {
	background: var( --arx-card-bg );
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	padding: 20px;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.06 ), 0 1px 3px rgba( 16, 24, 40, 0.1 );
}

/* Shared small blue uppercase section label, used as the heading inside
   every card above (eyebrow on hero cards, title on list cards). */
.arx-card-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #2a77a8;
	margin: 0 0 12px;
}

/* Progress bar, reused by current-lesson card and continue-learning list */
.arx-progress-bar {
	width: 100%;
	height: 8px;
	background: var( --arx-border );
	border-radius: 3px;
	overflow: hidden;
}

.arx-progress-bar__fill {
	height: 100%;
	background: var( --arx-accent );
	border-radius: 3px;
}

/* Greeting header */
.arx-greeting-header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.arx-greeting-header__avatar img {
	border-radius: 50%;
	display: block;
}

.arx-greeting-header__text {
	font-size: 16px;
	font-weight: 500;
}

/* Progress headline */
.arx-progress-headline__text {
	font-size: 32px;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.arx-progress-headline__percent {
	color: #2a77a8;
}

.arx-progress-headline__subtext {
	color: var( --arx-muted );
	margin: 0;
}

/* Current lesson card. 180px default height matches the widget's
   "Thumbnail height" Style-tab slider default - without a height/
   object-fit here, this <img> would render at its file's own natural
   height (whatever a given course's featured image happens to be), which
   can be tall/square enough to blow the whole card out on its own. The
   slider control overrides this per-instance. */
.arx-current-lesson__thumbnail img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
	margin-bottom: 12px;
}

.arx-current-lesson__title {
	margin: 0 0 4px;
	font-size: 18px;
}

.arx-current-lesson__course {
	color: var( --arx-muted );
	font-size: 13px;
}

/* Percent sits left, button pins to the right via margin-left: auto on
   the button — works whether or not the percent span is even present. */
.arx-current-lesson__footer {
	display: flex;
	align-items: center;
	margin-top: 16px;
}

.arx-current-lesson__percent {
	color: var( --arx-muted );
	font-size: 13px;
}

.arx-current-lesson__button {
	display: inline-block;
	margin-left: auto;
	padding: 10px 20px;
	background: var( --arx-accent );
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
}

/* Stat tiles */
.arx-stat-tiles {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 16px;
}

.arx-stat-tile {
	background: var( --arx-card-bg );
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-shadow: 0 1px 2px rgba( 16, 24, 40, 0.06 ), 0 1px 3px rgba( 16, 24, 40, 0.1 );
}

.arx-stat-tile__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	border-radius: 50%;
	background-color: #eff6ff;
	padding: 12px;
}

.arx-stat-tile__icon svg {
	width: 20px;
	height: 20px;
}

.arx-stat-tile__number {
	font-size: 24px;
	font-weight: 800;
}

.arx-stat-tile__label {
	font-size: 13px;
	color: var( --arx-muted );
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Continue learning list — rows inside the one .arx-continue-learning-list
   card (see shared card rule above), separated by a hairline divider
   rather than each being its own nested card. */
.arx-continue-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var( --arx-border );
}

.arx-continue-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.arx-continue-item:first-child {
	padding-top: 0;
}

.arx-continue-item__body {
	flex: 1;
}

.arx-continue-item__title {
	margin: 0 0 6px;
	font-size: 15px;
}

.arx-continue-item__percent {
	font-size: 13px;
	color: var( --arx-muted );
}

.arx-continue-item__button {
	flex-shrink: 0;
	padding: 8px 16px;
	border: 1px solid var( --arx-accent );
	color: #2a77a8;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
}

/* Today's challenge */
.arx-todays-challenge__title {
	margin: 0 0 8px;
}

.arx-todays-challenge__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
}

.arx-todays-challenge__reward {
	font-weight: 700;
	color: #2a77a8;
}

.arx-todays-challenge__cta {
	padding: 8px 16px;
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	text-decoration: none;
	color: var( --arx-text );
	font-weight: 600;
	font-size: 13px;
}

/* Course categories — outer .arx-course-categories-card is the shared
   card (see rule above); the grid of individual category tiles lives
   inside it. */
.arx-course-categories {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 16px;
}

.arx-course-category {
	background: #f9fafb;
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.arx-course-category a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.arx-course-category__count {
	color: var( --arx-muted );
	font-size: 13px;
}

/* Recommended for you — rows inside the one .arx-recommended-for-you
   card (see shared card rule above), separated by a hairline divider. */
.arx-recommended-card {
	padding: 14px 0;
	border-bottom: 1px solid var( --arx-border );
}

.arx-recommended-card:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.arx-recommended-card:first-child {
	padding-top: 0;
}

.arx-recommended-card__reason {
	display: block;
	font-size: 13px;
	text-transform: uppercase;
	color: var( --arx-muted );
	margin-bottom: 4px;
}

/* 140px default height matches the widget's "Thumbnail height" Style-tab
   slider default - same reasoning as .arx-current-lesson__thumbnail img
   above: this comes from a user-uploaded media field with no size
   constraint of its own, so it needs a height/object-fit here or it can
   render at any height depending on what gets uploaded. */
.arx-recommended-card__thumbnail {
	display: block;
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 8px;
}

.arx-recommended-card__title {
	margin: 0 0 4px;
}

.arx-recommended-card__blurb {
	color: var( --arx-muted );
	font-size: 13px;
	margin: 0 0 10px;
}

.arx-recommended-card__cta {
	display: inline-block;
	padding: 8px 16px;
	background: var( --arx-accent );
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
}

/* Upcoming live sessions — rows inside the one .arx-upcoming-live-sessions
   card (see shared card rule above), separated by a hairline divider. */
.arx-live-session {
	padding: 14px 0;
	border-bottom: 1px solid var( --arx-border );
}

.arx-live-session:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.arx-live-session:first-child {
	padding-top: 0;
}

.arx-live-session__date {
	display: inline-block;
	background: var( --arx-accent );
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 3px;
	margin-bottom: 8px;
}

.arx-live-session__title {
	margin: 0 0 4px;
}

.arx-live-session__host {
	color: var( --arx-muted );
	font-size: 13px;
	margin: 0 0 10px;
}

.arx-live-session__cta {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	text-decoration: none;
	color: var( --arx-text );
	font-weight: 600;
	font-size: 13px;
}

/* Leaderboard */
.arx-leaderboard-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 4px;
}

.arx-leaderboard-row--current {
	background: #eff6ff;
}

.arx-leaderboard-row__rank {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var( --arx-border );
	color: var( --arx-text );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.arx-leaderboard-row__avatar img {
	border-radius: 50%;
	display: block;
}

.arx-leaderboard-row__name {
	flex: 1;
}

.arx-leaderboard-row__points {
	color: var( --arx-muted );
	font-size: 13px;
}

/* Recent achievements */
.arx-achievement-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
}

.arx-achievement-row__icon img {
	display: block;
	border-radius: 4px;
}

.arx-achievement-row__title {
	flex: 1;
}

.arx-achievement-row__points {
	color: #2a77a8;
	font-weight: 700;
	font-size: 13px;
}

/* Progress donut */
.arx-progress-donut {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.arx-progress-donut__chart {
	--arx-donut-thickness: 16px;
	position: relative;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* The conic-gradient (set via JS on the element itself) is only ever
   painted through this ring-shaped mask, applied on a pseudo-element so
   the center label below stays unaffected and fully visible. */
.arx-progress-donut__chart::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: inherit;
	-webkit-mask-image: radial-gradient( circle, transparent calc( 50% - var( --arx-donut-thickness ) ), black calc( 50% - var( --arx-donut-thickness ) + 1px ) );
	mask-image: radial-gradient( circle, transparent calc( 50% - var( --arx-donut-thickness ) ), black calc( 50% - var( --arx-donut-thickness ) + 1px ) );
}

.arx-progress-donut__center-label {
	position: relative;
	background: #fff;
	border-radius: 50%;
	width: 60%;
	height: 60%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 13px;
	color: var( --arx-muted );
	padding: 8px;
}

.arx-progress-donut__legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: center;
}

.arx-progress-donut__legend li {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var( --arx-muted );
}

.arx-progress-donut__swatch {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}


/* =====================================================================
   v1.2 redesign — "app" look: white cards on a light-grey page, black
   text, ARX Blue accents, condensed Fjalla One headings.
   Palette: #111111 / #ffffff / #f4f4f4 / #4b9bce (+ soft category hues).
   ===================================================================== */
.arx-dashboard-widget {
	--arx-hue-1: #4b9bce;
	--arx-hue-2: #8b5cf6;
	--arx-hue-3: #1fa37a;
	--arx-hue-4: #f59e0b;
	--arx-heading-font: "Fjalla One", var( --e-global-typography-primary-font-family, sans-serif );
}

.arx-current-lesson,
.arx-todays-challenge,
.arx-continue-learning-list,
.arx-leaderboard,
.arx-recent-achievements,
.arx-recommended-for-you,
.arx-upcoming-live-sessions,
.arx-course-categories-card,
.arx-progress-donut,
.arx-quick-links {
	background: var( --arx-card-bg );
	border: 1px solid var( --arx-border );
	border-radius: 4px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba( 17, 17, 17, 0.04 );
}

/* Card titles: black, condensed, uppercase (was small blue eyebrow). */
.arx-card-title {
	font-family: var( --arx-heading-font );
	font-weight: 400;
	font-size: 17px;
	letter-spacing: 0.04em;
	color: #111111;
	margin: 0;
}

.arx-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 -24px 8px;
	padding: 0 24px 18px;
	border-bottom: 1px solid var( --arx-border );
}

.arx-card-link {
	color: #2a77a8;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.arx-card-link:hover { text-decoration: underline; }

.arx-progress-bar { height: 6px; background: #e7ebef; }

/* ---- Welcome banner ---- */
.arx-welcome-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.arx-welcome-banner__eyebrow {
	display: block;
	font-family: var( --arx-heading-font );
	font-size: 16px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #2a77a8;
	margin-bottom: 6px;
}

.arx-welcome-banner__headline {
	font-family: var( --arx-heading-font );
	font-weight: 400;
	font-size: clamp( 34px, 4.2vw, 56px );
	line-height: 1.05;
	color: #111111;
	margin: 0 0 20px;
}

.arx-welcome-banner__subtext {
	font-size: 19px;
	color: var( --arx-muted );
	margin: 0;
}

.arx-welcome-banner__progress {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 560px;
	margin-bottom: 16px;
}

.arx-welcome-banner__progress .arx-progress-bar { flex: 1; min-width: 80px; }

.arx-welcome-banner__progress-label {
	font-size: 17px;
	font-weight: 500;
	color: #111111;
	white-space: nowrap;
}

.arx-welcome-banner__logo {
	width: clamp( 96px, 11vw, 150px );
	height: auto;
	flex-shrink: 0;
}

/* ---- Stat tiles ---- */
.arx-stat-tiles { gap: 20px; }

.arx-stat-tile {
	border-radius: 4px;
	padding: 24px;
	gap: 4px;
	box-shadow: 0 1px 2px rgba( 17, 17, 17, 0.04 );
}

.arx-stat-tile__icon {
	background: none;
	padding: 0;
	margin-bottom: 14px;
	border-radius: 0;
	color: #2a77a8;
}

.arx-stat-tile__icon svg { width: 26px; height: 26px; fill: currentColor; }
.arx-stat-tile__icon i { font-size: 24px; color: #2a77a8; }

.arx-stat-tile__number {
	font-family: var( --arx-heading-font );
	font-weight: 400;
	font-size: 38px;
	line-height: 1.1;
	color: #111111;
}

.arx-stat-tile__label {
	font-size: 13px;
	letter-spacing: 0.08em;
	color: var( --arx-muted );
}

/* ---- Continue learning ---- */
.arx-continue-item {
	position: relative;
	padding: 20px 0 20px 22px;
	margin-bottom: 0 !important; /* spacing handled by padding + dividers */
}

.arx-continue-item::before {
	content: '';
	position: absolute;
	left: 0;
	top: 20px;
	bottom: 20px;
	width: 3px;
	border-radius: 3px;
	background: var( --arx-hue-1 );
}

.arx-continue-item:nth-of-type( 2 )::before { background: var( --arx-hue-1 ); }
.arx-continue-item:nth-of-type( 3 )::before { background: var( --arx-hue-2 ); }
.arx-continue-item:nth-of-type( 4 )::before { background: var( --arx-hue-3 ); }
.arx-continue-item:nth-of-type( 5 )::before { background: var( --arx-hue-4 ); }
.arx-continue-item:nth-of-type( 5n + 6 )::before { background: var( --arx-hue-1 ); }

.arx-continue-item:first-child,
.arx-continue-item:last-child { padding-top: 20px; padding-bottom: 20px; }
.arx-continue-item:last-child { border-bottom: 0; padding-bottom: 4px; }

.arx-continue-item__title {
	font-family: var( --arx-heading-font );
	font-weight: 400;
	font-size: 18px;
	letter-spacing: 0.01em;
	margin: 0 0 4px;
}

.arx-continue-item__category {
	display: block;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var( --arx-muted );
	margin-bottom: 8px;
}

.arx-continue-item__percent { display: block; margin-top: 6px; }

.arx-continue-item__button,
.arx-current-lesson__button,
.arx-recommended-card__cta {
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.arx-continue-item__button {
	padding: 9px 18px;
	background: #fff;
	border: 1px solid var( --arx-accent );
	color: #2a77a8;
}

.arx-continue-item__button:hover { background: var( --arx-accent ); color: #fff; }

/* ---- Current course ---- */
.arx-current-lesson { padding: 24px; }

.arx-current-lesson .arx-card-title { margin-bottom: 16px; }

.arx-current-lesson__thumbnail img {
	height: 190px;
	border-radius: 4px;
	margin-bottom: 16px;
}

.arx-current-lesson__category {
	display: block;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #2a77a8;
	margin-bottom: 6px;
}

.arx-current-lesson__title {
	font-family: var( --arx-heading-font );
	font-weight: 400;
	font-size: 22px;
	line-height: 1.25;
	margin: 0 0 6px;
}

.arx-current-lesson .arx-progress-bar { margin-top: 14px; }

.arx-current-lesson__button { padding: 10px 22px; }
.arx-current-lesson__button:hover { background: var( --arx-accent-dark, #2f7fb3 ); color: #fff; }

/* ---- Quick links ---- */
.arx-quick-links .arx-card-title {
	padding-bottom: 14px;
	border-bottom: 1px solid var( --arx-border );
	margin: 0 -24px 0;
	padding-left: 24px;
	padding-right: 24px;
}

.arx-quick-links__list { list-style: none; margin: 0; padding: 0; }

.arx-quick-links__list li { border-bottom: 1px solid var( --arx-border ); }
.arx-quick-links__list li:last-child { border-bottom: 0; }

.arx-quick-links__list a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 13px 0;
	font-size: 14px;
	color: #111111;
	text-decoration: none;
}

.arx-quick-links__list a:hover { color: #2a77a8; }

/* ---- Other cards pick up the same radius/hover polish ---- */
.arx-course-category,
.arx-leaderboard-row,
.arx-recommended-card__thumbnail { border-radius: 4px; }

.arx-leaderboard-row--current { background: #eaf4fa; }

@media ( max-width: 1024px ) {
	.arx-stat-tiles { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( max-width: 600px ) {
	.arx-welcome-banner { flex-direction: column-reverse; align-items: flex-start; }
	.arx-stat-tile { padding: 18px; }
	.arx-continue-item { flex-wrap: wrap; }
}

/* Recently added */
.arx-recently-added .arx-recent-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var( --arx-border ); text-decoration: none; color: var( --arx-text ); }
.arx-recently-added .arx-card-title + .arx-recent-item { border-top: 0; }
.arx-recent-item__thumb { flex: 0 0 96px; aspect-ratio: 16 / 9; background: #e9ecef; border-radius: 3px; overflow: hidden; }
.arx-recent-item__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.arx-recent-item__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.arx-recent-item__title { font-size: 15px; font-weight: 500; line-height: 1.3; }
.arx-recent-item:hover .arx-recent-item__title { color: #2a77a8; }
.arx-recent-item__meta { font-size: 13px; color: var( --arx-muted ); }

/* Badges */
.arx-badges__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.arx-badges__head .arx-card-title { margin: 0; }
.arx-badges__count { font-size: 13px; color: var( --arx-muted ); }
.arx-badges__grid { display: grid; grid-template-columns: repeat( auto-fill, minmax( 58px, 1fr ) ); gap: 12px; }
.arx-badge { display: block; }
.arx-badge img { display: block; width: 100%; max-width: 58px; height: auto; margin: 0 auto; border-radius: 50%; filter: grayscale( 1 ); opacity: 0.35; transition: filter 0.2s ease, opacity 0.2s ease; }
.arx-badge.is-earned img { filter: none; opacity: 1; }
.arx-badge.is-secret img { filter: none; opacity: 0.7; }
.arx-badge.is-secret.is-earned img { opacity: 1; box-shadow: 0 0 0 2px #F2B33D, 0 0 12px rgba( 242, 179, 61, 0.6 ); }

/* v1.3.1: cards in the same row fill the row, so the dashboard reads as an even grid
   (previously a short card sat in a tall cell with empty space under it). */
.elementor-widget[class*="elementor-widget-arx-"]:not( .elementor-widget-arx-welcome-banner ):not( .elementor-widget-arx-greeting-header ),
.elementor-widget[class*="elementor-widget-arx-"]:not( .elementor-widget-arx-welcome-banner ):not( .elementor-widget-arx-greeting-header ) > .elementor-widget-container { height: 100%; }
.arx-dashboard-widget.arx-recently-added,
.arx-dashboard-widget.arx-badges,
.arx-dashboard-widget.arx-leaderboard,
.arx-dashboard-widget.arx-recent-achievements,
.arx-dashboard-widget.arx-progress-donut,
.arx-dashboard-widget.arx-continue-learning-list,
.arx-dashboard-widget.arx-current-lesson { height: 100%; box-sizing: border-box; }
.arx-progress-donut__more { color: var( --arx-muted ); font-size: 13px; }
.arx-badges__grid { grid-template-columns: repeat( auto-fill, minmax( 52px, 1fr ) ); }
.arx-achievement-row__title { font-size: 15px; font-weight: 500; line-height: 1.3; }
