/* =========================================================
Share Module
========================================================= */

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

.share-module__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	color: var(--font-color);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.share-module__toggle[aria-expanded="true"] {
	opacity: 0;
}

.share-module__toggle:hover {
	background-color: var(--surface-muted, rgba(0, 0, 0, 0.05));
}

.share-module__toggle:focus {
	outline: 2px solid var(--focus-color);
	outline-offset: 2px;
}

.share-module__toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
}

.share-module__toggle-icon svg {
	width: 100%;
	height: 100%;
}

/* Share content dropdown */
.share-module__content {
	position: absolute;
	/* top: calc(100% + 0.5rem); */
	top: 0px;
	left: 0;
	background: var(--surface, white);
	border: 1px solid var(--border-color, #e0e0e0);
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 100;
	min-width: 200px;
	color: var(--font-color);
}

.share-module__content[hidden] {
	display: none;
}

.share-module__inner {
	padding: 1.5rem;
}

.share-module__title {
	margin: 0 0 1rem 0;
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--font-color);
}

.share-module__buttons {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.share-module__button {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	background: transparent;
	border: 1px solid var(--border-color, #e0e0e0);
	border-radius: 4px;
	color: var(--font-color);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.share-module__button:hover {
	background-color: var(--surface-muted, #f5f5f5);
	border-color: var(--font-color);
}

.share-module__button:focus {
	outline: 2px solid var(--focus-color);
	outline-offset: -2px;
}

.share-module__button-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.2rem;
	height: 1.2rem;
	flex-shrink: 0;
}

.share-module__button-icon svg {
	width: 100%;
	height: 100%;
}

.share-module__button--facebook {
	--button-color: #1877f2;
}

.share-module__button--facebook:hover {
	background-color: rgba(24, 119, 242, 0.1);
	border-color: var(--button-color);
	color: var(--button-color);
}

.share-module__button--email {
	--button-color: #666;
}

.share-module__button--email:hover {
	background-color: rgba(0, 0, 0, 0.05);
	border-color: var(--button-color);
	color: var(--button-color);
}

.share-module__button--copy {
	--button-color: #4caf50;
}

.share-module__button--copy:hover {
	background-color: rgba(76, 175, 80, 0.1);
	border-color: var(--button-color);
	color: var(--button-color);
}

.share-module__button--copy.is-copied {
	background-color: rgba(76, 175, 80, 0.2);
	border-color: var(--button-color);
	color: var(--button-color);
}

/* Feedback message */
.share-module__feedback {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: var(--font-color);
	text-align: center;
	min-height: 1.2rem;
}

.share-module__feedback.is-visible {
	color: #4caf50;
	font-weight: 500;
}
/* Dark theme adjustments */
body.theme-dark .share-module__toggle:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .share-module__button--email:hover {
	background-color: rgba(255, 255, 255, 0.1);
}