/* Gaanpaar Share – front end. Self-hosted, no web fonts. */

.gps,
.gps-panel,
.gps-toast,
.gps-quote {
	--gps-fg: #1f2937;
	--gps-muted: #6b7280;
	--gps-line: #e3e6ea;
	--gps-surface: #fff;
	--gps-surface-a: rgba(255, 255, 255, 0.92);
	--gps-mono: #1f2937;
	--gps-mono-fg: #fff;
	--gps-focus: #2563eb;
}

.gps--scheme-dark,
.gps-scheme-dark {
	--gps-fg: #e5e7eb;
	--gps-muted: #9ca3af;
	--gps-line: #374151;
	--gps-surface: #161b22;
	--gps-surface-a: rgba(22, 27, 34, 0.92);
	--gps-mono: #e5e7eb;
	--gps-mono-fg: #111827;
	--gps-focus: #93c5fd;
}

@media (prefers-color-scheme: dark) {
	.gps--scheme-auto,
	.gps-scheme-auto {
		--gps-fg: #e5e7eb;
		--gps-muted: #9ca3af;
		--gps-line: #374151;
		--gps-surface: #161b22;
		--gps-surface-a: rgba(22, 27, 34, 0.92);
		--gps-mono: #e5e7eb;
		--gps-mono-fg: #111827;
		--gps-focus: #93c5fd;
	}
}

/* Bar */
.gps {
	--gps-h: 40px;
	--gps-icon: 20px;
	--gps-fs: 14px;
	--gps-r: 11px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gps-gap, 8px) 12px;
	margin: 1.75em 0;
	padding: 0;
	font-size: var(--gps-fs);
	line-height: 1.2;
	color: var(--gps-fg);
	text-align: start;
}

.gps--inline,
.gps--preview,
.gps--panel {
	container-type: inline-size;
}

.gps--size-sm { --gps-h: 32px; --gps-icon: 16px; --gps-fs: 13px; --gps-r: 9px; }
.gps--size-lg { --gps-h: 48px; --gps-icon: 22px; --gps-fs: 15px; --gps-r: 13px; }
.gps--shape-pill { --gps-r: 999px; }
.gps--shape-square { --gps-r: 2px; }

.gps-heading {
	font-weight: 700;
	font-size: var(--gps-fs);
	color: var(--gps-fg);
	white-space: nowrap;
}

.gps-total {
	font-size: 13px;
	font-weight: 600;
	color: var(--gps-muted);
	white-space: nowrap;
}

.gps-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gps-gap, 8px);
	min-width: 0;
	margin: 0;
	padding: 0;
}

.gps--align-center { justify-content: center; }
.gps--align-center .gps-list { justify-content: center; }
.gps--align-end { justify-content: flex-end; }
.gps--align-end .gps-list { justify-content: flex-end; }
.gps--align-stretch { flex-direction: column; align-items: stretch; }
.gps--align-stretch .gps-list { flex-wrap: nowrap; }
.gps--align-stretch .gps-btn { flex: 1 1 0; min-width: 0; }

/* Button (guarded against theme link/button styles) */
.gps .gps-btn {
	--gps-c: #4b5563;
	--gps-ink: var(--gps-c);
	--gps-on: #fff;
	position: relative;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	height: var(--gps-h);
	min-width: var(--gps-h);
	margin: 0;
	padding: 0 0.95em;
	border: 1.5px solid transparent;
	border-radius: var(--gps-r);
	background: var(--gps-c);
	color: var(--gps-on);
	font: inherit;
	font-size: var(--gps-fs);
	font-weight: 600;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gps .gps-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
	box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.45);
}

.gps .gps-btn:active { transform: translateY(0); }

.gps .gps-btn:focus { outline: none; }

.gps .gps-btn:focus-visible {
	outline: 2px solid var(--gps-focus);
	outline-offset: 2px;
}

.gps .gps-icon {
	display: block;
	flex: none;
	width: var(--gps-icon);
	height: var(--gps-icon);
	margin: 0;
}

.gps .gps-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Icon-only modes: the name stays for screen readers. */
.gps--labels-icon .gps-btn,
.gps--shape-circle .gps-btn {
	width: var(--gps-h);
	padding: 0;
}

.gps--align-stretch.gps--labels-icon .gps-btn {
	width: auto;
}

.gps--shape-circle { --gps-r: 50%; }
.gps--shape-circle.gps--align-stretch { --gps-r: 999px; }

