/* base.css — qrz.if.ua Default template: design tokens, element defaults, form fields and buttons, form panels, utilities.
   Load order (main.tpl): base → layout → components → content → pages. Phone rules sit right after the rules they change;
   breakpoints: 800px (one column), 620px (phones), 480px (small phones). */

/* ==== Tokens ==== */

:root {
	/* text */
	--text: #3f4b51;
	--text-2: #516168;
	--muted: #6c838e;
	--faint: #8a9ca5;
	--placeholder: #a2b2ba;
	/* links and the accent */
	--link: #398dd8;
	--link-hover: #2b7cc4;
	--link-soft: #9cc4e8;
	/* lines and fills */
	--border: #cbdfe8;
	--line: #dbe8ed;
	--hover: #e7eff4;
	--strip: #f0f5f8;
	--soft: #f8fbfc;
	/* states */
	--danger: #c0504d;
	--danger-dark: #a33f3b;
	--danger-text: #8a3532;
	--danger-bg: #fbf1f0;
	--danger-line: #e2b5b3;
	--ok: #3a7a2e;
	--ok-dark: #2f6331;
	--ok-bg: #f1f8f0;
	--ok-line: #cfe5cd;
	/* Silent Key (memorial) pages */
	--sk-bg: #2d3338;
	--sk-bg-2: #3a4147;
	--sk-text: #e9e2d0;
	--sk-gold: #b39352;
	/* radii and type */
	--r-sm: 4px;
	--r: 6px;
	--r-lg: 8px;
	--font: Arial, Helvetica, sans-serif;
}

/* ==== Elements ==== */

html, body, div, ul, ol, li, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, fieldset, input {
	margin: 0;
	padding: 0;
}
body,
input,
textarea,
select,
button {
	font: 14px/1.2em var(--font);
}
body {
	color: #333;
	overflow-wrap: break-word;
}
input,
textarea,
select,
button,
a {
	outline: none;
}
h1, h2, h3, h4, h5 {
	line-height: normal;
}
h1 { font-size: 1.25em; }
h2 { font-size: 1.2em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.1em; }
h5 { font-size: 1em; }
p {
	margin-bottom: 0.4em;
}
a {
	color: var(--link);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a img {
	border: 0;
}
hr {
	height: 1px;
	border: 0;
	border-top: 1px solid var(--line);
}
ul {
	margin: 0 0 18px 2em;
	list-style: disc outside;
}
ol {
	margin: 0 0 18px 2.1em;
	list-style: decimal;
}
/* searched words, marked by libs.js */
mark.hl {
	padding: 0 2px;
	color: inherit;
	background: #fff1a8;
	border-radius: 3px;
}

/* ==== Form fields and buttons ==== */

.f_input,
.f_textarea,
.textin,
.tableform select,
.ulist-form select,
.mass_comments_action select,
.xfields input,
.xprofile input,
.xfields select,
.xprofile select,
.xfields textarea,
.xprofile textarea,
.ulist-form .loginform,
.editor input[type="text"],
.editor textarea,
#searchinput,
#searchuser {
	box-sizing: border-box;
	padding: 5px 7px;
	color: var(--text);
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-sm);
}
.f_input:focus,
.f_textarea:focus,
.textin:focus,
.ulist-form .loginform:focus,
.editor input[type="text"]:focus,
#searchinput:focus,
#searchuser:focus {
	border-color: var(--link);
}
.f_input {
	width: 300px;
}
.f_textarea {
	width: 458px;
}
/* buttons: quiet by default, like a sidebar menu item */
.fbutton,
.bbcodes,
.usersbmt {
	width: auto;
	height: auto;
	margin-bottom: 2px;
	padding: 6px 16px;
	font: bold 1em/1.2 var(--font);
	color: var(--text);
	background: var(--strip);
	border: 1px solid var(--border);
	border-radius: var(--r);
	cursor: pointer;
}
.fbutton:hover,
.bbcodes:hover,
.usersbmt:hover {
	background-color: var(--hover);
}
button.fbutton span {
	display: inline;
	padding: 0;
	cursor: pointer;
}
/* the one action that closes a form reads as the primary one */
.fieldsubmit .fbutton,
#logform .fbutton,
form#registration > input.bbcodes[type="submit"] {
	color: #fff;
	background-color: var(--link);
	border-color: var(--link-hover);
}
.fieldsubmit .fbutton:hover,
#logform .fbutton:hover,
form#registration > input.bbcodes[type="submit"]:hover {
	background-color: var(--link-hover);
}
/* the rules page: «Погоджуюся» is the step forward, «Не погоджуюся» stays quiet */
form#registration > input.bbcodes {
	margin: 6px 6px 2px 0;
}
/* the advanced-search boxes */
fieldset {
	padding: 12px 16px;
	text-align: left;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
}
fieldset legend {
	padding: 0 6px;
	font-weight: bold;
	color: var(--text);
}

