/*
 * KinoFlow base styles for DataLife Engine system widgets.
 * DLE 19.1 compatibility additions live in onik-dle19.css.
 */

.DLEPush,
#DLEPush {
	position: fixed;
	z-index: 10020;
	right: 18px;
	bottom: 18px;
	display: none !important;
	width: min(380px, calc(100vw - 32px));
	gap: 10px;
	pointer-events: none;
}

.DLEPush > *,
#DLEPush > * {
	padding: 14px 16px;
	color: var(--foreground, #f7f7f7);
	background: color-mix(in srgb, var(--card, #1d1f1e) 96%, transparent);
	border: 1px solid var(--border, #343635);
	border-radius: 12px;
	box-shadow: 0 16px 44px rgb(0 0 0 / 32%);
	pointer-events: auto;
}

.ui-widget-overlay {
	position: fixed;
	z-index: 9990;
	inset: 0;
	background: rgb(0 0 0 / 70%);
	backdrop-filter: blur(4px);
}

.ui-dialog {
	position: fixed;
	z-index: 10000;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	overflow: auto;
	color: var(--foreground, #f7f7f7);
	background: var(--card, #1d1f1e);
	border: 1px solid var(--border, #343635);
	border-radius: 14px;
	box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.ui-dialog-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 18px;
	border-bottom: 1px solid var(--border, #343635);
}

.ui-dialog-title {
	font-weight: 700;
}

.ui-dialog-titlebar-close {
	display: grid;
	width: 34px;
	height: 34px;
	padding: 0;
	place-items: center;
	color: inherit;
	background: transparent;
	border: 1px solid var(--border, #343635);
	border-radius: 50%;
	cursor: pointer;
}

.ui-dialog-content {
	padding: 18px;
}

.ui-dialog-buttonpane {
	padding: 0 18px 18px;
}

.ui-dialog-buttonset {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.ui-dialog-buttonset button,
.dle-button,
.bbcodes {
	min-height: 40px;
	padding: 0 16px;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	background: var(--fk-green, #18a367);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
}

.ui-helper-hidden-accessible {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.qq-uploader {
	position: relative;
	display: grid;
	gap: 10px;
	padding: 14px;
	background: color-mix(in srgb, var(--muted, #292b2a) 55%, transparent);
	border: 1px dashed var(--border, #3c3e3d);
	border-radius: 12px;
}

.qq-upload-button {
	display: inline-grid;
	width: fit-content;
	min-height: 40px;
	padding: 0 15px;
	place-items: center;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	background: var(--fk-green, #18a367);
	border-radius: 10px;
	cursor: pointer;
}

.qq-upload-drop-area {
	display: grid;
	min-height: 82px;
	place-items: center;
	color: var(--muted-foreground, #a4a7a5);
	border-radius: 9px;
}

.qq-upload-list,
.uploadedfile {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qq-upload-list li,
.uploadedfile {
	padding: 10px 12px;
	background: var(--card, #1d1f1e);
	border: 1px solid var(--border, #343635);
	border-radius: 9px;
}

.qq-upload-file,
.qq-upload-size {
	margin-right: 8px;
}

.qq-upload-size,
.qq-upload-status-text {
	color: var(--muted-foreground, #a4a7a5);
	font-size: 12px;
}

.qq-upload-cancel,
.qq-upload-delete,
.uploadedfile a {
	color: var(--fk-green, #18a367);
}

.xfieldsrow {
	display: grid;
	grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
	gap: 10px 16px;
	align-items: center;
	margin: 0 0 12px;
}

.xfieldsrow input:not([type="checkbox"]):not([type="radio"]),
.xfieldsrow textarea,
.xfieldsrow select {
	width: 100%;
}

.dle-captcha,
.captcha-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.dle-captcha img,
.captcha-row img {
	max-width: 180px;
	height: auto;
	border-radius: 8px;
}

.smart-captcha,
.g-recaptcha {
	max-width: 100%;
	overflow: hidden;
}

.tox-tinymce,
.wseditor,
.bb-editor,
.editor-panel {
	max-width: 100%;
	color: #222;
	border-color: var(--border, #343635) !important;
	border-radius: 10px !important;
}

.editor-panel {
	overflow: auto;
	background: var(--card, #1d1f1e);
}

.dle-alert,
.dle-confirm,
.dle-popup-userprofile {
	color: var(--foreground, #f7f7f7);
	background: var(--card, #1d1f1e);
}

.pollprogress,
.voteprogress {
	height: 7px;
	overflow: hidden;
	background: var(--muted, #292b2a);
	border-radius: 99px;
}

.pollprogress span,
.voteprogress span {
	display: block;
	height: 100%;
	background: var(--fk-green, #18a367);
}

.rating,
.unit-rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.attachment {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	background: color-mix(in srgb, var(--muted, #292b2a) 55%, transparent);
	border: 1px solid var(--border, #343635);
	border-radius: 9px;
}

@media (max-width: 640px) {
	.DLEPush,
	#DLEPush {
		right: 10px;
		bottom: 10px;
		width: calc(100vw - 20px);
	}

	.ui-dialog {
		max-width: calc(100vw - 20px);
		max-height: calc(100vh - 20px);
	}

	.xfieldsrow {
		grid-template-columns: 1fr;
		gap: 6px;
	}
}
