/*
 * Obviously, this file no longer contains only basic styles.
 * It now also contains all sorts of base styles like the toolbar and debug for backward compatibility with older skins... :/
 */

// CSS to show containers, widgets and includes:
@import "_dev-blocks.module.less";
// Styles for results table on AJAX data loading:
@import "_results_ajax_loading.module.less";

@import "inc/toolbar.inc.less";
@import "inc/tooltip.inc.less";
@import "inc/user_colors.inc.less";
@import "inc/debug.inc.less";

.transition( @transition ) {
	-webkit-transition: @transition;
			 -o-transition: @transition;
					transition: @transition;
}

body {
	padding: 0;
	margin: 0;
}

// Mark the nofollow links with pink background color on mouseover event
a[rel~=nofollow]:not([class~=btn]):hover {
	background: #f8e0e0;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	-khtml-border-radius: 2px;
	border-radius: 2px;
}

// Image styles:

div.single_image_zone {
	overflow: hidden;
}

div.multi_image_zone {
	overflow: hidden;
	background-color: #eee;
	border: 1px solid #ccc;
}

div.image_block {
	// WARNING: this will screw out backoffice layout (fulltext edit screen)
	text-align: center;
	img {
		margin: 1ex;
	}
}
// We only float image_blocks when in multiple image zone
div.multi_image_zone div.image_block {
	margin: 1ex;
	float: left;
}

// Used to limit max width of the replied comments,
// because width of the replied comment can be very small
// (Each level of the replied comments has additional 20px margin left)
.replied_comment div.image_block img {
	max-width: 100%;
	height: auto;
}

// Description text under image
div.image_legend {
	font-size: 84%;
	color: #aaa;
	margin: 1ex;
}
div.image_block.noinlinecaption div.image_legend {
	display: none;
}

// Avatar images
img.avatar_before_login {
	margin-right: 2px;
	vertical-align: top;
}
img.avatar_before_login_middle {
	margin-right: 2px;
	vertical-align: middle;
}
img.avatar_above_login {
	display: block;
	margin: 0 auto;
}

// ---------------- //

// Limit width of the table cells to text length without new line breaks
.shrinkwrap {
	width: 1%;
	white-space: nowrap;
	text-align: center;
}
.col-narrow {
	width: 1px;
	white-space: nowrap;
	text-align: center;
	padding-left: 1px !important;
	padding-right: 1px !important;
}

.filename {
	font-family: monospace;
	font-size: larger;
}

.block {
	margin: 1ex;
	white-space: nowrap;
}

a.selected {
	font-weight: bold;
}

// Round corners of avatar images:
.avatar_rounded {
	background: #FFF;
	border: 1px solid #CCC;
	padding: 2px;
	display: inline-block;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	-khtml-border-radius: 4px;
	border-radius: 4px;
	text-align: center;
	&:hover {
		text-decoration: none;
	}
	img {
		-moz-border-radius-topleft: 2px; -moz-border-radius-topright: 2px;
		-webkit-border-radius: 2px 2px 0 0;
		-khtml-border-radius-topleft: 2px; -khtml-border-radius-topright: 2px;
		border-radius: 2px 2px 0 0;
		margin-bottom: 2px;
	}
	&.no_avatar_actions img {
		margin-bottom: 0;
	}
}
// ---------------- //

// Layout for editing the avatars on "Profile picture" pages:
.avatar_actions {
	float: left;
	line-height: 26px;
}
.avatar_main_frame {
	background: #FFF;
	border: 1px solid #CCC;
	padding: 2px;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	-khtml-border-radius: 4px;
	border-radius: 4px;
	display: table;
	vertical-align: middle;
}
.avatar_main_frame img {
	-moz-border-radius-topleft: 2px; -moz-border-radius-bottomleft: 2px;
	-webkit-border-radius: 2px 0 0 2px;
	-khtml-border-radius-topleft: 2px; -khtml-border-radius-bottomleft: 2px;
	border-radius: 2px 0 0 2px;
}
.avatar_main_frame > a:first-child {
	float: left;
	margin-right: 5px;
}
.duplicated_avatars {
	text-align: center;
	max-width: 160px;
}
.avatar_main_frame .duplicated_avatars {
	max-width: 320px;
}
.duplicated_avatars a.user img {
	vertical-align: text-top;
}
div.avatartag {
	display: inline-block;
	vertical-align: top;
	margin: 0 0.5em 0.5em 0;
	a {
		outline: none;
	}
	&.main {
		display: block;
		float: none !important;
		&>a {
			float: left;
		}
		a:first-child {
			margin-right: 25px;
		}
		.avatar_actions {
			margin-right: 25px;
		}
	}
}
@media only screen and (max-width: 480px) {
	.avatar_main_frame {
		> a:first-child {
			margin-right: 0;
		}
		img {
			max-width: 245px;
			max-height: 245px;
		}
	}
}
// ---------------- //

