/**
 * 分享弹窗样式（全站共用）
 * 加载：nav.php → static/css/ygw_share_dialog.css
 */

.ygw-share-modal {
	position: fixed;
	inset: 0;
	z-index: 12000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.ygw-share-modal[hidden] {
	display: none;
}

.ygw-share-mask {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(2px);
}

.ygw-share-dialog {
	position: relative;
	width: 100%;
	max-width: 880px;
	max-height: calc(100vh - 48px);
	overflow: auto;
	background: #14161b;
	border: 1px solid #262a33;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
	color: #e6e8ee;
}

.ygw-share-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #262a33;
}

.ygw-share-head-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	color: #e6e8ee;
}

.ygw-share-head-title svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	opacity: 0.9;
}

.ygw-share-close {
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #9aa1ad;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ygw-share-close:hover {
	background: #23262e;
	color: #fff;
}

.ygw-share-body {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 28px;
	padding: 22px 24px 26px;
}

/* ---------- 左侧：二维码 / 内容预览 ---------- */
.ygw-share-left {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	min-width: 0;
}

.ygw-share-qr-box {
	align-self: center;
	width: 216px;
	height: 216px;
	padding: 10px;
	background: #fff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ygw-share-qr-box canvas,
.ygw-share-qr-box img {
	width: 196px !important;
	height: 196px !important;
	display: block;
}

.ygw-share-qr-tip {
	align-self: center;
	font-size: 12px;
	color: #9aa1ad;
	text-align: center;
	margin: 0;
}

.ygw-share-link-box {
	display: flex;
	align-items: center;
	width: 100%;
	border: 1px solid #2c3040;
	background: #1b1e26;
	border-radius: 8px;
	padding: 9px 10px;
	min-width: 0;
}

.ygw-share-link-box input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	color: #b8bec9;
	font-size: 12px;
	letter-spacing: 0.2px;
	text-overflow: ellipsis;
}

.ygw-share-copy-btn {
	align-self: flex-start;
	min-width: 300px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 0;
	border-radius: 8px;
	background: #f5c451;
	color: #241b04;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.ygw-share-copy-btn:hover {
	filter: brightness(1.06);
}

.ygw-share-copy-btn:disabled {
	opacity: 0.65;
	cursor: default;
}

.ygw-share-copy-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* 分享卡片预览：引用图片 + 标题 + 网站名称 */
.ygw-share-preview {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px;
	border: 1px solid #262a33;
	border-radius: 10px;
	background: #191c23;
	min-width: 0;
}

.ygw-share-preview-img {
	width: 56px;
	height: 56px;
	flex: 0 0 56px;
	border-radius: 8px;
	object-fit: cover;
	background: #23262e;
}

.ygw-share-preview-info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ygw-share-preview-title {
	font-size: 13px;
	font-weight: 600;
	color: #e6e8ee;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-all;
}

.ygw-share-preview-site {
	font-size: 12px;
	color: #8b929e;
}

/* ---------- 右侧：奖励说明 ---------- */
.ygw-share-right {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ygw-share-reward-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #f5c451;
}

.ygw-share-reward-title svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.ygw-share-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ygw-share-step {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.ygw-share-step-no {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #6b5bd2;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ygw-share-step-title {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 600;
	color: #e6e8ee;
}

.ygw-share-step-desc {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #9aa1ad;
}

.ygw-share-step-desc em {
	font-style: normal;
	color: #e5484d;
	font-weight: 700;
}

.ygw-share-notice {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 11px 12px;
	border-radius: 8px;
	background: rgba(229, 72, 77, 0.12);
	border: 1px solid rgba(229, 72, 77, 0.35);
	color: #f07174;
	font-size: 12px;
}

.ygw-share-notice svg {
	width: 15px;
	height: 15px;
	fill: currentColor;
	flex: 0 0 15px;
}

/* 加载态 */
.ygw-share-loading {
	grid-column: 1 / -1;
	padding: 48px 0;
	text-align: center;
	color: #9aa1ad;
	font-size: 13px;
}

.ygw-share-loading::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 8px;
	vertical-align: -3px;
	border: 2px solid #3a3f4d;
	border-top-color: #f5c451;
	border-radius: 50%;
	animation: ygw-share-spin 0.8s linear infinite;
}

@keyframes ygw-share-spin {
	to { transform: rotate(360deg); }
}

.ygw-share-error {
	grid-column: 1 / -1;
	padding: 40px 0;
	text-align: center;
	color: #f07174;
	font-size: 13px;
}

@media (max-width: 720px) {
	.ygw-share-modal {
		padding: 12px;
		align-items: flex-end;
	}

	.ygw-share-dialog {
		max-height: calc(100vh - 24px);
		border-radius: 14px 14px 0 0;
	}

	.ygw-share-body {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 18px 16px 22px;
	}

	.ygw-share-qr-box {
		width: 180px;
		height: 180px;
	}

	.ygw-share-copy-btn {
		align-self: stretch;
		min-width: 0;
	}

	.ygw-share-qr-box canvas,
	.ygw-share-qr-box img {
		width: 160px !important;
		height: 160px !important;
	}
}
