/* lh-support.css — панель поддержки «?» (Георгий, 28.10.2026). Разметка —
 * ui/_support.html, поведение — js/lh-support.js. Только токены кита:
 * экран входа подключает lh-tokens.css, кабинет — lh-kit.css.
 */
.lh-sup {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 60;
	font-family: var(--lh-font, 'Inter Tight', Arial, sans-serif);
	color: var(--lh-fg-primary);
}
/* Кабинет на телефоне: снизу панель быстрого доступа (44 px, z 50). */
@media (max-width: 600px) {
	.lh-sup { right: .75rem; bottom: .75rem; }
	.lh-shell:not(.lh-noside) .lh-sup { bottom: calc(3.5rem + env(safe-area-inset-bottom)); }
}

/* Кнопка залита зелёным бренда и на компьютере подписана «Поддержка»
 * (Георгий, 05.11.2026): белый кружок с «?» на белом фоне не замечали.
 * На телефоне — круг без подписи, но тоже залитый. */
.lh-sup-fab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	height: 3rem;
	padding: 0 1.25rem 0 1rem;
	border: 0;
	border-radius: 1.5rem;
	background: var(--lh-green, #05EE9B);
	color: #0B0B0B;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	box-shadow: 0 6px 20px var(--lh-shadow-lift);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.lh-sup-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 26px var(--lh-shadow-lift); }
.lh-sup-fab:focus-visible { outline: 3px solid var(--lh-focus-ring); outline-offset: 2px; }
.lh-sup.is-open .lh-sup-fab-label { display: none; }
.lh-sup.is-open .lh-sup-fab { width: 3rem; padding: 0; justify-content: center; }
@media (max-width: 600px) {
	.lh-sup-fab { width: 3.25rem; height: 3.25rem; padding: 0; justify-content: center; border-radius: 50%; }
	.lh-sup-fab-label { display: none; }
}
.lh-sup-fab-x { display: none; }
.lh-sup.is-open .lh-sup-fab-q { display: none; }
.lh-sup.is-open .lh-sup-fab-x { display: block; }
.lh-sup-badge, .lh-sup-chat-badge {
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 .3rem;
	border-radius: .625rem;
	background: var(--lh-state-danger);
	color: #fff;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.25rem;
	text-align: center;
}
.lh-sup-badge { position: absolute; top: -.25rem; right: -.25rem; }
.lh-sup-chat-badge { margin-left: .5rem; }
.lh-sup-badge[hidden], .lh-sup-chat-badge[hidden] { display: none; }

.lh-sup-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + .75rem);
	display: flex;
	flex-direction: column;
	width: min(22.5rem, calc(100vw - 1.5rem));
	max-height: min(34rem, calc(100dvh - 7rem));
	border: 1px solid var(--lh-line-base);
	border-radius: var(--lh-radius-l, 1rem);
	background: var(--lh-bg-surface);
	box-shadow: 0 24px 60px var(--lh-shadow-lift);
	overflow: hidden;
}
.lh-sup-panel[hidden] { display: none; }
.lh-sup.is-chat .lh-sup-panel { height: min(34rem, calc(100dvh - 7rem)); }

.lh-sup-head {
	display: flex;
	align-items: center;
	gap: .25rem;
	padding: .75rem .5rem .75rem 1.125rem;
	border-bottom: 1px solid var(--lh-line-base);
}
.lh-sup-title { flex: 1; font-size: 1rem; font-weight: 600; }
.lh-sup-back, .lh-sup-close {
	display: inline-grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: var(--lh-radius-s, .5rem);
	background: none;
	color: var(--lh-fg-muted);
	cursor: pointer;
}
.lh-sup-back { margin-left: -.625rem; }
.lh-sup-back[hidden] { display: none; }
.lh-sup-back:hover, .lh-sup-close:hover { background: var(--lh-hover-bg); color: var(--lh-fg-primary); }
.lh-sup-back:focus-visible, .lh-sup-close:focus-visible { outline: 3px solid var(--lh-focus-ring); outline-offset: 1px; }

