/**
 * Social Share Styles
 * Vanilla CSS port of SocialShareButton.tsx Tailwind classes
 * Compact modal (270px), dark theme, 3x3 platform grid
 */

/* -- Overlay -- */
.share-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

/* Fallback animation when framer-motion isn't loaded */
.share-overlay:not([style*="opacity"]) {
	animation: shareOverlayIn 0.15s ease;
}

@keyframes shareOverlayIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* -- Modal -- */
.share-modal {
	width: 85%;
	max-width: 270px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: #111113;
	padding: 14px;
}

/* -- Header -- */
.share-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.share-modal-title {
	display: flex;
	align-items: flex-end;
	gap: 6px;
}

.share-modal-logo {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	object-fit: contain;
}

.share-modal-header h3 {
	font-size: 13px;
	font-weight: 600;
	color: #fafafa;
	margin: 0;
	line-height: 1;
}

/* -- Close button -- */
.share-close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 4px;
	border-radius: 8px;
	background: transparent;
	border: none;
	color: #fafafa;
	cursor: pointer;
	transition: color 0.15s, background 0.15s, transform 0.2s;
	flex-shrink: 0;
}

.share-close-btn:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #f87171;
	transform: rotate(90deg);
}

/* -- Tagline -- */
.share-modal-tagline {
	font-size: 11px;
	color: #71717a;
	line-height: 1.5;
	margin: 0 0 8px 0;
}

/* -- Platform grid (3x3) -- */
.share-options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	margin-bottom: 10px;
}

.share-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 4px 2px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid transparent;
	border-radius: 6px;
	color: #a1a1aa;
	text-decoration: none;
	font-size: 8px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

.share-option:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.1);
	transform: scale(1.08);
}

.share-option:active {
	transform: scale(0.92);
}

.share-option-icon svg {
	width: 12px;
	height: 12px;
}

/* Platform brand colors */
.share-option.x {
	color: #e4e4e7;
}
.share-option.x:hover {
	border-color: rgba(228, 228, 231, 0.2);
}
.share-option.bluesky {
	color: #0085ff;
}
.share-option.bluesky:hover {
	border-color: rgba(0, 133, 255, 0.2);
}
.share-option.threads {
	color: #e4e4e7;
}
.share-option.threads:hover {
	border-color: rgba(228, 228, 231, 0.2);
}
.share-option.linkedin {
	color: #0077b5;
}
.share-option.linkedin:hover {
	border-color: rgba(0, 119, 181, 0.2);
}
.share-option.facebook {
	color: #1877f2;
}
.share-option.facebook:hover {
	border-color: rgba(24, 119, 242, 0.2);
}
.share-option.reddit {
	color: #ff4500;
}
.share-option.reddit:hover {
	border-color: rgba(255, 69, 0, 0.2);
}
.share-option.whatsapp {
	color: #25d366;
}
.share-option.whatsapp:hover {
	border-color: rgba(37, 211, 102, 0.2);
}
.share-option.telegram {
	color: #0088cc;
}
.share-option.telegram:hover {
	border-color: rgba(0, 136, 204, 0.2);
}
.share-option.instagram {
	color: #e4405f;
}
.share-option.instagram:hover {
	border-color: rgba(228, 64, 95, 0.2);
}

/* -- Copy link row -- */
.share-link-row {
	display: flex;
	gap: 0;
	align-items: stretch;
	height: 24px;
}

.share-link-input {
	flex: 1;
	min-width: 0;
	padding: 0 8px;
	background: #09090b;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 6px 0 0 6px;
	border-right: none;
	color: #71717a;
	font-size: 9px;
	font-family: "JetBrains Mono", ui-monospace, monospace;
	height: 24px;
	box-sizing: border-box;
}

.share-link-input:focus {
	outline: none;
}

.share-copy-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	padding: 0;
	background: rgba(255, 255, 255, 0.02);
	color: #71717a;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 0 6px 6px 0;
	cursor: pointer;
	transition: all 0.15s;
	height: 24px;
	box-sizing: border-box;
	flex-shrink: 0;
}

.share-copy-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #e4e4e7;
}

.share-copy-btn:active {
	transform: scale(0.97);
}

.share-copy-btn.copied {
	background: rgba(52, 211, 153, 0.15);
	color: #34d399;
	border-color: rgba(52, 211, 153, 0.2);
}

/* -- Confirm modal overlay (legacy compat) -- */
.confirm-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	animation: shareOverlayIn 0.15s ease;
}
