/**
	1. Main container -- filebox
	2. Labels (before/after main container)
	3. filebox--container
	4.  -- input
	    -- button
	    -- tooltip
	    -- filename control
	    -- extended interface tooltip

 */
.filebox{
	display: flex;
	flex-direction: row;
	align-content: center;
	align-items: center;
	position: relative;
	font-size: 1.1rem;
	min-width: 140px;
	max-width: none;
}
.filebox.filebox--shrink {
	display: inline-flex;
}

.filebox .filebox__main{
	line-height: 0;
	position: relative;
	flex-basis: 100%;
	width: 100%;
	display: flex;
}
.filebox.filebox--shrink .filebox__main-button,
.filebox.filebox--shrink .filebox__main{
	flex-basis: initial;
	width: auto;

}

.filebox-col .filebox{
	flex-direction: column;
	align-content: flex-start;
	align-items: flex-start;
}

.filebox .filebox__main-button {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit; /* Don't remove */
	/*border: 2px solid #bfbfbf;*/ /*overwrites borders of buttons*/
	border: 2px solid transparent; /*overwrites borders of buttons*/
	border-radius: 16px;
	width: 100%;
	padding: 0 0.5em;
	min-width: 140px;
}

.filebox.has-comment .filebox__main-button,
.filebox.file-status-pending .filebox__main-button{
	border-color: #edcd2e !important;
	outline: 1px solid #edcd2e;
}

.filebox.has-comment.fixed .filebox__main-button{
	border-color: #4b8dcb !important;
	outline: 1px solid #4b8dcb;
}

.filebox.has-comment.file-status-rejected .filebox__main-button,
.filebox.file-status-rejected .filebox__main-button{
	border-color: #ed332e !important;
	outline: 1px solid #ed332e;
}

.filebox.has-comment.file-status-confirmed .filebox__main-button,
.filebox.file-status-confirmed .filebox__main-button{
	border-color: #2fa243 !important;
	outline: 1px solid #2fa243;
}

/*.filebox__main-button:before {
	content: attr(data-text-empty);
}*/
.filebox__main-button__text:before {
	content: attr(data-text-empty);
}
.filebox__main-button.static {
	cursor: default;
	background: #333645;
	border-color: #333645;
	color: #fff;
	padding: 0 0.5em;
}
.filebox__btn--remove {
	position: absolute;
	top: 50%;
	right: 0.5em;
	visibility: hidden;
	opacity: 0;
	z-index: 2;
	cursor: pointer;
	display: block;
	outline: none;
	-ms-transform: scaleY(0.7);
	transform: scaleY(0.7);
}
.filebox .file_input.active + .filebox__main-button .filebox__btn--remove { /* ??? */
	opacity: 1;
	visibility: visible;
}

.filebox__extended-interface-container{
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 0.5em;
	visibility: hidden;
	opacity: 0;
	z-index: 2;

	width: 17px;
	height: 17px;
	line-height: 17px !important;
}
.filebox.confirm-reject-interface .filebox__main-button .filebox__extended-interface-container, /* for simple extended interface comment for empty file is allowed*/
.filebox.has-button .file_input.active ~ .filebox__main-button .filebox__extended-interface-container {
	opacity: 1;
	visibility: visible;
}

/* todo: remove background */
.filebox .file_input:not(.active) + .filebox__main-button{
	background-color: #ffffff;
	color: inherit; /* don't remove if you didn't resolved white text on hover */
	border: 2px solid #bfbfbf;
}

.filebox .file_input.active + .filebox__main-button .filebox__main-button__text:before{
	content: attr(data-text-full) !important;
}

.uploadbox.uploadbox--inverse .file_input.active + .tooltip .uploadbox__btn {
	color: #333645;
	border-color: #ffffff;
}
.uploadbox.uploadbox--inverse .file_input.active + .tooltip .uploadbox__btn:hover {
	background: #c9c9c9;
	border-color: #333645;
	color: #333645;
}
.uploadbox.uploadbox--inverse .file_input.active + .tooltip .uploadbox__btn:active {
	background: #a2a2a2;
	border-color: #333645;
	color: #333645;
}
.uploadbox.uploadbox--inverse .file_input.active + .tooltip .uploadbox__remove:not(:hover) {
	color: #333645;
}
.uploadbox.uploadbox--inverse .file_input.active + .tooltip .uploadbox__btn {
	background: #ffffff;
	color: #333645;
	border-color: #333645;
}

