/*
// 功能：插件管理样式文件
// 作者：启肯科技
// Q Q：328493711
// 微信：13738373177（同手机）
// 官网：http://www.qiken.com
// 说明：QKCMS-轻量级AI智能内容管理建站系统
// 版权：© 2025 温州启肯网络有限公司 保留所有权利，盗版必究。
*/


.pagination-btn {
	display: inline-block;
	padding: 0 14px;
	margin: 0 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	height: 36px;
	line-height: 36px;
	vertical-align: middle;
	box-sizing: border-box;
	transition: all 0.2s ease;
	text-align: center;
	cursor: pointer;
}

.pagination-btn:hover:not(.disabled):not(.active) {
	background-color: #f5f5f5;
	border-color: #ccc;
}

.pagination-btn.active {
	background-color: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
}

.pagination-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: #f5f5f5;
}

#plugin-page-numbers .pagination-btn {
	width: 38px;
}

.pagination-container,
.plugin-pagination-container {
	margin-top: 20px;
	padding-top: 20px;
}

.pagination-wrapper,
.plugin-pagination-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	flex-direction: row;
}

.pagination-buttons,
.plugin-pagination-buttons {
	display: flex;
	gap: 5px;
	align-items: center;
	flex-direction: row;
}

.plugin-page-numbers {
	display: flex;
	gap: 5px;
	align-items: center;
	flex-direction: row;
}

.pagination-settings,
.plugin-pagination-settings {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-direction: row;
}

.pagination-settings span,
.plugin-pagination-settings span {
	font-size: 14px;
	white-space: nowrap;
	display: inline-block;
}

select.posts-per-page-select,
select.plugin-posts-per-page-select {
	width: 85px !important;
	min-width: 85px !important;
	max-width: 85px !important;
	appearance: none !important;
	background-repeat: no-repeat !important;
	background-position: right 8px center !important;
	background-size: 16px !important;
	padding-right: 32px !important;
	padding-left: 10px !important;
	height: 36px !important;
	font-size: 14px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	background-color: #fff !important;
}

.plugin-type-select {
	width: 100px !important;
	min-width: 100px !important;
	max-width: 100px !important;
	appearance: none !important;
	background-repeat: no-repeat !important;
	background-position: right 8px center !important;
	background-size: 16px !important;
	padding-right: 32px !important;
	padding-left: 10px !important;
	height: 39px !important;
	font-size: 14px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	background-color: #fff !important;
}

.plugin-card-container {
	position: relative;
}

.plugin-drag-handle-element {
	display: none;
}

.idcss {
	position: absolute;
	right: 10px;
	bottom: 10px;
	top: auto;
	left: auto;
	transform: rotate(0deg);
	opacity: 0.4;
	font-size: 12px;
	font-weight: bold;
	pointer-events: none;
}

.plugin-tab-link {
	text-decoration: none;
}

.plugin-tab-link-active {
	color: var(--primary-color);
}

.plugin-tab-link-inactive {
	color: inherit;
}

.plugin-tab-link-cloud {
	margin-left: 20px;
}

.plugin-modal-footer {
	display: flex !important;
	justify-content: flex-end !important;
	gap: 10px;
	padding: 16px 35px;
	border-top: 1px solid #e0e0e0;
}

#toast-container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.toast {
	background-color: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	max-width: 400px;
	white-space: normal;
	text-align: center;
	line-height: 1.5;
	opacity: 0;
	transform: translateX(100%);
	transition: opacity 0.3s ease, transform 0.3s ease;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.toast.toast-visible {
	opacity: 1;
	transform: translateX(0);
}

.toast.toast-success,
.toast.toast-warning,
.toast.toast-info {}

.toast.toast-error {
	background-color: rgba(255, 69, 0, 0.85);
}

.toast.toast-info {
	background-color: var(--toast-bg);
}

#plugin-confirm-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.plugin-confirm-message {
	font-size: 16px;
	color: #333;
	margin-bottom: 20px;
	text-align: center;
}

.plugin-confirm-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
}

.plugin-confirm-btn {
	padding: 8px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.plugin-cancel-btn {
	background-color: #f1f1f1;
	color: #333;
}

.plugin-cancel-btn:hover {
	background-color: #e0e0e0;
}

.plugin-confirm-buttons .plugin-confirm-btn {
	background-color: #F03;
	color: white;
}

.plugin-confirm-buttons .plugin-confirm-btn:hover {
	background-color: #F03;
	color: white;
	filter: alpha(opacity:80);
	opacity: 0.8;
}

#plugin-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	min-height: 200px;
	width: 100%;
}

.plugin-grid-container {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	min-height: 200px;
	width: 100%;
}

.no-plugins {
	grid-column: 1 / -1;
	min-height: 280px;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	border: 1px dashed #e5e7eb;
	border-radius: 10px;
	background: #fff;
	color: #6b7280;
	box-sizing: border-box;
}

.no-plugins-icon {
	width: 66px;
	height: 66px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f3f4f6;
	color: #94a3b8;
	margin-bottom: 14px;
}

