/* Editor side rail and panels (Styles, Sections, Photos, Help, section settings). */
/* ---------- Rail and panel ---------- */
@layer module {
.se-rail {
	grid-area: rail;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-block: 8px; padding-inline: 6px;
	background: var(--se-paper);
	border-inline-end: 1px solid var(--se-line);
}
.se-rail button {
	display: grid;
	justify-items: center;
	gap: 4px;
	padding-block: 10px 8px; padding-inline: 0;
	border: 0;
	border-radius: var(--se-r);
	background: transparent;
	font-size: 12px;
	line-height: 16px;
}
.se-rail button[aria-pressed="true"] {
	background: var(--se-accent-soft);
	color: var(--se-accent);
}
.se-panel {
	grid-area: panel;
	inline-size: 340px;
	display: flex;
	flex-direction: column;
	min-block-size: 0;
	background: var(--se-paper);
	border-inline-end: 1px solid var(--se-line);
}
.se-panel[hidden] {
	display: none;
}
.se-panel-head {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-block: 12px; padding-inline: 16px 8px;
	border-block-end: 1px solid var(--se-line);
}
.se-panel-head h2 {
	flex: 1;
	margin: 0;
	font-size: 16px;
	line-height: 24px;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.se-panel-head .se-icon[hidden] {
	display: none;
}
.se-panel-body {
	flex: 1;
	overflow-y: auto;
	display: grid;
	align-content: start;
	gap: 16px;
	padding: 16px;
}
.se-group {
	display: grid;
	gap: 14px;
	padding-block-end: 16px;
	border-block-end: 1px solid var(--se-line);
}
.se-group h3 {
	margin: 0;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	color: var(--se-muted);
}
.se-field {
	display: grid;
	gap: 6px;
}
.se-label {
	display: flex;
	justify-content: space-between;
	font-weight: 500;
}
.se-label output {
	color: var(--se-muted);
	font-weight: 400;
}
.se-inline {
	grid-template-columns: 1fr auto;
	align-items: center;
}
.se-color-input {
	display: flex;
	align-items: center;
	gap: 8px;
}
.se-color input[type="color"] {
	inline-size: 44px;
	block-size: 36px;
	padding: 3px;
	border: 1px solid var(--se-line);
	border-radius: var(--se-r);
	background: var(--se-paper);
	cursor: pointer;
}
.se-hex {
	inline-size: 96px;
	text-transform: lowercase;
}
@supports (font-family: ui-monospace) {
	.se-hex {
		font-family: ui-monospace, Menlo, monospace;
	}
}
.se-chips {
	display: flex;
	gap: 6px;
}
.se-chip {
	inline-size: 24px;
	block-size: 24px;
	padding: 0;
	border: 1px solid rgb(0 0 0 / 0.15);
	border-radius: 50%;
}
#se-app input[type="range"] {
	inline-size: 100%;
}
.se-switch {
	inline-size: 20px;
	block-size: 20px;
}
@supports (accent-color: auto) {
	#se-app input[type="range"] {
		accent-color: var(--se-accent);
	}
	.se-switch {
		accent-color: var(--se-accent);
	}
}
.se-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.se-wide {
	inline-size: 100%;
}
.se-hint {
	margin: 0;
	color: var(--se-muted);
}
}
@layer module {
.se-sections {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.se-sections li {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	padding-block: 2px; padding-inline: 0 2px;
	border: 1px solid var(--se-line);
	border-radius: var(--se-r);
}
.se-sections li.se-off {
	opacity: 0.55;
}
.se-section-open {
	min-block-size: 40px;
	padding-block: 0; padding-inline: 12px;
	border: 0;
	background: transparent;
	text-align: start;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.se-tip {
	display: grid;
	gap: 2px;
}
.se-tip p {
	margin: 0;
	color: var(--se-muted);
}
.se-photos {
	display: grid;
	gap: 12px;
}
.se-photo-row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 4px 12px;
	align-items: center;
}
.se-photo-row img {
	grid-row: span 2;
	inline-size: 64px;
	block-size: 64px;
	object-fit: cover;
	border-radius: var(--se-r);
	background: var(--se-soft);
}
.se-photo-row span {
	overflow: hidden;
	color: var(--se-muted);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.se-photo-row div {
	display: flex;
	align-items: center;
	gap: 8px;
}
.se-photo-row .se-btn {
	block-size: 32px;
}
.se-alt {
	grid-column: 1 / -1;
}
.se-text {
	inline-size: 100%;
	min-block-size: 36px;
	padding-block: 8px; padding-inline: 10px;
	border: 1px solid var(--se-line);
	border-radius: var(--se-r);
	background: var(--se-paper);
	font: inherit;
}
@supports (resize: vertical) {
	.se-text {
		resize: vertical;
	}
}
.se-label output[data-over="true"] {
	color: var(--se-error);
}
.se-serp {
	display: grid;
	gap: 2px;
	padding: 12px;
	border: 1px solid var(--se-line);
	border-radius: var(--se-r);
	font-family: Arial, sans-serif;
}
.se-serp span {
	color: rgb(32 33 36);
	font-size: 12px;
}
.se-serp strong {
	color: rgb(26 13 171);
	font-size: 18px;
	font-weight: 400;
	line-height: 24px;
}
.se-serp p {
	margin: 0;
	color: rgb(77 81 86);
	font-size: 13px;
}
.se-versions {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.se-version {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-block: 8px; padding-inline: 12px 8px;
	border: 1px solid var(--se-line);
	border-radius: var(--se-r);
}
.se-version div {
	display: grid;
}
.se-version span {
	color: var(--se-muted);
	font-size: 12px;
}

/* The question asked before the draft is thrown away. */
.se-confirm {
	inline-size: min(400px, calc(100vw - 32px));
	padding: 24px;
	border: 1px solid var(--se-line);
	border-radius: 12px;
	background: var(--se-paper);
	color: var(--se-ink);
}
.se-confirm::backdrop {
	background: rgb(0 0 0 / 0.32);
}
.se-confirm p {
	margin-block: 0 24px;
	margin-inline: 0;
	font-size: 16px;
	line-height: 24px;
}
.se-confirm div {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
#se-app .se-confirm .se-danger {
	border-color: var(--se-error);
	background: var(--se-error);
	color: rgb(255 255 255);
	font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
	#se-app .se-confirm .se-btn:hover {
		background: var(--se-soft);
	}
	#se-app .se-confirm .se-danger:hover {
		background: rgb(168 30 30);
	}
}

/* "Signaler un retour" in the top bar, with its dot while Pragma's replies wait. */
.se-feedback {
	position: relative;
}
.se-feedback .se-dot {
	position: absolute;
	inset-block-start: 4px;
	inset-inline-end: 4px;
	inline-size: 8px;
	block-size: 8px;
	border-radius: 50%;
	background: var(--se-error);
	box-shadow: 0 0 0 2px var(--se-paper);
}
.se-feedback .se-dot[hidden] {
	display: none;
}

/* Phone: the rail becomes a bottom tool bar and the panel a bottom sheet; the top bar keeps every action on
   one line, the page choice shortened. */
@media (max-width: 760px) {
	#se-app .se-bar-right .se-feedback {
		inline-size: 44px;
		min-block-size: 44px;
	}
	.se-bar-right {
		gap: 4px;
	}
	.se-bar-left .se-page {
		min-inline-size: 0;
		inline-size: 100%;
		text-overflow: ellipsis;
	}
	.se-rail {
		flex-direction: row;
		justify-content: space-around;
		padding-block: 4px calc(4px + env(safe-area-inset-bottom));
		padding-inline: 8px;
		border-inline-end: 0;
		border-block-start: 1px solid var(--se-line);
	}
	.se-rail button {
		flex: 1;
		padding-block: 6px; padding-inline: 0;
	}
	.se-panel {
		position: fixed;
		inset-inline: 0;
		inset-block-end: 60px;
		z-index: 5;
		inline-size: 100%;
		max-block-size: 62vh;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -12px 40px rgb(0 0 0 / 0.2);
	}
}
}
