/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
	width: 100%;
	min-width: 0;
}


/* =========================================================
   SIDEBAR CARD
   ========================================================= */

.sidebar-card {
	width: 100%;
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--theme-shadow);
	margin: 0 0 16px;
}

.sidebar-card:last-child {
	margin-bottom: 0;
}


/* =========================================================
   SIDEBAR CARD HEADER
   ========================================================= */

.sidebar-card-header,
.sidebar-card-hd {
	padding: 12px 16px;
	background: linear-gradient(
		90deg,
		var(--theme-primary),
		var(--theme-secondary)
	);
	color: #fff;
	font-family: var(--theme-font-heading);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}


/* =========================================================
   SIDEBAR CARD BODY
   ========================================================= */

.sidebar-card-body {
	padding: 4px 0;
}


/* =========================================================
   SIDEBAR LINKS
   ========================================================= */

.sidebar-link {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 16px;
	border-bottom: 1px solid var(--theme-border);
	font-family: var(--theme-font-heading);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--theme-text);
	text-decoration: none;
	transition:
		background .15s ease,
		color .15s ease;
}

.sidebar-link:last-child {
	border-bottom: 0;
}

.sidebar-link:hover {
	background: var(--theme-primary-light, #e8f0fd);
	color: var(--theme-primary);
}


/* =========================================================
   SIDEBAR LINK ICON
   ========================================================= */

.sidebar-link-icon,
.s-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	flex: 0 0 18px;
	font-size: 14px;
	line-height: 1;
	color: var(--theme-primary);
}


/* =========================================================
   SIDEBAR LINK ARROW
   ========================================================= */

.sidebar-link-arr,
.s-arr {
	margin-left: auto;
	flex-shrink: 0;
	font-size: 11px;
	line-height: 1;
	color: var(--theme-muted);
	transition:
		transform .15s ease,
		color .15s ease;
}

.sidebar-link:hover .sidebar-link-arr,
.sidebar-link:hover .s-arr {
	color: var(--theme-primary);
	transform: translateX(2px);
}


/* =========================================================
   SIDEBAR PLAIN CONTENT
   ========================================================= */

.sidebar-plain {
	padding: 14px 16px;
}

.sidebar-section-title {
	margin: 0 0 10px;
	font-family: var(--theme-font-heading);
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--theme-text);
}


/* =========================================================
   SIDEBAR LIST
   ========================================================= */

.sidebar-list-item {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	padding: 7px 0;
	border-bottom: 1px solid var(--theme-border);
	font-family: var(--theme-font-heading);
	font-size: 12px;
	line-height: 1.45;
	color: var(--theme-text);
	transition: color .15s ease;
}

.sidebar-list-item:last-child {
	border-bottom: 0;
}

.sidebar-list-item:hover {
	color: var(--theme-primary);
}

.sidebar-list-item-arrow {
	flex: 0 0 auto;
	color: var(--theme-primary);
	font-size: 12px;
	line-height: 1.45;
}


/* =========================================================
   POPULAR ARTICLES
   ========================================================= */

.sidebar-popular-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--theme-border);
}

.sidebar-popular-item:last-child {
	border-bottom: 0;
}

.sidebar-popular-rank {
	flex: 0 0 26px;
	font-family: var(--theme-font-heading);
	font-size: 24px;
	font-weight: 900;
	line-height: 1;
	color: var(--theme-border);
}

.sidebar-popular-title {
	display: block;
	font-family: var(--theme-font-heading);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
	color: var(--theme-text);
	text-decoration: none;
	transition: color .15s ease;
}

.sidebar-popular-title:hover {
	color: var(--theme-primary);
}

.sidebar-popular-meta {
	margin-top: 3px;
	font-size: 10px;
	line-height: 1.4;
	color: var(--theme-muted);
}


/* =========================================================
   RESOURCE CARD
   ========================================================= */

.sidebar-resource-card {
	width: 100%;
	background: linear-gradient(
		135deg,
		var(--theme-primary),
		var(--theme-secondary)
	);
	border-radius: 12px;
	padding: 16px;
	margin: 0 0 16px;
	color: #fff;
}

.sidebar-resource-card a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 0;
	font-family: var(--theme-font-heading);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.45;
	color: rgba(255,255,255,.88);
	text-decoration: none;
	transition: color .15s ease;
}

.sidebar-resource-card a:hover {
	color: #fff;
}


/* =========================================================
   WORDPRESS WIDGETS
   ========================================================= */

.widget {
	width: 100%;
	margin: 0 0 16px;
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--theme-shadow);
}

.widget:last-child {
	margin-bottom: 0;
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget li {
	margin: 0;
	padding: 0;
}

.widget a {
	color: var(--theme-text);
	text-decoration: none;
	transition: color .15s ease;
}

.widget a:hover {
	color: var(--theme-primary);
}


/* =========================================================
   WIDGET FORM ELEMENTS
   ========================================================= */

.widget select,
.widget input[type="text"],
.widget input[type="search"] {
	width: 100%;
	padding: 9px 12px;
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.4;
	color: var(--theme-text);
	outline: none;
	transition:
		border-color .15s ease,
		box-shadow .15s ease;
}

.widget select:focus,
.widget input[type="text"]:focus,
.widget input[type="search"]:focus {
	border-color: var(--theme-primary);
	box-shadow: 0 0 0 3px color-mix(
		in srgb,
		var(--theme-primary) 10%,
		transparent
	);
}


/* =========================================================
   SIDEBAR IMAGES
   ========================================================= */

.sidebar img {
	max-width: 100%;
	height: auto;
	display: block;
}


/* =========================================================
   SIDEBAR BUTTONS
   ========================================================= */

.sidebar .button,
.sidebar button,
.sidebar input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 14px;
	border: 0;
	border-radius: var(--theme-button-radius);
	background: var(--theme-primary);
	color: #fff;
	font-family: var(--theme-font-heading);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	transition:
		transform .15s ease,
		opacity .15s ease;
}

.sidebar .button:hover,
.sidebar button:hover,
.sidebar input[type="submit"]:hover {
	opacity: .9;
	transform: translateY(-1px);
}


/* =========================================================
   SIDEBAR RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

	.sidebar {
		width: 100%;
	}

	.sidebar-card,
	.sidebar-resource-card,
	.widget {
		margin-bottom: 14px;
	}

	.sidebar-card-header,
	.sidebar-card-hd {
		padding: 11px 15px;
	}

	.sidebar-link {
		padding: 9px 15px;
	}

	.sidebar-plain {
		padding: 13px 15px;
	}
}


@media (max-width: 768px) {

	.sidebar-card,
	.sidebar-resource-card,
	.widget {
		border-radius: 10px;
	}

	.sidebar-card-header,
	.sidebar-card-hd {
		font-size: 12px;
	}

	.sidebar-link {
		font-size: 12px;
	}

	.sidebar-popular-title {
		font-size: 12px;
	}
}