.filebox .file_input.error + .tooltip .uploadbox__remove{
	border-color: #f00 !important;
}

.filebox.confirm-reject-interface .filebox__main-button, /* For this type of interface the toggler is always shown (for comment on empty file) */
.filebox.filebox-extended-interface .file_input.active + .filebox__main-button{
	padding: 0 1.5em 0 0.5em;
}

.filebox.js-filebox-arbitrary-add .filebox__main-button[data-add_button_symbol]:not([data-add_button_symbol=""]), /* Must have not empty data- attribute */
.filebox.filebox-basic-interface .file_input.active + .filebox__main-button{
	padding: 0 1em 0 0.5em;
}
.filebox:not(.has-button) .file_input.active + .filebox__main-button{
	padding: 0 0.5em;
}

/*.vendor__uploads .filebox {*/
/*!*	display: -webkit-box;*/
/*	display: -ms-flexbox;*/
/*	display: flex;*!*/
/*	font-weight: 300;*/
/*	!*width: 100%;*!*/
/*}*/

.bidding_auction__uploads .uploadbox input[required]:not(.active) + .tooltip .uploadbox__btn {
	border-color: #f00;
}
.bidding_auction__uploads__additional .uploadbox input:not(.active) + .tooltip .uploadbox__btn {
	position: relative;
}
.bidding_auction__uploads__additional .uploadbox input:not(.active) + .tooltip .uploadbox__btn:after {
	position: absolute;
	content: '+';
	right: 11px;
	top: 50%;
	-ms-transform: translateY(-50%);
	transform: translateY(-50%);
}
/*.register__uploads .uploadbox {
	margin-left: 15px;
}*/


/*.vendor__uploads .uploadbox .tooltip {*/
/*	display: block;*/
/*}*/
/*.vendor__uploads .uploadbox .tooltip__title {
	display: block;
}*/

.auction__panel__row .uploadbox input[required]:not(.active) + .tooltip .uploadbox__btn,
.procedure__panel__row .uploadbox input[required]:not(.active) + .tooltip .uploadbox__btn {
	border-color: #f00;
}
/*.auction .uploadbox,
.procedure .uploadbox,
.tender .uploadbox {
	margin-left: 5px;
}*/

.auction__step4__buttons_end .uploadbox{
	margin-left: 15px;
}
.auction__step4__buttons_end .uploadbox__btn {
	border-color: #333645;
	min-width: 170px;
}

@media screen and (max-width: 440px) {
	.register__uploads .filebox__main {
		margin-left: 0;
	}
	.register__uploads .filebox__main-button {
		min-width: 115px;
	}
	.auction__step4__buttons_end .filebox__main{
		margin-bottom: 15px;
		margin-left: 0;
	}
}

body:not(.registration) .js-upload-box-supplier .tooltip.disabled .uploadbox__btn{
	border: 2px solid #ed332e;
}
.uploadbox--grey div.active ~ .tooltip .uploadbox__btn, .uploadbox--grey input.active ~ .uploadbox__btn{
	background: #bfbfbf;
	border-color: #bfbfbf;
	color: #333645;
}
.procedure__panel__row--upload .uploadbox input[required]:not(.active) + .tooltip .uploadbox__btn {
	border-color: #f00;
}
.signed_file_container .tooltip.disabled .uploadbox__btn {
	border: 2px solid #ed332e;
}

/*.filebox.required .uploadbox__btn,
.arbitrary-field--file.required .uploadbox__btn,*/
.filebox.required .file_input/*:not(input)*/:not(.active) + .filebox__main-button, /* e-document/readonly */
.filebox.required:not(.e-document) .file_input:invalid + .filebox__main-button { /* !* red border for all required, even before submission attempt *!*/
	border: 2px solid red;
}

/*.update-supplier-file{
	width: 17px;
	height: 17px;
	line-height: 17px !important;
}*/
.filebox__extended-interface-container svg.file-popup-toggle{
	width: 100%;
	height: 100%;
	margin: auto;
	/*vertical-align: middle;*/
	fill: currentColor;
	stroke-width: 16px;
	stroke: currentColor;
}

