/*!
 * mjjzz-modal.css —— 全站弹窗头部统一优化
 * 2026-11-27
 * 解决的问题：
 *   1) $.alert 生成的弹窗，左上角有一个游离在标题上方的 “✓”；
 *   2) 关闭按钮显示成 “✕ + 一道多余斜杠” 的重影。
 * 原因：
 *   1) 模板结构是 <span>✓</span><h4>标题</h4>，span 是 inline、h4 是 block，
 *      两者换行成两行，且主题迁到 Bootstrap 5 时丢了 .xn-alert-modal__* 的样式；
 *   2) Bootstrap 5 的 .btn-close 本身用 background-image 画了 ✕，
 *      模板里又额外塞了一个 <span>&times;</span> 文字，两者叠在一起。
 */

/* ---------- 1. 头部布局：标题居左、关闭居右、底部细分隔线 ---------- */
.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border-bottom: 1px solid rgba(0, 0, 0, .07);
	border-top-left-radius: var(--bs-modal-border-radius, .5rem);
	border-top-right-radius: var(--bs-modal-border-radius, .5rem);
}

.modal-header .modal-title {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	color: #1f2937;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- 2. 提示框（$.alert）：✓ 做成圆形徽标，与标题同一行 ---------- */
.xn-alert-modal__titlewrap {
	display: flex;
	align-items: center;
	gap: 9px;
	flex: 1 1 auto;
	min-width: 0;
}

.xn-alert-modal__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #16a34a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 2px 6px rgba(22, 163, 74, .3);
}

/* ---------- 3. 搜索弹窗：标签页横向不换行 ---------- */
.mjj-search-modal__tabs {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

/* ---------- 4. 关闭按钮：只保留 Bootstrap 5 的 SVG 图标，去掉 &times; 重影 ---------- */
.modal-header .btn-close {
	float: none !important;
	margin: 0 0 0 auto !important;
	padding: .28em !important;
	flex: 0 0 auto;
	opacity: .45;
	border-radius: 6px;
	transition: opacity .15s ease, background-color .15s ease;
}

.modal-header .btn-close > span {
	display: none !important;
}

.modal-header .btn-close:hover {
	opacity: .8;
	background-color: rgba(0, 0, 0, .05);
}

.modal-header .btn-close:focus {
	opacity: .8;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(31, 73, 119, .15);
}

/* ---------- 5. 提示框正文与底部按钮（主题迁移后同样丢失的样式） ---------- */
.xn-alert-modal__message {
	font-size: 15px;
	line-height: 1.75;
	color: #374151;
	word-break: break-word;
}

.xn-alert-modal .modal-footer {
	padding: 12px 16px;
	border-top: 1px solid rgba(0, 0, 0, .06);
}

.xn-alert-modal__btn {
	min-width: 88px;
	padding: 7px 20px;
	border: 1px solid #d7dde5;
	border-radius: 6px;
	background: #f8fafc;
	color: #334155;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.xn-alert-modal__btn:hover {
	background: #eef2f7;
	border-color: #c6d0dc;
	color: #1f2937;
}

.xn-alert-modal__btn:active {
	background: #e5ebf2;
}

.xn-alert-modal__btn:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 3px rgba(31, 73, 119, .15);
}

/* ---------- 6. 移动端微调 ---------- */
@media (max-width: 575.98px) {
	.modal-header {
		padding: 12px 14px;
		gap: 8px;
	}
	.modal-header .modal-title {
		font-size: 16px;
	}
}
