/* EP Sidebar — Frontend layout CSS
   Provides the two-column sidebar layout. Works regardless of whether
   the theme's __sidebar CSS feature flag is enabled. */

/* Hide sidebar div when empty (before JS populates it) */
.column-sidebar:empty { display: none; }

/* Two-column layout when sidebar is active */
.has-sidebar .page-container,
.has-sidebar .columns {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
}

.has-sidebar .page-content,
.has-sidebar .column-content {
	flex: 1 1 0;
	min-width: 0;
}

.has-sidebar .column-sidebar {
	flex: 0 0 280px;
	max-width: 280px;
	min-width: 0;
}

/* Sidebar widget styling */
.ep-sidebar-widget {
	margin-bottom: 24px;
}

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

.widget_title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid rgba(0,0,0,0.1);
}

.ep-sidebar-widget-body {
	font-size: 0.9em;
	line-height: 1.6;
}

.ep-sidebar-widget-body p {
	margin: 0 0 8px;
}

.ep-sidebar-widget-body p:last-child {
	margin-bottom: 0;
}

.ep-sidebar-widget-body ul,
.ep-sidebar-widget-body ol {
	margin: 0 0 8px;
	padding-left: 1.2em;
}

.ep-sidebar-widget-body li {
	margin-bottom: 4px;
}

.ep-sidebar-widget-body li:last-child {
	margin-bottom: 0;
}

.ep-sidebar-widget-body a {
	text-decoration: none;
	color: inherit;
}

.ep-sidebar-widget-body a:hover {
	text-decoration: underline;
}

/* Responsive: stack sidebar below content on narrow viewports */
@media (max-width: 768px) {
	.has-sidebar .page-container,
	.has-sidebar .columns {
		flex-direction: column;
	}

	.has-sidebar .column-sidebar {
		flex: none;
		max-width: 100%;
		margin-top: 32px;
		padding-top: 24px;
		border-top: 1px solid rgba(0,0,0,0.1);
	}
}
