/* WP Document Library public directory. System fonts; inherits theme colors. */
.wpdl-directory {
	margin: 1.5em 0;
}

.wpdl-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em 1.25em;
	align-items: flex-end;
	margin-bottom: 1em;
}

.wpdl-field {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	margin: 0;
}

.wpdl-field label {
	font-weight: 600;
}

/* Full row: the filters wrap to the left, under the search field. */
.wpdl-search {
	flex: 1 1 100%;
}

.wpdl-search input {
	width: 100%;
}

.wpdl-help {
	font-size: 0.875em;
	margin: 0;
	flex-basis: 100%;
}

.wpdl-buttons {
	display: flex;
	gap: 1em;
	align-items: center;
	margin: 0;
}

.wpdl-directory :focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 2px;
}

.wpdl-directory.is-loading .wpdl-region {
	opacity: 0.6;
}

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

.wpdl-item {
	padding: 1em 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.4);
}

.wpdl-item-title {
	margin: 0 0 0.25em;
	font-size: 1.125em;
}

.wpdl-pin-label {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	padding: 0.1em 0.5em;
	border: 1px solid currentcolor;
	border-radius: 3px;
	vertical-align: middle;
}

.wpdl-item-description {
	margin: 0 0 0.5em;
}

.wpdl-item-meta,
.wpdl-document-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 1.5em;
	margin: 0 0 0.5em;
}

.wpdl-item-meta div,
.wpdl-document-meta div {
	display: flex;
	gap: 0.35em;
}

.wpdl-item-meta dt,
.wpdl-document-meta dt {
	font-weight: 600;
}

.wpdl-item-meta dt::after,
.wpdl-document-meta dt::after {
	content: ":";
}

.wpdl-item-meta dd,
.wpdl-document-meta dd {
	margin: 0;
}

.wpdl-item-actions,
.wpdl-document-actions,
.wpdl-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1em;
	margin: 0;
}

.wpdl-document-viewer {
	margin: 1.5em 0 0;
}

.wpdl-document-back {
	margin: 0 0 0.5em;
}

.wpdl-document-viewer object {
	display: block;
	width: 100%;
	height: 80vh;
	min-height: 24em;
}

.wpdl-document-viewer.is-unsupported object {
	height: auto;
	min-height: 0;
}

.wpdl-directory,
.wpdl-table-scroll {

	/* Contain positioned screen-reader text: it must not widen the page. */
	position: relative;
}

.wpdl-table-scroll {
	overflow-x: auto;
	max-width: 100%;
}

.wpdl-table {
	width: 100%;
	border-collapse: collapse;
}

.wpdl-table caption {
	text-align: left;
	font-weight: 600;
	padding: 0.5em 0;
}

.wpdl-table th,
.wpdl-table td {
	text-align: left;
	padding: 0.5em;
	border-bottom: 1px solid rgba(127, 127, 127, 0.4);
	vertical-align: top;
}

/* Header text, not a body link: the underline shows on hover and focus. */
.wpdl-table .wpdl-sort {
	display: inline-block;
	min-height: 1.5em;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.wpdl-table .wpdl-sort:hover,
.wpdl-table .wpdl-sort:focus {
	text-decoration: underline;
}

.wpdl-sort-mark {
	font-size: 0.75em;
}

.wpdl-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	list-style: none;
	margin: 1em 0;
	padding: 0;
}

.wpdl-pagination a,
.wpdl-pagination [aria-current] {
	display: inline-block;
	min-width: 2.75em;
	min-height: 2.75em;
	line-height: 2.75;
	text-align: center;
	padding: 0 0.5em;
}

.wpdl-pagination [aria-current] {
	font-weight: 700;
	border: 2px solid currentcolor;
}

.wpdl-error {
	font-weight: 600;
	border-left: 4px solid #d63638;
	padding-left: 0.75em;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	overflow-wrap: normal !important;
}

@media (max-width: 600px) {

	.wpdl-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.wpdl-field select {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {

	.wpdl-directory * {
		transition: none !important;
	}
}