// Window to crop profile image:
#user_crop_content {
	padding: 10px;
}
#image_crop_block {
	display: table;
}
#image_crop_block > div {
	display: table-cell;
	vertical-align: top;
}
#target_cropped_image {
	float: left;
	margin: 0 10px 10px 0;
	box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.25);
}
#target_cropped_image img {
	height: auto;
	width: auto;
}
.preview_cropped_images {
	width: 128px;
	text-align: center;
}
.preview_cropped_image {
	display: inline-block;
	overflow: hidden;
	margin-bottom: 10px;
	box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.25);
}
.preview_cropped_image.circle {
	border-radius: 50%;
}
.crop_button {
	text-align: center;
}
.crop_button.top {
	display: none;
}
#image_crop_block.short_width > div { display: block; }
#image_crop_block.short_width .preview_cropped_images { text-align: left; width: auto; }
#image_crop_block.short_width .preview_cropped_image { margin-right: 10px; }
@media only screen and (max-width: 900px) {
	#fieldset_wrapper_image_crop fieldset,
	#overlay_page form.bComment{ padding: 0 !important; }
	#target_cropped_image{ margin-right: 0; }
	#image_crop_block > div { display: block; }
	#overlay_page .preview_cropped_images,
	.preview_cropped_images { text-align: left !important; width: auto !important; display: inline-block; padding-left: 10px; }
	.preview_cropped_image { margin-right: 10px; }
	.crop_button.top { display: block; }
	.crop_button.bottom { display: none; }
	#image_crop legend{ padding: 10px; box-sizing: border-box; }
}
.disp_avatar .preview_cropped_images {
	width: auto;
	text-align: left;
}
.disp_avatar .preview_cropped_image {
	margin-right: 8px;
}
.disp_avatar #target_cropped_image img {
	max-width: 400px;
	max-height: 320px;
}
// ---------------- //

// Evo Toolbar:
.evobar-menu {
	// .evobar-icon-down, .evobar-icon-right, .evobar-icon-left
	[class^=evobar-icon-] {
		display: inline-block;
		font-size: 10px;
		&::before {
			width: 10px;
			height: 10px;
			content: "\25BC"; // arrow down
		}
	}
	.evobar-icon-right::before {
		content: "\25B6"; // arrow right
	}
	.evobar-icon-left::before {
		content: "\25C0"; // arrow left
	}
}
// ---------------- //

// Form styles:
form {
	margin: 0;
	padding: 0;
} // thanks #mozilla

fieldset.input {
	margin: 0;
	padding: 0;
	border: 0;
}
input[type=checkbox]
{
	margin:1px;
}
fieldset div.notes {
	margin: 0 0 1ex 3ex;
}
.evo_label_inline {
	margin-left: 2ex;
}
// Used for action icons
div.right_icons,
div.fieldset_icons {
	text-align: right;
}
span.right_icons,
span.fieldset_icons {
	float:right;
}
// Red star appears before label of the required labels
span.label_field_required {
	color: #f00;
	font-weight: bold;
	margin-right: 4px;
}
// Used to hide red star by JavaScript
.not_required span.label_field_required {
	display: none;
}
// Error fields
span.field_error {
	display: block;
	color: #f00;
	span.oneline & {
		display: inline;
	}
}
input.field_error,
select.field_error,
textarea.field_error {
	background:#fbf2ee;
	border: 1px solid #d99;
}
span.checkbox_error {
	background: #fbf2ee;
	border: 1px solid #d99;
}
span.checkbox_error input.checkbox {
	background:#fbf2ee;
}

