.syngli-panel_dialog.syngli-editor_dialog {
    position: absolute;
    width: min(640px, calc(100vw - 48px));
    max-height: calc(100vh - 60px);
    /* top/left set by JS based on trigger row */
}

.syngli-editor_relation_tag {
	display: inline-block;
	margin: 0 6px;
	font-size: 12px;
	font-weight: 600;
	color: #4f7ca7;
	white-space: nowrap;
}

.syngli-panel_field-wide.syngli-editor_relation_row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.syngli-editor_relation_row .syngli-panel_input {
	width: 100%;
	box-sizing: border-box;
}

.syngli-editor_relation_preview {
	margin-top: 10px;
	padding: 8px 10px;
	background: #f4f7fb;
	border-radius: 6px;
	border: 1px solid #dce5ef;
	font-family: source_sans_proregular, serif;
	font-size: 13px;
	color: #2d4258;
	width: 100%;
	box-sizing: border-box;
}

.syngli-panel_field.syngli-editor_validity_row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.syngli-editor_validity_slider {
	width: 100%;
	margin-top: 10px;
	accent-color: #4f7ca7;
}

.syngli-editor_validity_input {
	flex: 0 0 70px;
	text-align: center;
}

.syngli-editor_lang_list {
	list-style: none;
	padding: 0;
	margin: 0;
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid #d6dce3;
	border-radius: 6px;
}

.syngli-editor_lang_item {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	color: #2b3138;
}

.syngli-editor_lang_item:hover {
	background: #f0f4f8;
}

.syngli-editor_lang_item.is-selected {
	background: #d0e4ff;
	color: #1a3a6e;
	font-weight: 600;
}

.syngli-tag-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 1px solid #8a9cb0;
	border-radius: 2px;
	font-size: 11px;
	color: #2d4258;
}

.syngli-editor_char_counter {
	font-size: 11px;
	color: #8a9cb0;
	text-align: right;
	margin-top: 4px;
}

.syngli-editor_char_counter--over {
	color: #c0392b;
	font-weight: 600;
}

.syngli-editor_file_current_wrap {
	padding: 8px 0;
	border-bottom: 1px solid #e8eaed;
	margin-bottom: 8px;
}

.syngli-editor_file_search {
	width: 100%;
	margin-bottom: 6px;
	box-sizing: border-box;
}

.syngli-editor_file_thumb {
	max-height: 32px;
	max-width: 48px;
	width: auto;
	height: auto;
	vertical-align: middle;
	margin-right: 8px;
	flex-shrink: 0;
	object-fit: contain;
}

.syngli-editor_file_icon {
	margin-right: 8px;
	color: #8a9cb0;
	flex-shrink: 0;
}

.syngli-editor_file_name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.syngli-editor_file_date {
	font-size: 11px;
	color: #8a9cb0;
	white-space: nowrap;
	margin-left: 8px;
	flex-shrink: 0;
}

.syngli-editor_file_current {
	display: flex;
	align-items: center;
	font-size: 13px;
	color: #2b3138;
}

.syngli-editor_file_empty {
	font-size: 13px;
	color: #8a9cb0;
	padding: 8px 0;
}

.syngli-editor_file_list {
	list-style: none;
	padding: 0;
	margin: 0;
	max-height: 200px;
	overflow-y: auto;
	border: 1px solid #d6dce3;
	border-radius: 6px;
}

.syngli-editor_file_item {
	display: flex;
	align-items: center;
	padding: 5px 10px;
	cursor: pointer;
	font-size: 13px;
	color: #2b3138;
	gap: 0;
}

.syngli-editor_file_item:hover { background: #f0f4f8; }

.syngli-editor_file_item.is-selected {
	background: #d0e4ff;
	color: #1a3a6e;
	font-weight: 600;
}

.syngli-editor_file_tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eaed;
}

.syngli-editor_file_tab {
    padding: 3px 14px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #d0d7e0;
    border-radius: 14px;
    background: #fff;
    color: #4a5568;
    line-height: 1.5;
}

.syngli-editor_file_tab:hover { background: #f0f4f8; }

.syngli-editor_file_tab.is-active {
    background: #4f7ca7;
    color: #fff;
    border-color: #4f7ca7;
}

.premises-file-cell__placeholder {
    color: #c0cbd6;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    line-height: 1;
}

.premises-file-cell__placeholder:hover { color: #4f7ca7; }

.syngli-editor_file_chips_area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    min-height: 36px;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 4px;
    align-items: center;
}

.syngli-editor_file_chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: #e8f2fb;
    border: 1px solid #b8d4eb;
    border-radius: 12px;
    font-size: 12px;
    color: #2d4258;
    max-width: 180px;
}

.syngli-editor_file_chip_name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.syngli-editor_file_chip_remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #8a9cb0;
    font-size: 10px;
    flex-shrink: 0;
    line-height: 1;
}

.syngli-editor_file_chip_remove:hover { color: #c0392b; }

.syngli-editor_file_selection_counter {
    font-size: 12px;
    color: #8a9cb0;
    text-align: right;
    padding: 4px 0 2px;
}

.syngli-editor_file_selection_counter--full {
    color: #c0392b;
    font-weight: 600;
}

.syngli-editor_relation_file_order_btn {
    background: none;
    border: none;
    padding: 0 3px;
    cursor: pointer;
    color: #aaa;
    font-size: 10px;
    line-height: 1;
}

.syngli-editor_relation_file_order_btn:hover:not(:disabled) { color: #4f7ca7; }
.syngli-editor_relation_file_order_btn:disabled { opacity: 0.3; cursor: default; }

.syngli-editor_footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid #e7e8ea;
    flex-shrink: 0;
}
