/* 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; }

/* Sidebar layout — mirrors Attention theme's __sidebar SCSS feature.
   Uses space-between within the existing container, no width overrides needed. */
.column-content, .column-sidebar {
	box-sizing: border-box;
}

/* Mobile: sidebar stacks below content */
.column-sidebar {
	margin-top: 31px;
}

/* Tablet: constrain both columns */
@media all and (min-width: 682px) {
	.has-sidebar .column-content,
	.has-sidebar .column-sidebar {
		width: 100%;
	}
}

/* Desktop: side-by-side within the existing container */
@media all and (min-width: 1102px) {
	.has-sidebar .columns {
		display: flex;
		justify-content: space-between;
	}
	.has-sidebar .column-content {
		max-width: 644px;
	}
	.has-sidebar .column-sidebar {
		margin-top: 0;
		max-width: 280px;
	}
}

/* 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);
	}
}
