/* components.css — script and engine UI used across pages: request feedback, dialogs, dropdown menus, message boxes,
   pagination, rating stars, polls, the sidebar calendar, tags cloud, live search, media embeds, attached files. */

/* ==== Request feedback (qrz-core.js: ShowLoading/HideLoading, qrzBusy, qrzTip) — replaces DLE's blue «Завантаження…» popup ====
   #qrz-bar    thin progress bar along the top of the window, only for requests longer than 300 ms
   .qrz-busy   the block being worked on: dimmed, not clickable
   .qrz-tip    short note above the control after the result (.is-err red); .is-toast at the bottom when the control is off-screen */

#qrz-bar {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 10000;
	width: 100%;
	height: 3px;
	overflow: hidden;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}
#qrz-bar.is-on {
	opacity: 1;
}
#qrz-bar:before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 40%;
	background: var(--link);
	border-radius: 0 2px 2px 0;
	animation: qrz-bar 1.1s ease-in-out infinite;
}
@keyframes qrz-bar { to { left: 100%; } }
.qrz-busy {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
.qrz-tip {
	position: absolute;
	z-index: 1000;
	box-sizing: border-box;
	max-width: calc(100vw - 16px);
	padding: 6px 10px;
	font: 13px/1.3 var(--font);
	color: #fff;
	white-space: nowrap;
	background: var(--text);
	border-radius: var(--r);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.qrz-tip:after {
	content: "";
	position: absolute;
	left: var(--ax, 50%);
	bottom: -5px;
	margin-left: -5px;
	border: 5px solid transparent;
	border-bottom: 0;
	border-top-color: var(--text);
}
.qrz-tip.is-err {
	background: #b03a2e;
}
.qrz-tip.is-err:after {
	border-top-color: #b03a2e;
}
.qrz-tip.is-on {
	opacity: 1;
	transform: none;
}
.qrz-tip.is-toast {
	position: fixed;
	left: 50%;
	bottom: 20px;
	padding: 9px 14px;
	font-size: 14px;
	transform: translate(-50%, 8px);
}
.qrz-tip.is-toast.is-on {
	transform: translate(-50%, 0);
}
.qrz-tip.is-toast:after {
	content: none;
}

@media (prefers-reduced-motion: reduce) {
	#qrz-bar:before {
		left: 0;
		width: 100%;
		opacity: 0.6;
		animation: none;
	}
	.qrz-tip,
	.qrz-busy {
		transition: none;
	}
}

/* ==== Dialogs (qrz-dialog.js: qrzDialog, DLEalert/DLEconfirm/DLEprompt; qrz-core.js: news delete, notice, complaint, all polls;
   bbcodes.js colour and smiley pickers; forum.js warning and upload windows) on the native <dialog>, jQuery UI's look kept.
   .qrz-dlg-field / .qrz-dlg-select  text box and list inside one; .qrz-dlg-err  an empty required field.
   The admin panel's copy: engine/skins/admin.css ==== */

.qrz-dlg {
	box-sizing: border-box;
	width: 470px;
	max-width: calc(100% - 32px);
	max-height: calc(100% - 32px);
	margin: auto;
	padding: 3px;
	font-size: 11px;
	line-height: 1.4;
	color: #222;
	background: #fff;
	border: 1px solid var(--border);
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}
.qrz-dlg[open] {
	display: flex;
	flex-direction: column;
}
.qrz-dlg::backdrop {
	background: rgba(40, 52, 58, 0.2);
}
.qrz-dlg-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0.5em 0.4em 0.4em 1em;
	font-weight: bold;
	color: var(--text);
	background: var(--strip);
	border-bottom: 1px solid var(--border);
}
.qrz-dlg-title {
	flex: 1;
	min-width: 0;
	overflow-wrap: anywhere;
}
.qrz-dlg-x {
	position: relative;
	flex: none;
	width: 20px;
	height: 20px;
	padding: 0;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	cursor: pointer;
}
.qrz-dlg-x:after {
	content: "\00d7";
	position: absolute;
	inset: 0;
	font: 18px/18px var(--font);
	text-align: center;
	color: var(--muted);
}
.qrz-dlg-x:hover,
.qrz-dlg-x:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.12);
}
.qrz-dlg-x:hover:after,
.qrz-dlg-x:focus-visible:after {
	color: #2d3538;
}
.qrz-dlg-body {
	min-height: 0;
	overflow: auto;
	padding: 0.8em 1em;
}
.qrz-dlg-body > p:first-child {
	margin-top: 0;
}
#cp .qrz-dlg-body {
	padding: 0.5em 6px;
	text-align: center;
}
.qrz-dlg-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.4em;
	margin-top: 0.3em;
	padding: 0.6em 0.6em 0.5em;
	border-top: 1px solid var(--border);
}
.qrz-dlg-btn,
.dlevotebutton {
	padding: 0.4em 0.9em;
	font-family: inherit;
	font-size: 11px;
	font-weight: bold;
	line-height: 1.4;
	color: var(--text);
	background: var(--strip);
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
	cursor: pointer;
}
.qrz-dlg-btn:hover,
.qrz-dlg-btn:focus-visible,
.dlevotebutton:hover,
.dlevotebutton:focus-visible {
	background: var(--hover);
	border-color: #b7d0dc;
}
.qrz-dlg-field {
	box-sizing: border-box;
	width: 100%;
	padding: 0.4em;
	font: inherit;
	color: #222;
	background: #fff;
	border: 1px solid var(--border);
}
textarea.qrz-dlg-field {
	height: 100px;
	resize: vertical;
}
.qrz-dlg-select {
	padding: 0.3em;
	font: inherit;
	background: #fff;
	border: 1px solid var(--border);
}
.qrz-dlg-err {
	color: #cd0a0a;
	background: #fef1ec;
	border-color: #e8a598;
}

