/**
 * Frontend styles for Kayce Custom Archive Sections.
 *
 * Provides minimal, non-opinionated spacing so sections sit naturally
 * within any theme layout without overriding theme design decisions.
 * All rules use low-specificity selectors so theme CSS always wins.
 */

/* ── Outer wrapper (before / after variants) ────────────────────────────── */

.kcas-archive-sections {
	box-sizing: border-box;
	width: 100%;
}

.kcas-archive-sections--before_content {
	/* Sits between the archive header and the posts area.
	   Spans all columns if accidentally rendered inside a CSS-Grid or
	   multi-column posts container before the JS repositioner fires. */
	grid-column: 1 / -1;
	-ms-grid-column-span: 99; /* IE fallback */
	column-span: all;
	float: none !important;
	clear: both;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin-bottom: 1.5em;
}

.kcas-archive-sections--before {
	margin-bottom: 2em;
}

.kcas-archive-sections--after {
	margin-top: 2em;
}

/* ── Individual section ─────────────────────────────────────────────────── */

.kcas-archive-section {
	box-sizing: border-box;
}

.kcas-archive-section + .kcas-archive-section {
	margin-top: 1.5em;
}

/* ── v1.3.0 Device visibility ───────────────────────────────────────────── */
/*
 * These classes are added server-side when the "Devices" setting excludes one
 * or more device types. Using `display:none !important` ensures the section is
 * hidden regardless of theme specificity.
 *
 * Breakpoints:
 *   Desktop  ≥ 1025 px
 *   Tablet     768 – 1024 px
 *   Mobile   ≤  767 px
 */

@media (min-width: 1025px) {
	.kcas-hide-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.kcas-hide-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.kcas-hide-mobile {
		display: none !important;
	}
}