.gps--labels-icon .gps-label,
.gps--shape-circle .gps-label,
.gps-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@container (max-width: 560px) {
	/* Narrow: icons share one even row (a second row only when they can't fit). */
	.gps--labels-auto .gps-list {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
		width: 100%;
	}

	.gps--labels-auto .gps-btn {
		width: auto;
		padding: 0;
	}

	.gps--labels-auto.gps--align-stretch .gps-btn {
		width: auto;
	}

	.gps--labels-auto .gps-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* Brand colours */
.gps .gps-btn--facebook { --gps-c: #0866ff; }
.gps .gps-btn--x { --gps-c: #0f1419; }
.gps .gps-btn--whatsapp { --gps-c: #1da851; }
.gps .gps-btn--messenger { --gps-c: #0a7cff; }
.gps .gps-btn--telegram { --gps-c: #1d8fcc; }
.gps .gps-btn--linkedin { --gps-c: #0a66c2; }
.gps .gps-btn--pinterest { --gps-c: #e60023; }
.gps .gps-btn--reddit { --gps-c: #f04a00; }
.gps .gps-btn--email { --gps-c: #5b6470; }
.gps .gps-btn--copy { --gps-c: #4b5563; }
.gps .gps-btn--native { --gps-c: #374151; }

.gps--scheme-dark .gps-btn--x { --gps-c: #e7e9ea; --gps-on: #0f1419; }
.gps--scheme-dark .gps-btn--email,
.gps--scheme-dark .gps-btn--copy,
.gps--scheme-dark .gps-btn--native { --gps-ink: #d1d5db; }

@media (prefers-color-scheme: dark) {
	.gps--scheme-auto .gps-btn--x { --gps-c: #e7e9ea; --gps-on: #0f1419; }
	.gps--scheme-auto .gps-btn--email,
	.gps--scheme-auto .gps-btn--copy,
	.gps--scheme-auto .gps-btn--native { --gps-ink: #d1d5db; }
}

/* Looks */
.gps--look-soft .gps-btn {
	background: rgba(120, 120, 120, 0.12);
	background: color-mix(in srgb, var(--gps-c) 12%, transparent);
	color: var(--gps-ink);
}

.gps--look-soft .gps-btn:hover {
	background: var(--gps-c);
	color: var(--gps-on);
}

.gps--look-outline .gps-btn {
	background: transparent;
	border-color: var(--gps-c);
	border-color: color-mix(in srgb, var(--gps-c) 45%, transparent);
	color: var(--gps-ink);
}

.gps--look-outline .gps-btn:hover {
	background: var(--gps-c);
	border-color: var(--gps-c);
	color: var(--gps-on);
}

.gps--look-mono .gps-btn {
	background: var(--gps-mono);
	color: var(--gps-mono-fg);
}

.gps--look-mono .gps-btn:hover {
	background: var(--gps-c);
	color: var(--gps-on);
}

.gps--look-ghost .gps-btn {
	background: transparent;
	border-color: var(--gps-line);
	color: var(--gps-fg);
}

.gps--look-ghost .gps-btn:hover {
	border-color: var(--gps-ink);
	color: var(--gps-ink);
	box-shadow: none;
}

.gps--look-minimal .gps-btn {
	background: transparent;
	color: var(--gps-ink);
}

.gps--look-minimal .gps-btn:hover {
	background: rgba(120, 120, 120, 0.12);
	background: color-mix(in srgb, var(--gps-c) 12%, transparent);
	box-shadow: none;
}

.gps--look-minimal.gps--labels-icon .gps-btn { --gps-icon: calc(var(--gps-h) * 0.55); }

/* Copied state */
.gps .gps-btn.gps-is-done .gps-icon { animation: gps-pop 0.35s ease; }

@keyframes gps-pop {
	50% { transform: scale(1.25); }
}

/* Messenger without an App ID works only in the app. */
@media (hover: hover) and (pointer: fine) {
	.gps .gps-touch-only { display: none; }
	.gps--preview .gps-touch-only { display: inline-flex; }
}

/* In-content wrapper */
.gps-wrap { clear: both; }
.gps-wrap .gps { margin: 1.75em 0; }
.gps-wrap--before .gps { margin-top: 0.5em; }
.gps-scope[hidden] { display: none !important; }

/* Floating bar (computers) */
.gps-float-wrap { display: none; }

.gps.gps--floating {
	position: fixed;
	top: 50%;
	z-index: 9990;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0;
	padding: 6px;
	background: var(--gps-surface-a);
	border: 1px solid var(--gps-line);
	border-radius: calc(var(--gps-r) + 6px);
	box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.3);
	transform: translateY(-50%);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	backdrop-filter: saturate(180%) blur(10px);
}

.gps--floating.gps--shape-circle,
.gps--floating.gps--shape-pill { border-radius: 999px; padding: 6px 5px; }
.gps--floating .gps-list { flex-direction: column; flex-wrap: nowrap; }
.gps--floating.gps--side-left { left: 16px; }
.gps--floating.gps--side-right { right: 16px; }

.gps--floating .gps-total {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 2px 0;
	font-size: 11px;
	line-height: 1.2;
}

.gps--floating .gps-total strong {
	font-size: 15px;
	color: var(--gps-fg);
}

.gps--floating.gps-is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.gps--floating.gps--side-left.gps-is-hidden { transform: translate(-12px, -50%); }
.gps--floating.gps--side-right.gps-is-hidden { transform: translate(12px, -50%); }

/* Bottom bar (phones) */
.gps-sticky-wrap { display: none; }

.gps.gps--sticky {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	margin: 0;
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
	background: var(--gps-surface-a);
	border-top: 1px solid var(--gps-line);
	box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, 0.3);
	transition: transform 0.25s ease, visibility 0.25s;
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
}

.gps--sticky .gps-list { flex-wrap: nowrap; width: 100%; }
.gps.gps--sticky .gps-btn { flex: 1 1 0; width: auto; min-width: 0; }
.gps--sticky .gps-total { display: none; }

.gps--sticky.gps-is-hidden {
	visibility: hidden;
	transform: translateY(110%);
}

/* "Share…" panel */
.gps-panel {
	box-sizing: border-box;
	width: min(460px, calc(100vw - 24px));
	max-width: none;
	max-height: calc(100vh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: var(--gps-surface);
	color: var(--gps-fg);
	box-shadow: 0 28px 70px -20px rgba(0, 0, 0, 0.45);
	overflow: auto;
}

.gps-panel::backdrop {
	background: rgba(15, 23, 42, 0.5);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.gps-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 2px 20px;
}

.gps-panel .gps-panel__title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gps-fg);
}

.gps-panel .gps-panel__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(120, 120, 120, 0.12);
	color: var(--gps-fg);
	cursor: pointer;
}

.gps-panel .gps-panel__close:hover { background: rgba(120, 120, 120, 0.22); }
.gps-panel .gps-panel__close:focus-visible { outline: 2px solid var(--gps-focus); outline-offset: 2px; }
.gps-panel .gps-panel__close .gps-icon { width: 18px; height: 18px; }

.gps-panel__link {
	margin: 0 20px;
	overflow: hidden;
	font-size: 13px;
	color: var(--gps-muted);
	white-space: nowrap;
	text-overflow: ellipsis;
}

.gps.gps--panel {
	margin: 0;
	padding: 14px 20px 22px;
}

.gps--panel .gps-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
}

.gps.gps--panel .gps-btn {
	justify-content: flex-start;
	width: auto;
	padding: 0 0.95em;
}

.gps--panel .gps-label {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	clip: auto;
	clip-path: none;
}

@media (max-width: 600px) {
	.gps-panel {
		width: 100%;
		max-height: 85vh;
		margin: auto 0 0;
		border-radius: 20px 20px 0 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}

/* Toast */
.gps-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	z-index: 100000;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: calc(100vw - 32px);
	padding: 11px 18px;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 16px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.gps-toast.gps-is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.gps-toast .gps-icon {
	width: 18px;
	height: 18px;
	color: #4ade80;
}

/* Highlight-to-share */
.gps-quote {
	position: absolute;
	z-index: 99999;
	display: flex;
	gap: 2px;
	padding: 4px;
	border-radius: 12px;
	background: #111827;
	box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.5);
	transform: translate(-50%, calc(-100% - 10px));
	animation: gps-in 0.15s ease;
}

.gps-quote::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -6px;
	border: 6px solid transparent;
	border-top-color: #111827;
}

.gps-quote .gps-quote__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.gps-quote .gps-quote__btn:hover { background: rgba(255, 255, 255, 0.14); }
.gps-quote .gps-quote__btn:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }
.gps-quote .gps-icon { width: 18px; height: 18px; }

@keyframes gps-in {
	from { opacity: 0; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.gps .gps-btn,
	.gps.gps--floating,
	.gps.gps--sticky,
	.gps-toast { transition: none; }
	.gps .gps-btn:hover { transform: none; }
	.gps .gps-btn.gps-is-done .gps-icon,
	.gps-quote { animation: none; }
}

@media print {
	.gps,
	.gps-float-wrap,
	.gps-sticky-wrap,
	.gps-quote,
	.gps-toast { display: none !important; }
}
