/* © 2025 Mark Kats. Все права защищены. Копирование и переработка запрещены. */

@import url('./forms.css?v=1786046274');

/* ── Floating panels ─────────────────────────────────────────────────────── */

.pb-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: calc(var(--pb-z-panel, 1100) - 1);
	touch-action: none;
}

html[data-ui-theme='light'] .pb-modal-backdrop {
	background: rgba(24, 31, 42, 0.42);
}

#floatingPanelRoot:has(.pb-schema-map-panel, .pb-module-diag-panel) {
	position: fixed;
	inset: 0;
	display: block;
	z-index: calc(var(--pb-z-panel, 1100) - 1);
	background: rgba(0, 0, 0, 0.34);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	pointer-events: none;
}

html[data-ui-theme='light'] #floatingPanelRoot:has(.pb-schema-map-panel, .pb-module-diag-panel) {
	background: rgba(24, 31, 42, 0.26);
}

#floatingPanelRoot:has(.pb-schema-map-panel, .pb-module-diag-panel) > .pb-panel {
	pointer-events: auto;
}

.pb-panel {
	--pb-panel-bg: #202020;
	--pb-panel-body-bg: #1c1c1c;
	--pb-panel-head-bg: #262626;
	--pb-panel-footer-bg: rgba(255, 255, 255, 0.06);
	--pb-panel-border-width: 1px;
	--pb-panel-border: #555555;
	--pb-panel-outline-width: 1px;
	--pb-panel-outline: rgba(255, 255, 255, 0.045);
	--pb-panel-shadow: 0 18px 46px rgba(0, 0, 0, 0.58);
	position: fixed;
	top: calc(env(safe-area-inset-top, 0px) + var(--page-topbar-offset, 58px) + 18px);
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, calc(100vw - 32px));
	max-width: calc(100vw - 16px);
	margin-left: auto;
	margin-right: auto;
	max-height: min(90vh, calc(100vh - env(safe-area-inset-top, 0px) - var(--page-topbar-offset, 58px) - 16px));
	overflow: hidden;
	box-sizing: border-box;
	background: var(--pb-panel-bg);
	color: var(--ui-text);
	font:
		13px/1.35 'Artifakt Element',
		system-ui,
		-apple-system,
		'Segoe UI',
		sans-serif;
	border: var(--pb-panel-border-width) solid var(--pb-panel-border);
	border-radius: 12px;
	box-shadow: var(--pb-panel-shadow);
	outline: var(--pb-panel-outline-width) solid var(--pb-panel-outline);
	z-index: var(--pb-z-panel, 1100);
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	touch-action: pan-x pan-y;
}

:where(html[data-ui-theme='light']) .pb-panel {
	--pb-panel-bg: #f4f6f8;
	--pb-panel-body-bg: #f5f7f9;
	--pb-panel-head-bg: #e4eaf0;
	--pb-panel-footer-bg: #eef2f6;
	--pb-panel-border: rgba(31, 41, 55, 0.18);
	--pb-panel-outline: rgba(15, 23, 42, 0.1);
	--pb-panel-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
}

.pb-panel-head {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	padding: 6px;
	border-bottom: 1px solid var(--ui-border-strong);
	background: var(--pb-panel-head-bg);
	cursor: move;
	user-select: none;
	touch-action: none;
}

.pb-panel-head strong {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font:
		600 15px/1.2 'IBM Plex Sans Condensed',
		sans-serif;
	letter-spacing: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pb-panel-head-actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 4px;
	min-width: 0;
}

.pb-panel-head-actions > .pb-btn {
	height: 26px;
	min-height: 26px;
	padding: 0 8px;
}

.pb-panel-body {
	flex: 1 1 auto;
	padding: 8px;
	display: grid;
	gap: 8px;
	min-height: 0;
	min-width: 0;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-y: auto;
	background: var(--pb-panel-body-bg);
}

.pb-panel-note {
	min-width: 0;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--ui-border);
	border-radius: 8px;
	background: var(--ui-panel-bg);
	color: var(--ui-text-muted);
	font-size: 12px;
	line-height: 1.4;
	white-space: pre-line;
	box-sizing: border-box;
}

