/* SAMURAI FESTIVAL — [hide] blocks + editor toolbar (forum-hide.js v8) — CSS v5.1, 24.10.
   Palette rules (Arthur): locked blocks = STANDARD WHITE for all conditions;
   met-condition blocks = GOLD ring around the block (sharp, 3px, translucent). */

/* ---------- base [hide] block: plain spoiler & met = white standard ---------- */
details.ipsDataSpoiler--hide {
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 2px;
	margin: 0.5em 0;
	background: rgba(255, 255, 255, 0.02);
}
details.ipsDataSpoiler--hide > summary {
	cursor: pointer;
	list-style: none;
	padding: 0.45em 0.8em;
	font-size: 0.9em;
	font-weight: 600;
	color: #e8e2d8;
	letter-spacing: 0.02em;
	transition: background 0.15s;
}
/* v5.1 (24.10, Артур): stock .ipsDataSpoiler__summary border-bottom (currentColor 20%)
   заменён на наш золотой hairline (тот же градиент, что в body спойлера и в тултипе).
   Реализация через background-image summary (НЕ ::after — там темовый маркер "+"). */
details.ipsDataSpoiler--hide > summary.ipsDataSpoiler__summary {
	border-bottom: 0;
	background-image: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.75), transparent);
	background-size: 100% 1px;
	background-repeat: no-repeat;
	background-position: bottom;
}
details.ipsDataSpoiler--hide > summary::-webkit-details-marker { display: none; }
details.ipsDataSpoiler--hide > summary::before {
	content: "\25B8"; /* ▸ */
	margin-right: 0.5em;
	font-size: 0.85em;
	color: rgba(255, 255, 255, 0.55);
}
details[open].ipsDataSpoiler--hide > summary::before { content: "\25BE"; } /* ▾ */
details.ipsDataSpoiler--hide > summary:hover { background-color: rgba(255, 255, 255, 0.05); }
details.ipsDataSpoiler--hide > summary i { opacity: 0.6; margin-right: 0.3em; }
details.ipsDataSpoiler--hide > .ipsDataSpoiler__body {
	padding: 0.6em 0.8em;
	/* [DAVIN 24.10] мой v5 body-hairline УБРАН: с GIN v5.1 (hairline на summary)
	   он давал ДУБЛЬ линии на [hide]-блоке (case 5 «Обычный спойлер»): две
	   hairline-градиенты на одной границе summary/body. Теперь ЕДИНСТВЕННАЯ
	   линия = summary (GIN v5.1, выше). Body остаётся без своей линии. */
}

/* ---------- GOLD ring for met-condition blocks (sharp 3px, translucent, NOT blurred) ---------- */
details.sfHideMet {
	border-color: transparent;
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.40);
}
details.sfHideMet > summary { color: #f0e6cf; }
/* [DAVIN 24.10] мет-панель: Post.php:785 сбрасывает классы <details> до class="sfHideMet"
   (ipsDataSpoiler--hide теряется) → v5.1 hairline (только --hide) мет-панель НЕ ловит,
   линия остаётся stock-серой (баг Артура: скрин «Условия выполнены»). Мет-панель =
   та же white-standard, что [hide] без условий → та же ЕДИНСТВЕННАЯ hairline на
   summary (как у --hide выше). Лок-панели (.sfHideLocked) линий не имеют — не трогаем. */
details.sfHideMet > summary.ipsDataSpoiler__summary {
	border-bottom: 0;
	background-image: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.75), transparent);
	background-size: 100% 1px;
	background-repeat: no-repeat;
	background-position: bottom;
}

