﻿/* ═══════════════════════════════════════════════════════════════
   Page Navigation block — editor UI (Inspector panel + icon picker).
   Loaded in the MAIN editor DOM (not the canvas iframe), because the
   Inspector sidebar and Modal render outside the iframe.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Inspector: per-page icon rows ───────────────────────────────── */
.a6sc-icp-hint {
	font-size: 12px;
	color: #757575;
	margin: 0 0 8px;
}

.a6sc-icp-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.a6sc-icp-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 4px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #fff;
}

.a6sc-icp-row:hover { background: #f7f9fc; }

.a6sc-icp-row.is-dragging {
	opacity: 0.5;
	border-color: #bcd0ff;
	background: #eef4ff;
}

.a6sc-icp-row__handle {
	flex-shrink: 0;
	cursor: grab;
	color: #999;
	font-size: 16px;
	line-height: 1;
	padding: 0 2px;
	user-select: none;
}

.a6sc-icp-row__handle:active { cursor: grabbing; }

.a6sc-icp-row__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1e1e1e;
}

.a6sc-icp-row__label {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.a6sc-icp-row__btns {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 0;
}

.a6sc-icp-row__btns .components-button.has-icon {
	min-width: 26px;
	width: 26px;
	height: 26px;
	padding: 0;
}

.a6sc-icp-row__edit.components-button {
	min-width: 28px;
	height: 26px;
	padding: 0 6px;
	color: #1d4ed8;
	font-size: 14px;
}

.a6sc-icp-row__edit.components-button:hover { background: #eef4ff; }

/* ─── Icon picker modal grid ──────────────────────────────────────── */
.a6sc-icp-modal .components-modal__content { padding-bottom: 16px; }

.a6sc-icp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
	gap: 4px;
	max-height: 320px;
	overflow-y: auto;
	margin-top: 8px;
	padding: 4px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
}

.a6sc-icp-cell {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	color: #1e1e1e;
	transition: background .12s, border-color .12s;
}

.a6sc-icp-cell:hover {
	background: #f0f6ff;
	border-color: #1d4ed8;
	color: #1d4ed8;
}

.a6sc-icp-cell svg { pointer-events: none; }

.a6sc-icp-more {
	font-size: 12px;
	color: #888;
	margin: 8px 0 0;
}

/* ─── Admin screen (Appearance → Sidebar Navigation) ──────────────── */
.a6sc-nav-admin {
	max-width: 560px;
	margin-top: 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px;
}

.a6sc-nav-admin .a6sc-icp-row {
	border-bottom: 1px solid #f0f0f1;
	border-radius: 4px;
	padding: 8px 6px;
}

.a6sc-nav-admin .a6sc-icp-row__label { font-size: 14px; }

.a6sc-nav-admin .a6sc-icp-row__btns .button-small {
	min-width: 30px;
	padding: 0 7px;
	line-height: 26px;
	height: 28px;
}

/* ─── Plain-DOM icon-picker modal (admin screen) ──────────────────── */
.a6sc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.a6sc-modal {
	background: #fff;
	border-radius: 8px;
	width: min(560px, 92vw);
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	padding: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.a6sc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	font-size: 15px;
}

.a6sc-modal__close {
	border: none;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #50575e;
}

.a6sc-modal__search {
	width: 100%;
	padding: 8px 10px;
	margin-bottom: 8px;
}