.filebox .tooltip,
.filebox .fieldbox__label,
.filebox .filebox__label{
	vertical-align: middle;
}

.fieldbox__label-after{
	margin-right: 0.35em;
}

/*.fieldbox__label-after,*/
.filebox-name_control{
	margin-bottom: 0;
}

.filebox.required .filebox__label:before{
	content: ' *';
	color: red;
	font-weight: 300;
}

/*.bidding_auction__uploads .filebox .fieldbox__label{*/
/*	font-weight: 400;*/
/*}*/

.filebox-name_control{
	display: inline-block;
	margin-right: 0.5em;
	vertical-align: middle;
}

/* Show not uploaded business in supplier profile (only) with red border. Border becomes yellow when field receives comment */
.profile .filebox.js-filebox-business_file .file_input:not(.active) + .filebox__main-button,
.profile-authority.profile-page-supplier .filebox.js-filebox-business_file .file_input:not(.active) + .filebox__main-button{
	border-color: red;
}

.uploadbox__remove_tooltip{
	display: none;
	background-color: #c9c9c9;
	border-radius: 18px;
	padding: 5px 3px;
	position: absolute;
	transform: translate(28px, -154%);
}

.uploadbox__remove_tooltip.active{
	display: inline-block;
}

.filebox__extended-interface-button {
	border-radius: 50%;
	width: 28px;
	height: 28px;
	line-height: 26px;
	font-size: 17px;
	display: inline-block;
	text-align: center;
	margin: 0 3px;
	position: relative;
}

.filebox__extended-interface-button:before{
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	box-sizing: border-box;
	border: 1px solid transparent;
	border-radius: 50%;
	z-index: 50;
}

.angle__base.angle__uploadbox__remove_tooltip:before{
	-ms-transform: rotate(235deg);
	transform: rotate(235deg);
	right: 0;
	bottom: -6px;
}

.filebox .file_input:not(.active) ~ .filebox__extended-interface-container .tooltip__button_confirm,
.filebox .file_input:not(.active) ~ .filebox__extended-interface-container .tooltip__button_delete {
	display: none !important;
}

.tooltip__button_confirm{
	background-color: #2FA243;
	display: none;
	color: #ffffff;
}

.tooltip__button_confirm svg{
	width: 65%;
	height: 65%;
	margin: auto;
	vertical-align: middle;
}

.confirm-reject-interface .tooltip__button_confirm, /* Allow to confirm always if file is presented */
.has-comment .tooltip__button_confirm { /* Allow to remove comment if it was set */
	display: inline-block;
}

.tooltip__button_message{
	background-color: #EFCC32;
}

.tooltip__button_message svg {
	width: 75%;
	height: 75%;
	margin: auto;
	vertical-align: middle;
}
.tooltip__button_delete{
	background-color: #EE2430;
}
.tooltip__button_delete:before{
	content: '\2716';
	color: #ffffff;
}

.js-filebox-envelopes_protocol_quality,
.js-filebox-envelopes_protocol_price,
.js-filebox-envelopes_protocol{
	justify-content: center;
	margin-bottom: 15px;
	flex-direction: column;
}

.js-filebox-envelopes_protocol_quality label.fieldbox__label,
.js-filebox-envelopes_protocol_price label.fieldbox__label,
.js-filebox-envelopes_protocol label.fieldbox__label{
	font-weight: 600;
}

.authority-auction .participant-item .threshold_condition_details--inner .filebox:not(.has-comment) .file_input:not(.active)+.filebox__main-button,
.authority-auction .participant-item .participant-files-status-check .filebox.required:not(.has-comment) .file_input:not(.active)+.filebox__main-button{
	border-color: #ed332e;
}
.filebox.js-filebox-arbitrary-add .filebox__main-button:after {
	position: absolute;
	content: attr(data-add_button_symbol);
	right: 0.5em;
	top: 50%;
	-ms-transform: translateY(-50%);
	transform: translateY(-50%);
}
/*--------------------------------*/
   /*
   .bidding_auction__uploads__additional .uploadbox input:not(.active) + .tooltip .uploadbox__btn:after {

   }   */
