/* Slug Generator — additive overrides (P0 + P1: bulk, CMS, history, settings) */

.lc-tools-slug-generator .lc-tool-panel.lc-slug-panel {
	display: block;
}

/* Neutralize shared child-grid placements from lc-redesign.css */
.lc-tools-slug-generator .lc-slug-panel > .lc-tool-label:first-child,
.lc-tools-slug-generator .lc-slug-panel #lc-slug-input,
.lc-tools-slug-generator .lc-slug-panel .lc-tool-toggles,
.lc-tools-slug-generator .lc-slug-panel > .lc-tool-label[for="lc-slug-output"],
.lc-tools-slug-generator .lc-slug-panel .lc-tool-output-row {
	grid-column: auto;
	grid-row: auto;
	margin-top: 0;
	margin-bottom: 0;
	align-self: auto;
}

.lc-slug-mode {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
}

.lc-slug-mode-tab {
	appearance: none;
	margin: 0;
	padding: 8px 14px;
	color: #465564;
	background: #f3f6f7;
	border: 1px solid #d6dee2;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

.lc-slug-mode-tab:hover {
	border-color: #9eacb5;
}

.lc-slug-mode-tab.is-active {
	color: #0d6630;
	background: #edf8f0;
	border-color: #b9dfc4;
}

.lc-slug-cms {
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e2e8eb;
}

.lc-slug-cms .lc-tool-label {
	display: block;
	margin-bottom: 8px;
}

.lc-slug-cms-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.lc-slug-cms-chip {
	appearance: none;
	margin: 0;
	padding: 8px 14px;
	color: var(--lc-navy-900, #0a2a5e);
	background: #fff;
	border: 1px solid #d5dde5;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}

.lc-slug-cms-chip:hover {
	border-color: #b7c7b9;
	background: #f3faf5;
}

.lc-slug-cms-chip.is-active {
	color: #0d6630;
	background: #edf8f0;
	border-color: #b9dfc4;
}

.lc-slug-reserved {
	margin: 10px 0 0;
	padding: 10px 12px;
	color: #9a6700;
	background: #fff8e8;
	border: 1px solid #f0d78c;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 650;
	line-height: 1.45;
}

.lc-slug-cols {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	gap: 22px 32px;
	align-items: start;
}

.lc-slug-col {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.lc-slug-col .lc-tool-label { margin-bottom: 8px; }
.lc-slug-col .lc-tool-input { width: 100%; }
.lc-slug-col .lc-tool-toggles { margin: 14px 0 0; }

.lc-slug-col .lc-tool-check.is-disabled {
	opacity: .45;
	pointer-events: none;
}

.lc-slug-maxlen {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #e2e8eb;
}

.lc-slug-maxlen__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.lc-slug-maxlen__head .lc-tool-label { margin: 0; }
.lc-slug-maxlen__value {
	color: var(--lc-navy-900, #0a2a5e);
	font-size: 12px;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
}

.lc-slug-range {
	display: block;
	width: 100%;
	margin: 0;
	accent-color: var(--lc-green-500, #18b94a);
	cursor: pointer;
}

.lc-slug-maxlen .lc-tool-hint { margin-top: 10px; }

.lc-slug-url-fields {
	display: grid;
	grid-template-columns: 1.2fr .8fr;
	gap: 14px 16px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #e2e8eb;
}

.lc-slug-url-fields .lc-tool-field { min-width: 0; }
.lc-slug-url-fields .lc-tool-label { margin-bottom: 8px; }

.lc-slug-col--output .lc-tool-output-row { margin-top: 0; }

.lc-slug-meta {
	margin: 14px 0 20px;
	padding: 12px 14px;
	background: #f4f7f8;
	border: 1px solid #dde5e9;
	border-radius: 8px;
}

.lc-slug-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 20px;
	margin-bottom: 8px;
}

.lc-slug-count {
	color: #5a6876;
	font-size: 12.5px;
	font-weight: 600;
}

.lc-slug-count strong {
	color: var(--lc-navy-900, #0a2a5e);
	font-family: 'Sora', sans-serif;
	font-size: 16px;
	font-weight: 750;
	font-variant-numeric: tabular-nums;
	margin-right: 4px;
}

.lc-slug-seo {
	margin: 0;
	font-size: 12.5px;
	font-weight: 650;
	line-height: 1.45;
	color: #5a6876;
}

.lc-slug-seo[data-tone="good"] { color: #0d6630; }
.lc-slug-seo[data-tone="warn"] { color: #9a6700; }
.lc-slug-seo[data-tone="danger"] { color: #b42318; }
.lc-slug-seo[data-tone="idle"] { color: #7a8793; font-weight: 500; }

.lc-slug-col--output > .lc-tool-label[for="lc-slug-fullurl"] {
	margin-top: 0;
}

/* Bulk mode */
.lc-slug-mode-panel[hidden] {
	display: none !important;
}

#lc-slug-bulk-input {
	width: 100%;
	min-height: 180px;
	margin-bottom: 12px;
}

.lc-slug-bulk-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

.lc-slug-bulk-actions .lc-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

#lc-slug-bulk-meta {
	margin: 0 0 14px;
	min-height: 1.2em;
}

.lc-slug-bulk-table-wrap {
	overflow: auto;
	border: 1px solid #dde5e9;
	border-radius: 8px;
	background: #fff;
}

.lc-slug-bulk-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12.5px;
}

.lc-slug-bulk-table th,
.lc-slug-bulk-table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid #e8eef1;
	vertical-align: top;
}

.lc-slug-bulk-table th {
	position: sticky;
	top: 0;
	color: #5a6876;
	background: #f4f7f8;
	font-size: 11px;
	font-weight: 750;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.lc-slug-bulk-table tbody tr:last-child td {
	border-bottom: 0;
}

.lc-slug-bulk-table tr.is-flagged td {
	background: #fffaf0;
}

.lc-slug-bulk-table code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: var(--lc-navy-900, #0a2a5e);
	word-break: break-all;
}

.lc-slug-bulk-url {
	color: #5a6876;
	word-break: break-all;
}

/* History + settings */
.lc-slug-memory-panel {
	margin-top: 18px;
}

.lc-slug-memory-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	gap: 22px 28px;
	align-items: start;
}

.lc-slug-memory-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.lc-slug-memory-head .lc-tool-label { margin: 0; }

.lc-slug-memory-clear {
	min-height: 34px;
	padding: 6px 10px;
	font-size: 12px;
}

.lc-slug-history {
	display: grid;
	gap: 8px;
	max-height: 220px;
	overflow: auto;
	padding: 2px;
}

.lc-slug-history__empty {
	margin: 0;
	color: #687583;
	font-size: 12.5px;
}

.lc-slug-history__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
	align-items: stretch;
	background: #f5f8f9;
	border: 1px solid #dde5e9;
	border-radius: 8px;
}

.lc-slug-history__load {
	appearance: none;
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 10px 12px;
	text-align: left;
	color: inherit;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.lc-slug-history__load strong {
	font-size: 13px;
	font-weight: 700;
	color: var(--lc-navy-900, #0a2a5e);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lc-slug-history__load span {
	color: #687583;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lc-slug-history__remove {
	appearance: none;
	margin: 0;
	padding: 0 12px;
	color: #84919c;
	background: transparent;
	border: 0;
	border-left: 1px solid #dde5e9;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.lc-slug-history__remove:hover {
	color: #b42318;
	background: #fff5f5;
}

.lc-slug-settings-hint {
	margin: 0 0 12px;
}

.lc-slug-settings-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.lc-slug-file-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	margin: 0;
}

#lc-slug-settings-status {
	margin: 10px 0 0;
	min-height: 1.2em;
}

@media (max-width: 980px) {
	.lc-slug-cols {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}

	.lc-tools-slug-generator .lc-slug-panel .lc-tool-toggles {
		margin-bottom: 0;
	}

	.lc-slug-col--output {
		margin-top: 20px;
		padding-top: 22px;
		border-top: 1px solid #e2e8eb;
	}

	.lc-slug-url-fields {
		grid-template-columns: 1fr;
	}

	.lc-slug-memory-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.lc-slug-meta { padding: 11px 12px; }

	.lc-slug-col--output .lc-tool-output-row {
		flex-wrap: wrap;
	}

	.lc-slug-col--output .lc-tool-output-row .lc-tool-copy {
		flex: 1 1 auto;
		width: 100%;
	}

	.lc-slug-bulk-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.lc-slug-bulk-actions .lc-btn {
		width: 100%;
	}

	.lc-slug-settings-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.lc-slug-settings-actions .lc-btn,
	.lc-slug-file-label {
		width: 100%;
	}
}