@media (max-width: 800px) {
	fieldset {
		padding: 10px 12px;
	}
	/* one control height: 38px fields and buttons, 16px text (no zoom-in on iOS) */
	.f_input,
	.loginform,
	.baseform select,
	.ulist-form select,
	.textin {
		box-sizing: border-box;
		height: 38px;
		font-size: 16px;
	}
	.f_textarea {
		box-sizing: border-box;
		font-size: 16px;
	}
	.fbutton,
	.usersbmt,
	input.bbcodes {
		box-sizing: border-box;
		height: 38px;
		padding: 0 16px;
	}
	.baseform select {
		width: 100%;
		max-width: 100%;
	}
}

@media (max-width: 620px) {
	.f_input,
	.f_textarea,
	.textin {
		width: 100%;
		max-width: 100%;
	}
}

/* ==== Form panels: feedback, lost password, add comment, profile editing, add news ==== */

.baseform {
	margin-bottom: 15px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
}
.tableform {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}
.tableform td {
	padding: 10px 15px;
	border-top: 1px solid #fff;
}
.tableform td.label {
	width: 27%;
	padding-right: 0;
	vertical-align: top;
	font-weight: bold;
	color: var(--text);
}
.baseform .tableform td {
	padding: 10px 16px;
	border-top: 1px solid var(--line);
}
.baseform .tableform tr:first-child td {
	border-top: 0;
}
/* required-field star */
.impot {
	font-weight: normal;
	color: var(--danger);
}
/* the submit strip closes the panel, like a block footer */
.fieldsubmit {
	padding: 10px 16px;
	background-color: var(--strip);
	border-top: 1px solid var(--border);
	border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.fieldsubmit .reg-skip {
	margin-left: 14px;
	color: var(--text-2);
}

@media (max-width: 800px) {
	.baseform .tableform td {
		padding: 4px 12px;
	}
	.fieldsubmit {
		padding: 10px 12px;
	}
}

@media (max-width: 620px) {
	/* stack the two-column form tables */
	.tableform,
	.tableform tbody,
	.tableform tr,
	.tableform td,
	.tableform td.label {
		display: block;
		width: auto;
	}
	.baseform .tableform td {
		border-top: 0;
	}
	.baseform .tableform tr {
		padding: 8px 0;
		border-top: 1px solid var(--line);
	}
	.baseform .tableform tr:first-child {
		border-top: 0;
	}
}

/* ==== Utilities ==== */

.clr {
	clear: both;
}
.lcol,
.rcol,
form {
	display: inline;
}
.lcol {
	float: left;
}
.rcol {
	float: right;
}
.reset,
.reset li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.thide {
	display: block;
	height: 0;
	overflow: hidden;
	line-height: normal;
}
.small {
	font-size: 0.9em;
}
.grey {
	color: var(--muted);
}
.blue {
	color: var(--link);
}
.checkbox {
	padding: 4px 0;
	line-height: 1em;
}
.checkbox input {
	margin-top: -2px;
	vertical-align: middle;
}
