/* Elintra OS — reusable rich content editor (Delivery 6.9) */

.eos-rich-editor {
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 8px;
	background: var(--eos-surface-2, var(--eos-panel, #0f0f0f));
	overflow: hidden;
}

.eos-rich-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	padding: 8px 10px;
	border-bottom: 1px solid var(--eos-border, #2a2a2a);
	background: var(--eos-surface, #0a0a0a);
}

.eos-rich-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 6px;
	background: var(--eos-surface-2, #141414);
	color: var(--eos-text, #f5f5f2);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
}

.eos-rich-btn:hover,
.eos-rich-btn:focus-visible {
	border-color: var(--eos-text-muted, #8b8b8b);
	background: var(--eos-surface-3, #1a1a1a);
}

.eos-rich-btn--danger {
	color: #ffb4b4;
	border-color: rgba(220, 80, 80, 0.35);
}

.eos-rich-select {
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 6px;
	background: var(--eos-surface-2, #141414);
	color: var(--eos-text, #f5f5f2);
	font: inherit;
	font-size: 0.8125rem;
}

.eos-rich-select--sm { min-width: 88px; }

.eos-rich-canvas {
	min-height: 280px;
	max-height: 520px;
	overflow: auto;
	padding: 16px 18px;
	outline: none;
	line-height: 1.6;
	color: var(--eos-text, #f5f5f2);
}

.eos-rich-canvas:empty:before {
	content: attr(data-placeholder);
	color: var(--eos-text-muted, #8b8b8b);
	pointer-events: none;
}

.eos-rich-canvas h1,
.eos-rich-canvas h2,
.eos-rich-canvas h3 {
	margin: 0.75em 0 0.35em;
	line-height: 1.25;
}

.eos-rich-canvas p { margin: 0 0 0.75em; }
.eos-rich-canvas ul,
.eos-rich-canvas ol { margin: 0 0 0.75em 1.25em; }

.eos-rich-img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	margin: 0.75em auto;
	cursor: pointer;
	box-shadow: 0 0 0 2px transparent;
}

.eos-rich-img:focus,
.eos-rich-img:hover {
	box-shadow: 0 0 0 2px var(--eos-text-muted, #8b8b8b);
}

.eos-rich-img--sm { max-width: 240px; }
.eos-rich-img--md { max-width: 480px; }
.eos-rich-img--lg { max-width: 720px; }
.eos-rich-img--full { max-width: 100%; width: 100%; }
.eos-rich-img--left { margin-left: 0; margin-right: auto; }
.eos-rich-img--center { margin-left: auto; margin-right: auto; }
.eos-rich-img--right { margin-left: auto; margin-right: 0; }

.eos-rich-imgbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 8px 10px;
	border-top: 1px solid var(--eos-border, #2a2a2a);
	background: var(--eos-surface, #0a0a0a);
}

.eos-rich-imgbar-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--eos-text-muted, #8b8b8b);
}

.eos-rich-input {
	height: 32px;
	padding: 0 10px;
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 6px;
	background: var(--eos-surface-2, #141414);
	color: var(--eos-text, #f5f5f2);
	font: inherit;
	font-size: 0.8125rem;
}

.eos-rich-input--sm { min-width: 160px; }

[data-eos-theme="light"] .eos-rich-editor {
	background: #fff;
	border-color: #dde1e6;
}

[data-eos-theme="light"] .eos-rich-toolbar,
[data-eos-theme="light"] .eos-rich-imgbar {
	background: #eef1f4;
	border-color: #dde1e6;
}

[data-eos-theme="light"] .eos-rich-btn,
[data-eos-theme="light"] .eos-rich-select,
[data-eos-theme="light"] .eos-rich-input {
	background: #fff;
	border-color: #d3d8de;
	color: #111;
}

.eos-adm__news-card-body .eos-rich-img,
.eos-adm__news-card-body img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.eos-adm__news-card-body .eos-rich-img--sm,
.eos-adm__news-card-body img.eos-rich-img--sm { max-width: 240px; }
.eos-adm__news-card-body .eos-rich-img--md,
.eos-adm__news-card-body img.eos-rich-img--md { max-width: 480px; }
.eos-adm__news-card-body .eos-rich-img--lg,
.eos-adm__news-card-body img.eos-rich-img--lg { max-width: 720px; }

.eos-adm__notify-list { display: flex; flex-direction: column; gap: 10px; }
.eos-adm__notify-item {
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 8px;
	background: var(--eos-surface-2, #141414);
	overflow: hidden;
}
.eos-adm__notify-item--unread { border-left: 3px solid var(--eos-text, #f5f5f2); }
.eos-adm__notify-item--high { border-left-color: #c0392b; }
.eos-adm__notify-item--medium { border-left-color: #d4a017; }
.eos-adm__notify-item--low { border-left-color: #5b7a9d; }
.eos-adm__notify-item-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	cursor: pointer;
}
.eos-adm__notify-priority {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 2px 8px;
	border-radius: 999px;
}
.eos-adm__notify-priority--high { background: rgba(192,57,43,0.15); color: #e57373; }
.eos-adm__notify-priority--medium { background: rgba(212,160,23,0.15); color: #e6c35c; }
.eos-adm__notify-priority--low { background: rgba(91,122,157,0.15); color: #90a4c0; }
.eos-adm__notify-item-body {
	padding: 0 14px 14px;
	color: var(--eos-text-muted, #8b8b8b);
	font-size: 0.875rem;
}
.eos-adm__notify-item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 14px 14px;
}

.eos-adm__cal { display: flex; flex-direction: column; gap: 16px; }
.eos-adm__cal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.eos-adm__cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 10px;
	overflow: hidden;
	/* The hairline grid lines are the border colour showing through the 1px
	   gap; the cells themselves are clean white (light) / charcoal (dark). */
	background: var(--eos-border, #2a2a2a);
}
.eos-adm__cal-dow,
.eos-adm__cal-day {
	min-height: 88px;
	padding: 6px;
	font-size: 0.8125rem;
}
/* In-month cells: clean white surface (light) / elevated charcoal (dark). */
.eos-adm__cal-day {
	background: var(--eos-calendar-cell-bg, var(--eos-surface, #0a0a0a));
}
/* Day-of-week header + leading/trailing pad cells: muted neutral, never beige. */
.eos-adm__cal-dow,
.eos-adm__cal-day--pad {
	background: var(--eos-calendar-off-bg, var(--eos-surface-2, #141414));
}
.eos-adm__cal-dow {
	min-height: auto;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--eos-text-muted, #8b8b8b);
}
/* today / selected day styling lives in the premium calendar block in
   admin-modules.css so the states stay calm and consistent. */
.eos-adm__cal-day-num { font-weight: 600; margin-bottom: 4px; }
/* Base layout only. Event COLOR (solid fill + white text) is owned by the
 * premium calendar color system in admin-modules.css. The previous
 * translucent-background + light-text category rules that lived here caused
 * the blue-text-on-blue contrast failure (they loaded after admin-modules.css
 * and overrode the readable solid fills), so they have been removed. */
.eos-adm__cal-event {
	display: block;
	margin: 2px 0;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.6875rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
}

.eos-adm__cal-heading {
	margin: 0 0 14px;
	font-size: 1.35rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.eos-adm__cal-multimonth {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 14px;
}

.eos-adm__cal-mini {
	border: 1px solid var(--eos-border-strong);
	border-radius: 10px;
	padding: 10px;
	background: var(--eos-surface);
}

.eos-adm__cal-mini-title {
	margin: 0 0 8px;
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--eos-text-muted);
}

.eos-adm__cal-mini-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.eos-adm__cal-mini-day {
	font-size: 0.65rem;
	text-align: center;
	padding: 2px 0;
	border-radius: 3px;
	cursor: pointer;
	color: var(--eos-text-muted);
}

.eos-adm__cal-mini-day--has-event {
	background: var(--eos-os-row-selected);
	color: var(--eos-text);
	font-weight: 600;
}

.eos-adm__cal-mini-day--current-month {
	outline: 1px solid var(--eos-border-strong);
}

.eos-adm__cal-day--off {
	background: rgba(59, 130, 246, 0.06);
}

.eos-adm__cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.eos-adm__cal-list-row {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid var(--eos-border);
	border-radius: 10px;
	background: var(--eos-surface);
}

.eos-adm__cal-event--chip {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
}

.eos-adm__cal-editor {
	max-width: 640px;
	padding: 20px;
	border: 1px solid var(--eos-border-strong);
	border-radius: 14px;
	background: var(--eos-panel-elevated, var(--eos-surface));
}

.eos-adm__toast--error {
	border-left: 3px solid var(--eos-danger, #dc2626);
}

.eos-adm__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--eos-border, #2a2a2a);
}
.eos-adm__table-row--placeholder td {
	height: 44px;
	color: transparent;
	background: rgba(127,127,127,0.04);
}

.eos-adm__profile-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.eos-adm__profile-nav-btn {
	padding: 8px 14px;
	border: 1px solid var(--eos-border, #2a2a2a);
	border-radius: 999px;
	background: transparent;
	color: var(--eos-text, #f5f5f2);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}
.eos-adm__profile-nav-btn--active {
	background: var(--eos-surface-3, #1a1a1a);
	border-color: var(--eos-text-muted, #8b8b8b);
	font-weight: 600;
}

.eos-os__notify-foot {
	padding: 10px 12px;
	border-top: 1px solid var(--eos-border, #2a2a2a);
}
.eos-os__notify-all {
	display: block;
	width: 100%;
	padding: 8px 12px;
	border: 0;
	border-radius: 6px;
	background: var(--eos-surface-2, #141414);
	color: var(--eos-text, #f5f5f2);
	font: inherit;
	font-size: 0.8125rem;
	cursor: pointer;
	text-align: center;
}

/* v0.9.0 — rich editor media, toolbar, tooltips */

.eos-rich-toolbar {
	gap: 2px;
	background: linear-gradient(180deg, var(--eos-panel-elevated, #111) 0%, var(--eos-surface, #0a0a0a) 100%);
}

.eos-rich-toolbar-sep {
	display: inline-block;
	width: 1px;
	height: 24px;
	margin: 0 4px;
	background: var(--eos-border);
	align-self: center;
}

.eos-rich-btn {
	border: none;
	background: transparent;
	position: relative;
}

.eos-rich-btn:hover,
.eos-rich-btn:focus-visible,
.eos-rich-btn.is-active {
	background: var(--eos-os-row-selected, rgba(148, 163, 184, 0.14));
	border: 1px solid var(--eos-border-strong);
}

.eos-rich-btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

.eos-rich-media-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	margin: 0.75em auto;
}

.eos-rich-media-wrap--active {
	outline: 2px solid var(--eos-os-focus, rgba(148, 163, 184, 0.55));
	outline-offset: 2px;
	border-radius: 6px;
}

.eos-rich-media-handles span {
	position: absolute;
	width: 10px;
	height: 10px;
	background: var(--eos-text, #f5f5f2);
	border: 1px solid var(--eos-border-strong);
	border-radius: 2px;
	cursor: nwse-resize;
	z-index: 2;
}

.eos-rich-media-handles span[data-handle="nw"] { top: -5px; left: -5px; cursor: nwse-resize; }
.eos-rich-media-handles span[data-handle="ne"] { top: -5px; right: -5px; cursor: nesw-resize; }
.eos-rich-media-handles span[data-handle="sw"] { bottom: -5px; left: -5px; cursor: nesw-resize; }
.eos-rich-media-handles span[data-handle="se"] { bottom: -5px; right: -5px; cursor: nwse-resize; }

.eos-rich-media,
.eos-rich-canvas video {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.eos-rich-media--small { max-width: 240px; }
.eos-rich-media--medium { max-width: 480px; }
.eos-rich-media--large { max-width: 720px; }
.eos-rich-media--full { max-width: 100%; width: 100%; }
.eos-rich-media--left { margin-left: 0; margin-right: auto; }
.eos-rich-media--center { margin-left: auto; margin-right: auto; }
.eos-rich-media--right { margin-left: auto; margin-right: 0; }

.eos-rich-media-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 8px 10px;
	border-top: 1px solid var(--eos-border);
	background: var(--eos-surface);
}

.eos-rich-media-bar-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--eos-text-muted);
}

.eos-adm__profile-nav-btn--active {
	background: var(--eos-os-row-selected, rgba(148, 163, 184, 0.14));
	border-color: var(--eos-border-strong);
}
