/* 分享卡片弹窗 */

.doumao-share-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.7);
	-webkit-tap-highlight-color: transparent;
}

.doumao-share-modal.is-open {
	display: flex;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* 弹窗打开时锁定页面滚动 */
html.doumao-share-opened,
html.doumao-share-opened body {
	overflow: hidden;
}

.doumao-share-modal-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	max-width: 352px;
	margin: auto;
	padding: 40px 16px;
	box-sizing: border-box;
}

/* 卡片 + 关闭按钮 */
.doumao-share-modal-figure {
	position: relative;
	width: 100%;
	max-width: 320px;
	display: flex;
}

.doumao-share-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 320px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
	text-align: left;
	overflow: hidden;
	animation: doumao-share-in 0.18s ease-out;
}

/* 卡片本身作为焦点落点 */
.doumao-share-modal-dialog:focus {
	outline: none;
}

@keyframes doumao-share-in {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.doumao-share-modal-dialog {
		animation: none;
	}
}

/* 关闭按钮 */
.doumao-share-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.doumao-share-close span {
	position: relative;
	display: block;
	width: 10px;
	height: 10px;
}

.doumao-share-close span::before,
.doumao-share-close span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 13px;
	height: 1.5px;
	margin: -0.75px 0 0 -6.5px;
	background: currentColor;
	border-radius: 1px;
}

.doumao-share-close span::before {
	transform: rotate(45deg);
}

.doumao-share-close span::after {
	transform: rotate(-45deg);
}

.doumao-share-close:hover,
.doumao-share-close:focus {
	background: rgba(255, 255, 255, 0.3);
	color: #fff;
}

.doumao-share-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}


.doumao-share-modal-header {
	background: #1d2327;
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.doumao-share-logo {
	height: 60px;
	width: 60px;
	border-radius: 50%;
	margin: 0 10px;
	object-fit: cover;
}

.doumao-share-modal-body {
	padding: 24px 32px 0;
}

.doumao-share-title,
.doumao-share-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
}

.doumao-share-title:empty,
.doumao-share-excerpt:empty {
	display: none;
}

.doumao-share-title {
	font-size: 20px;
	margin: 0 0 8px;
	font-weight: 600;
	line-height: 1.4;
	color: #1d2327;
	-webkit-line-clamp: 2;
}

.doumao-share-excerpt {
	font-size: 15px;
	color: #666;
	margin-bottom: 8px;
	line-height: 1.7;
	-webkit-line-clamp: 5;
}

.doumao-share-divider {
	width: 90%;
	margin: 16px 5% 0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.doumao-share-divider::before,
.doumao-share-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	border-bottom: 1px dashed #ccc;
}

.doumao-share-name {
	padding: 0 12px;
	font-size: 13px;
	color: #999;
	background: #fff;
	white-space: nowrap;
	position: relative;
	z-index: 1;
}

.doumao-share-modal-footer {
	padding: 12px 24px 18px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.doumao-share-info {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.doumao-share-tip {
	font-size: 13px;
	color: #333;
	text-align: center;
	line-height: 1.5;
}

.doumao-share-site {
	text-align: center;
	font-size: 12px;
	color: #999;
	margin-top: 2px;
}

.doumao-share-qrcode {
	flex: none;
	height: 100px;
	width: 100px;
	background-size: 100px 100px;
	background-position: center center;
	background-repeat: no-repeat;
}

.doumao-share-qrcode img {
	display: block;
	margin-top: 15px;
	margin-left: 15px;
	width: 72px;
	height: 72px;
}

/* 卡片下方的下载按钮 */
.doumao-share-download {
	text-align: center;
}

.doumao-share-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 100px;
	padding: 6px 10px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #53595d;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.doumao-share-download-btn:hover {
	background: #f5f5f5;
	color: #1d2327;
	transform: translateY(-1px);
}

.doumao-share-download-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.doumao-share-download-btn[disabled] {
	opacity: 0.8;
	cursor: wait;
	transform: none;
}

@media (max-width: 480px) {
	.doumao-share-modal-wrap {
		padding: 24px 16px;
	}

	.doumao-share-modal-dialog {
		max-width: min(320px, calc(100vw - 32px));
	}

	.doumao-share-modal-body {
		padding: 20px 24px 0;
	}

	.doumao-share-modal-footer {
		padding: 12px 20px 16px;
	}
}
