/* ============================================================================
 * /work-studio 作品管理台样式
 * 只补列表、工具条、编辑器容器；表单控件沿用 studio.css。
 * ========================================================================== */

.lzd-admin {
	--adm-line: rgba(255, 255, 255, 0.09);
	--adm-line-strong: rgba(255, 255, 255, 0.16);
	--adm-surface: #101014;
	--adm-surface-2: #15151a;
	--adm-ink: #e9e5dd;
	--adm-ink-dim: #9b968c;
	--adm-gold: #cbbc9c;
	padding-bottom: 96px;
}

.lzd-admin__head {
	display: flex;
	flex-wrap: wrap;
	gap: 24px 40px;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--adm-line);
}

.lzd-admin__headtext {
	min-width: 260px;
	flex: 1 1 320px;
}

.lzd-admin .lzd-studio__title {
	margin: 0 0 8px;
}

.lzd-admin__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.lzd-admin__quicklink {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--adm-line-strong);
	border-radius: 2px;
	color: var(--adm-ink-dim);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-decoration: none;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lzd-admin__quicklink:hover,
.lzd-admin__quicklink:focus-visible {
	color: #0a0a0c;
	background: var(--adm-gold);
	border-color: var(--adm-gold);
}

.lzd-admin__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 24px 0 20px;
}

.lzd-admin__search {
	max-width: 260px;
	flex: 1 1 180px;
}

.lzd-admin__count {
	margin-left: auto;
	color: var(--adm-ink-dim);
	font-size: 12px;
	letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------ 列表 */
.lzd-admin__list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--adm-line);
}

.lzd-admin__loading {
	padding: 40px 0;
	color: var(--adm-ink-dim);
	font-size: 14px;
}

.lzd-item {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 20px;
	padding: 16px 0;
	border-bottom: 1px solid var(--adm-line);
}

.lzd-item[hidden] {
	display: none;
}

.lzd-item__thumb {
	width: 132px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #17171c;
	border-radius: 2px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lzd-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lzd-item__nothumb {
	color: #6b675f;
	font-size: 11px;
	letter-spacing: 0.1em;
}

.lzd-item__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--adm-ink);
	overflow-wrap: anywhere;
}

.lzd-item__main {
	min-width: 0;
}

.lzd-item__meta > span {
	max-width: 100%;
	overflow-wrap: anywhere;
}

.lzd-item__meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 12px;
	color: var(--adm-ink-dim);
}

.lzd-tag {
	padding: 1px 7px;
	border: 1px solid var(--adm-line-strong);
	border-radius: 2px;
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--adm-gold);
}

.lzd-item__status {
	font-size: 11px;
	letter-spacing: 0.06em;
	padding: 4px 9px;
	border-radius: 2px;
	white-space: nowrap;
}

.lzd-item__status--publish {
	color: #9ec9a4;
	background: rgba(158, 201, 164, 0.12);
}

.lzd-item__status--draft {
	color: #cfae7a;
	background: rgba(207, 174, 122, 0.12);
}

.lzd-item__ops {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.lzd-op {
	appearance: none;
	background: transparent;
	border: 1px solid var(--adm-line-strong);
	border-radius: 2px;
	padding: 6px 11px;
	font-size: 12px;
	line-height: 1;
	color: var(--adm-ink-dim);
	text-decoration: none;
	cursor: pointer;
	transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.lzd-op:hover,
.lzd-op:focus-visible {
	color: var(--adm-ink);
	border-color: var(--adm-gold);
}

.lzd-op--edit {
	color: var(--adm-gold);
	border-color: rgba(203, 188, 156, 0.45);
}

.lzd-op--edit:hover {
	background: rgba(203, 188, 156, 0.12);
}

.lzd-op--danger:hover {
	color: #e28b7f;
	border-color: #e28b7f;
}

/* ---------------------------------------------------------------- 编辑器 */
.lzd-admin__editor {
	margin-top: 40px;
	padding: 28px 28px 32px;
	background: var(--adm-surface);
	border: 1px solid var(--adm-line);
	border-radius: 3px;
	scroll-margin-top: 90px;
}

.lzd-admin__editor[hidden] {
	display: none;
}

.lzd-admin__editor-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.lzd-admin__editor-title {
	margin: 0;
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--adm-ink);
}

.lzd-admin__close {
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--adm-ink-dim);
	font-size: 24px;
	line-height: 1;
	padding: 4px 8px;
	cursor: pointer;
}

.lzd-admin__close:hover {
	color: var(--adm-ink);
}

.lzd-admin__editing-tip {
	margin: 0 0 22px;
	padding: 10px 14px;
	background: rgba(203, 188, 156, 0.08);
	border-left: 2px solid var(--adm-gold);
	font-size: 12px;
	line-height: 1.7;
	color: var(--adm-ink-dim);
}

.lzd-admin__editing-tip a {
	color: var(--adm-gold);
	text-decoration: none;
	border-bottom: 1px solid rgba(203, 188, 156, 0.35);
}

.lzd-admin__row2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
}

.lzd-admin__row3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

.lzd-admin__poster {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 12px;
	padding: 12px;
	background: var(--adm-surface-2);
	border: 1px solid var(--adm-line);
	border-radius: 2px;
}

.lzd-admin__poster img {
	width: 148px;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 2px;
	display: block;
}

.lzd-admin__poster-note {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--adm-gold);
}