/* ==== Dropdown menus (#dropmenudiv, qrz-core.js) ==== */

#dropmenudiv {
	box-sizing: border-box;
	min-width: 170px;
	max-width: calc(100vw - 16px);
	margin-top: 4px;
	padding: 4px 12px;
	font: 13px/1.3 var(--font);
	background: #fff;
	border: 1px solid var(--link);
	border-radius: var(--r-lg);
	box-shadow: 0 4px 14px rgba(43, 124, 196, 0.15);
}
#dropmenudiv a {
	display: block;
	padding: 7px 4px;
	color: var(--link);
	white-space: nowrap;
	text-decoration: none;
	border-bottom: 1px solid var(--line);
}
#dropmenudiv a:last-child {
	border-bottom: 0;
}
#dropmenudiv a:hover {
	color: var(--link-hover);
	background-color: var(--strip);
}

@media (max-width: 800px) {
	#dropmenudiv a {
		padding: 10px 6px;
	}
}

/* ==== Message boxes ==== */

/* notices: the guest notice under an article, confirmations */
.berrors {
	padding: 10px 16px;
	color: var(--text);
	background: var(--strip);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
}
.berrors a {
	color: var(--link);
}
/* «Продовжити» on the confirmation notice: the primary blue action */
.berrors a.fbutton.reg-next {
	display: inline-block;
	color: #fff;
	text-decoration: none;
	background-color: var(--link);
	border-color: var(--link-hover);
}
.berrors a.fbutton.reg-next:hover {
	background-color: var(--link-hover);
}
/* filled note panels: search page, statistics summary */
.infoblock {
	margin: 0 0 25px;
	padding: 15px;
	background-color: var(--strip);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
}

@media (max-width: 800px) {
	.berrors,
	.infoblock {
		padding: 10px 12px;
	}
}

/* ==== Pagination (navigation.tpl) ====
   One row: [‹ Назад] [1 2 … 23] [Вперед ›] … [↑ Нагору]; every control is a 32px box with the block border.
   Phones: page numbers on top (compacted by libs.js to first, current ±1 and last), then [‹ Назад] [↑ Нагору] [Вперед ›]. */

