/* Document Library Pro – Share button next to Download */
.dlp-download-share-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	vertical-align: middle;
}

.dlp-share {
	position: relative;
	display: inline-block;
}

.dlp-share-toggle {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

/* Share button: white icon + white text. */
.dlp-share-toggle,
.dlp-share-toggle:hover,
.dlp-share-toggle:focus,
.dlp-share-toggle .dlp-share-toggle-text {
	color: #fff !important;
}

.dlp-share-toggle .dlp-share-icon {
	flex-shrink: 0;
	color: #fff !important;
	stroke: #fff !important;
}

/* Icon bar opens ABOVE the Share button, all icons in one row.
   padding-bottom acts as a hover "bridge" so the bar doesn't close
   while the mouse moves from the button up into it. */
.dlp-share-menu {
	position: absolute;
	bottom: 100%;
	left: 50%;
	z-index: 9999;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px;
	padding: 6px 6px 14px;
	transform: translate(-50%, -4px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

/* Bar background + small arrow pointing down at the button. */
.dlp-share-menu::before {
	content: "";
	position: absolute;
	inset: 0 0 8px 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 999px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
	z-index: -1;
}

.dlp-share-menu::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 3px;
	width: 10px;
	height: 10px;
	background: #fff;
	border-right: 1px solid rgba(0, 0, 0, .12);
	border-bottom: 1px solid rgba(0, 0, 0, .12);
	transform: translateX(-50%) rotate(45deg);
	z-index: -1;
}

.dlp-share:hover .dlp-share-menu,
.dlp-share:focus-within .dlp-share-menu,
.dlp-share.is-open .dlp-share-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}

/* Round icon buttons – all 4 the same: orange circle, white icon. */
.dlp-share-item {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px !important;
	height: 36px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #F7941D !important;
	color: #fff !important;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color .15s ease, transform .15s ease;
}

.dlp-share-item:hover,
.dlp-share-item:focus-visible {
	background: #e0820f !important;
	color: #fff !important;
	transform: translateY(-1px);
	outline: none;
}

.dlp-share-item .dlp-share-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	color: #fff !important;
}

/* Only 4 icons, in this order: Copy, Facebook, WhatsApp, X.
   (Done in CSS too, so it's correct even if old/cached HTML is served.) */
.dlp-share-linkedin {
	display: none !important;
}

.dlp-share-copy { order: 1; }
.dlp-share-facebook { order: 2; }
.dlp-share-whatsapp { order: 3; }
.dlp-share-x { order: 4; }

/* Copy button: the copy -> tick swap is done in dlp-share.js (inline styles,
   so theme button styles can't interfere). Old hidden check icon stays hidden. */
.dlp-share-copy .dlp-share-icon-check {
	display: none !important;
}

/* Keep the copy button orange in every state (themes restyle button :focus/:active). */
.dlp-share-item.dlp-share-copy,
.dlp-share-item.dlp-share-copy:focus,
.dlp-share-item.dlp-share-copy:active {
	background: #F7941D !important;
	color: #fff !important;
	outline: none !important;
}

.dlp-share-item.dlp-share-copy:hover {
	background: #e0820f !important;
}

/* Text labels are for screen readers only – the bar shows icons. */
.dlp-share-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Let the icon bar escape table cells / grid cards. */
.dlp-table td.col-link,
.dlp-grid-card,
.dlp-grid-card-footer {
	overflow: visible !important;
}
