/* Shared pending feedback inherits the active section's style class. */
.ecms-runtime-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 3.5em;
	width: 100%;
	pointer-events: none;
}
.ecms-runtime-loading > span {
	display: block;
	width: 1.8em;
	height: 0.3em;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.2;
	animation: ecms-runtime-pulse 1.8s ease-in-out infinite;
}
.ecms-runtime-loading > span:nth-child(2) { animation-delay: 0.15s; }
.ecms-runtime-loading > span:nth-child(3) { animation-delay: 0.3s; }
.ecms-runtime-loading--captioned {
	box-sizing: border-box;
	flex-wrap: wrap;
	align-content: center;
	min-height: 6.5rem;
	padding: 1.25rem 1rem;
	row-gap: 0.7rem;
}
.ecms-runtime-loading--captioned > strong {
	flex-basis: 100%;
	text-align: center;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.4;
}
.ecms-runtime-loading--compact {
	display: inline-flex;
	width: 2.2em;
	min-height: 0;
	height: 1em;
	margin-inline-start: 0.5em;
	vertical-align: middle;
	gap: 0.15em;
}
.ecms-runtime-loading--compact > span { width: 0.5em; height: 0.2em; }
@keyframes ecms-runtime-pulse {
	0%, 100% { opacity: 0.2; }
	50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
	.ecms-runtime-loading > span { animation: none; opacity: 0.35; }
}

/* Spreadsheet cells keep the append control in the same place in display and edit mode. */
[data-ecfrm-sheet] .table-responsive { overflow-x: auto; }
[data-ecfrm-sheet] table { table-layout: fixed; min-width: 100%; }
[data-ecfrm-sheet] tr[data-sheet-url] > td { height: calc(34px + .4em + 2px); padding-block: .2em; vertical-align: middle; overflow-wrap: anywhere; }
[data-ecfrm-sheet] td .form-control { max-width: 100%; }
[data-ecfrm-sheet] tr[data-sheet-line] > td[data-sheet-add-column] { position: relative; padding-inline-start: 3.25rem; }
[data-ecfrm-sheet] [data-sheet-add] { position: absolute; inset-inline-start: .25rem; top: 50%; transform: translateY(-50%); width: 2.5rem; padding: 0 .25rem; visibility: hidden; }
[data-ecfrm-sheet] tr:hover [data-sheet-add],
[data-ecfrm-sheet] tr.sheet-active [data-sheet-add],
[data-ecfrm-sheet] tr:focus-within [data-sheet-add] { visibility: visible; }
[data-ecfrm-sheet] table:focus tr.sheet-cursor:not(.danger) > td,
[data-ecfrm-sheet] tr.sheet-active:not(.danger) > td { background-color: var(--bs-primary-bg-subtle, #e2effb); }
[data-ecfrm-sheet] tr.danger > td { background-color: var(--bs-danger-bg-subtle, #f2dede); }
[data-ecfrm-sheet] [aria-invalid="true"] { border-color: var(--bs-danger, #a94442); }

table[data-sticky-headings] > thead { position: relative; z-index: 2; background: var(--bs-body-bg, white); }
[data-ecfrm-sheet] td:has(> :is([data-sheet-child-delete],[data-sheet-discard])) { position: relative; padding-inline-end: 4.8rem; }
[data-ecfrm-sheet] :is([data-sheet-child-delete],[data-sheet-discard]) { position: absolute; inset-inline-end: .2rem; inset-block: 0; margin-block: auto; visibility: hidden; }
[data-ecfrm-sheet] .sheet-active :is([data-sheet-child-delete],[data-sheet-discard]),
[data-ecfrm-sheet] tr:hover :is([data-sheet-child-delete],[data-sheet-discard]) { visibility: visible; }

[data-ecfrm-sheet] tr:not(.danger) > td.sheet-child-hover { background-color: var(--bs-info-bg-subtle, #c6e5f5); }
[data-ecfrm-sheet] tr.danger > td.sheet-child-hover { background-color: var(--bs-danger-border-subtle, #ebcccc); }

[data-ecfrm-sheet] td .ecms-avatar { margin: 0 auto; }
[data-ecfrm-sheet] .ECMS_actionIconButton { height: 20px; vertical-align: middle; }
[data-ecfrm-sheet] .ECMS_actionIconGroup { vertical-align: middle; }

[data-timeline-sticky] .eccrm-history__entry_marker { background: #ffe680; color: #554100; }
.eccrm-sticky { position: relative; min-width: 0; }
.eccrm-sticky [data-sticky-display] { padding: .4rem; overflow-wrap: anywhere; }
.eccrm-sticky [role=button] { cursor: text; }
.eccrm-sticky--compact [data-sticky-display] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eccrm-sticky--compact [data-sticky-display] * { display: inline; margin: 0; padding: 0; }
.eccrm-sticky--compact [data-sticky-display] br::after,
.eccrm-sticky--compact [data-sticky-display] :is(p,div,li)::after { content: ' '; }
.eccrm-sticky__preview { display: none; position: absolute; inset-inline-start: 0; top: 100%; z-index: 20; padding: .75rem; background: white; color: #222; border: 1px solid #bbb; box-shadow: 0 2px 8px #0002; width: max-content; max-width: min(32rem,70vw); overflow-wrap: anywhere; }
.eccrm-sticky--compact:hover [data-sticky-display]:not([hidden]) + .eccrm-sticky__preview:not(:empty),
.eccrm-sticky--compact:focus-within [data-sticky-display]:not([hidden]) + .eccrm-sticky__preview:not(:empty) { display: block; }
.eccrm-sticky__editor { display: flow-root; }
.eccrm-sticky__editor > .close { float: right; }
.eccrm-sticky__editor > .cke { clear: both; }

@keyframes ecms-save-success {
	from { background-color: #c7edcf; }
}
[data-ecfrm-sheet] tr.ecms-save-success > td,
.ecms-save-success [data-sticky-display] { animation: ecms-save-success 950ms ease-out; }
