/**
 * Gymspiratie Social Share — deelbalk, modal, viering.
 */

/* ── Deelbalk ── */

.gym-share-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: 1rem 0;
}

.gym-share-native {
	display: none; /* alleen tonen als de browser native share ondersteunt */
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.15rem;
	background: var(--gym-blue-500, #2680c2);
	color: #fff;
	border: none;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.12s, background 0.15s;
}

.gym-share-native:hover {
	background: var(--gym-blue-600, #1f6aa3);
	transform: translateY(-1px);
}

.gym-share-channels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* Native share beschikbaar: hoofdknop tonen, losse kanalen verbergen.
   Geen native support (o.a. desktop-Firefox): losse kanalen blijven zichtbaar. */
body.gym-has-native-share .gym-share-native {
	display: inline-flex;
}

body.gym-has-native-share .gym-share-channels {
	display: none;
}

.gym-share-btn {
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: transform 0.12s, filter 0.15s;
}

.gym-share-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
}

.gym-share-btn svg {
	width: 26px;
	height: 26px;
	display: block;
}

.gym-share-btn.is-done {
	width: auto;
	padding: 0 0.85rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 600;
	gap: 0.35rem;
}

/* button.class-specificiteit zodat de rode thema-button:hover de kanaalkleur
   niet overschrijft tijdens hover. */
button.gym-share-whatsapp { background: #25d366; }
button.gym-share-x        { background: #000; }
button.gym-share-facebook { background: #1877f2; }
button.gym-share-linkedin { background: #0a66c2; }
button.gym-share-copy     { background: #6b7280; }
button.gym-share-ig       { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 70%, #285aeb 100%); }

/* ── Deelteller-badge ── */

.gym-share-count-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.3rem 0.7rem;
	background: #fff7ed;
	color: #c2410c;
	border: 1px solid #fed7aa;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
}

.gym-share-count-badge.is-hidden { display: none; }

.gym-share-count-badge.is-pulse {
	animation: gymSharePulse 0.6s ease;
}

@keyframes gymSharePulse {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.18); }
	100% { transform: scale(1); }
}

/* ── Hints ── */

.gym-share-ig-hint {
	flex-basis: 100%;
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	color: #6b7280;
}

/* ── Modal (builder na publiceren) ── */

.gym-share-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gym-share-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.gym-share-modal-content {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	width: 92%;
	max-width: 460px;
	padding: 1.75rem;
	text-align: center;
}

.gym-share-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.9rem;
	background: none;
	border: none;
	font-size: 1.1rem;
	color: #9ca3af;
	cursor: pointer;
}

button.gym-share-modal-close:hover { color: #374151; background: transparent; }

.gym-share-modal-title {
	margin: 0 0 0.25rem;
	font-size: 1.3rem;
}

.gym-share-modal-sub {
	margin: 0 0 1rem;
	color: #6b7280;
	font-size: 0.92rem;
}

.gym-share-modal-preview {
	margin: 0 0 1rem;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #f3f4f6;
}

.gym-share-modal-preview img {
	display: block;
	width: 100%;
	height: auto;
}

.gym-share-modal .gym-share-bar {
	justify-content: center;
}

/* ── Mijlpaal-toast ── */

.gym-share-toast {
	position: fixed;
	left: 50%;
	bottom: 32px;
	transform: translate(-50%, 24px);
	z-index: 100002;
	max-width: 90%;
	padding: 0.85rem 1.4rem;
	background: #1f2937;
	color: #fff;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity 0.3s, transform 0.3s;
}

.gym-share-toast.is-in {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ── Confetti ── */

.gym-share-confetti {
	position: fixed;
	inset: 0;
	z-index: 100000;
	pointer-events: none;
	overflow: hidden;
}

.gym-share-confetti span {
	position: absolute;
	top: -14px;
	width: 10px;
	height: 14px;
	border-radius: 2px;
	opacity: 0.9;
	animation: gymShareFall 2.8s linear forwards;
}

@keyframes gymShareFall {
	0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
	100% { transform: translateY(105vh) rotate(720deg); opacity: 0.9; }
}

/* ── Responsive ── */

@media (max-width: 600px) {
	.gym-share-native { width: 100%; justify-content: center; }
	.gym-share-channels { width: 100%; }
}