.lzd-admin__poster .lzd-form__help {
	margin: 0;
}

/* ------------------------------------------------------------------ 提示 */
.lzd-admin__toast {
	position: fixed;
	left: 50%;
	bottom: 36px;
	transform: translateX(-50%);
	z-index: 60;
	padding: 12px 22px;
	background: #1b1b21;
	border: 1px solid var(--adm-gold);
	border-radius: 2px;
	color: var(--adm-ink);
	font-size: 13px;
	letter-spacing: 0.03em;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.lzd-admin__toast[hidden] {
	display: none;
}

.lzd-admin__toast.is-bad {
	border-color: #e28b7f;
}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 860px) {
	.lzd-item {
		grid-template-columns: 96px minmax(0, 1fr);
		grid-template-areas:
			"thumb main"
			"ops    ops";
		row-gap: 12px;
	}

	.lzd-item__thumb { grid-area: thumb; width: 96px; align-self: start; }
	.lzd-item__main  { grid-area: main; }
	/* 状态徽标落在标题行右侧：只让标题让位，元信息仍用全宽 */
	.lzd-item__title { padding-right: 62px; }
	.lzd-item__status { grid-area: main; justify-self: end; align-self: start; }
	.lzd-item__ops   { grid-area: ops; justify-content: flex-start; }

	.lzd-admin__editor { padding: 20px 16px 24px; }
	.lzd-admin__search { max-width: none; }
	.lzd-admin__count { margin-left: 0; }
}

/* ------------------------------------------------------- 表单控件的深色化
 * studio.css 里的输入控件是浅底，放在管理台的深色面板上会刺眼。
 * 这里统一改成深底 + 发丝边框，只作用于管理台内部。
 */
.lzd-admin .lzd-input,
.lzd-admin .lzd-textarea,
.lzd-admin .lzd-file,
.lzd-admin .lzd-admin__search {
	background: #15151a;
	border: 1px solid var(--adm-line-strong);
	border-radius: 2px;
	color: var(--adm-ink);
	font-size: 14px;
	padding: 10px 12px;
	width: 100%;
	transition: border-color 0.18s, background 0.18s;
}

.lzd-admin .lzd-textarea {
	line-height: 1.7;
	resize: vertical;
	font-family: inherit;
}

.lzd-admin .lzd-input::placeholder,
.lzd-admin .lzd-textarea::placeholder,
.lzd-admin .lzd-admin__search::placeholder {
	color: #6d685f;
	opacity: 1;
}

.lzd-admin .lzd-input:focus,
.lzd-admin .lzd-textarea:focus,
.lzd-admin .lzd-admin__search:focus {
	outline: none;
	border-color: var(--adm-gold);
	background: #101014;
}

/* 文件选择控件 */
.lzd-admin .lzd-file {
	padding: 8px 10px;
	cursor: pointer;
	font-size: 13px;
	color: var(--adm-ink-dim);
}

.lzd-admin .lzd-file::file-selector-button {
	appearance: none;
	background: transparent;
	border: 1px solid var(--adm-line-strong);
	border-radius: 2px;
	color: var(--adm-gold);
	padding: 6px 12px;
	margin-right: 12px;
	font-size: 12px;
	letter-spacing: 0.03em;
	cursor: pointer;
	transition: background 0.18s, border-color 0.18s;
}

.lzd-admin .lzd-file::file-selector-button:hover {
	background: rgba(203, 188, 156, 0.12);
	border-color: var(--adm-gold);
}

/* 数字输入框去掉浏览器默认的上下箭头底色差异 */
.lzd-admin input[type="number"] {
	appearance: textfield;
}

/* GeneratePress 的 `input[type="text"]:focus` 规则会把输入文字染回深灰，
 * 在深底上等于看不见。这里对全部状态显式压住颜色。 */
.lzd-admin .lzd-input,
.lzd-admin .lzd-textarea,
.lzd-admin .lzd-file,
.lzd-admin .lzd-admin__search,
.lzd-admin .lzd-input:hover,
.lzd-admin .lzd-textarea:hover,
.lzd-admin .lzd-input:focus,
.lzd-admin .lzd-textarea:focus,
.lzd-admin .lzd-admin__search:focus {
	color: #e9e5dd !important;
	-webkit-text-fill-color: #e9e5dd;
}

/* ============================================================================
 * 花絮剧照（详情页底部横排轮播的素材位）
 * ========================================================================== */

.lzd-stillsgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
	margin-bottom: 10px;
}

.lzd-still {
	position: relative;
	aspect-ratio: 16 / 9;
	border: 1px solid var(--adm-line);
	background: var(--adm-surface-2);
	overflow: hidden;
}

.lzd-still img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lzd-still__ops {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.lzd-still:hover .lzd-still__ops,
.lzd-still:focus-within .lzd-still__ops {
	opacity: 1;
}

.lzd-still__btn {
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--adm-line-strong);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.72);
	color: #e9e5dd;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.lzd-still__btn:hover {
	border-color: var(--adm-gold);
	color: var(--adm-gold);
}

.lzd-still__remove:hover {
	border-color: #d76b6b;
	color: #d76b6b;
}

.lzd-stillsgrid__empty {
	margin: 0 0 10px;
	color: var(--adm-ink-dim);
	font-size: 13px;
}

.lzd-admin .lzd-still__btn:focus-visible {
	outline: 1px solid var(--adm-gold);
	outline-offset: 1px;
}
