/* DrivePress file block: front end and editor. Colours follow the theme (currentColor), so it fits any site. */
.wp-block-drivepress-file {
	margin: 0 0 1.5em;
}
/* Alignment: themes style .alignleft / .alignright / .aligncenter; these make it work in any theme when the block is narrower than the column. */
.wp-block-drivepress-file.alignleft {
	float: left;
	margin-right: 1.5em;
}
.wp-block-drivepress-file.alignright {
	float: right;
	margin-left: 1.5em;
}
.wp-block-drivepress-file.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

/* Name, size and download icon sit along the top of an image or video (the bottom of a video belongs to the player's controls)
   and show on hover or keyboard focus; on a touch screen, which has no hover, they are always visible. */
.wp-block-drivepress-file .dp-file__media {
	position: relative;
	overflow: hidden;
}
.wp-block-drivepress-file .dp-file__bar {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem 1.75rem;
	color: #fff;
	background: linear-gradient(to bottom, rgb(0 0 0 / 0.5), transparent);
	font-size: 0.78rem;
	line-height: 1.3;
	opacity: 0;
	transition: opacity 0.18s ease;
	pointer-events: none;
}
.wp-block-drivepress-file .dp-file__media:hover .dp-file__bar,
.wp-block-drivepress-file .dp-file__media:focus-within .dp-file__bar {
	opacity: 1;
}
@media (hover: none) {
	.wp-block-drivepress-file .dp-file__bar {
		opacity: 1;
	}
}
.wp-block-drivepress-file .dp-file__filename {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
	letter-spacing: 0.01em;
	text-shadow: 0 1px 3px rgb(0 0 0 / 0.65);
}
.wp-block-drivepress-file .dp-file__tools {
	display: flex;
	flex: none;
	align-items: center;
	gap: 0.35rem;
	margin-left: auto;
}
.wp-block-drivepress-file .dp-file__filesize:not(:last-child)::after {
	content: "\00b7";
	margin-left: 0.4rem;
	font-weight: 700;
}
.wp-block-drivepress-file .dp-file__filesize {
	white-space: nowrap;
	opacity: 0.9;
	text-shadow: 0 1px 3px rgb(0 0 0 / 0.65);
}
.wp-block-drivepress-file .dp-file__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	padding: 0;
	font-size: 0.78rem;
	color: #fff;
	background: none;
	border: 0;
	border-radius: 0;
	text-decoration: none;
	pointer-events: auto;
	opacity: 0.9;
	filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
	transition: opacity 0.15s ease, transform 0.15s ease;
}
.wp-block-drivepress-file .dp-file__download:hover,
.wp-block-drivepress-file .dp-file__download:focus-visible {
	opacity: 1;
	transform: scale(1.12);
}