.pager {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 18px 0;
}
.pg-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.pg-pages > a,
.pg-pages > span,
.pg-prev > a,
.pg-prev > span,
.pg-next > a,
.pg-next > span,
.pg-top {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 32px;
	text-decoration: none !important;
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
}
.pg-pages > a,
.pg-prev > a,
.pg-next > a {
	color: var(--text);
}
.pg-pages > a,
.pg-prev > a,
.pg-next > a,
.pg-top {
	background: #fff;
}
.pg-pages > a,
.pg-pages > span {
	min-width: 32px;
	padding: 0 6px;
	font-variant-numeric: tabular-nums;
}
/* the current page */
.pg-pages > span {
	font-weight: bold;
	color: #fff;
	background: var(--link);
	border-color: var(--link-hover);
}
.pg-pages > span.nav_ext {
	min-width: 18px;
	padding: 0;
	font-weight: normal;
	color: var(--muted);
	background: none;
	border-color: transparent;
}
.pg-pages > span.pg-gap {
	display: none;
}
.pg-prev > a,
.pg-prev > span,
.pg-next > a,
.pg-next > span {
	gap: 7px;
	padding: 0 12px;
}
/* first / last page: no step */
.pg-prev > span,
.pg-next > span {
	color: var(--placeholder);
	background: var(--soft);
	border-color: var(--line);
}
.pg-lbl:before,
.pg-lbl:after {
	width: 6px;
	height: 6px;
	border: solid currentColor;
	border-width: 2px 2px 0 0;
}
.pg-prev .pg-lbl:before {
	content: "";
	display: inline-block;
	margin-right: 7px;
	transform: rotate(-135deg);
}
.pg-next .pg-lbl:after {
	content: "";
	display: inline-block;
	margin-left: 7px;
	transform: rotate(45deg);
}
.pg-prev > a .pg-lbl:before,
.pg-next > a .pg-lbl:after {
	color: var(--link);
}
.pg-top {
	margin-left: auto;
	padding: 0 12px;
	color: var(--text-2);
	white-space: nowrap;
}
.pg-pages > a:hover {
	color: #fff;
	background: var(--link);
	border-color: var(--link-hover);
}
.pg-prev > a:hover,
.pg-next > a:hover,
.pg-top:hover {
	color: var(--link-hover);
	background: var(--strip);
	border-color: var(--link);
}

@media (max-width: 620px) {
	/* full width: the page numbers share the line, the three buttons are equal thirds */
	.pager {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-areas: "pages pages pages" "prev top next";
		gap: 8px;
	}
	.pg-pages {
		grid-area: pages;
	}
	.pg-prev {
		grid-area: prev;
	}
	.pg-next {
		grid-area: next;
	}
	.pg-top {
		grid-area: top;
		margin: 0;
		padding: 0 6px;
	}
	.pg-prev > a,
	.pg-prev > span,
	.pg-next > a,
	.pg-next > span {
		padding: 0 6px;
	}
	.pg-pages > a,
	.pg-pages > span,
	.pg-prev > a,
	.pg-prev > span,
	.pg-next > a,
	.pg-next > span,
	.pg-top {
		height: 38px;
	}
	.pg-pages > a,
	.pg-pages > span {
		flex: 1 1 0;
		min-width: 38px;
	}
	.pg-pages > span.nav_ext {
		flex: 0 0 auto;
		min-width: 16px;
	}
	.pg-pages.is-compact > .pg-far,
	.pg-pages.is-compact > .pg-ext {
		display: none;
	}
	.pg-pages.is-compact > .pg-gap {
		display: flex;
	}
}

/* ==== Rating stars (.unit-rating, functions.php) ==== */

