/*
 * DataSoft Report Catalog module styles.
 *
 * Used on the front end and inside the Divi 5 Visual Builder.
 *
 * Quick restyle: change the custom properties below, or override them from
 * the module's Advanced > Custom CSS > Module Wrapper field, for example:
 *   .ds_report_catalog { --ds-rc-accent: #c2410c; }
 */

.ds_report_catalog {
	--ds-rc-accent: #0b5ed7;
	--ds-rc-accent-text: #ffffff;
	--ds-rc-card-bg: #ffffff;
	--ds-rc-card-border: #e3e6ea;
	--ds-rc-radius: 8px;
	--ds-rc-gap: 24px;
	--ds-rc-free: #1a7f37;
	--ds-rc-paid: #9a6700;
}

.ds_report_catalog__title {
	margin-bottom: 20px;
}

/* ---------- Filter bar ---------- */

.ds_report_catalog__filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.ds_report_catalog__filter-btn {
	appearance: none;
	background: transparent;
	border: 1px solid var(--ds-rc-card-border);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	line-height: 1;
	padding: 9px 16px;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ds_report_catalog__filter-btn:hover,
.ds_report_catalog__filter-btn:focus-visible {
	border-color: var(--ds-rc-accent);
}

.ds_report_catalog__filter-btn:focus-visible {
	outline: 2px solid var(--ds-rc-accent);
	outline-offset: 2px;
}

.ds_report_catalog__filter-btn.is-active {
	background: var(--ds-rc-accent);
	border-color: var(--ds-rc-accent);
	color: var(--ds-rc-accent-text);
}

/* ---------- Grid ---------- */

.ds_report_catalog__grid {
	display: grid;
	gap: var(--ds-rc-gap);
	grid-template-columns: repeat(var(--ds-rc-cols, 3), minmax(0, 1fr));
}

@media (max-width: 980px) {
	.ds_report_catalog__grid {
		/* --ds-rc-cols-md is set next to --ds-rc-cols (never more than 2). */
		grid-template-columns: repeat(var(--ds-rc-cols-md, 2), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ds_report_catalog__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Card ---------- */

.ds_report_catalog__card {
	background: var(--ds-rc-card-bg);
	border: 1px solid var(--ds-rc-card-border);
	border-radius: var(--ds-rc-radius);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

/* The "hidden" attribute is used by the filter script. Without this rule the
   display:flex above would win and the card would stay visible. */
.ds_report_catalog__card[hidden] {
	display: none;
}

.ds_report_catalog__image {
	/* These five variables are set by the module's Card Image settings. */
	background: var(--ds-rc-img-bg, #f3f5f7);
	border-bottom: 1px solid var(--ds-rc-card-border);
	display: block;
	padding: var(--ds-rc-img-pad, 0);
}

.ds_report_catalog__image img {
	aspect-ratio: var(--ds-rc-img-ratio, auto);
	display: block;
	height: auto;
	margin: 0 auto;
	/* Picture width: "auto" keeps a small icon at its real size, "100%" fills the card.
	   max-width stops a wide picture from overflowing the card in either case. */
	max-width: 100%;
	object-fit: var(--ds-rc-img-fit, cover);
	object-position: var(--ds-rc-img-pos, top center);
	width: var(--ds-rc-img-w, auto);
}

.ds_report_catalog__badge {
	background: #ffffff;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 6px 10px;
	position: absolute;
	right: 12px;
	top: 12px;
}

.ds_report_catalog__badge--free {
	color: var(--ds-rc-free);
}

.ds_report_catalog__badge--paid {
	color: var(--ds-rc-paid);
}

.ds_report_catalog__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
}

.ds_report_catalog__card-title {
	font-size: 18px;
	line-height: 1.3;
	margin: 0;
	padding: 0;
}

.ds_report_catalog__card-title a {
	color: inherit;
	text-decoration: none;
}

.ds_report_catalog__card-title a:hover {
	text-decoration: underline;
}

.ds_report_catalog__desc {
	margin: 0;
	padding: 0;
}

.ds_report_catalog__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ds_report_catalog__cat {
	background: #eef2f7;
	border-radius: 4px;
	font-size: 12px;
	padding: 3px 8px;
}

/*
 * Version and date line, shown as:   • Version 1.2.0   • Updated October 29, 2026
 *
 * Themes (Divi included) put their own bullets, indents and spacing on lists. To look
 * the same everywhere this block switches those off and draws its own round bullets
 * with a fixed space after each bullet and between items. The "!important" marks are
 * deliberate: they are what beat the theme's list rules.
 */
.ds_report_catalog .ds_report_catalog__meta {
	color: #5b6470;
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 4px 1.25em;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.ds_report_catalog .ds_report_catalog__meta li {
	align-items: baseline;
	display: flex;
	gap: 0.5em;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.ds_report_catalog .ds_report_catalog__meta li::marker {
	content: none;
}

.ds_report_catalog .ds_report_catalog__meta li::before {
	content: "\2022" !important; /* round bullet */
	display: inline;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
}

.ds_report_catalog .ds_report_catalog__meta li::after {
	content: none !important;
}

.ds_report_catalog__button {
	align-self: flex-start;
	background: var(--ds-rc-accent);
	border-radius: 6px;
	color: var(--ds-rc-accent-text);
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	margin-top: auto;
	padding: 10px 18px;
	text-decoration: none;
}

.ds_report_catalog__button:hover,
.ds_report_catalog__button:focus-visible {
	filter: brightness(0.92);
	text-decoration: none;
}

.ds_report_catalog__empty {
	margin: 0;
}
