/* 院校对比侧边栏 */
.compare-sidebar {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 999;
	display: flex;
	align-items: stretch;
	font-family: "Microsoft YaHei", sans-serif;
}

.compare-toggle {
	width: 39px;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-right: none;
	border-radius: 4px 0 0 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: -2px 0 8px rgba(0, 0, 0, 0.06);
	transition: background 0.3s;
	padding-top: 15px;
	padding-bottom: 15px;
}

.compare-toggle:hover {
	background: #fafafa;
}

.toggle-text {
	font-size: 15px;
	color: #ff6b08;
	line-height: 1.4;
	text-align: center;
	margin-bottom: 4px;
}

.toggle-arrow {
	font-size: 18px;
	color: #ff6b08;
	font-weight: bold;
}

.compare-content {
	width: 240px;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-right: none;
	border-radius: 4px 0 0 4px;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	max-height: 70vh;
	transition: width 0.3s ease;
}

.compare-content.show-table {
	width: 1100px;
	max-width: calc(100vw - 60px);
	min-height: 100vh;
}

.compare-header {
	padding: 12px 16px;
	border-bottom: 1px solid #f0f0f0;
}

.compare-title {
	font-size: 15px;
	font-weight: 600;
	color: #ff6b08;
}

.compare-body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 0;
}

.compare-body::-webkit-scrollbar {
	width: 4px;
}

.compare-body::-webkit-scrollbar-thumb {
	background: #d9d9d9;
	border-radius: 2px;
}

.compare-body::-webkit-scrollbar-track {
	background: transparent;
}

.compare-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	border-bottom: 1px dashed #f0f0f0;
	transition: background 0.2s;
}

.compare-item:hover {
	background: #fafafa;
}

.compare-item-name {
	font-size: 13px;
	color: #333;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.compare-item-remove {
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: #999;
	cursor: pointer;
	border-radius: 50%;
	transition: all 0.2s;
	margin-left: 8px;
	flex-shrink: 0;
}

.compare-item-remove:hover {
	background: #ff4d4f;
	color: #fff;
}

.compare-empty {
	padding: 30px 16px;
	text-align: center;
	color: #999;
	font-size: 13px;
}

.compare-footer {
	padding: 12px;
	border-top: 1px solid #f0f0f0;
	display: flex;
	gap: 8px;
}

.compare-btn-start {
	flex: 1;
	padding: 8px 12px;
	background: #ff6b08;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s;
}

.compare-btn-start:hover:not(:disabled) {
	background: #ee5a24;
	box-shadow: 0 2px 6px rgba(255, 107, 8, 0.3);
}

.compare-btn-start:disabled {
	background: #d9d9d9;
	cursor: not-allowed;
}

.compare-btn-clear {
	padding: 8px 12px;
	background: #fff;
	color: #666;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.3s;
}

.compare-btn-clear:hover:not(:disabled) {
	color: #ff4d4f;
	border-color: #ff4d4f;
}

.compare-btn-clear:disabled {
	color: #bfbfbf;
	border-color: #f0f0f0;
	cursor: not-allowed;
}

/* 对比页面样式 */
.compare-page {
	padding: 20px;
	background: #f5f5f5;
	min-height: calc(100vh - 200px);
}

.compare-page-header {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compare-page-title {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px 0;
}

.compare-page-desc {
	font-size: 13px;
	color: #999;
}

.compare-table-wrap {
	background: #fff;
	border-radius: 8px;
	overflow-x: auto;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compare-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.compare-table th,
.compare-table td {
	padding: 14px 12px;
	border: 1px solid #f0f0f0;
	text-align: center;
	vertical-align: middle;
}

.compare-table thead th {
	background: #fafafa;
	font-weight: 600;
	color: #333;
	position: sticky;
	top: 0;
	z-index: 10;
}

.compare-table .row-label {
	background: #fafafa;
	font-weight: 600;
	color: #666;
	text-align: left;
	width: 120px;
	min-width: 120px;
	position: sticky;
	left: 0;
	z-index: 5;
}

.compare-table .school-cell {
	min-width: 180px;
}

.compare-school-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin: 8px 0 4px 0;
}

.compare-school-logo {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid #f0f0f0;
}

.compare-school-tags {
	display: flex;
	gap: 4px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 4px;
}

.compare-school-tags .tag {
	font-size: 11px;
	padding: 1px 6px;
	border-radius: 2px;
	background: #f5f5f5;
	color: #666;
}

.compare-school-tags .tag-985 { background: #fff1f0; color: #cf1322; }
.compare-school-tags .tag-211 { background: #e6f7ff; color: #1890ff; }
.compare-school-tags .tag-dfc { background: #f9f0ff; color: #722ed1; }

.back-action-btn {
	font-size: 13px;
	padding: 5px 15px;
	border: 1px solid #ff6b08;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
	margin: 0 2px;
	transition: all 0.2s;
	color: #ff6b08;
}
.db-action-btn {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
	color: #333;
}
/* 右侧弹出对比面板 */
.compare-sidebar-panel {
	position: fixed;
	right: 0;
	top: 0;
	bottom: 0;
	width: 85%;
	max-width: 1200px;
	background: #fff;
	z-index: 10000;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	transform: translateX(0);
	transition: transform 0.3s ease;
}

.compare-sidebar-panel.closing {
	transform: translateX(100%);
}

.compare-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
	background: #fafafa;
}

.compare-sidebar-title {
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.compare-sidebar-close {
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.compare-sidebar-close:hover {
	background: #f0f0f0;
	color: #666;
}

.compare-sidebar-body {
	flex: 1;
	overflow: auto;
	padding: 20px;
	background: #f5f5f5;
}

.compare-sidebar-table {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.compare-sidebar-mask {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	opacity: 1;
	transition: opacity 0.3s ease;
}

.compare-sidebar-mask.closing {
	opacity: 0;
}