.ratebox {
	text-align: center;
}
.ratebox .rate {
	width: 85px;
	height: 17px;
	margin: 0;
	overflow: hidden;
	text-align: left;
}
.rating {
	width: 85px;
	height: 17px;
	font-size: 0.9em;
}
.unit-rating {
	position: relative;
	width: 85px;
	height: 17px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24'%3E%3Cpath fill='%23c3d4dd' d='M12 2.6l2.9 6 6.6.9-4.8 4.6 1.2 6.6L12 17.5l-5.9 3.2 1.2-6.6-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") repeat-x 0 0;
}
.unit-rating li {
	float: left;
	margin: 0;
	padding: 0;
	text-indent: -90000px;
}
.unit-rating li a {
	position: absolute;
	z-index: 17;
	display: block;
	width: 17px;
	height: 17px;
	padding: 0;
	text-indent: -9000px;
	text-decoration: none;
}
.unit-rating li a:hover {
	z-index: 2;
	left: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24'%3E%3Cpath fill='%23398dd8' d='M12 2.6l2.9 6 6.6.9-4.8 4.6 1.2 6.6L12 17.5l-5.9 3.2 1.2-6.6-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") repeat-x 0 0;
}
.unit-rating li.current-rating {
	position: absolute;
	z-index: 1;
	display: block;
	height: 17px;
	text-indent: -9000px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24'%3E%3Cpath fill='%23e2a93b' d='M12 2.6l2.9 6 6.6.9-4.8 4.6 1.2 6.6L12 17.5l-5.9 3.2 1.2-6.6-4.8-4.6 6.6-.9z'/%3E%3C/svg%3E") repeat-x 0 0;
}
/* star N: its link starts at (N-1)×17px and, hovered, covers N stars */
.unit-rating a.r1-unit { left: 0; }
.unit-rating a.r2-unit { left: 17px; }
.unit-rating a.r3-unit { left: 34px; }
.unit-rating a.r4-unit { left: 51px; }
.unit-rating a.r5-unit { left: 68px; }
.unit-rating a.r1-unit:hover { width: 17px; }
.unit-rating a.r2-unit:hover { width: 34px; }
.unit-rating a.r3-unit:hover { width: 51px; }
.unit-rating a.r4-unit:hover { width: 68px; }
.unit-rating a.r5-unit:hover { width: 85px; }

/* ==== Polls (sidebar vote, article poll) ==== */

#votes .btl {
	border: 0;
}
#votes .btl h4 {
	color: var(--text);
}
.vtitle {
	margin-bottom: 12px;
	padding: 8px 12px;
	color: var(--text);
	background: var(--strip);
	border: 1px solid var(--border);
	border-radius: var(--r);
}
.vote,
#dle-poll-list div {
	clear: both;
	padding: 2px 0 2px 2px;
}
.vote input,
#dle-poll-list div input {
	float: left;
	width: 14px;
	height: 14px;
	margin: 0 4px 0 0;
	padding: 0;
}
.pollvotelist {
	width: 70%;
	text-align: left;
}
.pollvotelist input {
	margin-right: 5px;
}
.vresult {
	float: right;
	margin-top: 3px;
	padding: 0;
	font-size: 12px;
	color: var(--link);
	background: none;
	border: 0;
	cursor: pointer;
}
.vresult:hover {
	text-decoration: underline;
}
/* result bars (vote.php, poll.php, ajax vote/poll/allvotes), the forum's .f-poll-bar look */
.poll-bar {
	display: block;
	height: 8px;
	margin: 3px 0 8px;
	overflow: hidden;
	background: var(--strip);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}
.poll-bar > span {
	display: block;
	height: 100%;
	background: var(--link);
}

/* ==== Calendar (engine/classes/qrz-calendar.php) ====
   [‹] month [›], small grey weekday names, days in round cells; a day with publications is a light blue disc (a link),
   today a blue ring, today with publications a full blue disc. */