span.checkbox_surround {
	background: #fbf2ee;
	border: 1px solid #F825F1;
	border-radius: 2px;
	padding : 1px;
}
// Large inputs and textareas (with full width)
input.large,
textarea.form_textarea_input {
	width: 97%;
	margin: 0;
	display: block;
}
// Space between radio option lable and note text
label.radiooption {
	margin-right: 1em;
}
// ---------------- //

// File Select custom control
.file_select_wrapper {
	display: flex;
	flex-flow: row wrap;
	align-items: flex-start;

	.file_select_item {
		//display: block;
		//float: left;
		display: flex;
		flex-flow: row wrap;
		margin-right: 8px;
		text-align: center;

		.item_actions {
			display: flex;
			flex-shrink: 1;
			flex-flow: column wrap;
			justify-content: flex-start;
			align-content: center;
			justify-content: center;
			text-align: left;
			margin-left: 8px;
		}
	}
}
// ---------------- //

// Enhanced form
.eform label {
	font-weight:bold;
}


// 24/75% forms - Fast Forms:
.fform fieldset {
	border: 1px solid #ddd;
	margin: 0 0 1ex 0;
	background-color: #fff; /* dh> change to "transparent"? */
	padding: .5ex 1ex;
}
legend {
	font-weight: bold;
	font-size: 120%;
	padding: 12px 0 8px;
	color: #888;
}
.fform fieldset fieldset {
	border: none;
	margin: 1ex;
	padding: 0;
}
.fform fieldset.bordered {
	border: 1px solid #ddd;
}
.fform div.label {
	float: left;
	width: 24%;
	text-align: right;
	font-weight:bold;
	margin: 0;
	padding-top: .5ex;
}
.fform fieldset.field_wide div.label,
.fform fieldset.field_inline div.label {
	float: none;
	text-align: left;
	width: auto;
	margin-bottom: 5px;
}
.fform fieldset.field_inline div.label {
	float: left;
}
.fform div.input {
	margin: 0 0 0 25%;
}
.fform fieldset.field_wide div.input {
	margin-left: 20px;
}
.fform fieldset.field_inline div.input {
	float: left;
	margin-left: 5px;
	line-height: 24px;
}

.fform fieldset.input{
	margin: 0;
}

.fform div.info {
	margin: 0 0 0 25%;
	padding-top: .5ex;
}
.fform fieldset.info_full div.info {
	margin-left: 5px;
}
// hide checkbox in order to indent exactly the same size
input.invisible{
	visibility: hidden;
}
// ---------------- //

// Messages:
div.log_container,
div.action_messages {
	margin:1ex;
	ul.message_group {
		li {
			margin-left: 25px;
			list-style: disc;
		}
	}
}
div.log_container ul,
div.action_messages ul,
div.log_container ol,
div.action_messages ol {
	list-style: none;
	margin: 1ex 0;
	padding-left: 0;
}
div.log_container div,
div.action_messages div {
	margin:1ex auto;
	padding:1ex;
}
div.log_container div.log_note,
div.action_messages div.log_note {
	border:1px solid #6287c2;
	background:#ddd;
}
div.log_container div.log_success,
div.action_messages div.log_success,
div.success {
	border:1px solid #9d9;
	background:#f2fbee;
	color:#0c0;
}
div.log_container div.log_error,
div.action_messages div.log_error,
div.error,
td.error {
	border:1px solid #d99;
	background:#fbf2ee;
	color:#e00;
}

div.log_container div.log_warning,
div.action_messages div.log_warning,
div.warning,
td.warning {
	border:1px solid #f60;
	background:#fff0dd;
	color:#f60;
}

p.error,
span.error,
span.warning,
p.warning {
	color: #e00;
	font-weight:bold;
}
p.error {
	margin: 1ex;
}

div.bText div.log_container ul {
	padding: 0;
	text-indent: 0;
}
div.bText div.log_container li {
	margin: 0;
	padding: 0;
	background: none;
}
div.bText div.log_container ul li::before {
	content: none;
}
// ---------------- //