/* ---------- locked panels: CLOSED + cannot be opened (JS v9), no "+" affordance ---------- */
details.sfHideLocked > summary { cursor: default; color: #cfc9bd; }
details.sfHideLocked > summary:hover { background-color: transparent; }
/* theme rule .ipsRichText summary::after draws "+" on every spoiler summary —
   hide it on locked panels (they never open; the JS also blocks the click) */
details.sfHideLocked > summary::after { content: none !important; display: none !important; }
details.sfHideLocked > summary::-webkit-details-marker { display: none; }
/* inline action links inside the guest line: login = green, register = bordeaux */
.sfHideLink { font-size: 0.95em; font-weight: 500; }
.sfHideLink--login { color: #67c587; }
.sfHideLink--reg { color: #c05568; }
.sfHideLink__dot { opacity: 0.5; margin: 0 0.45em; }
/* one condition = one line, in a column */
.sfHideReq__head {
	display: block;
	font-weight: 600;
	color: #e8e2d8;
	letter-spacing: 0.02em;
}
.sfHideReq__head--met { color: #d4af37; }
/* condition lines: unmet = bordeaux, met = gold (accent, Arthur v5) */
.sfHideReq__cond {
	display: block;
	margin-top: 0.35em;
	padding: 0.15em 0.6em;
	border-left: 2px solid rgba(255, 255, 255, 0.30);
	color: #b9b2a4;
	font-size: 0.82em;
	font-weight: 400;
	line-height: 1.35;
}
.sfHideReq__cond--bad { color: #d98c8c; border-left-color: #8e2e2e; font-weight: 500; }
.sfHideReq__cond--ok { color: #d4af37; border-left-color: #d4af37; font-weight: 500; }
.sfHideReq__title { font-weight: 600; color: #cfc9bd; margin: 0 0 0.4em; font-size: 0.9em; letter-spacing: 0.02em; }
.sfHideReq__note { margin: 0.5em 0 0; color: #9b937f; font-size: 0.8rem; font-style: italic; }
.sfHideReq__note a { color: #e8e2d8; font-weight: 600; text-decoration: none; }
.sfHideReq__note a:hover { text-decoration: underline; }

/* ---------- editor toolbar custom buttons (hide/visu) — blend into the stock row ---------- */
button[data-sf-custom="1"] { display: inline-flex; align-items: center; justify-content: center; opacity: 0.85; cursor: pointer; transition: background 0.15s, opacity 0.15s; }
button[data-sf-custom="1"]:hover { background: rgba(255, 255, 255, 0.10); opacity: 1; }
button[data-sf-custom="1"] i { font-size: 0.9em; }

/* ---------- [hide] rules dropdown (v8: multi-select + «Готово»; attached to <body>, fixed;
   the script repositions it on scroll so it always sticks to its button) ---------- */
.sfHideMenu {
	position: fixed;
	top: 0;
	left: 0;
	transform: translate(0, 0);
	will-change: transform;
	z-index: 4000;
	min-width: 320px;
	max-width: 380px;
	color-scheme: dark;
	background: #171310;
	color: #e8e2d8;
	border: 1px solid rgba(255, 255, 255, 0.20);
	border-radius: 2px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
	padding: 4px 0;
	font-size: 0.85rem;
}
.sfHideMenu__head {
	padding: 4px 12px 2px;
	font-size: 0.72rem;
	color: #9b937f;
	letter-spacing: 0.03em;
}
.sfHideMenu__item {
	display: grid;
	grid-template-columns: 18px 1fr 1fr;
	grid-template-rows: auto auto;
	gap: 2px 8px;
	align-items: baseline;
	padding: 6px 12px;
	cursor: pointer;
	border-left: 2px solid transparent;
}
.sfHideMenu__item:hover { background: rgba(255, 255, 255, 0.05); }
.sfHideMenu__check {
	grid-row: 1 / 3;
	grid-column: 1;
	align-self: start;
	width: 14px; height: 14px;
	margin-top: 2px;
	accent-color: #d4af37;
}
.sfHideMenu__item--active { background: rgba(212, 175, 55, 0.08); border-left-color: #d4af37; }
.sfHideMenu__label { font-weight: 600; }
.sfHideMenu__hint { color: #9b937f; font-size: 0.75rem; }
.sfHideMenu__num {
	width: 90px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.20);
	border-radius: 2px;
	color: #e8e2d8;
	padding: 3px 8px;
	font-size: 0.8rem;
}
.sfHideMenu__num:focus { outline: none; border-color: #d4af37; }
.sfHideMenu__done {
	display: block;
	width: calc(100% - 24px);
	margin: 6px 12px 4px;
	padding: 6px 10px;
	background: rgba(212, 175, 55, 0.14);
	border: 1px solid rgba(212, 175, 55, 0.45);
	border-radius: 2px;
	color: #e8d9a8;
	font-weight: 600;
	font-size: 0.82rem;
	cursor: pointer;
	text-align: center;
}
.sfHideMenu__done:hover { background: rgba(212, 175, 55, 0.24); }
.sfHideMenu__done:disabled { opacity: 0.4; cursor: default; }

/* ---------- [visu] explicit plate chip (server span; JS hook = plate-tooltip) ---------- */
span.ipsPlateVisu {
	display: inline-block;
	padding: 0.05em 0.45em;
	margin: 0 0.1em;
	border: 1px solid rgba(255, 255, 255, 0.30);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.05);
	font-weight: 600;
	font-size: 0.92em;
	white-space: nowrap;
}

/* ---------- v6 (24.10, Arthur): [visu] live-search menu + hard exclusivity in [hide] menu ---------- */

/* [hide] menu: greyed-out (unavailable) item — exclusive interlock */
.sfHideMenu__item--off {
	opacity: 0.38;
	pointer-events: none;
}

/* [visu] menu: same shell, search-first layout */
.sfHideMenu--visu { width: 400px; max-width: calc(100vw - 16px); }

.sfHideMenu__search {
	width: 100%;
	box-sizing: border-box;
	margin: 8px 0 6px;
	padding: 7px 10px;
	background: #0f1216;
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 4px;
	color: #f2ead8;
	font: inherit;
	font-size: 0.92rem;
}
.sfHideMenu__search:focus { outline: none; border-color: #d4af37; }
.sfHideMenu__search::placeholder { color: #8b8474; }

.sfHideMenu__visu-list {
	max-height: 300px;
	overflow-y: auto;
	margin-top: 2px;
}

.sfHideMenu__visu-row {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	cursor: pointer;
}
.sfHideMenu__visu-row:hover { background: rgba(212, 175, 55, 0.08); }

.sfHideMenu__visu-icon {
	width: 26px;
	height: 26px;
	object-fit: contain;
	flex: 0 0 auto;
}

.sfHideMenu__visu-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}
.sfHideMenu__visu-name {
	color: #f2ead8;
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sfHideMenu__visu-en {
	color: #9b937f;
	font-size: 0.75rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfHideMenu__visu-meta {
	flex: 0 0 auto;
	color: #9b937f;
	font-size: 0.72rem;
	background: rgba(255, 255, 255, 0.05);
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
}

.sfHideMenu__visu-status {
	color: #9b937f;
	font-size: 0.8rem;
	padding: 8px 10px;
}
