/* ==========================================================================
   Share Poster v2 — 弹层样式（Canvas 2D 渲染，弹层只负责显示+下载+分享）
   ========================================================================== */

.share-poster-wrap {
	margin: 28px 0 8px;
	display: flex;
	justify-content: flex-start;
}

.share-poster-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 15px;
	line-height: 1.2;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(79,70,229,.28);
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.share-poster-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(79,70,229,.36); }
.share-poster-btn:active { transform: translateY(0); }
.share-poster-btn:focus-visible { outline: 3px solid #c7d2fe; outline-offset: 2px; }
.share-poster-btn[disabled] { opacity: .6; cursor: progress; }
.share-poster-btn svg { display: block; }

/* ----- Modal ----- */
.share-poster-modal[hidden] { display: none !important; }
.share-poster-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.share-poster-mask {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .65);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.share-poster-dialog {
	position: relative;
	width: min(720px, 96vw);
	max-height: 92vh;
	background: #ffffff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0,0,0,.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: sp-zoom-in .18s ease-out;
}
@keyframes sp-zoom-in {
	from { transform: scale(.96); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}
.share-poster-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid #eef0f3;
}
.share-poster-dialog-head h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}
.share-poster-close {
	background: transparent;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 8px;
}
.share-poster-close:hover { background: #f3f4f6; color: #111827; }

.share-poster-dialog-body {
	flex: 1 1 auto;
	overflow: auto;
	background: #f5f6f8;
	padding: 20px;
	display: block;
	min-height: 280px;
}
.share-poster-preview {
	max-width: min(420px, 92vw);
	margin: 0 auto;
	text-align: center;
	min-height: 200px;
	display: block;
}
.share-poster-preview img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.18);
	display: block;
	margin: 0 auto;
	min-width: 200px;
	min-height: 280px;
	background: #e5e7eb;
	width: auto !important;
	height: auto !important;
	aspect-ratio: 720 / 1280;
}
.share-poster-dialog-foot {
	padding: 14px 18px;
	border-top: 1px solid #eef0f3;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	background: #fff;
}
.share-poster-btn-primary {
	background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
	box-shadow: 0 4px 14px rgba(79,70,229,.32) !important;
}
.share-poster-btn-share {
	background: linear-gradient(135deg, #059669, #10b981) !important;
	box-shadow: 0 4px 14px rgba(16,185,129,.3) !important;
}
.share-poster-btn-ghost {
	background: #f3f4f6 !important;
	color: #111827 !important;
	box-shadow: none !important;
}
.share-poster-status {
	padding: 0 18px 12px;
	font-size: 13px;
	color: #6b7280;
	min-height: 0;
}
.share-poster-status.is-error { color: #dc2626; }
.share-poster-status.is-success { color: #047857; }

/* 移动端适配 */
@media (max-width: 760px) {
	.share-poster-dialog-body { padding: 12px; }
	.share-poster-preview { max-width: 92vw; }
}
@media (max-width: 640px) {
	.share-poster-dialog { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
	.share-poster-dialog-foot { padding: 12px; }
	.share-poster-btn-label { display: none; }
}
@media (max-width: 380px) {
	.share-poster-btn { padding: 9px 14px; font-size: 14px; }
}