/* Icons: Lucide shapes drawn with a mask, so they take the text colour. */
.wp-block-drivepress-file .dp-icon,
.dp-gallery .dp-icon,
.dp-lightbox .dp-icon {
	display: block;
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: var(--dp-icon) center / contain no-repeat;
	mask: var(--dp-icon) center / contain no-repeat;
}
.dp-icon--file {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E");
}
.dp-icon--file-text {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}
.dp-icon--file-spreadsheet {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M8 13h2'/%3E%3Cpath d='M14 13h2'/%3E%3Cpath d='M8 17h2'/%3E%3Cpath d='M14 17h2'/%3E%3C/svg%3E");
}
.dp-icon--file-code {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 12.5 8 15l2 2.5'/%3E%3Cpath d='m14 12.5 2 2.5-2 2.5'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z'/%3E%3C/svg%3E");
}
.dp-icon--file-archive {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 12v-1'/%3E%3Cpath d='M10 18v-2'/%3E%3Cpath d='M10 7V6'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01'/%3E%3Ccircle cx='10' cy='20' r='2'/%3E%3C/svg%3E");
}
.dp-icon--download {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
}
.dp-icon--expand {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='m21 3-7 7'/%3E%3Cpath d='m3 21 7-7'/%3E%3Cpath d='M9 21H3v-6'/%3E%3C/svg%3E");
}
.dp-icon--close {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
}
.dp-icon--plus {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5v14'/%3E%3C/svg%3E");
}
.dp-icon--minus {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E");
}
.dp-icon--play {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='6 3 20 12 6 21 6 3' fill='black'/%3E%3C/svg%3E");
}
.dp-icon--prev {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
}
.dp-icon--next {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
}
.dp-icon--reset {
	--dp-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

/* Lightbox: the open-in-lightbox button sits top left of the picture and shows on hover like the bar (always on touch screens). */
.wp-block-drivepress-file .dp-file__expand {
	position: absolute;
	top: 0.41rem;
	left: 0.75rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: 0.78rem;
	color: #fff;
	background: none;
	cursor: pointer;
	opacity: 0;
	filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.7));
	transition: opacity 0.18s ease, transform 0.15s ease;
}
.wp-block-drivepress-file .dp-file__media:hover .dp-file__expand,
.wp-block-drivepress-file .dp-file__media:focus-within .dp-file__expand,
.wp-block-drivepress-file .dp-file__expand:focus-visible {
	opacity: 1;
}
.wp-block-drivepress-file .dp-file__expand:hover,
.wp-block-drivepress-file .dp-file__expand:focus-visible {
	transform: scale(1.12);
}
@media (hover: none) {
	.wp-block-drivepress-file .dp-file__expand {
		opacity: 0.9;
	}
}
.wp-block-drivepress-file.dp-file--lightbox.dp-file--image .dp-file__media img {
	cursor: zoom-in;
}
/* The name is at the top left too: make room for the lightbox button. */
.wp-block-drivepress-file.dp-file--lightbox .dp-file__bar {
	padding-left: 1.75rem;
}
.wp-block-drivepress-file.dp-file--lightbox .dp-file__filename {
	position: relative;
	padding-left: 0.9rem;
}
.wp-block-drivepress-file.dp-file--lightbox .dp-file__filename::before {
	content: "\00b7";
	position: absolute;
	left: 0.3rem;
	font-weight: 700;
}
/* Icons in the bar are a little smaller than the text's line, like a glyph of the same font. */
.wp-block-drivepress-file .dp-file__bar .dp-icon,
.wp-block-drivepress-file .dp-file__expand .dp-icon {
	width: 0.85em;
	height: 0.85em;
}

.dp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgb(0 0 0 / 0.95);
	animation: dp-lightbox-in 0.16s ease-out;
}
@keyframes dp-lightbox-in {
	from {
		opacity: 0;
	}
}
.dp-lightbox__stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	touch-action: none;
}
.dp-lightbox__stage img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transform-origin: center;
	user-select: none;
	-webkit-user-drag: none;
}
.dp-lightbox__stage video {
	display: block;
	max-width: 100%;
	max-height: 100%;
	outline: 0;
}
.dp-lightbox__stage.is-zoomable {
	cursor: zoom-in;
}
.dp-lightbox__stage.is-zoomed {
	cursor: grab;
}
.dp-lightbox__stage.is-dragging {
	cursor: grabbing;
}
.dp-lightbox__bar {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.75em 0.9em 2.5em;
	background: linear-gradient(to bottom, rgb(0 0 0 / 0.65), transparent);
	pointer-events: none;
}
.dp-lightbox__title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font: 600 0.875rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-shadow: 0 1px 3px rgb(0 0 0 / 0.7);
}
/* Themes and Elementor kits style every <button> (border, colours, radius, padding, hover): the selectors are heavy and everything they set is reset. */
html .dp-lightbox button.dp-lightbox__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 2.5rem;
	min-width: 0;
	height: 2.5rem;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	color: #fff;
	background: rgb(255 255 255 / 0.12);
	background-image: none;
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.15s ease;
}
html .dp-lightbox button.dp-lightbox__btn:hover,
html .dp-lightbox button.dp-lightbox__btn:focus,
html .dp-lightbox button.dp-lightbox__btn:focus-visible,
html .dp-lightbox button.dp-lightbox__btn:active {
	border: 0;
	box-shadow: none;
	color: #fff;
	background: rgb(255 255 255 / 0.28);
}
html .dp-lightbox button.dp-lightbox__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
html .dp-lightbox button.dp-lightbox__btn:disabled {
	opacity: 0.35;
	cursor: default;
	background: rgb(255 255 255 / 0.12);
}
.dp-lightbox .dp-icon {
	width: 1.25em;
	height: 1.25em;
}
@media (prefers-reduced-motion: reduce) {
	.dp-lightbox {
		animation: none;
	}
	.wp-block-drivepress-file .dp-file__expand,
	.wp-block-drivepress-file .dp-file__bar {
		transition: none;
	}
}
html.dp-lightbox-open {
	overflow: hidden;
}

