:root {
	--go-share-radius: 1rem;
	--go-share-color-contrast: #151515;
}

.go-share-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-size: 1rem;
	line-height: 1;
	transition: opacity 0.2s ease-in-out;
	vertical-align: middle;
	-webkit-appearance: button; /* Ensure button appearance on mobile */
	appearance: button;
	font-family: inherit;
}
.go-share-button:focus {
	outline: 1px dotted CurrentColor; /* Basic focus style */
	outline-offset: 2px;
}
.go-share-button:hover {
	opacity: 0.85;
}

.go-share-icon {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	margin-inline-end: 0.5em; /* Use logical properties */
	line-height: 1;
	flex-shrink: 0;
}

.go-share-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	/* Fill color should be controlled by parent or CSS */
}

.go-share-counter {
	margin-inline-start: 0.6em; /* Use logical properties */
	font-size: 0.9em;
	opacity: 0.8;
}

/* Desktop Sharesheet Styles */
.go-share-desktop-sheet {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: 100%;
	background-color: rgba(0, 0, 0, 0.7); /* Slightly less opaque */
	z-index: 10001 !important;
	display: flex !important; /* Use flex for centering */
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);

	/* Animation */
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.go-share-desktop-sheet.go-share-visible {
	opacity: 1 !important;
	visibility: visible !important;
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.go-share-sheet-content {
	background-color: #ffffff;
	padding: 25px 30px;
	border-radius: var(--go-share-radius, 1rem);
	max-width: 320px; /* Slightly wider */
	width: 95%;
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
	position: relative;
	text-align: center;
}

.go-share-close-sheet {
	position: absolute;
	top: .5rem;
	right: .5rem;
	background: none;
	border: none;
	font-size: 1.5rem; /* Larger for easier tapping */
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 8px; /* Larger click area */
	appearance: none;
}
.go-share-close-sheet:hover {
	color: var(--go-share-color-contrast, #151515);
}

.go-share-sheet-content h4 {
	margin-top: 0;
	margin-bottom: 20px;
	color: var(--go-share-color-contrast, #151515);
	font-size: 1.3rem; /* Slightly smaller */
	font-weight: 600; /* Less bold */
}

.go-share-platforms {
	margin-bottom: 20px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.go-share-platform-link {
	display: inline-block;
	padding: 8px 15px;
	text-decoration: none;
	border-radius: 5px;
	font-size: 0.9rem;
	transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
	color: white; /* Default text color */
}

.go-share-platform-link:hover {
	opacity: .8;
	transform: rotate(2deg)scale(1.04);
}

/* Platform Colors */
.go-share-facebook { background-color: #1877f2; }
.go-share-x-twitter { background-color: #14171a; }
.go-share-linkedin { background-color: #0a66c2; }
.go-share-threads { background-color: #000000; }
.go-share-email { background-color: #dd4b39; }
/* Removed Instagram as it wasn't in the available platforms list */

.go-share-copy-section {
	display: flex;
	align-items: stretch;
	margin-top: 20px;
	margin-bottom: 20px;
	gap: 5px;
}

.go-share-copy-url-input {
	flex-grow: 1;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #f9f9f9;
	color: #333;
	font-size: .85rem;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin: 0;
	line-height: normal;
}
.go-share-copy-url-input:focus {
	 border-color: var(--go-share-color-contrast, #151515);
	 box-shadow: 0 0 0 1px var(--go-share-color-contrast, #151515);
	 outline: 2px solid transparent;
}

.go-share-copy-url-button {
	padding: 0 1rem;
	border-radius: 5px;
	margin: 0;
	white-space: nowrap;
	flex-shrink: 0;
	position: relative;
	border: none;
	background: var(--go-share-color-contrast, #151515);
	color: white;
	font-size: .8rem;
	font-weight: 700;
	cursor: pointer;
	line-height: normal; /* Ensure consistent height */
	appearance: button;
}
.go-share-copy-url-button:hover {
	opacity: 0.85;
}

.go-share-copy-url-button.copied {
	background-color: #4CAF50; /* Green for success */
	color: white;
	cursor: default;
}
.go-share-copy-url-button.copied:hover {
	opacity: 1;
}

/* Screen Reader Text (from WP Core) */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.go-share-qr-code {
	margin-top: 20px;
	border-top: 1px solid #eee;
	padding-top: 20px;
	text-align: center;
}

.go-share-qr-code h5 {
	margin-top: 0;
	margin-bottom: 15px;
	color: var(--go-share-color-contrast, #151515);
	font-size: 1rem;
	font-weight: 600;
}

.go-share-qrcode-image {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
	border: 2px solid var(--go-share-color-contrast, #151515);
	border-radius: .5rem;
}