/* Zibll 硬件密钥登录 */

.hwk-card {
	position: relative;
	margin-top: 20px;
	padding: 20px;
	border-radius: 10px;
	background: var(--main-bg, #fff);
	border: 1px solid rgba(128, 128, 128, .16);
	box-sizing: border-box;
	color: inherit;
}

.hwk-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.hwk-head-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.hwk-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.hwk-sub {
	font-size: 12px;
	line-height: 1.6;
	color: var(--muted-color, #8a8f99);
}

.hwk-pill {
	flex: none;
	font-size: 11px;
	line-height: 1;
	padding: 5px 8px;
	border-radius: 999px;
	color: #2b7ff3;
	background: rgba(43, 127, 243, .1);
	border: 1px solid rgba(43, 127, 243, .25);
	letter-spacing: .3px;
}

.hwk-list {
	display: flex;
	flex-direction: column;
}

.hwk-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid rgba(128, 128, 128, .12);
}

.hwk-item:first-child {
	border-top: 0;
	padding-top: 4px;
}

.hwk-item-icon {
	flex: none;
	width: 36px;
	height: 36px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2b7ff3;
	background: rgba(43, 127, 243, .09);
	font-size: 15px;
}

.hwk-item-main {
	flex: 1;
	min-width: 0;
}

.hwk-item-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	word-break: break-all;
}

.hwk-tag {
	font-size: 11px;
	font-weight: 400;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 4px;
	color: var(--muted-color, #8a8f99);
	background: rgba(128, 128, 128, .1);
	white-space: nowrap;
}

.hwk-item-meta {
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.6;
	color: var(--muted-color, #8a8f99);
	word-break: break-all;
}

.hwk-item-actions {
	flex: none;
	display: flex;
	gap: 10px;
}

.hwk-link {
	border: 0;
	background: none;
	padding: 2px;
	font-size: 12px;
	color: var(--muted-color, #6b7280);
	cursor: pointer;
}

.hwk-link:hover {
	color: #2b7ff3;
}

.hwk-danger:hover {
	color: #e5484d;
}

.hwk-add {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed rgba(128, 128, 128, .18);
}

.hwk-input {
	flex: 1;
	min-width: 0;
	height: 38px;
	padding: 0 12px;
	border-radius: 7px;
	border: 1px solid rgba(128, 128, 128, .25);
	background: transparent;
	color: inherit;
	font-size: 13px;
	outline: none;
	box-sizing: border-box;
}

.hwk-input:focus {
	border-color: #2b7ff3;
	box-shadow: 0 0 0 2px rgba(43, 127, 243, .12);
}

.hwk-add-btn {
	flex: none;
	height: 38px;
	line-height: 36px;
	padding: 0 16px;
	font-size: 13px;
	cursor: pointer;
}

.hwk-add-btn[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

.hwk-empty {
	padding: 18px 10px;
	text-align: center;
	color: var(--muted-color, #8a8f99);
}

.hwk-empty i {
	font-size: 22px;
	opacity: .35;
	margin-bottom: 8px;
	display: block;
}

.hwk-empty p {
	margin: 0 0 4px;
	font-size: 13px;
}

.hwk-empty span {
	font-size: 11px;
	opacity: .8;
}

.hwk-loading {
	padding: 16px 4px;
	font-size: 12px;
	color: var(--muted-color, #8a8f99);
}

.hwk-msg {
	margin: 10px 0 0;
	min-height: 18px;
	font-size: 12px;
	line-height: 1.6;
	word-break: break-all;
}

.hwk-msg:empty {
	display: none;
}

.hwk-msg.hwk-error {
	color: #e5484d;
}

.hwk-msg.hwk-ok {
	color: #17a673;
}

.hwk-msg.hwk-loading {
	color: #2b7ff3;
}

.hwk-note {
	margin: 12px 0 0;
	font-size: 11px;
	line-height: 1.7;
	color: var(--muted-color, #8a8f99);
	opacity: .9;
}

/* 登录弹窗 */

.hwk-login-block {
	margin-top: 6px;
}

.hwk-sep {
	position: relative;
	text-align: center;
	margin: 16px 0 12px;
	color: var(--muted-color, #9aa1ab);
	font-size: 12px;
}

.hwk-sep::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: rgba(128, 128, 128, .18);
}

.hwk-sep span {
	position: relative;
	display: inline-block;
	padding: 0 10px;
	background: var(--main-bg, #fff);
}

.hwk-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	cursor: pointer;
}

.hwk-login-btn[disabled] {
	opacity: .7;
	cursor: wait;
}

/* 默认登录页 */

.hwk-wplogin {
	margin: 18px 0 6px;
}

.hwk-wplogin-sep {
	position: relative;
	text-align: center;
	color: #8a8f99;
	font-size: 12px;
	margin: 0 0 12px;
}

.hwk-wplogin-sep::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: #dcdcde;
}

.hwk-wplogin-sep span {
	position: relative;
	background: #f0f0f1;
	padding: 0 10px;
}

.hwk-full {
	width: 100%;
	text-align: center;
}

.hwk-shortcode-login {
	margin: 10px 0;
}

/* 暗色模式兜底（Zibll 未定义 --main-bg 时） */
.dark-theme .hwk-card,
body.dark-theme .hwk-card,
.hwk-dark .hwk-card {
	background: #1b1c21;
	border-color: rgba(255, 255, 255, .09);
}

.dark-theme .hwk-sep span,
body.dark-theme .hwk-sep span,
.hwk-dark .hwk-sep span {
	background: #1b1c21;
}

.dark-theme .hwk-input,
body.dark-theme .hwk-input {
	border-color: rgba(255, 255, 255, .16);
}

@media (max-width: 640px) {	.hwk-card {
		padding: 16px;
	}

	.hwk-item {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.hwk-item-actions {
		width: 100%;
		justify-content: flex-end;
	}

	.hwk-add {
		flex-direction: column;
	}

	.hwk-add-btn {
		width: 100%;
	}
}

/* 非 Zibll 主题下的按钮兜底样式 */
body:not(.wp-theme-zibll) .hwk-login-btn,
body:not(.wp-theme-zibll) .hwk-add-btn {
	background: #2b7ff3;
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
}

body:not(.wp-theme-zibll) .hwk-add-btn {
	height: 38px;
	padding: 0 16px;
}
