.hlm-wrap {
	max-width: 940px;
	margin: 28px auto 70px 18px;
	color: #171717;
}

.hlm-page-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 22px;
}

.hlm-page-heading h1,
.hlm-settings-wrap h1 {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 6px;
}

.hlm-page-heading p { margin: 0; color: #555; }

.hlm-card {
	position: relative;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
	padding: 28px;
	margin: 0 0 22px;
}

.hlm-card h2 {
	font-size: 22px;
	margin: 4px 0 8px;
}

.hlm-step {
	display: inline-block;
	background: #a60000;
	color: #fff;
	border-radius: 999px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .08em;
	padding: 5px 11px;
}

.hlm-ai-card {
	border-top: 5px solid #a60000;
}

.hlm-ai-card > label,
.hlm-multi-image-field > label,
.hlm-add-images > label,
.hlm-field label {
	display: block;
	font-size: 15px;
	font-weight: 700;
	margin: 22px 0 8px;
}

.hlm-wrap input[type="text"],
.hlm-wrap input[type="date"],
.hlm-wrap input[type="time"],
.hlm-wrap input[type="url"],
.hlm-wrap input[type="email"],
.hlm-wrap input[type="tel"],
.hlm-wrap input[type="password"],
.hlm-wrap textarea {
	width: 100%;
	max-width: none;
	border: 1px solid #a7aaad;
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.6;
	padding: 11px 13px;
	box-sizing: border-box;
}

.hlm-wrap input:focus,
.hlm-wrap textarea:focus {
	border-color: #a60000;
	box-shadow: 0 0 0 2px rgba(166, 0, 0, .14);
}

.hlm-wrap input[type="file"] {
	display: block;
	width: 100%;
	background: #f6f7f7;
	border: 2px dashed #a7aaad;
	border-radius: 10px;
	padding: 18px;
	box-sizing: border-box;
}

.hlm-file-help { color: #646970; font-size: 13px; margin: 7px 0 14px; }

.hlm-current-image,
.hlm-image-preview {
	margin: 16px 0;
}

.hlm-current-image span { display: block; font-weight: 700; margin-bottom: 8px; }
.hlm-current-image img,
.hlm-image-preview img { display: block; max-width: 320px; width: 100%; height: auto; border-radius: 8px; }

.hlm-current-gallery,
.hlm-image-preview {
	margin: 18px 0;
}

.hlm-current-gallery > strong,
.hlm-image-preview > strong {
	display: block;
	font-size: 15px;
	margin-bottom: 5px;
}

.hlm-current-gallery > p {
	color: #646970;
	font-size: 13px;
	margin: 0 0 10px;
}

.hlm-image-preview > p {
	color: #646970;
	font-size: 13px;
	margin: 0 0 10px;
}

.hlm-gallery-admin-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.hlm-gallery-admin-grid figure {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 9px;
	box-sizing: border-box;
	margin: 0;
	padding: 10px;
	transition: border-color .2s ease, opacity .2s ease, background .2s ease;
}

.hlm-gallery-admin-grid figure.is-replacing {
	background: #eef8ff;
	border-color: #2271b1;
}

.hlm-gallery-admin-grid figure.is-removed {
	background: #fcf0f1;
	border-color: #d63638;
	opacity: .68;
}

.hlm-gallery-admin-grid figure > span {
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 7px;
}

.hlm-gallery-admin-grid img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: contain;
	background: #fff;
	border-radius: 6px;
}

.hlm-gallery-admin-grid figure > label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin: 9px 0 0;
}

.hlm-image-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin-top: 9px;
}

.hlm-image-actions .button {
	font-size: 12px;
	min-height: 34px;
	padding: 2px 7px;
	text-align: center;
}

.hlm-image-actions .hlm-new-image-action[data-action="remove"] {
	grid-column: 1 / -1;
	color: #b32d2e;
}

.hlm-replace-image {
	display: block;
	background: #2271b1;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	padding: 9px 8px;
	text-align: center;
}

.hlm-wrap .hlm-replace-image input[type="file"] {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 11px;
	margin-top: 6px;
	padding: 0;
}

.hlm-remove-image {
	color: #b32d2e;
	cursor: pointer;
	text-align: center;
}

.hlm-image-state {
	display: block;
	color: #2271b1;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.45;
	min-height: 16px;
	margin-top: 7px;
	text-align: center;
}

.hlm-gallery-item.is-removed .hlm-image-actions,
.hlm-gallery-item.is-removed .hlm-replace-image {
	display: none;
}

.hlm-ai-button { margin-top: 12px !important; min-width: 230px; }
.hlm-ai-button.is-loading { opacity: .68; pointer-events: none; }

.hlm-ai-status {
	display: none;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 8px;
	font-weight: 700;
}
.hlm-ai-status.is-active { display: block; background: #edf7ed; color: #146b1f; }
.hlm-ai-status.is-error { display: block; background: #fcf0f1; color: #8a111a; }

.hlm-warning {
	background: #fff8e5;
	border-left: 4px solid #dba617;
	padding: 12px 14px;
	margin: 16px 0 0;
}

.hlm-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 22px;
}
.hlm-full { grid-column: 1 / -1; }
.hlm-field .required { color: #b32d2e; font-size: 11px; margin-left: 8px; }
.hlm-field.is-ai-filled input,
.hlm-field.is-ai-filled textarea { background: #f0f8ff; border-color: #72aee6; }

.hlm-category-field {
	border: 0;
	padding: 0;
	margin: 18px 0 10px;
}

.hlm-category-field legend {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 5px;
}

.hlm-category-help {
	color: #646970;
	font-size: 13px;
	margin: 0 0 10px;
}

.hlm-category-options {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
}

.hlm-category-options label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	padding: 8px 13px;
	cursor: pointer;
}

.hlm-category-options label.is-live-category {
	background: #fbeaea;
	border-color: #a60000;
	color: #8a111a;
	cursor: default;
}

.hlm-category-options input { margin: 0; }
.hlm-category-options small { font-size: 10px; opacity: .75; }

.hlm-publish-card { border-top: 5px solid #1d6b32; }
.hlm-actions { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.hlm-actions .button { min-width: 150px; text-align: center; }

@media (max-width: 782px) {
	.hlm-wrap { margin: 18px 10px 80px 0; }
	.hlm-page-heading { display: block; }
	.hlm-page-heading .button { margin-top: 14px; }
	.hlm-page-heading h1 { font-size: 26px; }
	.hlm-card { padding: 20px 16px; border-radius: 12px; }
	.hlm-card h2 { font-size: 20px; }
	.hlm-grid { grid-template-columns: 1fr; gap: 0; }
	.hlm-full { grid-column: auto; }
	.hlm-ai-button { width: 100%; min-width: 0; }
	.hlm-gallery-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hlm-gallery-admin-grid img { height: 130px; }
	.hlm-actions { flex-direction: column-reverse; }
	.hlm-actions .button { width: 100%; min-height: 48px; }
	.hlm-settings-wrap .form-table th { padding-bottom: 2px; }
	.hlm-settings-wrap .form-table td { padding-top: 4px; }
}
