/**
 * BuddyBoss Native Share - Page share button and modal
 *
 * Activity feed: we do NOT add any CSS for shared-URL activity content.
 * We output the same HTML/classes as BuddyBoss (bb-post-img-link, bb-content-wrp, etc.),
 * so the theme/BuddyBoss default styles apply. No overrides.
 */

.buddyboss-native-share-page-wrap {
	margin: 1.5em 0;
}

.buddyboss-native-share-page-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.5em 1em;
	background: var(--bb-sharing-primary-color, var(--bb-primary-color, #007cba));
	color: var(--bb-sharing-text-white-color, #fff);
	border: none;
	border-radius: 4px;
	font-size: 0.95em;
	cursor: pointer;
	transition: opacity 0.2s, background 0.2s;
}

.buddyboss-native-share-page-trigger-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.buddyboss-native-share-page-trigger-icon i {
	font-size: 1em;
}

.buddyboss-native-share-page-trigger:hover {
	opacity: 0.95;
	background: var(--bb-sharing-accent-color, var(--bb-primary-color-hover, #385dff));
}

/* Modal */
.buddyboss-native-share-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.buddyboss-native-share-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.buddyboss-native-share-modal-container {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	max-width: 420px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
}

.buddyboss-native-share-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e0e0e0;
}

.buddyboss-native-share-modal-header h3 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--bb-sharing-text-color, var(--bs-body-color, #23282d));
}

.buddyboss-native-share-modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--bb-sharing-text-regular-color, #5a5a5a);
	padding: 0.25rem;
}

.buddyboss-native-share-modal-close:hover {
	color: var(--bb-sharing-text-color, #23282d);
}

.buddyboss-native-share-modal-body {
	padding: 1rem 1.25rem;
}

.buddyboss-native-share-option {
	margin-bottom: 0.5rem;
}

.buddyboss-native-share-option:last-child {
	margin-bottom: 0;
}

/* Modal option buttons - layout only; no background/color/border so theme defaults apply */
.buddyboss-native-share-modal .buddyboss-native-share-option-btn {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	text-align: left;
	cursor: pointer;
}

.buddyboss-native-share-modal .buddyboss-native-share-option-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.buddyboss-native-share-modal .buddyboss-native-share-option-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.buddyboss-native-share-modal .buddyboss-native-share-option-icon i {
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.buddyboss-native-share-feed-form {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #eee;
}

.buddyboss-native-share-feed-form .buddyboss-native-share-message {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.95rem;
	resize: vertical;
	box-sizing: border-box;
}

.buddyboss-native-share-privacy {
	margin-top: 0.5rem;
}

.buddyboss-native-share-privacy-select {
	padding: 0.4rem 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.9rem;
}

.buddyboss-native-share-modal .buddyboss-native-share-feed-submit {
	margin-top: 0.75rem;
	padding: 0.5rem 1rem;
	font-size: 0.95rem;
	cursor: pointer;
}

.buddyboss-native-share-feed-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Native Share dropdown row: exact BuddyBoss share-dropdown-item styling on our own class. */
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	outline: none;
	text-decoration: none;
}
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item:focus {
	box-shadow: none;
}
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item {
	display: flex;
	align-items: center;
	gap: var(--bb-sharing-space-100);
	width: 100%;
	padding: var(--bb-sharing-space-100) var(--bb-sharing-space-200);
	text-align: left;
	transition: all 0.3s ease;
	cursor: pointer;
	border: none;
	background: transparent !important;
	color: var(--bb-sharing-text-color);
	font-weight: 400;
	border-radius: var(--bb-sharing-radius-md);
}
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item:hover,
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item:focus,
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item:active {
	background: var(--bb-sharing-background-secondary-hover-color) !important;
	box-shadow: none !important;
	outline: none !important;
}
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item i {
	font-size: var(--bb-sharing-icon-base);
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--bb-sharing-icon-color);
}
#buddyboss-share-dropdown .share-dropdown-menu .buddyboss-native-share-dropdown-item span {
	flex: 1;
	font-size: var(--bb-sharing-font-size-sm);
	white-space: nowrap;
	line-height: 1;
	color: var(--bb-sharing-text-regular-color) !important;
}

/* Hide native share on activity if browser doesn't support it */
.buddyboss-native-share-no-support .buddyboss-native-share-dropdown-native,
.buddyboss-native-share-no-support .buddyboss-native-share-option-native {
	display: none !important;
}