.no-plugins-icon svg {
	width: 34px;
	height: 34px;
	display: block;
}

.no-plugins-text {
	font-size: 18px;
	color: #94a3b8;
}

.plugin-card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	height: 172px;
	min-height: 172px;
	max-height: 172px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
	padding: 20px;
	margin-bottom: 2px;
	position: relative;
	overflow: visible;
	transition: all 0.3s ease;
	opacity: 1;
	cursor: move;
	min-width: 0;
	box-sizing: border-box;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.plugin-card:hover {
	border-color: var(--primary-color);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@keyframes pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.6);
	}

	70% {
		box-shadow: 0 0 0 12px rgba(124, 58, 237, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
	}
}

.plugin-card.dragging {
	opacity: 1 !important;
	transform: rotate(5deg);
	z-index: 100;
	animation: pulse 2s infinite;
}

.plugin-drag-handle {
	position: absolute;
	top: 8px;
	left: 8px;
	cursor: move;
	color: #999;
	font-size: 12px;
	user-select: none;
}

.plugin-drag-handle:hover {
	color: #666;
}

.plugin-card:active .plugin-drag-handle {
	cursor: grabbing;
}

.plugin-thumbnail-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 20px;
	flex-shrink: 0;
}

.plugin-thumbnail {
	width: 80px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-shrink: 0;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	border: 0px solid #f3f4f6;
	background-color: #e16464;
	margin-bottom: 10px;
}

.plugin-thumbnail-free {
	background-color: #10B981;
}

.plugin-thumbnail-licensed {
	background-color: #3B82F6;
}

.plugin-thumbnail-licensed .plugin-thumbnail-text {
	font-size: 18px;
}

.plugin-thumbnail-text {
	font-size: 18px;
	font-weight: bold;
	color: white;
	text-align: center;
	padding: 0 10px;
}

.plugin-thumbnail:not(.plugin-thumbnail-free):not(.plugin-thumbnail-licensed) .plugin-thumbnail-text {
	font-size: 18px;
}

.plugin-content {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.plugin-title-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.plugin-title-left {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1;
}

.plugin-title-meta {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 0 0 auto;
}

.plugin-title-name {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	flex: 1;
}

.plugin-title-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 22px;
	padding: 0 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	white-space: nowrap;
	flex: 0 0 auto;
}

.plugin-title-chip-free {
	background: rgba(34, 197, 94, 0.12);
	border: 1px solid rgba(34, 197, 94, 0.30);
	color: #15803d;
}

.plugin-title-chip-licensed {
	background: rgba(245, 158, 11, 0.14);
	border: 1px solid rgba(245, 158, 11, 0.38);
	color: #b45309;
}

.plugin-title-chip-price {
	background: rgba(255, 80, 0, 0.10);
	border: 1px solid rgba(255, 80, 0, 0.32);
	color: #ff5000;
}

.plugin-title-row h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #1F2937;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.plugin-title-name h3 {
	flex: 0 1 auto;
	max-width: calc(100% - 27px);
}

.plugin-favorite-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: none;
	background: transparent;
	padding: 0;
	cursor: pointer;
	color: #cbd5e1;
	flex: 0 0 auto;
}

.plugin-favorite-btn svg {
	width: 20px;
	height: 20px;
	display: block;
	margin-top: 2px;
}

.plugin-favorite-btn:hover {
	color: #94a3b8;
}

.plugin-favorite-btn.is-favorite {
	color: #f59e0b;
}

.plugin-favorite-btn.is-favorite:hover {
	color: #f59e0b;
}

.plugin-type-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 22px;
	padding: 0 8px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #6B7280;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	white-space: nowrap;
	border: 1px solid rgba(148, 163, 184, 0.35);
}

.plugin-type-badge-tool {
	background: rgba(96, 125, 139, 0.12);
	border-color: rgba(96, 125, 139, 0.30);
	color: #607d8b;
}

.plugin-type-badge-plugin {
	background: rgba(96, 125, 139, 0.12);
	border-color: rgba(96, 125, 139, 0.30);
	color: #607d8b;
}

.plugin-type-badge-top {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #f3f4f6;
	color: #6B7280;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 12px;
	margin: 0;
	font-weight: 500;
	transform: none;
	box-shadow: none;
}

.plugin-description {
	margin-bottom: 16px;
}

.plugin-description p {
	margin: 0;
	font-size: 14px;
	color: #6B7280;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.plugin-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: nowrap;
	width: 100%;
	justify-content: flex-start;
}

.plugin-actions .btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 32px;
	padding: 0 10px;
	border-radius: 4px;
	border: 1px solid;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 13px;
	gap: 4px;
	text-decoration: none;
	white-space: nowrap;
}

.plugin-actions .btn-website {
	border-color: #60a5fa;
	color: #2563eb;
	background: #dbeafe;
}

.plugin-actions .btn-website:hover {
	background: #bfdbfe;
	transform: translateY(-1px);
}