table.calendar {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}
table.calendar th,
table.calendar td {
	padding: 0;
	text-align: center;
	vertical-align: middle;
	background: none;
}
table.calendar th.monthselect {
	padding: 0 0 6px;
	font-size: 1em;
}
.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}
.cal-month {
	font: bold 15px/1.2 var(--font);
	color: var(--text);
}
.cal-nav {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	font: 20px/1 var(--font);
	color: var(--link-hover);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 50%;
}
a.cal-nav:hover,
a.cal-nav:focus-visible {
	color: var(--link-hover);
	text-decoration: none;
	background: var(--hover);
}
.cal-nav.is-off {
	color: #c5d3da;
	border-color: var(--line);
}
table.calendar tr.cal-wd th {
	height: 24px;
	font-size: 12px;
	font-weight: normal;
	color: var(--muted);
}
table.calendar tr.cal-wd th.weekday {
	color: var(--placeholder);
}
table.calendar td {
	height: 32px;
	font-size: 13px;
	color: var(--text);
}
table.calendar td.weekday {
	color: var(--faint);
}
table.calendar td > span,
table.calendar td > a {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	margin: 0 auto;
	border-radius: 50%;
}
table.calendar td > a {
	font-weight: bold;
	color: var(--link-hover);
	text-decoration: none;
	background: #e3eef8;
}
table.calendar td > a:hover,
table.calendar td > a:focus-visible {
	color: #fff;
	text-decoration: none;
	background: var(--link);
}
table.calendar td.day-current > span {
	font-weight: bold;
	color: var(--link-hover);
	box-shadow: inset 0 0 0 2px var(--link);
}
table.calendar td.day-current > a {
	color: #fff;
	background: var(--link);
}

@media (max-width: 800px) {
	/* bigger targets for fingers */
	table.calendar td {
		height: 36px;
	}
	table.calendar td > span,
	table.calendar td > a {
		width: 32px;
		height: 32px;
	}
	.cal-nav {
		width: 34px;
		height: 34px;
	}
}

/* ==== Tags cloud (tagscloud.php) ==== */

.clouds_xsmall { font-size: 1em; }
.clouds_small { font-size: 1.1em; }
.clouds_medium { font-size: 1.2em; font-weight: bold; }
.clouds_large { font-size: 1.5em; }
.clouds_xlarge { font-size: 1.7em; }

/* ==== Live search suggestions under the top search field (qrz-core.js) ==== */

#searchsuggestions {
	width: 300px;
	font-size: 10px;
	line-height: 14px;
	background-color: #5c9ccc;
	border: 1px solid #919191;
}
#searchsuggestions a {
	display: block;
	clear: left;
	height: 75px;
	padding: 5px;
	text-decoration: none;
	background-color: #fff;
}
#searchsuggestions a:hover {
	color: #fff;
	background-color: #fdd08b;
}
#searchsuggestions a span {
	color: #555;
}
#searchsuggestions a:hover span {
	color: #000;
}
#searchsuggestions a span.searchheading {
	display: block;
	padding: 5px;
	font-weight: bold;
	color: #fff;
	background: #5c9ccc;
}
#searchsuggestions a:hover span.searchheading {
	color: #fff;
}
#searchsuggestions span.seperator {
	float: right;
	margin-right: 5px;
	padding-right: 15px;
}
#searchsuggestions span.seperator a {
	display: block;
	height: auto;
	color: #fff;
	background-color: transparent;
}
#searchsuggestions span.notfound {
	display: block;
	padding: 5px;
	color: #000;
	background-color: #fff;
}

/* ==== Sort links ({sort}): direction arrow next to the active one ==== */

.sort-dir {
	margin-right: 3px;
	color: var(--muted);
}

/* ==== Media (engine/classes/qrz-media.php)
   .qrz-yt          YouTube preview box; its size comes from the stored player (inline width + aspect-ratio), phones: content.css
   .qrz-yt-play     picture + round play button; .is-on once site.js «videos» has swapped in the player
   .qrz-video / .qrz-audio  [video=] / [audio=] in the browser's own players
   .qrz-media-file  a format browsers can't play, shown as a download link; .qrz-media-gone  a recording that wasn't kept ==== */

