/**
 * @file
 * View block component.
 *
 * Basic styles for a view's output that work in any theme: they inherit the
 * theme's fonts and colours and only set spacing and layout. Every selector
 * starts with a viewspress- class, so nothing outside a view is affected. The
 * screen reader text, field, grid, table and calendar components load before
 * it.
 *
 * Gaps, row spacing, borders and outlines read the design tokens: each value
 * is var(--viewspress-<token>, var(--wp--custom--viewspress--<token>, <default>)),
 * so a theme's or a buyer's value wins, then a theme.json custom value, then
 * the default here. ViewsPress never declares a token itself.
 *
 * Contents:
 * 1. View
 * 2. Items
 * 3. Empty state
 * 4. Admin placeholder
 * 5. Pager
 * 6. Downloads
 * 7. Areas
 * 8. More link
 * 9. Attachments
 * 10. Media queries
 */

/* 1. View
   ========================================================================== */

.viewspress-view {
	box-sizing: border-box;
	max-width: 100%;
}

.viewspress-view *,
.viewspress-view *::before,
.viewspress-view *::after {
	box-sizing: inherit;
}

/* End of 1. View */

/* 2. Items
   ========================================================================== */

.viewspress-view__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.viewspress-list--ordered {
	padding-inline-start: 1.75em;
	list-style: decimal;
}

.viewspress-view__item {
	margin: 0;
	padding-block: var(--viewspress-row-spacing, var(--wp--custom--viewspress--row-spacing, 0.5em));
	padding-inline: 0;
	border-bottom: var(--viewspress-border-width, var(--wp--custom--viewspress--border-width, 1px)) solid var(--viewspress-border-color, var(--wp--custom--viewspress--border-color, color-mix(in srgb, currentcolor 15%, transparent)));
	overflow-wrap: anywhere;
}

.viewspress-view__item:last-child {
	border-bottom: 0;
}

/* End of 2. Items */

/* 3. Empty state
   ========================================================================== */

.viewspress-view__empty {
	margin: 0;
	padding: 0.5em 0;
}

/* End of 3. Empty state */

/* 4. Admin placeholder
   ========================================================================== */

.viewspress-view__placeholder {
	margin: 0 0 1em;
	padding: 0.75em 1em;
	border: 1px dashed currentcolor;
	font-size: 0.875em;
}

.viewspress-view--placeholder .viewspress-view__placeholder {
	margin-bottom: 0;
}

.viewspress-view__placeholder-title {
	margin: 0 0 0.25em;
	font-weight: 600;
}

.viewspress-view__placeholder-message {
	margin: 0;
	overflow-wrap: anywhere;
}

/* End of 4. Admin placeholder */

/* 5. Pager
   ========================================================================== */

.viewspress-pager {
	margin-top: 1em;
}

.viewspress-pager__items {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.viewspress-pager__item {
	margin: 0;
	padding: 0;
}

.viewspress-pager__link {
	display: inline-block;
	min-width: 2.75em;
	padding: 0.5em 0.75em;
	border: var(--viewspress-border-width, var(--wp--custom--viewspress--border-width, 1px)) solid var(--viewspress-border-color, var(--wp--custom--viewspress--border-color, color-mix(in srgb, currentcolor 25%, transparent)));
	text-align: center;
}

.viewspress-pager__item.is-active .viewspress-pager__link {
	border-color: var(--viewspress-accent, var(--wp--custom--viewspress--accent, currentcolor));
	font-weight: 600;
}

.viewspress-pager__ellipsis {
	display: inline-block;
	padding: 0.5em 0.25em;
}

/* The load more button: a link to the next page that the filter script appends. */
.viewspress-pager__more {
	display: inline-block;
	padding: 0.625em 1.25em;
	border: var(--viewspress-border-width, var(--wp--custom--viewspress--border-width, 1px)) solid var(--viewspress-accent, var(--wp--custom--viewspress--accent, currentcolor));
	border-radius: var(--viewspress-radius, var(--wp--custom--viewspress--radius, 0));
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.viewspress-pager__more:hover,
.viewspress-pager__more:focus-visible {
	text-decoration: underline;
}

/* End of 5. Pager */

/* 6. Downloads
   ========================================================================== */

.viewspress-downloads {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1.5em;
	margin: 1em 0 0;
}

.viewspress-downloads__link {
	display: inline-block;
	padding: 0.5em 0;
}

/* End of 6. Downloads */

/* 7. Areas
   ========================================================================== */

.viewspress-area {
	margin-block: 0 1em;
}

.viewspress-area--footer {
	margin-block: 1em 0;
}

.viewspress-area__text,
.viewspress-area__heading,
.viewspress-view--embedded {
	margin-block: 0 0.75em;
}

.viewspress-area__text {
	overflow-wrap: break-word;
}

.viewspress-area > :last-child {
	margin-block-end: 0;
}

/* End of 7. Areas */

/* 8. More link
   ========================================================================== */

.viewspress-more {
	margin-block: 1em 0;
}

.viewspress-more__link {
	display: inline-block;
	padding-block: 0.5em;
}

/* End of 8. More link */

/* 9. Attachments
   ========================================================================== */

/* An attachment display is a view of its own placed in its host's results. */
.viewspress-view__attachment--before {
	margin-block: 0 1.5em;
}

.viewspress-view__attachment--after {
	margin-block: 1.5em 0;
}

/* End of 9. Attachments */

/* 10. Media queries
   ========================================================================== */

@media (min-width: 782px) {
	.viewspress-view__placeholder {
		padding: 1em 1.25em;
	}

	.viewspress-pager__link {
		min-width: 2.25em;
		padding: 0.375em 0.625em;
	}
}

/* End of 10. Media queries */
