/*************************************
 * SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
 * SPDX-License-Identifier: AGPL-3.0-only
 ************************************/

/*  Buttons */

a.crmButton,
a.crmbutton {
	display: inline-block;
	text-decoration: none;
}

.crmButton,
.crmbutton {
	@extend .btn;
	@extend .btn-default;
	@extend .btn-sm;
	margin: 2px;
	
	&.with-icon {
		// font-size: 10px;
	}
	
	&.only-icon {
		padding: 7px 7px;
		
		& .vteicon, & .vteicon2, & .icon-module {
			font-size: 20px;
		}
	}
	
	& .vteicon, & .vteicon2, & .icon-module {
		&,
		&:hover:not(.disabled):not(.nohover) {
			color: inherit;
		}
	}
}

// crmv@187622
.vte-btn-group {
	@extend .btn-group;
	margin: 2px;
	box-shadow: none;
	top: -1px;

	& > .crmbutton:first-child:not(:last-child):not(.dropdown-toggle) {
		padding: 8px 20px;
	}
	
	& > .crmbutton, & > .crmButton {
		@extend .btn;
		font-size: 13px;

		&.dropdown-toggle {
			padding: 15px 10px;
			border-left: 1px solid #fafafa;

			& .caret {
				position: relative;
				left: -5px;	
			}
		}
	}
}
// crmv@187622e

/* crmv@26807 */
.picklistButton {
	background: $white url(vteimage("themes/softed/images/movecol_down.gif", "../../")) right center no-repeat;
	background-color: $grey-300;
	text-align: left;
}
/* crmv@26807e */

.crmButton,
.crmbutton {
	&.create,
	&.edit {
		border: 1px solid $vte-button-border;
	}
	 
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:active,
		&:hover {
			background-color: $vte-button-bg;
			color: $vte-button-text;
		}
	}
}

.turboliftEntry1.delete,
.crmButton.delete,
.crmbutton.delete {
	@extend .btn-danger;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:hover {
			color: $vte-button-delete-text;
		}
	}
}

.crmButton.save,
.crmbutton.save {
	@extend .btn-success;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:hover {
			color: $vte-button-save-text;
		}
	}
}

.crmButton.cancel,
.crmbutton.cancel {
	@extend .btn-danger;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:hover {
			color: $vte-button-delete-text;
		}
	}
}

.crmButton.success,
.crmbutton.success {
	@extend .btn-success;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:active,
		&:hover {
			background-color: $vte-button-success-bg;
			color: $vte-button-success-text;
		}
	}
}

.crmButton.info,
.crmbutton.info {
	@extend .btn-info;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:hover {
			color: $vte-button-success-text;
		}
	}
}

.crmButton.warning,
.crmbutton.warning {
	@extend .btn-warning;
	
	&:not(.btn-link):not(.btn-flat) {
		&,
		&:hover {
			color: $vte-button-warning-text;
		}
	}
}

.crmbutton.btn-arrow-right {
	border-right: none !important;
	z-index: 1;
}

.crmbutton.btn-arrow-left {
	border-left: none !important;
	z-index: 1;
}

.btn-arrow-right:before,
.btn-arrow-left:before {
	content: "";
	position: absolute;
	top: 3px;
	width: 22px;
	height: 22px;
	background: $white;
	border: 1px solid $vte-button-border;
	border-left-color: transparent;
	border-bottom-color: transparent;
	border-radius: 2px;
	z-index: -1;
}

.btn-arrow-right:before {
	transform: rotate(45deg);
	-webkit-transform: rotate(45deg);
	-moz-transform: rotate(45deg);
	-o-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
}

.btn-arrow-left:before {
	transform: rotate(225deg);
	-webkit-transform: rotate(225deg);
	-moz-transform: rotate(225deg);
	-o-transform: rotate(225deg);
	-ms-transform: rotate(225deg);
}

.btn-arrow-right:before {
	right: -10px;
}

.btn-arrow-left:before {
	left: -10px;
}

.btn-arrow-left:before,
.btn-arrow-right:before {
	background-color: $white;
}

.backButtonSave {
	background-color: $vte-button-save;
	background: linear-gradient(135deg, transparent 10px, $vte-button-save 0) top left, linear-gradient(45deg, transparent 10px, $vte-button-save 0) bottom left;
	background-size: 100% 50%;
	background-repeat: no-repeat;
	border: 0px none !important;
	padding-left: 25px !important;
	
	&.crmbutton,
	&.crmButton {
		&:not(.btn-link):not(.btn-flat) {
			&,
			&:hover {
				color: $darkbg-text !important;
			}
		}
	}
}

.backButtonSave:active {
	box-shadow: none !important;
}

.backButtonSave:hover {
	box-shadow: none !important;
	color: $lightbg-text !important;
}

.crmbutton-nav {
	margin: 5px 1px;
}

/* crmv@98866 */
.searchAlph {
	width: 100%;
	margin: 0;
	border: 1px solid $vte-button-alpha-border;
	
	&.crmbutton,
	&.crmButton {
		&:not(.btn-link):not(.btn-flat) {
			background-color: $vte-button-alpha-bg;
			color: $vte-button-alpha-color;
		}
	}
}

.crmbutton.searchAlphselected {
	width: 100%;
	margin: 0;
	font-weight: 700;
	border: 1px solid $vte-button-alpha-selected-border;
	
	&.crmbutton,
	&.crmButton {
		&:not(.btn-link):not(.btn-flat) {
			background-color: $vte-button-alpha-selected-bg;
			color: $vte-button-alpha-selected-color;
		}
	}
}
/* crmv@98866 end */