.pb-panel-note--warning {
	border-color: color-mix(in srgb, var(--status-warning-text) 48%, transparent);
	background: color-mix(in srgb, var(--status-warning-text) 11%, var(--ui-panel-bg-strong));
	color: var(--status-warning-text);
}

.pb-base-reference-status {
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid var(--ui-border);
	border-left: 3px solid var(--ui-border-strong);
	border-radius: 8px;
	background: var(--ui-surface);
	color: var(--ui-text);
	font-size: 12px;
	line-height: 1.35;
}

.pb-base-reference-status--available {
	border-left-color: var(--status-success-text);
}

.pb-base-reference-status--warning {
	border-left-color: var(--status-warning-text);
}

.pb-base-reference-status--danger {
	border-left-color: var(--status-danger-text);
}

.pb-base-reference-status__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
}

.pb-base-reference-status__head strong {
	min-width: 0;
	font-weight: 600;
}

.pb-base-reference-status__badge {
	flex: 0 0 auto;
	padding: 2px 7px;
	border-radius: 999px;
	background: var(--ui-surface-soft);
	color: var(--ui-text-muted);
	font-size: 11px;
	font-weight: 600;
}

.pb-base-reference-status--available .pb-base-reference-status__badge {
	background: color-mix(in srgb, var(--status-success-text) 14%, var(--ui-surface));
	color: var(--status-success-text);
}

.pb-base-reference-status--warning .pb-base-reference-status__badge {
	background: color-mix(in srgb, var(--status-warning-text) 14%, var(--ui-surface));
	color: var(--status-warning-text);
}

.pb-base-reference-status--danger .pb-base-reference-status__badge {
	background: color-mix(in srgb, var(--status-danger-text) 14%, var(--ui-surface));
	color: var(--status-danger-text);
}

.pb-base-reference-status__fields {
	display: grid;
	gap: 3px;
	margin: 6px 0 0;
}

.pb-base-reference-status__fields div {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
}

.pb-base-reference-status__fields dt {
	flex: 0 0 auto;
	color: var(--ui-text-muted);
}

.pb-base-reference-status__fields dd {
	min-width: 0;
	margin: 0;
	text-align: right;
	overflow-wrap: anywhere;
}

.pb-base-reference-status__fields code {
	font-size: 10px;
}

.pb-base-reference-status--compact {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	padding: 3px 6px;
	font-size: 11px;
	line-height: 1.2;
}

.pb-base-reference-status--compact .pb-base-reference-status__diagnostic {
	min-width: 0;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pb-base-reference-status--compact .pb-base-reference-status__badge {
	padding: 1px 5px;
	font-size: 10px;
}

.pb-base-reference-status-link {
	display: inline-flex;
	max-width: 100%;
	color: inherit;
	text-decoration: none;
}

.pb-base-reference-status-link:hover {
	text-decoration: underline;
}

@media (max-width: 560px) {
	.pb-base-reference-status__head,
	.pb-base-reference-status__fields div {
		align-items: flex-start;
		flex-direction: column;
		gap: 2px;
	}

	.pb-base-reference-status__badge {
		align-self: flex-start;
	}
}

html[data-ui-theme='light'] .pb-panel-note--warning {
	border-color: color-mix(in srgb, var(--status-warning-text) 36%, transparent);
	background: color-mix(in srgb, var(--status-warning-text) 10%, var(--ui-panel-bg));
}

.pb-panel.discussions-topic-floating-panel {
	width: min(520px, calc(100vw - 32px));
	height: min(820px, calc(100dvh - env(safe-area-inset-top, 0px) - var(--page-topbar-offset, 58px) - 32px));
	max-height: min(820px, calc(100dvh - env(safe-area-inset-top, 0px) - var(--page-topbar-offset, 58px) - 32px));
}

.pb-panel.discussions-topic-floating-panel > .pb-panel-body {
	display: flex;
	padding: 0;
	overflow: hidden;
}

.pb-panel.pb-project-discussions-panel,
.pb-panel.entity-discussions-panel {
	width: min(1180px, calc(100vw - 32px));
	height: min(820px, calc(100dvh - env(safe-area-inset-top, 0px) - var(--page-topbar-offset, 58px) - 32px));
	max-height: min(820px, calc(100dvh - env(safe-area-inset-top, 0px) - var(--page-topbar-offset, 58px) - 32px));
}

.pb-panel.pb-project-discussions-panel > .pb-panel-body,
.pb-panel.entity-discussions-panel > .pb-panel-body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	padding: 0;
	overflow: hidden;
}