.qrz-yt {
	position: relative;
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	vertical-align: top;
	background: #000;
	border-radius: var(--r-sm);
}
.qrz-yt-play {
	position: absolute;
	inset: 0;
	display: block;
}
.qrz-yt-play img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}
.qrz-yt-play:after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	background: rgba(0, 0, 0, 0.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat 56% 50% / 28px;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	transition: background-color 0.2s ease, transform 0.2s ease;
}
.qrz-yt-play:hover img,
.qrz-yt-play:focus-visible img {
	opacity: 1;
}
.qrz-yt-play:hover:after,
.qrz-yt-play:focus-visible:after {
	background-color: #cc1f1a;
	transform: scale(1.06);
}
.qrz-yt-play:focus-visible {
	outline: 3px solid var(--link);
	outline-offset: -3px;
}
.qrz-yt.is-on iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
.qrz-video {
	display: inline-block;
	max-width: 100%;
	height: auto;
	vertical-align: top;
	background: #000;
	border-radius: var(--r-sm);
}
.qrz-audio {
	display: block;
	width: 100%;
	max-width: 520px;
	height: 40px;
	margin: 6px 0;
}
.qrz-media-file a,
.qrz-media-gone {
	display: inline-block;
	padding: 6px 10px;
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}
.qrz-media-file a:before {
	content: "\2B07\FE0E  ";
}
.qrz-media-gone {
	font-style: italic;
	color: var(--muted);
}
/* picture captions: hidden by default, shown under the picture in articles (content.css) and in the viewer */
.highslide-caption {
	display: none;
	padding: 5px;
	background: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.qrz-yt-play img,
	.qrz-yt-play:after {
		transition: none;
	}
}

/* ==== Attached files ([attachment=N], qrz-files.php) ====
   A card: type tile | name over «15,7 КБ · 161 завантаження» | download arrow; all of it is the link. */

.qrz-file {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	max-width: 100%;
	margin: 3px 0;
	padding: 7px 12px 7px 8px;
	vertical-align: middle;
	font: 14px/1.3 var(--font);
	text-align: left;
	color: var(--text);
	text-decoration: none !important;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
}
a.qrz-file {
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
a.qrz-file:hover {
	background: var(--strip);
	border-color: #a9c9d8;
}
a.qrz-file:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}
a.qrz-file:after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	margin-left: 4px;
	background: var(--link);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.qrz-file:hover:after {
	background: #2a6fae;
}
/* the type tile: a small sheet with a folded corner */
.qrz-file-ext {
	position: relative;
	flex: none;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	box-sizing: border-box;
	width: 34px;
	height: 40px;
	padding-bottom: 6px;
	font: bold 9px/1 var(--font);
	letter-spacing: 0.3px;
	color: #fff;
	background: var(--faint);
	border-radius: 3px;
	clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.qrz-file-ext:before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 10px;
	height: 10px;
	background: rgba(255, 255, 255, 0.55);
	border-bottom-left-radius: 2px;
}
.qrz-file-ext.qrz-file-pdf {
	background: #d0584f;
}
.qrz-file-ext.qrz-file-zip {
	background: #c58a1b;
}
.qrz-file-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.qrz-file-name {
	font-weight: bold;
	color: var(--link);
	overflow-wrap: anywhere;
}
.qrz-file-meta {
	margin-top: 2px;
	font-size: 12px;
	font-weight: normal;
	color: var(--muted);
}
/* deleted file / group without download rights: same shape, no link */
.qrz-file.is-gone,
.qrz-file.is-locked {
	background: var(--soft);
	border-style: dashed;
}
.qrz-file.is-gone .qrz-file-ext,
.qrz-file.is-locked .qrz-file-ext {
	background: #b8c6cc;
}
.qrz-file.is-gone .qrz-file-name,
.qrz-file.is-locked .qrz-file-name {
	color: var(--faint);
}
.qrz-file.is-gone .qrz-file-name {
	font-weight: normal;
	font-style: italic;
}
/* [attachment=N:text] inside a sentence: the author's words are the link, a quiet «DOCX · 15,7 КБ» tag after them */
.qrz-file-inline {
	white-space: normal;
}
.qrz-file-tag {
	display: inline-block;
	margin-left: 3px;
	padding: 0 6px;
	vertical-align: 1px;
	font: 11px/17px var(--font);
	color: var(--text-2);
	white-space: nowrap;
	background: var(--strip);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
}
.qrz-file-inline:hover .qrz-file-tag {
	background: var(--hover);
}

@media (max-width: 620px) {
	/* phones: a full-width row, easy to tap */
	.qrz-file {
		display: flex;
		width: 100%;
	}
	a.qrz-file:after {
		margin-left: auto;
	}
	/* the card is a block here, the line break after it would leave a gap */
	.qrz-file + br {
		display: none;
	}
}