/* Audio has no picture to put them on: a plain row under the player. */
.wp-block-drivepress-file .dp-file__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
	margin-top: 0.4em;
	font-size: 0.8125rem;
}
.wp-block-drivepress-file .dp-file__row .dp-file__bar {
	position: static;
	padding: 0;
	color: inherit;
	background: none;
	opacity: 1;
	flex: 1;
}
.wp-block-drivepress-file .dp-file__row .dp-file__download {
	color: #fff;
}
.wp-block-drivepress-file a.dp-file__link {
	display: block;
}
.wp-block-drivepress-file img,
.wp-block-drivepress-file video {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}
.wp-block-drivepress-file audio {
	display: block;
	width: 100%;
}
.wp-block-drivepress-file figcaption {
	margin-top: 0.5em;
	font-size: 0.875em;
	opacity: 0.75;
	text-align: center;
}
/* The card for documents, archives and other files (no picture to show). Everything follows the theme's text colour. */
.wp-block-drivepress-file .dp-file__card {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: 14px;
	background: color-mix(in srgb, currentColor 3%, transparent);
	transition: border-color 0.15s ease;
}
.wp-block-drivepress-file .dp-file__card:hover,
.wp-block-drivepress-file .dp-file__card:focus-within {
	border-color: color-mix(in srgb, currentColor 30%, transparent);
}
.wp-block-drivepress-file .dp-file__tile {
	display: grid;
	flex: none;
	place-items: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 12px;
	background: color-mix(in srgb, currentColor 8%, transparent);
	font-size: 1rem;
}
.wp-block-drivepress-file .dp-file__tile .dp-icon {
	width: 1.6rem;
	height: 1.6rem;
	opacity: 0.8;
}
.wp-block-drivepress-file .dp-file__meta {
	display: flex;
	flex: 1 1 10rem;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}
.wp-block-drivepress-file .dp-file__name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.wp-block-drivepress-file .dp-file__info {
	font-size: 0.8125rem;
	letter-spacing: 0.01em;
	opacity: 0.65;
}
.wp-block-drivepress-file .dp-file__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-left: auto;
	padding: 0.6rem 1.15rem;
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 999px;
	color: inherit;
	background: transparent;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.wp-block-drivepress-file .dp-file__button .dp-icon {
	width: 1.05rem;
	height: 1.05rem;
}
.wp-block-drivepress-file .dp-file__button:hover,
.wp-block-drivepress-file .dp-file__button:focus-visible {
	border-color: currentColor;
	background: color-mix(in srgb, currentColor 10%, transparent);
	color: inherit;
}
/* Themes underline links: not the button. */
.wp-block-drivepress-file a.dp-file__button,
.wp-block-drivepress-file a.dp-file__button:hover,
.wp-block-drivepress-file a.dp-file__button:focus {
	text-decoration: none !important;
}
/* The whole card downloads the file, not only the button. */
.wp-block-drivepress-file a.dp-file__button::after {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	content: "";
}
@media (max-width: 520px) {
	.wp-block-drivepress-file .dp-file__button {
		flex: 1 1 100%;
		margin-left: 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-drivepress-file .dp-file__card {
		transition: none;
	}
}


/* A file that was deleted or moved: a notice for people who can use DrivePress (visitors see nothing). */
.dp-missing-wrap {
	margin: 1.5em 0;
}
.dp-missing {
	padding: 14px 18px;
	background: #f6f2ea;
	border-left: 4px solid #f0b849;
	color: #3c434a;
	font-size: 14px;
	line-height: 1.5;
}
.dp-missing p {
	margin: 0;
}
.dp-missing__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px !important;
}
.dp-missing__name {
	padding: 4px 10px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	font-size: 12px;
	word-break: break-all;
}
.dp-missing__button {
	display: inline-block;
	padding: 4px 12px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	color: #2c3338;
	font: inherit;
	font-size: 13px;
	line-height: 1.6;
	text-decoration: none !important;
	cursor: pointer;
}
.dp-missing__button:hover {
	background: #fff;
	border-color: #8c8f94;
}