.pb-project-discussions-panel .discussions-page--embedded,
.pb-project-discussions-panel .discussions-shell,
.pb-project-discussions-panel .discussions-main,
.pb-project-discussions-panel .discussions-work-area,
.entity-discussions-panel .discussions-page--embedded,
.entity-discussions-panel .discussions-shell,
.entity-discussions-panel .discussions-main,
.entity-discussions-panel .discussions-work-area {
	width: 100%;
	height: 100%;
	min-height: 0;
}

.discussions-topic-floating-panel .discussions-topic-modal-host,
.discussions-topic-floating-panel .discussions-page--embedded,
.discussions-topic-floating-panel .discussions-shell,
.discussions-topic-floating-panel .discussions-main,
.discussions-topic-floating-panel .discussions-work-area {
	width: 100%;
	height: 100%;
	min-height: 0;
}

.pb-panel-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 2px;
	border: 1px solid var(--ui-border);
	border-radius: 10px;
	background: var(--ui-surface-soft);
}

.pb-panel-tabs-scroll {
	max-width: 100%;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.pb-panel-tabs-scroll::-webkit-scrollbar {
	display: none;
}

.pb-panel-tabs-scroll > .pb-btn {
	flex: 0 0 auto;
	white-space: nowrap;
	background: rgba(255, 255, 255, 0.055);
}

.pb-panel-sections {
	display: grid;
	gap: 18px;
}

.pb-panel-section {
	display: grid;
	gap: 8px;
	padding: 6px;
	border: 1px solid var(--ui-border);
	border-radius: 10px;
	background: var(--ui-surface-soft);
}

.pb-section-hint {
	color: var(--ui-text-dim);
	font-size: 12px;
	line-height: 1.4;
}

.pb-panel-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 2px;
	min-width: 0;
}

.pb-form-row.pb-search-input-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.pb-form-row.pb-search-input-row > .pb-input {
	flex: 1 1 auto;
	min-width: 0;
}

.pb-form-row.pb-search-input-row > .pb-panel-actions {
	flex: 0 0 auto;
	flex-wrap: nowrap;
	margin-top: 0;
}

.pb-panel-actions-split {
	justify-content: space-between;
}

.pb-panel-actions-left,
.pb-panel-actions-main {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
}

.pb-panel-actions-left {
	flex: 1 1 auto;
}

.search-scope-rows--global {
	align-items: stretch;
	flex-direction: column;
	width: 100%;
}

.search-scope-row {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	align-items: center;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.search-scope-row > .pb-form-label {
	min-width: max-content;
	white-space: nowrap;
}

.search-scope-row > .pb-panel-tabs {
	min-width: 0;
}

.pb-panel-actions-main {
	flex: 0 0 auto;
	justify-content: flex-end;
}

.pb-panel-footer-actions {
	flex: 0 0 auto;
	margin: 0;
	padding: 6px;
	border-top: 1px solid var(--ui-border-strong);
	background: var(--ui-panel-footer-bg);
}

.pb-panel-error {
	font-size: 12px;
	line-height: 1.25;
	color: var(--status-danger-text);
}

.pb-panel-head > .pb-icon-btn {
	flex: 0 0 auto;
}

.pb-panel-head > .pb-icon-btn:not([data-role='discussion-copy-link']) {
	color: var(--status-danger-text);
	background: var(--status-danger-bg);
	border-color: var(--status-danger-border);
}

.pb-panel-head > .pb-icon-btn:not([data-role='discussion-copy-link']):hover {
	background: var(--status-danger-bg-hover);
	border-color: var(--status-danger-border-hover);
	color: var(--status-danger-text-hover);
}

.pb-panel-head > .pb-icon-btn:not([data-role='discussion-copy-link']):active {
	background: var(--status-danger-bg-active);
	border-color: var(--status-danger-border-hover);
	color: var(--status-danger-text);
}

@media (max-width: 767px) {
	.pb-panel {
		top: calc(env(safe-area-inset-top, 0px) + var(--page-topbar-offset, 58px) + 8px);
		right: 8px;
		left: 8px;
		width: auto;
		max-width: none;
	}
}