// include errors, wrong params, deleted blog, missed skin tempalte file, etc...
div.skin_error {
	border: 2px dotted #d99;
	background:#fbf2ee;
	color:#e00;
	padding: 1em;
	margin: 1em;
}

// Widget styles:
// Grid table (Used on media index widget)
table.widget_grid {
	margin: 8px auto 1px;
	border-collapse: separate;
	border-spacing: 3px;
}
table.widget_grid td {
	padding: 0;
	background-color: #fff;
	border: 1px solid #ddd;
	vertical-align: top;
}
table.widget_grid img {
	padding: 1px;
}
table.widget_grid .note {
	text-align: center;
	padding: 2px;
	border-top: 1px solid #ddd;
	line-height: normal;
	display:block;
}
#sidebar table.widget_grid .note {
	margin: 0;
}
// Flow blocks (Used on media index widget)
.widget_flow_blocks, table.widget_grid {
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	flex-flow: row wrap;
	-webkit-flex-flow: row wrap;
	justify-content: space-around;
	-webkit-justify-content: space-around;
	div {
		margin-bottom: 15px;
		&:last-child {
			margin-bottom: 0px !important;
		}
	}
}
.widget_flow_blocks > div img {
	border-radius: 3px;
}

// ---------------- //


// Badge that display how many the unread messages a user has
.badge {
	position: relative;
	top: -1px;
	border-radius:12px;
	-moz-border-radius:12px;
	-webkit-border-radius:12px;
	background-color:red;
	border:2px solid #fff;
	color:#fff;
	font-size:10px;
	padding:0 6px
}


// Block with links under login, register, lostpassword and etc. forms
.evo_form__login_links {
	padding: 0 1em;
}

// Overlay screen (used for antispam on dashboard, for report/crop/delete user forms):
#screen_mask{
	position:fixed;
	top: 0;
	left: 0;
	background: #000;
	height: 100%;
	width: 100%;
	display:none;
	z-index:9998;
}
#overlay_wrap{
	position: fixed;
	top: 27px;
	left: 50%;
	height: 95%;
	z-index:9999;
	visibility: hidden;
}
#overlay_layout{
	position: relative;
	left: -50%;
	display: table;
	width: 100%;
	height: 100%;
	visibility: hidden;
}
#overlay_page{
	display:none;
	visibility: visible;
}
#overlay_page.overlay_page_active, #overlay_page.overlay_page_active_transparent{
	position:fixed;
	top:40px;
	bottom:5%;
	right:5%;
	left:5%;
	overflow:auto;
	background:#f1f6f8;
	border:1px solid #ccc;
	display:block;
}
#overlay_page.overlay_page_active_transparent{
	background: transparent;
	border: none;
	margin: auto;
	position: relative;
	display: table-cell;
	vertical-align: middle;
	min-height: 32px;
	top:auto;
	bottom:auto;
	right:auto;
	left:auto;
}
#overlay_page form.bComment {
	background: #FFF;
	padding: 0 10px;
}
#overlay_page form.bComment legend {
	width: 100%;
	text-align: left;
}
#overlay_page.overlay_page_active_transparent .fieldset{
	margin: 0;
}
.overlay_page_active form{
	padding:1em;
}
#overlay_postback{
	position:absolute;
	top:-1000em;
	left:-1000em;
}
#overlay_page .preview_cropped_images {
	width: 128px;
	text-align: center;
}
#overlay_page form {
	background: #FFF;
	legend {
		width: 100%;
	}
}
// ---------------- //

// User links widget
.ufld_icon_links {
	text-align: center;
	a {
		text-align: center;
	}
}

// Highlight effect:
div.evo_highlight, li.evo_highlight, tr.evo_highlight td {
	animation: evo_highlight 5s ease-out;
}
@keyframes evo_highlight {
	from {
		background-color: #FF6600;
	}
	to {
		background-color: transparent;
	}
}

// Counter for max and recommended length of input/textarea elements:
.evo_input_counter {
	position: absolute;
	color: #999;
	font-size: 80%;
	&.label {
		color: #FFF;
	}
}