.plugin-actions .btn-settings {
	border-color: #a78bfa;
	color: #7c3aed;
	background: #ede9fe;
}

.plugin-actions .btn-settings:hover {
	background: #ddd6fe;
	transform: translateY(-1px);
}

.plugin-actions .btn-uninstall {
	border-color: #f87171;
	color: #dc2626;
	background: #fee2e2;
}

.plugin-actions .btn-uninstall:hover {
	background: #fecaca;
	transform: translateY(-1px);
}

.plugin-actions .btn-copy-shortcode {
	border-color: #34d399;
	color: #059669;
	background: #d1fae5;
}

.plugin-actions .btn-copy-shortcode:hover {
	background: #a7f3d0;
	transform: translateY(-1px);
}

.plugin-actions svg {
	width: 14px;
	height: 14px;
}

@media (max-width: 1100px) and (min-width: 769px) {
	#plugin-list,
	.plugin-grid-container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width:768px) {
	.qk-ext-filter-bar {
		display: none !important;
	}

	#plugin-list {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.plugin-actions {
		flex-wrap: nowrap;
	}

	.plugin-actions .btn {
		flex: 0 0 auto;
		width: 60px;
		padding: 0 8px;
	}
	
	.plugin-actions > a.btn:nth-child(n+4),
	.plugin-actions > button.btn:nth-child(n+4) {
		display: none !important;
	}

	.plugin-card {
		flex-direction: row;
		align-items: flex-start;
		padding: 16px;
	}

	.plugin-thumbnail-container {
		margin-bottom: 0;
		margin-right: 16px;
	}

	.plugin-content {
		width: 100%;
	}

	.plugin-title-row {
		flex-direction: row;
		align-items: center;
		gap: 8px;
		flex-wrap: wrap;
	}

	.plugin-type-badge {
		margin-left: 8px;
		margin-top: 0;
	}

	.plugin-thumbnail {
		width: 70px;
		height: 70px;
	}

	.plugin-thumbnail-text {
		font-size: 16px;
	}

	.plugin-thumbnail:not(.plugin-thumbnail-free) .plugin-thumbnail-text {
		font-size: 18px;
	}

	.plugin-title-row h3 {
		font-size: 16px;
	}

	.plugin-description p {
		font-size: 13px;
	}

	.plugin-pagination-container .pagination-buttons {
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 5px !important;
		flex-wrap: wrap !important;
	}

	.plugin-pagination-container .pagination-buttons .pagination-btn {
		display: inline-block !important;
		min-width: 36px !important;
		height: 36px !important;
		line-height: 36px !important;
		text-align: center !important;
		font-size: 14px !important;
		border: 1px solid #ddd !important;
		border-radius: 4px !important;
		background-color: #fff !important;
		color: #333 !important;
	}

	.plugin-pagination-container .pagination-buttons .pagination-btn.active {
		background-color: var(--primary-color) !important;
		color: #fff !important;
		border-color: var(--primary-color) !important;
	}

	.plugin-pagination-container #plugin-first-page,
	.plugin-pagination-container #plugin-last-page {
		display: inline-block !important;
	}

	.plugin-pagination-container .plugin-page-select {
		display: inline-block !important;
	}
}

.modal-content.tool-plugin {
	min-width: 280px;
	max-width: 90%;
	max-height: 90vh;
	border-radius: 8px;
	overflow: hidden;
}

.modal-content.tool-plugin .modal-body {
	padding: 15px;
	max-height: calc(90vh - 100px);
	overflow: hidden;
}

.modal-content.tool-plugin .modal-footer {
	display: none !important;
}

.plugin-iframe {
	min-height: 200px;
	width: 100%;
	display: block;
	overflow: hidden;
	box-sizing: border-box;
	text-align: center !important;
}

.modal-close {
	width: 28px;
	height: 28px;
	border: none;
	background: #dbdbdb;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
}

.modal-close::before,
.modal-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 2px;
	background: #fff;
	transform: translate(-50%, -50%) rotate(45deg);
	transition: all 0.3s ease;
}

.modal-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover {
	background: #ff5252;
	transform: rotate(90deg);
}

.modal-close:hover::before,
.modal-close:hover::after {
	width: 14px;
}

.modal-screenshot {
	background: transparent;
	border: none;
	color: #6B7280;
	cursor: pointer;
	margin-left: 12px;
	border-radius: 6px;
	transition: all 0.3s ease;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin-bottom: 4px;
	transform: translateY(4px);
}

.modal-screenshot:hover {
	background: rgba(107, 114, 128, 0.1);
	color: #3B82F6;
	transform: scale(1.05);
}

.modal-screenshot svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
	transition: all 0.3s ease;
}

.modal-screenshot:hover svg {
	stroke: #3B82F6;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #e0e0e0;
	background: #fff;
}

.modal-title {
	font-size: 18px;
	font-weight: 600;
	color: #1F2937;
	margin: 0;
	line-height: 1.2;
}