.lh-sup-home { padding: 1rem 1.125rem 1.125rem; }
.lh-sup-home[hidden] { display: none; }
.lh-sup-lead {
	margin: 0 0 1rem;
	font-size: var(--lh-type-body-s, .875rem);
	line-height: 1.45;
	color: var(--lh-fg-muted);
}
.lh-sup-open-chat { width: 100%; gap: .5rem; }
.lh-sup-msgrs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .625rem; }
.lh-sup a.lh-sup-msgr, .lh-sup a.lh-sup-msgr:hover { text-decoration: none; }
.lh-sup-msgr {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	min-height: 2.75rem;
	padding: .5rem .75rem;
	border: 1px solid var(--lh-line-base);
	border-radius: var(--lh-radius, .75rem);
	color: var(--lh-fg-primary);
	font-size: .9375rem;
	font-weight: 500;
	text-decoration: none;
}
.lh-sup-msgr svg { color: var(--lh-accent-base); }
.lh-sup-msgr:hover { background: var(--lh-hover-bg); border-color: var(--lh-line-strong); text-decoration: none; }
.lh-sup-msgr:focus-visible { outline: 3px solid var(--lh-focus-ring); outline-offset: 2px; }

.lh-sup-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lh-sup-chat[hidden] { display: none; }
.lh-sup-log {
	flex: 1;
	min-height: 0;
	padding: 1rem 1rem .5rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}
.lh-sup-empty {
	margin: auto 0;
	font-size: var(--lh-type-body-s, .875rem);
	line-height: 1.45;
	color: var(--lh-fg-muted);
	text-align: center;
}
.lh-sup-m {
	max-width: 85%;
	padding: .5rem .75rem;
	border-radius: .875rem;
	font-size: .9375rem;
	line-height: 1.4;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.lh-sup-m time { display: block; margin-top: .125rem; font-size: .6875rem; opacity: .7; }
.lh-sup-m--in { align-self: flex-end; background: var(--lh-accent-soft); border-bottom-right-radius: .25rem; }
.lh-sup-m--out { align-self: flex-start; background: var(--lh-bg-page); border: 1px solid var(--lh-line-base); border-bottom-left-radius: .25rem; }
.lh-sup-m--out::before { content: "Поддержка"; display: block; margin-bottom: .125rem; font-size: .75rem; font-weight: 600; color: var(--lh-accent-base); }
.lh-sup-m.is-pending { opacity: .6; }

.lh-sup-form {
	display: flex;
	align-items: flex-end;
	gap: .5rem;
	padding: .625rem .75rem .75rem;
	border-top: 1px solid var(--lh-line-base);
}
.lh-sup-input {
	flex: 1;
	min-height: 2.5rem;
	max-height: 8rem;
	padding: .5625rem .75rem;
	border: 1px solid var(--lh-line-base);
	border-radius: var(--lh-radius, .75rem);
	background: var(--lh-bg-surface);
	color: var(--lh-fg-primary);
	font: inherit;
	font-size: .9375rem;
	line-height: 1.35;
	resize: none;
}
.lh-sup-input:focus { outline: none; border-color: var(--lh-accent-base); box-shadow: 0 0 0 3px var(--lh-focus-ring); }
.lh-sup-send {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex: none;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--lh-btn-primary-bg, var(--lh-accent-hover));
	color: var(--lh-btn-primary-fg, var(--lh-accent-contrast));
	cursor: pointer;
}
.lh-sup-send[disabled] { opacity: .4; cursor: default; }
.lh-sup-send:focus-visible { outline: 3px solid var(--lh-focus-ring); outline-offset: 2px; }
.lh-sup-err { margin: 0; padding: 0 1rem .75rem; font-size: .8125rem; color: var(--lh-state-danger); }
.lh-sup-err[hidden] { display: none; }

@media (max-width: 600px) {
	.lh-sup-panel { position: fixed; left: .5rem; right: .5rem; bottom: 4.75rem; width: auto; }
	.lh-shell:not(.lh-noside) .lh-sup-panel { bottom: calc(7.5rem + env(safe-area-inset-bottom)); }
	.lh-sup.is-chat .lh-sup-panel { height: auto; top: 4rem; max-height: none; }
	.lh-sup-input { font-size: 1rem; } /* iOS не увеличивает страницу при фокусе */
}
@media print { .lh-sup { display: none; } }
