/*
 * Skill Bars – front-end styles (free core)
 * Pro styles live in skillbar-premium.css, which is not part of the free plugin.
 * Everything is scoped under .skillbars. Per-bar settings arrive as CSS variables
 * on the wrapper: --sb-radius, --sb-title-size, --sb-title-case, --sb-title-style,
 * --sb-duration and (optionally) --sb-height.
 */
.skillbars {
	--sb-radius: 0px;
	--sb-title-size: 16px;
	--sb-title-case: none;
	--sb-title-style: normal;
	--sb-duration: 1500ms;
	position: relative;
	margin: 0;
	padding: 0;
}
.skillbars *,
.skillbars *::before,
.skillbars *::after {
	box-sizing: border-box;
}

/* Animated fill: grows to --sb-w once its item is revealed (.sb-in). */
.skillbars [data-sb-fill] {
	width: 0;
	transition: width var(--sb-duration) cubic-bezier(0.22, 0.61, 0.36, 1);
}
.skillbars .sb-in [data-sb-fill] {
	width: var(--sb-w, 0);
}
/* Striped fill (bars). */
.skillbars--striped [data-sb-fill] {
	background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.22) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.22) 75%, transparent 75%, transparent);
	background-size: 1.25rem 1.25rem;
}

/* Editor previews (block editor): already filled, no animation. */
.skillbars--static [data-sb-fill] {
	width: var(--sb-w, 0);
	transition: none;
}
.skillbars--static.skillbars-theme2 .progress-bar span {
	opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
	.skillbars [data-sb-fill] {
		transition: none;
	}
}

/* Shared title reset */
.skillbars h6 {
	font-size: var(--sb-title-size);
	text-transform: var(--sb-title-case);
	font-style: var(--sb-title-style);
}

/* ---------------------------------------------------------------- Style 1 */
.skillbars-theme1 .single-skill-item {
	margin-bottom: 15px;
}
.skillbars-theme1 .skillbar {
	position: relative;
	display: block;
	width: 100%;
	height: var(--sb-height, 42px);
	border-radius: var(--sb-radius);
	overflow: hidden;
}
.skillbars-theme1 .skillbar-titles h6 {
	margin: 0 0 10px;
	padding: 0;
}
.skillbars-theme1 .skillbar-bar {
	height: var(--sb-height, 42px);
	border-radius: var(--sb-radius);
}
.skillbars-theme1 .skillbar-percent {
	position: absolute;
	right: 10px;
	top: 0;
	height: var(--sb-height, 42px);
	line-height: var(--sb-height, 42px);
	font-size: 12px;
}

/* ---------------------------------------------------------------- Style 2 */
.skillbars-theme2 .single-skill-item {
	overflow: hidden;
	margin-bottom: 20px;
}
.skillbars-theme2 .single-skill-item:last-child {
	margin-bottom: 0;
}
.skillbars-theme2 .single-skill-item h6 {
	margin: 0 0 15px;
	padding: 0;
}
.skillbars-theme2 .progress {
	display: flex;
	height: var(--sb-height, 6px);
	overflow: visible;
	border-radius: var(--sb-radius);
}
.skillbars-theme2 .progress-bar {
	position: relative;
	overflow: visible;
	border-radius: var(--sb-radius);
}
.skillbars-theme2 .progress-bar span {
	position: absolute;
	right: 0;
	bottom: calc(var(--sb-height, 6px) + 14px);
	padding: 3px 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.skillbars-theme2 .sb-in .progress-bar span {
	opacity: 1;
	transition-delay: calc(var(--sb-duration) * 0.5);
}

/* ------------------------------------------------ Label position & icons */
/* Label above / below the bar: the title is a sibling of the track. */
.skillbars .single-skill-item > .skillbar-titles h6 {
	margin: 0 0 10px;
	padding: 0;
}
.skillbars--label-below .single-skill-item > .skillbar-titles h6 {
	margin: 10px 0 0;
}
.skillbars--label-below.skillbars-theme1 .single-skill-item {
	margin-bottom: 24px;
}
.skillbars--label-below.skillbars-theme2 .single-skill-item > h6 {
	margin: 15px 0 0;
}
.skillbars--label-below.skillbars-theme2 .single-skill-item {
	padding-top: 36px; /* room for the floating percentage above the thin bar */
}
/* Label inside the bar: the title is placed over the track. */
.skillbars--label-inside .skillbar {
	position: relative;
	display: block;
	width: 100%;
	height: var(--sb-height, 42px);
	overflow: hidden;
	border-radius: var(--sb-radius);
}
.skillbars--label-inside .skillbar-bar {
	height: var(--sb-height, 42px);
	border-radius: var(--sb-radius);
}
.skillbars--label-inside .skillbar-percent {
	position: absolute;
	right: 10px;
	top: 0;
	height: var(--sb-height, 42px);
	line-height: var(--sb-height, 42px);
	font-size: 12px;
}
.skillbars .skillbar > .skillbar-titles {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	max-width: 75%;
}
.skillbars .skillbar > .skillbar-titles h6 {
	display: block;
	margin: 0;
	padding: 0 0 0 15px;
	line-height: var(--sb-height, 42px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ------------------------------------------- Legacy [skillbar] shortcode */
.skillbars-classic .skillbar {
	position: relative;
	display: block;
	width: 100%;
	height: 42px;
	margin-bottom: 15px;
	background: #ddd;
	border-radius: 2px;
}
.skillbars-classic .skillbar-title {
	position: absolute;
	top: 0;
	left: 0;
	font-weight: bold;
	font-size: 13px;
	color: #333;
	background: #6adcfa;
	border-radius: 2px 0 0 2px;
}
.skillbars-classic .skillbar-title h6 {
	position: relative;
	display: block;
	height: 42px;
	margin: 0;
	padding: 0 15px;
	line-height: 42px;
	font-size: 15px;
	color: #fff;
}
.skillbars-classic .skillbar-bar {
	height: 42px;
	border-radius: 2px 0 0 2px;
}
.skillbars-classic .skillbar-percent {
	position: absolute;
	right: 10px;
	top: 0;
	height: 42px;
	line-height: 42px;
	font-size: 12px;
	color: rgba(0, 0, 0, 0.4);
}
