/*  Radiosoft style for phpBB 3.3 (child of prosilver)
    Palette: radiosoft.pro (css/theme-light.css, css/theme-dark.css)
    Layout ideas: prosilver (French edition), phpBB-fr.com
*/

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("./fonts/open-sans-v27-latin_cyrillic-regular.woff2") format("woff2");
}

@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("./fonts/open-sans-v27-latin_cyrillic-600.woff2") format("woff2");
}

/* Every colour is light-dark(light, dark); data-theme on <html> forces one side, otherwise the OS decides */
:root {
	color-scheme: light dark;

	--rs-radius: 10px;
	--rs-radius-sm: 6px;
	--rs-font: 'Open Sans', 'Segoe UI', Arial, sans-serif;

	--rs-page-1: light-dark(#dce8f2, #0a2e44);
	--rs-page-2: light-dark(#e4eef7, #0c3248);
	--rs-page-3: light-dark(#edf2f7, #0f3a54);

	--rs-wrap: light-dark(#f7fafd, #0d3650);
	--rs-surface: light-dark(#ffffff, #10415f);
	--rs-surface-alt: light-dark(#f2f7fb, #0e3b57);
	--rs-panel: light-dark(#ebf2f8, #134a6d);
	--rs-surface-3: light-dark(#e6eff7, #0c344d);
	--rs-surface-4: light-dark(#d5e4f0, #0a2c42);
	--rs-row-hover: light-dark(#e3eef8, #15496e);
	--rs-dropdown: light-dark(#ffffff, #0f3d59);

	--rs-border: light-dark(#d6e3ee, #1f5578);
	--rs-border-strong: light-dark(#b5cde0, #2d6a92);

	--rs-text: light-dark(#282828, #d9d9d9);
	--rs-text-strong: light-dark(#0f2333, #ffffff);
	--rs-muted: light-dark(#5d7183, #93abbd);
	--rs-heading: light-dark(#195c8c, #b1deff);

	--rs-link: light-dark(#195c8c, #b1deff);
	--rs-link-hover: light-dark(#2a7ab5, #6cadd2);
	--rs-accent: light-dark(#2a7ab5, #329ae0);
	--rs-on-accent: #ffffff;

	--rs-header-1: light-dark(#31678d, #2268a0);
	--rs-header-2: light-dark(#1f496a, #134a70);
	--rs-header-text: #ffffff;

	--rs-cat: light-dark(#2f6790, #2a5775);
	--rs-cat-hover: light-dark(#487fa1, #33698a);
	--rs-cat-text: #ffffff;
	--rs-cat-link-hover: light-dark(#d5ecfd, #a0d4f5);

	--rs-btn-text: light-dark(#37759f, #ffffff);
	--rs-btn-bg: light-dark(#ffffff, #1d5579);
	--rs-btn-border: light-dark(#a9c6dc, #3a7aa6);
	--rs-btn-hover-bg: light-dark(#eef5fa, #2c6386);
	--rs-btn-hover-border: light-dark(#37759f, #6cadd2);
	--rs-btn-icon: light-dark(#6c8ba3, #a0c4dc);

	--rs-input-bg: light-dark(#ffffff, #0d334b);
	--rs-input-border: light-dark(#b8cbd9, #2a5a7a);
	--rs-input-focus: light-dark(#37759f, #64b4e6);

	--rs-read-icon-bg: light-dark(#e3edf5, #1a5275);
	--rs-read-icon: light-dark(#5b7f9b, #a0c4dc);
	--rs-unread-icon-bg: light-dark(#2a7ab5, #329ae0);
	--rs-mine: light-dark(#e0a106, #ffd166);

	--rs-danger: light-dark(#c4302b, #ff6b66);
	--rs-danger-bg: light-dark(#fbecec, #4a2128);
	--rs-success: light-dark(#2e8b57, #5fc88a);
	--rs-admin-colour: light-dark(#a86a42, #d8a27c);
	--rs-icon-delete: light-dark(#b8625c, #d98c86);
	--rs-icon-report: light-dark(#a8922e, #d6c272);
	--rs-icon-warn: light-dark(#b8823e, #d9a96c);
	--rs-online: #5fa877;
	--rs-online-border: #4a8a5f;

	--rs-spoiler-closed: light-dark(#c98583, #7a4a52);
	--rs-spoiler-open: light-dark(#7ca98a, #3e7357);
	--rs-spoiler-icon: light-dark(#ffffff, #e3edf4);

	--rs-site-header: light-dark(#1e4869, #124567);
	--rs-site-header-hover: light-dark(#1f496a, #0e3a54);
	--rs-site-header-border: light-dark(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
	--rs-site-header-shadow: 0 4px 24px light-dark(rgba(0, 40, 80, 0.20), rgba(0, 0, 0, 0.30));

	--rs-quote-bg: light-dark(#f2f7fb, #0c344d);
	--rs-quote-bg-2: light-dark(#e6eff7, #0e3b57);
	--rs-quote-border: light-dark(#c3ddf1, #2d6a92);
	--rs-code-bg: light-dark(#e9f0f6, #082638);
	--rs-code-head-bg: light-dark(#d8e4ee, #0f3550);
	--rs-code: light-dark(#2e6b47, #8fe3ad);
	--rs-hilit-bg: light-dark(#ffe9a8, #6b5714);
	--rs-hilit: light-dark(#3d2e00, #fff3c4);

	/* very light glass: a fading top sheen plus a 1px highlight on the top edge */
	--rs-glass-bar: linear-gradient(to bottom, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 60%);
	--rs-glass-bar-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14);
	--rs-glass-btn: linear-gradient(to bottom, light-dark(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.08)), light-dark(rgba(0, 40, 80, 0.04), rgba(255, 255, 255, 0)));
	--rs-glass-btn-edge: inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.10));

	--rs-shadow: 0 2px 16px light-dark(rgba(0, 40, 80, 0.08), rgba(0, 0, 0, 0.30));
	--rs-shadow-dropdown: 0 8px 28px light-dark(rgba(0, 40, 80, 0.18), rgba(0, 0, 0, 0.45));
}

:root[data-theme="light"] {
	color-scheme: light;
}

:root[data-theme="dark"] {
	color-scheme: dark;
}

/* Theme switch: moon in light mode, sun in dark mode */
.rs-theme-switch .icon.rs-icon-sun {
	display: none;
}

:root[data-theme="dark"] .rs-theme-switch .icon.rs-icon-sun {
	display: inline-block;
}

:root[data-theme="dark"] .rs-theme-switch .icon.rs-icon-moon {
	display: none;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .rs-theme-switch .icon.rs-icon-sun {
		display: inline-block;
	}

	:root:not([data-theme="light"]) .rs-theme-switch .icon.rs-icon-moon {
		display: none;
	}
}

/* Administrators' group colour #AA0000 comes as an inline style on names (posts, team list, stats, profile);
   replaced by a muted grey-orange that reads well in both themes. !important is the only way past an inline
   style; post text and signatures are excluded so a red [color] BBCode stays red. */
[style*="AA0000" i]:not(.content *):not(.signature *) {
	color: var(--rs-admin-colour) !important;
}

/* Page; the gradient sits on html so short pages have no seam under body */
html {
	background-color: var(--rs-page-2);
	background-image: linear-gradient(135deg, var(--rs-page-1) 0%, var(--rs-page-2) 40%, var(--rs-page-3) 100%);
	background-attachment: fixed;
	min-height: 100%;
}

body {
	background: transparent;
	color: var(--rs-text);
	font-size: 11px;
	line-height: 1.45;
	padding-top: 0;
}

/* every selector prosilver gives its own font-family (Trebuchet MS, Lucida Grande, Verdana, Arial), same specificity */
body,
h1,
h2,
h3,
h4,
.button,
.pagination li.active span,
.dropdown-extended .header,
.notification_list p.notifications_title,
li.header dt,
li.header dd,
.postbody h3,
.content,
.content p,
dl.faq,
p.author,
.notice,
.attachbox dt,
dl.file,
dl.file dt,
dl.thumbnail dd,
fieldset.polls,
fieldset.polls dd div,
fieldset,
input,
select,
select optgroup option,
textarea,
.message-box textarea,
a.button1,
a.button2,
input.button1,
input.button2,
input.button3,
a.forumtitle,
a.topictitle {
	font-family: var(--rs-font);
}

h2 {
	color: var(--rs-text-strong);
}

h3 {
	border-bottom-color: var(--rs-border);
	color: var(--rs-heading);
}

hr {
	border-color: var(--rs-border);
}

a {
	color: var(--rs-link);
}

a:hover,
a:focus,
a:active {
	color: var(--rs-link-hover);
}

.postlink,
.postlink:visited {
	border-bottom-color: var(--rs-accent);
	color: var(--rs-accent);
}

.postlink:hover {
	background-color: var(--rs-row-hover);
	color: var(--rs-link);
}

.top i,
.copyright,
.footer-row .icon {
	color: var(--rs-muted);
}

.arrow-left:hover,
.arrow-right:hover {
	color: var(--rs-accent);
}

.sep {
	color: var(--rs-border-strong);
}

.error,
dd.profile-warnings,
li.notification-reported strong,
li.notification-disapproved strong {
	color: var(--rs-danger);
}

.current {
	color: var(--rs-text-strong) !important;
}

.wrap {
	background-color: var(--rs-wrap);
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
	box-shadow: var(--rs-shadow);
	max-width: 1200px;
}

/* Site header: full-width bar modelled on radiosoft.pro (css/header.css, css/menu.css) */
/* flat fill with a 1px top highlight, as on radiosoft.pro; no sheen gradient here */
.rs-header {
	background: var(--rs-site-header);
	border-bottom: 1px solid var(--rs-site-header-border);
	box-shadow: var(--rs-site-header-shadow), var(--rs-glass-bar-edge);
	color: var(--rs-header-text);
	margin-bottom: 18px;
	/* stays above the page so the account dropdowns are not covered */
	position: relative;
	z-index: 10;
}

.rs-header-inner {
	align-items: center;
	box-sizing: border-box;
	display: flex;
	gap: 16px;
	margin: 0 auto;
	max-width: 1200px;
	min-height: 84px;
	padding: 0 15px;
}

.rs-brand,
.rs-brand:hover,
.rs-brand:focus {
	align-items: center;
	color: var(--rs-header-text);
	display: flex;
	flex-shrink: 0;
	gap: 12px;
	text-decoration: none;
}

.rs-logo {
	background: url("./images/site_logo.svg") no-repeat center / contain;
	height: 44px;
	width: 42px;
}

.rs-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.rs-brand-name {
	font-size: 28px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.rs-brand-title {
	font-size: 12.5px;
	opacity: 0.9;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.rs-menu {
	align-items: center;
	display: flex;
	flex: 1;
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rs-menu > li {
	position: relative;
}

/* thin fading separator between header items, as on the site; the theme button stands apart without one */
.rs-menu > li + li:not(.rs-theme-item):before {
	background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.25), transparent);
	content: "";
	height: 55%;
	left: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
}

/* class on the top-level header links only, so the white colour does not leak into the dropdowns */
.rs-menu-link,
a.rs-menu-link:hover,
a.rs-menu-link:focus {
	color: var(--rs-header-text);
	text-decoration: none;
}

.rs-menu-link {
	border-radius: var(--rs-radius-sm);
	display: block;
	font-size: 14px;
	line-height: 48px;
	padding: 0 14px;
	white-space: nowrap;
}

.rs-menu-link:hover,
.rs-menu-link:focus {
	background: var(--rs-site-header-hover);
}

.rs-menu-link .icon {
	font-size: 14px;
	margin-right: 6px;
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.rs-menu-link:hover .icon {
	opacity: 0.85;
}

/* notifications and private messages: icon buttons with the label as tooltip, count badge on the corner */
.rs-icon-item .rs-menu-link {
	padding: 0 10px;
}

.rs-icon-item .rs-menu-link .icon {
	font-size: 16px;
	margin: 0;
	opacity: 0.85;
}

.rs-icon-item .badge {
	float: none;
	font-size: 10px;
	line-height: 1;
	padding: 2px 5px;
	position: absolute;
	right: 2px;
	top: 7px;
}

.rs-menu .dropdown {
	color: var(--rs-text);
	text-align: left;
	top: 100%;
}

/* Theme switch: square glass button shaped like the post quote button */
.rs-menu li.rs-theme-item {
	margin-left: 10px;
}

.rs-menu a.rs-theme-switch {
	align-items: center;
	background-color: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--rs-radius-sm);
	box-sizing: border-box;
	display: flex;
	height: 34px;
	justify-content: center;
	width: 34px;
}

.rs-menu a.rs-theme-switch:hover,
.rs-menu a.rs-theme-switch:focus {
	background-color: rgba(255, 255, 255, 0.22);
	border-color: rgba(255, 255, 255, 0.40);
}

.rs-menu a.rs-theme-switch .icon {
	color: var(--rs-header-text);
	font-size: 17px;
}

@media (max-width: 700px) {
	.rs-brand-title,
	.rs-menu-link span:not(.sr-only) {
		display: none;
	}

	.rs-menu-link .icon {
		margin-right: 0;
	}

	.rs-header-inner {
		gap: 8px;
		padding: 0 8px;
	}

	.rs-menu-link {
		padding: 0 8px;
	}
}

/* Navbar */
.navbar {
	background-color: var(--rs-surface);
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
	padding: 4px 10px;
}

ul.navlinks {
	border-top-color: var(--rs-border);
}

/* Search where Login/Register used to be: input + two buttons joined into one 26px control.
   The padding keeps the gap to the breadcrumb line equal to the gap below it. */
.navbar ul.linklist > li.rs-nav-search {
	padding-bottom: 6px;
	padding-top: 2px;
}

.search-box fieldset {
	display: flex;
}

.search-box .inputbox,
.search-box .button-search,
.search-box .button-search-end {
	box-sizing: border-box;
	height: 26px;
	margin: 0;
}

/* prosilver gives .search-box .inputbox a light grey #C7C3BF border; match the joined buttons instead */
.search-box .inputbox,
.search-box .inputbox:hover {
	border-color: var(--rs-btn-border);
	border-radius: var(--rs-radius-sm) 0 0 var(--rs-radius-sm);
	border-right-width: 0;
	padding: 0 8px;
	width: 180px;
}

.search-box .inputbox:focus {
	border-color: var(--rs-input-focus);
}

.search-box .button-search,
.search-box .button-search-end {
	align-items: center;
	border-radius: 0;
	display: inline-flex;
	padding: 0 7px;
}

.search-box .button-search-end {
	border-left-width: 0;
	border-radius: 0 var(--rs-radius-sm) var(--rs-radius-sm) 0;
}

.search-results li:hover,
.search-results li.active {
	background-color: var(--rs-row-hover);
}

/* Forum and topic lists */
/* the sheen stops at 40px, so it only shows on the heading bar above the rows */
.forabg,
.forumbg {
	background-color: var(--rs-cat);
	background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 40px);
	border-radius: var(--rs-radius);
	box-shadow: var(--rs-shadow), var(--rs-glass-bar-edge);
	margin-bottom: 12px;
	padding: 0 1px 1px;
}

.forabg .header a,
.forumbg .header a,
th a,
li.header dt,
li.header dd,
table.table1 thead th {
	color: var(--rs-cat-text);
}

.forabg .header a:hover,
.forumbg .header a:hover,
th a:hover {
	color: var(--rs-cat-link-hover);
}

/* 9/5 instead of 7/7: uppercase headings have no descenders, so this centres the caps optically in the bar */
ul.topiclist li.header dl.row-item dt,
ul.topiclist li.header dl.row-item dd {
	padding-bottom: 5px;
	padding-top: 9px;
}

ul.topiclist li.header dl.row-item dt .list-inner {
	padding-left: 10px;
}

li.header dt {
	font-size: 1.1em;
	letter-spacing: 0.03em;
}

ul.forums,
ul.topics {
	background-color: var(--rs-surface);
	background-image: none;
	border-radius: 0 0 calc(var(--rs-radius) - 1px) calc(var(--rs-radius) - 1px);
}

/* round the last row itself instead of overflow:hidden, which would clip the row pagination dropdown */
ul.forums > li:last-child,
ul.topics > li:last-child {
	border-radius: 0 0 calc(var(--rs-radius) - 1px) calc(var(--rs-radius) - 1px);
}

ul.topiclist li {
	color: var(--rs-muted);
}

ul.topiclist dd {
	border-left-color: var(--rs-border);
}

li.row {
	border-top-color: var(--rs-border);
	border-bottom-color: var(--rs-border);
}

li.row strong {
	color: var(--rs-text-strong);
}

/* Flex rows instead of prosilver floats: cells stretch to the row height, so their content is centred vertically
   and the column borders reach full height without the 999px/-995px trick. Above 700px only: below it
   prosilver responsive.css hides the dd columns and stacks the row. */
@media (min-width: 701px) {
	ul.topiclist dl.row-item {
		display: flex;
	}

	ul.topiclist dl.row-item dt {
		align-items: center;
		display: flex;
		flex: 1 1 auto;
		float: none;
		margin-right: 0;
		min-width: 0;
		width: auto;
	}

	ul.topiclist dl.row-item dt .list-inner {
		flex: 1 1 auto;
		margin-right: 0;
		min-width: 0;
	}

	ul.topiclist dl.row-item dd {
		display: flex;
		flex: none;
		flex-direction: column;
		float: none;
		justify-content: center;
	}

	ul.topiclist li.row dt,
	ul.topiclist li.row dd {
		margin-bottom: 0;
		padding-bottom: 8px;
		padding-top: 8px;
	}
}

/* text columns (last post, info, time): 12px from the column border instead of 5px; same selectors as prosilver */
dd.lastpost > span,
ul.topiclist dd.info > span,
ul.topiclist dd.time > span,
dd.redirect > span,
dd.moderation > span {
	padding-left: 12px;
}

li.row:hover {
	background-color: var(--rs-row-hover);
}

li.row:hover dd {
	border-left-color: var(--rs-border-strong);
}

/* Font Awesome icons instead of the forum/topic GIFs (idea from prosilver French edition) */
.row-item[class*="_read"],
.row-item[class*="_unread"],
.row-item.forum_link,
.row-item.topic_moved {
	background-image: none;
}

.row-item[class*="_read"]:before,
.row-item[class*="_unread"]:before,
.row-item.forum_link:before,
.row-item.topic_moved:before {
	background-color: var(--rs-read-icon-bg);
	border-radius: 50%;
	color: var(--rs-read-icon);
	font-family: 'FontAwesome';
	font-size: 15px;
	height: 32px;
	left: 10px;
	line-height: 32px;
	position: absolute;
	text-align: center;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
}

.row-item[class*="_unread"]:before {
	background-color: var(--rs-unread-icon-bg);
	color: var(--rs-on-accent);
}

.row-item[class*="forum_"]:before {
	content: "\f086";
}

.row-item[class*="forum_"][class*="_subforum"]:before {
	content: "\f0e6";
}

.row-item[class*="topic_"]:before,
.row-item[class*="pm_"]:before {
	content: "\f0f6";
}

.row-item[class*="_hot"]:before {
	content: "\f06d";
}

.row-item[class*="sticky_"]:before {
	content: "\f08d";
}

.row-item[class*="announce_"]:before,
.row-item[class*="global_"]:before {
	content: "\f0a1";
}

.row-item[class*="_locked"]:before {
	content: "\f023";
}

.row-item.forum_link:before {
	content: "\f0c1";
}

.row-item.topic_moved:before {
	content: "\f064";
}

.row-item[class*="_mine"]:after {
	color: var(--rs-mine);
	content: "\f005";
	font-family: 'FontAwesome';
	font-size: 10px;
	left: 34px;
	position: absolute;
	top: calc(50% - 18px);
}

dl.row-item dt .list-inner {
	padding-left: 54px;
}

/* Panels, posts, backgrounds */
.panel {
	background-color: var(--rs-panel);
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
	color: var(--rs-text);
	margin-bottom: 10px;
	padding: 8px 14px;
}

/* more air around post content: 12px top/bottom, 18px left; the right side stays 10px because the
   corner online dot and back-to-top arrow are measured from it */
.post {
	border: 1px solid var(--rs-border);
	border-radius: var(--rs-radius);
	margin-bottom: 6px;
	padding: 12px 10px 12px 18px;
}

.bg1,
table.zebra-list tr:nth-child(odd) td,
ul.zebra-list li:nth-child(odd) {
	background-color: var(--rs-surface);
}

.bg2,
.fieldsbg,
table.zebra-list tr:nth-child(even) td,
ul.zebra-list li:nth-child(even) {
	background-color: var(--rs-surface-alt);
}

.bg3,
.ucprowbg {
	background-color: var(--rs-surface-3);
}

.post:target .content,
.post:target h3 a {
	color: var(--rs-text-strong);
}

.postbody,
.content,
dl.faq dt {
	color: var(--rs-text);
}

.content h2,
.panel h2 {
	border-bottom-color: var(--rs-border);
	color: var(--rs-heading);
}

.postprofile,
.pm .postprofile {
	border-color: var(--rs-border);
}

/* faint line between the post header (title, author, date) and the text, same colour as the profile divider */
.postbody p.author {
	border-bottom: 1px solid var(--rs-border);
	margin-bottom: 10px;
	padding-bottom: 12px;
}

.postprofile {
	color: var(--rs-muted);
}

.postprofile strong {
	color: var(--rs-text-strong);
}

/* transparent avatars (the white RadioSoft logo) get a backdrop so they stay visible on light panels */
.postprofile .avatar img,
.profile-avatar img {
	background-color: var(--rs-header-1);
	border-radius: var(--rs-radius-sm);
}

/* post author block: half-size avatar (64 -> 32px), name 1.2x larger (11 -> 13.2px) */
.postprofile .avatar img {
	height: auto;
	max-width: 32px;
}

.postprofile dt .username,
.postprofile dt .username-coloured {
	font-size: 1.2em;
}

/* green "online" dot (templates add .rs-online) replaces prosilver's corner ribbon image (colours.css and the lang stylesheet) */
.online {
	background-image: none;
}

.rs-online {
	background-color: var(--rs-online);
	border: 1px solid var(--rs-online-border);
	border-radius: 50%;
	box-sizing: border-box;
	display: inline-block;
	height: 11px;
	margin-left: 4px;
	/* baseline-relative: puts the dot's centre on the middle of the capital letters of an 11px name */
	vertical-align: -1.5px;
	width: 11px;
}

/* in posts and PMs the dot sits in the top-right corner, mirroring the back-to-top arrow in the bottom-right
   corner: centre on the arrow's column and as far from the top edge as the arrow's centre is from the bottom */
.post .rs-online {
	margin: 0;
	position: absolute;
	right: 12px;
	top: 9.5px;
}

/* action bars (Reply / New topic, tools, pagination) above and below lists and posts: even 10-12px gaps
   instead of prosilver's 4px, both to the page title and to the first/last post */
.action-bar {
	margin: 10px 0 11px;
}

/* the bottom bar follows a post whose 6px margin collapses into this one */
.action-bar.bar-bottom {
	margin-top: 12px;
}

/* icon before the label ("Reply", "New topic"); prosilver puts it after the text */
.action-bar .button {
	align-items: center;
	display: inline-flex;
	gap: 5px;
}

.action-bar .button > .icon {
	order: -1;
}

/* post action buttons (edit, delete, report, info, quote): smaller icons, wider gaps between buttons */
.post-buttons > li {
	margin-right: 6px;
}

.post-buttons .button .icon {
	font-size: 12px;
}

/* delete in muted red, report in muted yellow, warn user in muted orange, also on hover */
.post-buttons .button .icon.fa-exclamation,
.post-buttons .button:hover .icon.fa-exclamation {
	color: var(--rs-icon-report);
}

.post-buttons .button .icon.fa-times,
.post-buttons .button:hover .icon.fa-times {
	color: var(--rs-icon-delete);
}

.post-buttons .button .icon.fa-exclamation-triangle,
.post-buttons .button:hover .icon.fa-exclamation-triangle {
	color: var(--rs-icon-warn);
}

/* prosilver positions them absolutely (top: 5px); this centres them between the post's top edge and the
   header divider line. Above 700px only: responsive.css places them itself on narrow screens. */
@media (min-width: 701px) {
	.has-profile .post-buttons {
		top: 8.7px;
	}
}

/* back-to-top arrow in the post corner: larger, the same gap from the right and bottom edges */
.back2top .top {
	margin-right: -4px;
}

/* the arrow is a float: a negative bottom margin on it offsets the post's 12px bottom padding,
   keeping it as close to the corner as on the right */
.post .back2top .top {
	margin-bottom: -7px;
}

.back2top .top .icon {
	font-size: 18px;
}

.signature,
.notice {
	border-top-color: var(--rs-border);
}

.posthilit {
	background-color: var(--rs-hilit-bg);
	color: var(--rs-hilit);
}

.reported {
	background-color: var(--rs-danger-bg);
}

li.reported:hover {
	background-color: var(--rs-danger-bg) !important;
}

div.rules {
	background-color: var(--rs-danger-bg);
	border-radius: var(--rs-radius);
	color: var(--rs-danger);
}

p.post-notice {
	background-color: var(--rs-danger-bg);
	border-radius: var(--rs-radius-sm);
}

/* header avatar: a small 18px rounded square instead of prosilver's 20px, so it reads as a badge next to the name */
a.header-avatar img {
	background-color: var(--rs-header-1);
	border-radius: 4px;
	box-sizing: border-box;
	height: 18px;
	margin: 0 4px 2px 0;
	max-height: 18px;
	object-fit: cover;
	padding: 2px;
	width: 18px;
}

/* Quotes, code, attachments */
blockquote {
	background-color: var(--rs-quote-bg);
	border-color: var(--rs-quote-border);
	border-left-width: 3px;
	border-radius: var(--rs-radius-sm);
}

blockquote blockquote {
	background-color: var(--rs-quote-bg-2);
}

blockquote blockquote blockquote {
	background-color: var(--rs-quote-bg);
}

.codebox {
	background-color: var(--rs-code-bg);
	border-color: var(--rs-border);
	border-radius: var(--rs-radius-sm);
}

/* roomier code block: prosilver has only 3px around both the "Code:" header and the code. The header gets its
   own tint and holds the copy icon on the right (radiosoft.js; "Select all" is dropped in bbcode.html). */
.codebox p {
	align-items: center;
	background-color: var(--rs-code-head-bg);
	border-bottom-color: var(--rs-border);
	border-radius: var(--rs-radius-sm) var(--rs-radius-sm) 0 0;
	display: flex;
	justify-content: space-between;
	padding: 6px 8px 6px 12px;
}

.codebox code {
	color: var(--rs-code);
	padding: 10px 12px;
}

.rs-code-copy {
	border-radius: 4px;
	color: var(--rs-btn-icon);
	line-height: 1;
	padding: 3px;
}

.rs-code-copy .icon {
	font-size: 14px;
}

.rs-code-copy:hover,
.rs-code-copy:focus {
	background-color: var(--rs-row-hover);
	color: var(--rs-accent);
}

.rs-code-copy.rs-code-copied {
	color: var(--rs-success);
}

.attachbox,
.pm-message .attachbox {
	background-color: var(--rs-surface-alt);
	border-color: var(--rs-border);
	border-radius: var(--rs-radius-sm);
}

.attachbox dd {
	border-top-color: var(--rs-border);
}

.attachbox p,
.attachbox p.stats,
dl.file dd,
dl.thumbnail dd {
	color: var(--rs-muted);
}

.attach-image img {
	border-color: var(--rs-border-strong);
}

dl.thumbnail img {
	background-color: var(--rs-surface);
	border-color: var(--rs-border-strong);
}

dl.thumbnail dt a:hover {
	background-color: var(--rs-row-hover);
}

dl.thumbnail dt a:hover img {
	border-color: var(--rs-accent);
}

/* Simple Spoiler extension; its CSS is linked after this file, hence the .radiosoft body-class prefix */
.radiosoft details.spoiler {
	background-color: var(--rs-surface-alt);
	border-radius: var(--rs-radius-sm);
}

.radiosoft details.spoiler,
.radiosoft .spoiler-header {
	border-color: var(--rs-border);
}

.radiosoft .spoiler-header {
	background-color: var(--rs-surface-3);
	color: var(--rs-text);
}

/* eye button: the extension uses bright #d9534f / #5cb85c, toned down to the palette and made smaller */
.radiosoft .spoiler-status {
	background-color: var(--rs-spoiler-closed);
	font-size: 10px;
	line-height: 1;
	padding: 2px 4px;
}

.radiosoft details.spoiler[open] > .spoiler-header > .spoiler-status {
	background-color: var(--rs-spoiler-open);
}

.radiosoft .spoiler-status,
.radiosoft .spoiler-status > .icon {
	color: var(--rs-spoiler-icon);
}

/* Polls */
fieldset.polls dl {
	border-top-color: var(--rs-border);
	color: var(--rs-muted);
}

fieldset.polls dl.voted {
	color: var(--rs-text-strong);
}

.pollbar1,
.pollbar2,
.pollbar3,
.pollbar4,
.pollbar5 {
	background-color: var(--rs-accent);
	border-bottom-color: var(--rs-header-2);
	border-right-color: var(--rs-header-2);
	border-radius: 3px;
}

/* Tables */
table.table1 thead th {
	padding: 7px 8px;
}

table.table1 tbody tr {
	background-color: var(--rs-surface);
	border-color: var(--rs-border);
}

table.table1 tbody tr:nth-child(even) {
	background-color: var(--rs-surface-alt);
}

table.table1 tbody tr:hover,
table.table1 tbody tr.hover {
	background-color: var(--rs-row-hover);
	color: var(--rs-text-strong);
}

table.table1 td {
	color: var(--rs-text);
}

table.table1 tbody td {
	border-top-color: var(--rs-border);
	padding: 6px 8px;
}

table.table1 tbody th {
	background-color: var(--rs-surface-alt);
	border-bottom-color: var(--rs-border);
	color: var(--rs-text-strong);
}

table.info tbody th,
dl.details dt {
	color: var(--rs-text-strong);
}

dl.details dd,
dl.mini dt {
	color: var(--rs-muted);
}

/* Icons with semantic colours */
.icon.icon-blue,
a:hover .icon.icon-blue {
	color: var(--rs-accent);
}

.icon.icon-green,
a:hover .icon.icon-green {
	color: var(--rs-success);
}

.icon.icon-red,
a:hover .icon.icon-red {
	color: var(--rs-danger);
}

.icon.icon-orange,
a:hover .icon.icon-orange {
	color: var(--rs-mine);
}

.icon.icon-bluegray,
.icon.icon-gray,
.icon.icon-lightgray,
a:hover .icon.icon-bluegray,
a:hover .icon.icon-gray,
a:hover .icon.icon-lightgray {
	color: var(--rs-muted);
}

.icon.icon-black,
a:hover .icon.icon-black {
	color: var(--rs-text-strong);
}

.alert_close .icon:before {
	background-color: var(--rs-surface);
}

/* Buttons */
.button,
a.button1,
a.button2,
input.button1,
input.button2,
input.button3 {
	background-color: var(--rs-btn-bg);
	background-image: var(--rs-glass-btn);
	border-color: var(--rs-btn-border);
	border-radius: var(--rs-radius-sm);
	box-shadow: var(--rs-glass-btn-edge);
	color: var(--rs-btn-text);
	text-shadow: none;
}

.button:hover,
.button:focus,
a.button1:hover,
a.button2:hover,
input.button1:hover,
input.button2:hover,
input.button3:hover {
	background-color: var(--rs-btn-hover-bg);
	background-image: var(--rs-glass-btn);
	border-color: var(--rs-btn-hover-border);
	color: var(--rs-btn-text);
	text-shadow: none;
}

/* form buttons (submit, agree/disagree, preview): roomier padding around the text */
a.button1,
a.button2,
input.button1,
input.button2,
input.button3 {
	line-height: 1.3;
	padding: 5px 14px;
}

a.button1,
input.button1 {
	background-color: var(--rs-header-1);
	background-image: var(--rs-glass-bar);
	border-color: var(--rs-header-1);
	box-shadow: var(--rs-glass-bar-edge);
	color: var(--rs-on-accent);
}

a.button1:hover,
input.button1:hover {
	background-color: var(--rs-accent);
	background-image: var(--rs-glass-bar);
	border-color: var(--rs-accent);
	color: var(--rs-on-accent);
}

input.button1:focus,
input.button2:focus,
input.button3:focus {
	border-color: var(--rs-input-focus);
}

.button .icon,
.button-secondary {
	color: var(--rs-btn-icon);
}

.button-secondary:focus,
.button-secondary:hover,
.button:focus .icon,
.button:hover .icon {
	color: var(--rs-accent);
}

.caret {
	border-color: var(--rs-btn-border);
}

.contact-icons a {
	border-color: var(--rs-border);
}

.contact-icons a:hover {
	background-color: var(--rs-row-hover);
}

.badge {
	background-color: var(--rs-danger);
}

/* Pagination */
.pagination li a {
	background: var(--rs-glass-btn), var(--rs-btn-bg);
	border-color: var(--rs-btn-border);
	border-radius: var(--rs-radius-sm);
	box-shadow: var(--rs-glass-btn-edge);
	color: var(--rs-btn-text);
}

.pagination li.ellipsis span {
	background: transparent;
	color: var(--rs-muted);
}

.pagination li.active span {
	background: var(--rs-glass-bar), var(--rs-header-1);
	border-color: var(--rs-header-1);
	border-radius: var(--rs-radius-sm);
	box-shadow: var(--rs-glass-bar-edge);
	color: var(--rs-on-accent);
}

/* page buttons: square for one digit, growing with longer numbers;
   li.active span and dl.row-item dt a are listed because prosilver sets display on them with higher specificity */
.pagination li a,
.pagination li span,
.pagination li.active span,
dl.row-item dt .pagination li a {
	align-items: center;
	box-sizing: border-box;
	display: inline-flex;
	height: 24px;
	justify-content: center;
	line-height: 1;
	min-width: 24px;
	padding: 0 6px;
}

/* page numbers in topic rows: 18px squares on one line (the "pages" icon is removed in viewforum_body/search_results) */
.row .pagination {
	display: flex;
	justify-content: flex-end;
}

.row .pagination > ul {
	display: flex;
	gap: 3px;
}

.row .pagination li {
	margin: 0;
	padding: 0;
}

.row dl.row-item dt .pagination li a,
.row .pagination li span {
	font-size: 11px;
	height: 18px;
	min-width: 18px;
	padding: 0 4px;
}

.pagination li a:hover,
.pagination .dropdown-visible a.dropdown-trigger,
.nojs .pagination .dropdown-container:hover a.dropdown-trigger {
	background: var(--rs-glass-bar), var(--rs-accent);
	border-color: var(--rs-accent);
	color: var(--rs-on-accent);
}

.pagination li a:hover .icon {
	color: var(--rs-on-accent);
}

/* Forms */
input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--rs-accent);
}

.inputbox,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"] {
	background-color: var(--rs-input-bg);
	border-color: var(--rs-input-border);
	border-radius: var(--rs-radius-sm);
	color: var(--rs-text);
}

.inputbox:hover,
.inputbox:focus,
select:hover,
select:focus {
	border-color: var(--rs-input-focus);
}

/* prosilver colours placeholders #333 with -webkit-/-moz- prefixes, unreadable on dark inputs */
.inputbox::placeholder {
	color: var(--rs-muted);
}

label {
	color: var(--rs-muted);
}

dd label,
.message-box textarea {
	color: var(--rs-text);
}

fieldset dl:hover dt label {
	color: var(--rs-text-strong);
}

.message-box textarea.drag-n-drop {
	outline-color: var(--rs-border-strong);
}

.message-box textarea.drag-n-drop-highlight {
	outline-color: var(--rs-accent);
}

input.disabled,
option.disabled-option {
	color: var(--rs-muted);
}

.gallery label {
	background: var(--rs-surface);
	border-color: var(--rs-border);
}

.gallery label:hover {
	background-color: var(--rs-row-hover);
}

/* Dropdowns and notifications */
.dropdown .dropdown-contents {
	background: var(--rs-dropdown);
	border-color: var(--rs-border-strong);
	border-radius: var(--rs-radius-sm);
	box-shadow: var(--rs-shadow-dropdown);
}

.dropdown .pointer {
	border-color: var(--rs-border-strong) transparent;
}

.dropdown .pointer-inner {
	border-color: var(--rs-dropdown) transparent;
}

.dropdown li,
.dropdown li.separator,
.dropdown-extended ul li,
.jumpbox .dropdown li {
	border-color: var(--rs-border);
}

.dropdown-extended ul li:hover {
	background-color: var(--rs-row-hover);
	color: var(--rs-text-strong);
}

.dropdown-extended .header,
.dropdown-extended .footer {
	border-color: var(--rs-border);
	color: var(--rs-text-strong);
}

.dropdown-extended .header {
	background-color: var(--rs-surface-3);
	background-image: none;
}

.dropdown-extended .pointer-inner {
	border-color: var(--rs-surface-3) transparent;
}

.dropdown-extended a.mark_read {
	background-color: var(--rs-dropdown);
}

.notification_list p.notification-time {
	color: var(--rs-muted);
}

.jumpbox-cat-link {
	background-color: var(--rs-cat);
	border-top-color: var(--rs-cat);
	color: var(--rs-cat-text);
}

.jumpbox-cat-link:hover {
	background-color: var(--rs-cat-hover);
	border-top-color: var(--rs-cat-hover);
	color: var(--rs-cat-text);
}

.jumpbox-forum-link,
.jumpbox-sub-link {
	background-color: var(--rs-surface-alt);
}

.jumpbox-forum-link:hover,
.jumpbox-sub-link:hover {
	background-color: var(--rs-row-hover);
}

.jumpbox .dropdown .pointer-inner {
	border-color: var(--rs-surface-alt) transparent;
}

.phpbb_alert {
	background-color: var(--rs-surface);
	border-color: var(--rs-border-strong);
	border-radius: var(--rs-radius);
}

/* UCP / MCP */
.panel-container h3,
.panel-container hr,
.cp-menu hr {
	border-color: var(--rs-border-strong);
}

.panel-container .panel li.row {
	border-bottom-color: var(--rs-border);
	border-top-color: var(--rs-border);
}

ul.cplist {
	border-top-color: var(--rs-border);
}

.panel-container .panel li.header dd,
.panel-container .panel li.header dt,
.panel-container h2 {
	color: var(--rs-text-strong);
}

.panel-container table.table1 thead th {
	border-bottom-color: var(--rs-border-strong);
	color: var(--rs-text-strong);
}

.panel-container .panel,
.cp-main .pm {
	background-color: var(--rs-surface);
}

.cp-main .pm-message {
	background-color: var(--rs-surface);
	border-color: var(--rs-border);
}

.cp-mini {
	background-color: var(--rs-surface-alt);
	border-radius: var(--rs-radius-sm);
}

.tabs .tab > a,
.minitabs .tab > a {
	background: var(--rs-surface-4);
	color: var(--rs-muted);
}

.tabs .tab > a:hover,
.minitabs .tab > a:hover {
	background: var(--rs-row-hover);
	color: var(--rs-link);
}

.tabs .activetab > a,
.tabs .activetab > a:hover {
	background-color: var(--rs-surface-3);
	background-image: none;
	border-color: var(--rs-surface-3);
	box-shadow: none;
	color: var(--rs-text-strong);
}

.minitabs .activetab > a,
.minitabs .activetab > a:hover {
	background-color: var(--rs-surface);
	color: var(--rs-text-strong);
}

.responsive-tab .responsive-tab-link:before {
	border-color: var(--rs-muted);
}

.responsive-tab .responsive-tab-link:hover:before {
	border-color: var(--rs-link-hover);
}

.navigation a {
	background: var(--rs-surface-4);
	color: var(--rs-text);
}

/* same scope as prosilver responsive.css; outside it the id selector would override hover and active states */
@media (max-width: 900px) {
	#navigation a {
		background: var(--rs-surface-4);
	}
}

.navigation a:hover {
	background: var(--rs-row-hover);
	color: var(--rs-link);
}

.navigation .active-subsection a,
.navigation .active-subsection a:hover {
	background: var(--rs-surface);
	color: var(--rs-link);
}

.pmlist li.pm_message_reported_colour,
.pm_message_reported_colour {
	border-left-color: var(--rs-danger);
	border-right-color: var(--rs-danger);
}

.pmlist li.pm_marked_colour,
.pm_marked_colour {
	border-color: var(--rs-mine);
}

.pmlist li.pm_replied_colour,
.pm_replied_colour {
	border-color: var(--rs-border-strong);
}

.pmlist li.pm_friend_colour,
.pm_friend_colour {
	border-color: var(--rs-accent);
}

.pmlist li.pm_foe_colour,
.pm_foe_colour {
	border-color: var(--rs-text-strong);
}

/* prosilver responsive.css squares these blocks below 700px; keep a small radius, drop the outer frame */
@media (max-width: 700px) {
	.wrap {
		border-radius: 0;
		border-width: 0;
	}

	.navbar,
	.forabg,
	.forumbg,
	.panel,
	.post {
		border-radius: var(--rs-radius-sm);
	}
}