/**
 * Share + Copy URL bottom-of-article bar.
 * Hand-written CSS shipped from network plugin so it works on staging
 * without waiting for theme SCSS pipelines. After SCSS compile, this file
 * can be removed in favour of the partial in client/assets/scss/.
 */
.dmn-share-bar {
	margin-top: 30px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	clear: both;
}
.dmn-share-bar__actions {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}
.dmn-share-bar__btn {
	display: inline-flex;
	align-items: center;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #f5f5f5;
	cursor: pointer;
	font: inherit;
	color: inherit;
	line-height: 1;
}
.dmn-share-bar__btn:hover,
.dmn-share-bar__btn:focus {
	background-color: #eaeaea;
	outline: none;
}
.dmn-share-bar__btn strong {
	font-weight: 700;
}
.dmn-share-bar__icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
}
.dmn-share-bar__icon--share {
	background-image: url('../images/share.svg');
}
.dmn-share-bar__icon--copy {
	background-image: url('../images/link.svg');
}
.dmn-share-bar__url-input {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.dmn-share-bar__modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}
.dmn-share-bar__modal[hidden] {
	display: none;
}
.dmn-share-bar__modal-inner {
	position: relative;
	background: #fff;
	padding: 30px 20px;
	border-radius: 8px;
	min-width: 280px;
	max-width: 95vw;
}
.dmn-share-bar__modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}
.dmn-share-bar__modal-title {
	margin-bottom: 10px;
}
.dmn-share-bar__modal-icons #social-share-icons ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 12px;
}
html.dmn-share-modal-open {
	overflow: hidden;
}


/* --- Cross-site hardening (Glossy + Modern Retail). --- */
/* Ensure the bar wrapper is always visible (defensive against theme overrides). */
.dmn-share-bar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.dmn-share-bar__btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font: inherit;
    cursor: pointer;
    position: relative;
}
.dmn-share-bar__btn:hover,
.dmn-share-bar__btn:focus {
    background-color: #eaeaea;
}
/* Modal hidden by default; only visible when JS adds is-open. */
.dmn-share-bar__modal {
    display: none;
}
.dmn-share-bar__modal.is-open {
    display: flex;
}
/* Copied! confirmation tooltip. */
.dmn-share-bar__copied {
    position: absolute;
    bottom: calc( 100% + 6px );
    left: 50%;
    transform: translateX( -50% );
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease-in-out;
}
.dmn-share-bar__btn.is-copied .dmn-share-bar__copied {
    opacity: 1;
}


/* PR #1640a: inline icon data URIs so Glossy & Modern Retail render share/copy icons.
   Original url('../images/share.svg') and url('../images/link.svg') reference a
   directory that does not exist in the plugin; the inline data URIs below win via
   cascade order and are theme-path independent. */
.dmn-share-bar__icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 6px;
}
.dmn-share-bar__icon--share {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><line x1='8.59' y1='13.51' x2='15.42' y2='17.49'/><line x1='15.41' y1='6.51' x2='8.59' y2='10.49'/></svg>");
}
.dmn-share-bar__icon--copy {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/><path d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/></svg>");
}


		/* ==========================================================================
   Archive / Topic preview card – minimal share-icon row.
   Rendered by dmn_share_icons_preview().
   ========================================================================== */
.dmn-share-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.dmn-share-preview__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: color 150ms ease;
}
.dmn-share-preview__icon:hover,
.dmn-share-preview__icon:focus {
    color: #111;
    outline: none;
}
.dmn-share-preview__icon svg {
    display: block;
}
.dmn-share-preview__copy.is-copied {
    color: #00a651;
}
