@import "../partials/base";

@import "./partials/monster-keyValueSelector.scss";

/************************************************************/
/******************* MONSTER LOADING VIEW *******************/
/************************************************************/

.monster-loading-view.app-content {
	padding: 45px 20px;
	text-align: center;
	border: 1px solid $panel-border-color;
	border-radius: 2px;
	background-color: $panel-background-color;
}

.monster-loading-view.app-content.no-background {
	margin-top: 40px;
	border: none;
	background: transparent;
}

.monster-loading-view.app-content .title {
	font-weight: normal;
	margin-top: 0;
	margin-bottom: 15px;
	color: $font-primary-color;
}

.monster-loading-view.app-content .text {
	max-width: 560px;
	margin: 0 auto 40px;
	color: #909099;
}

.monster-loading-view.spinner {
	text-align: center;

	.monster-loading-spinner {
		font-size: 25px;
		width: 25px;
		height: 25px;
	}
}

/************************************************************/
/******************* ALERT/CONFIRM DIALOG *******************/
/************************************************************/

.alert-dialog {
	width: 460px;
	max-width: 460px;
}

.alert-dialog .dialog-content {
	padding: 20px;
	text-align: center;
}
.alert-dialog .dialog-content .dialog-header {
	font-size: 30px;
	margin-bottom: 20px;
	line-height: 30px;
}
.alert-dialog .dialog-content .dialog-text {
	font-size: 13px;
}
.alert-dialog .help-box .text-wrapper {
	padding: 25px 10px 15px 30px;
}
.alert-dialog .alert-buttons-wrapper {
	border-top: solid 1px #c0c0c9;
}
.alert-dialog .alert-buttons-wrapper button {
	border: none;
	border-radius: 0px;
	width: 50%;
	height: 50px;
}
.alert-dialog .alert-buttons-wrapper.single-button button {
	width: 100%;
}
.alert-dialog .alert-buttons-wrapper > button:not(:first-child) {
	border-left: solid 1px;
}

/************************************************************/
/********************** CHARGES DIALOG **********************/
/************************************************************/
.monster-charges .alert-dialog {
	width: auto;
	max-width: initial;
}
.dialog-charges {
	width: 520px;
}
.dialog-charges .content > .bookkeeper {
	text-align: left;
}
.dialog-charges .content > .section {
	padding: 10px;
	border: solid 1px #c0c0c9;
	border-radius: 2px;
	background: $background-primary-color;
}
.dialog-charges .content > .section:not(:first-child) {
	margin-top: 20px;
}
.dialog-charges .content .title-block {
	line-height: 47px;
}
.dialog-charges .charges-info .fa-exclamation-triangle {
	font-size: 39px;
	color: #c0c0c9;
}
.dialog-charges .charges-list {
	margin-top: 20px;
	max-height: 349px;
	overflow-y: auto;
}
.dialog-charges .charges-element {
	padding: 10px;
	text-align: center;
	border: 1px solid #c0c0c9;
	border-radius: 2px;
	background: #fff;
}
.dialog-charges .charges-element:not(:first-child) {
	margin-top: 5px;
}
.dialog-charges .charges-element table {
	width: 100%;
}
.dialog-charges .charges-element tr:first-child {
	height: 40px;
}
.dialog-charges .charges-element td {
	font-size: 20px;
}
.dialog-charges .charges-element td:nth-child(odd) {
	font-weight: bold;
	min-width: 100px;
	color: $primary-color;
}
.dialog-charges .charges-element th {
	font-weight: normal;
}
.dialog-charges .actions {
	margin-top: 30px;
	padding-top: 20px;
	text-align: right;
	border-top: 1px solid #c0c0c9;
}
.dialog-charges .actions button:last-child {
	width: 130px;
	margin-left: 20px;
}

/************************************************************/
/******************* ADVANCED ERROR DIALOG ******************/
/************************************************************/

.api-error-dialog .alert-dialog {
	width: 600px;
	max-width: 600px;
}

.alert-dialog-advanced {
	max-width: 800px;
	text-align: left;
}
.alert-dialog-advanced .error-line {
	margin: 5px 0;
}
.alert-dialog-advanced .error-line.title {
	font-size: 14px;
	margin-bottom: 20px;
}
.alert-dialog-advanced .error-line.api-name .verb {
	margin-right: 5px;
}
.alert-dialog-advanced .details-box .headline {
	margin: 10px 0;
	cursor: pointer;
}
.alert-dialog-advanced .details-box .headline i {
	margin-right: 5px;
}
.alert-dialog-advanced .details-box .headline i.fa-angle-up,
.alert-dialog-advanced .details-box .headline.active i.fa-angle-down {
	display: none;
}
.alert-dialog-advanced .details-box .headline i.fa-angle-down,
.alert-dialog-advanced .details-box .headline.active i.fa-angle-up {
	display: inline-block;
}
.alert-dialog-advanced .details-box .error-details-wrapper {
	display: none;
	overflow: auto;
}
.alert-dialog-advanced .details-box .error-details-wrapper .url {
	word-wrap: break-word;
}

/************************************************************/
/****************** JAVASCRIPT ERROR DIALOG *****************/
/************************************************************/

.alert-dialog-javascript table {
	margin: 0;
}
.alert-dialog-javascript table.table tr td {
	line-height: 15px;
	white-space: pre-line;
}

/************************************************************/
/****************** MONSTER DIALOG RELATED ******************/
/************************************************************/
body.monster-dialog-active {
	overflow: hidden;
}

/************************************************************/
/*************************** TABS ***************************/
/************************************************************/

.tabs-section {
	display: none;
}
.tabs-section.active {
	display: block;
}

/************************************************************/
/************************ VALIDATION ************************/
/************************************************************/

label.monster-invalid {
	font-size: 12px;
	line-height: 16px;
	position: absolute;
	margin: 0;
	color: $error-color;
}

// Add specificity to override bootstrap styles
input.monster-invalid,
input.monster-invalid[type="email"],
input.monster-invalid[type="text"]:not(.search-query),
textarea.monster-invalid,
select.monster-invalid,
.ui-widget.ui-spinner.monster-invalid,
.chosen-container-single.monster-invalid .chosen-single,
.chosen-container-multi.monster-invalid .chosen-choices {
	border: 1px solid $error-color;
}

textarea.monster-invalid {
	box-shadow: none;
}

/************************************************************/
/************************** WYSIWYG *************************/
/************************************************************/

.wysiwyg-container {
	clear: both;
}

/**************** TOOLBAR ***************/
.wysiwyg-container .wysiwyg-toolbar {
	margin: 0;
	padding: 6px 0;
	-webkit-user-select: none;
	   -moz-user-select: none;
		-ms-user-select: none;
			user-select: none;
	border: 1px solid #ccc;
	border-bottom: 0;
	background: #eee;
}
.wysiwyg-container.transparent .wysiwyg-toolbar {
	border-color: transparent;
	background: transparent;
}


/**************** OPTIONS ***************/
.wysiwyg-container .btn-group {
	margin-left: 4px;
	padding-right: 5px;
	border-right: 1px solid #ccc;
}
.wysiwyg-container .btn-group:last-child {
	border: none;
}
.wysiwyg-container .btn-group .btn:not(button) {
	margin-left: 5px;
	padding: 4px 8px;
	border: 1px solid rgba(0, 0, 0, 0);
	border-radius: 0;
	background-color: transparent;
	background-image: none;
	box-shadow: none;
}
.wysiwyg-container .btn-group .btn:first-child {
	margin-left: 0;
}
.wysiwyg-container .btn-group .btn:hover,
.wysiwyg-container .btn-group .btn.selected {
	border: 1px solid #bbb;
	background: #ddd;
}
.wysiwyg-container .btn-group .dropdown-menu {
	min-width: 0;
}
.wysiwyg-container .btn-group .dropdown-menu::after {
	border-bottom-color: #ccc;
}
.wysiwyg-container .btn-group .dropdown-menu .btn:first-child {
	margin-left: 5px;
}.wysiwyg-container .btn-group .dropdown-menu .btn:last-child {
	margin-right: 5px;
}
.wysiwyg-container .btn-group .dropdown-menu input {
	margin-left: 5px;
}
.wysiwyg-container .btn-group .dropdown-menu i {
	margin-right: 0;
}
.wysiwyg-container .btn-group .color-menu {
	width: 210px;
	padding: 5px;
}
.wysiwyg-container .btn-group .color-menu a {
	float: left;
	width: 15px;
	height: 15px;
	padding: 0;
	border: 2px solid #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .2) inset;
}
.wysiwyg-container .btn-group .submenu {
	background: #eee;
}

/************* UPLOAD BUTTON ************/
.wysiwyg-container .wysiwyg-upload {
	overflow: hidden;
}
.wysiwyg-container .wysiwyg-upload input {
	position: absolute;
	top: -1px;
	left: -1px;
	width: 38px;
	height: 30px;
	opacity: 0;
}

/**************** EDITOR ****************/
.wysiwyg-container .wysiwyg-editor {
	font-size: 16px;
	overflow: auto;
	-webkit-box-sizing: content-box;
	   -moz-box-sizing: content-box;
			box-sizing: content-box;
	height: 320px;
	margin-bottom: 20px;
	padding: 10px;
	border-collapse: separate;
	border: 1px solid #ccc;
	outline: none;
	background: #fff;
	-webkit-box-shadow: rgba(0, 0, 0, .0745098) 0 1px 1px 0 inset;
	   -moz-box-shadow: rgba(0, 0, 0, .0745098) 0 1px 1px 0 inset;
			box-shadow: rgba(0, 0, 0, .0745098) 0 1px 1px 0 inset;
}
.wysiwyg-container .wysiwyg-editor i {
	font-size: inherit;
}

/************************************************************/
/********************** LINKED COLUMNS **********************/
/************************************************************/

.items-selector .box-selector {
	width: 100%;
	max-width: 376px;
}
.items-selector .box-selector:first-child {
	float: left;
	margin-right: 40px;
}
.items-selector .box-selector:last-child {
	float: right;
}
.items-selector .box-selector ul {
	margin: 0;
	list-style: none;
	background: #f0f0f9;
	height: 327px;
	overflow: auto;
}
.items-selector .box-selector .box-title {
	font-size: 16px;
	margin-bottom: 20px;
	padding-bottom: 15px;
	color: $primary-color;
	border-bottom: 1px solid #c0c0c9;
}
.items-selector .box-selector .box-content {
	border: 1px solid #c0c0c9;
	border-radius: 2px;
}
.items-selector .box-selector .search-wrapper {
	padding: 10px 7px;
	border-bottom:  1px solid #c0c0c9;
	background-color: #f0f0f9;
}
.items-selector .box-selector .search-wrapper input {
	width: 323px;
}
.items-selector .box-selector .item-selector {
	font-size: 14px;
	line-height: 40px;
	height: 40px;
	padding: 0 7px;
	border-bottom: 1px solid #c0c0c9;
	background: #fff;
}
.items-selector .box-selector .item-selector:hover {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor: move;
	background: #fcfcfc;
}
.items-selector .box-selector .item-selector .item-handle {
	float: left;
	width: 3px;
	height: 16px;
	margin: 12px 10px 12px 0;
	border-right: 1px solid #c0c0c9;
	border-left: 1px solid #c0c0c9;
}
.items-selector .box-selector .item-selector.ui-sortable-helper {
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor: move;
	background-color: $primary-color;
	color: #fff;
}
.items-selector .box-selector .item-selector.ui-sortable-helper .item-handle {
	border-color:  #fff;
}

.items-selector.skinny .box-selector {
	width: 100%;
	max-width: 246px;
}

.items-selector.skinny .box-selector .search-wrapper input {
	width: 193px;
}

/************************************************************/
/********************* PASSWORD STRENGTH ********************/
/************************************************************/

div.monster-password-strength {
	line-height: 18px;
	box-sizing: border-box;
	width: 100%;
	height: 20px;
	margin-top: 5px;
	border: solid 1px #c0c0c9;
	border-radius: 2px;

	.monster-password-strength {
		&-bar {
			font-size: 12px;
			box-sizing: border-box;
			cursor: default;
		}

		&-label {
			margin-left: 5px;
			white-space: nowrap;
		}
	}
}

span.monster-password-strength {
	.monster-password-strength {
		&-icon {
			margin-left: 5px;
			color: $french-gray;
		}

		&-label {
			display: block;
			position: absolute;
			right: 0;
			font-size: 0.75rem;
			color: $midgray2;
			white-space: nowrap;
		}
	}
}

/*********************************************************************************************************/
/********************* RESULTS COLUMNS (Used in carriers + Number Manager) *******************************/
/*********************************************************************************************************/
.monster-results {
	margin-top: 30px;
	width: 600px;
}

.monster-results .column-wrapper {
	float: left;
	width: 290px;
}

.monster-results .column-wrapper:first-child {
	margin-right: 20px;
}

.monster-results .column-wrapper .row-title {
	line-height: 40px;
}

.monster-results .column-wrapper .stats {
	float: right;
	font-weight: 600;
}

.monster-results .column-wrapper .list-entities {
	background: #EEE;
	border: 1px solid #999;
	border-radius: 4px;
	height: 300px;
	overflow: auto;
	margin-top: 5px;
}

.monster-results .column-wrapper .list-entities .row-entity {
	border-bottom: 1px solid #999;
	padding: 4px 0px 4px 15px;
}

.monster-results .column-wrapper .list-entities .row-entity i {
	padding: 0 10px;
}

.monster-results .column-wrapper .result-status-wrapper i {
	margin-right: 5px;
}

/************************************************************/
/************************ APPS LAYOUT ***********************/
/************************************************************/
.app-layout {
	position: relative;
	min-height: 100%;
	background-color: $background-primary-color;
	box-sizing: border-box;
	padding-bottom: 15px;

	.app-header {
		.app-navbar-bg {
			position: relative;
			z-index: 10;
			border-bottom: 1px solid #c0c0c9;
			background-color: #fff;
			box-shadow: 0 0 5px 0 rgba(48, 48, 57, .3);

			.app-navbar-wrapper {
				max-width: 1280px;
				margin: 0 auto;
				padding: 18px 20px 0;

				.app-navbar {
					clear: both;
				}
			}
		}

		.app-subnav-bg {
			z-index: 9;
			display: none;

			.app-subnav-wrapper {
				max-width: 1280px;
				margin: 0 auto;
				padding: 20px 20px 0;

				.app-subnav {
					border-bottom: 1px solid #c0c0c9;

					&:not(.active) {
						display: none;
					}
				}
			}
		}
	}

	.app-content-wrapper {
		max-width: 1280px;
		margin: 0 auto;
		padding: 30px 20px;
	}

	&.docked {
		.app-content-wrapper {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			padding: 0;
		}

		&.with-navbar {
			.app-content-wrapper {
				position: relative;
			}
		}
	}

	&.docked,
	&.fullscreen {
		.app-header {
			.app-navbar-wrapper {
				max-width: none;
			}
		}
		.app-content-wrapper {
			max-width: none;
		}
	}
}

/************************************************************/
/********************** MONSTER SLIDER **********************/
/************************************************************/

.monster-slider {
	position: relative;
	border-top: 0;
	border-right: 1px solid #000;
	border-bottom: 0;
	border-left: 1px solid #000;
	border-radius: 0;
	background: none;
	margin: 0;
}

.monster-slider::before {
	position: absolute;
	top: 50%;
	display: block;
	width: 100%;
	height: 1px;
	content: '';
	transform: translate(0, -50%);
	background-color: #000;
}

.monster-slider.handle-top {
	margin-top: 92px ;
}

.monster-slider.handle-bottom {
	margin-bottom: 92px;
}

.monster-slider.handle-both {
	margin: 92px 0;
}

.monster-slider .ui-slider-range {
	display: none;
}

.monster-slider .ui-slider-handle {
	top: 50%;
	transform: translate(0, -50%);
	border: 0;
	border-radius: 10px;
	background: none;
}

.monster-slider .ui-slider-handle:hover {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
}

.monster-slider .ui-slider-handle:active {
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
}

.monster-slider .ui-slider-handle.min {
	background-color: #f8a506;
}

.monster-slider .ui-slider-handle.max {
	background-color: #fe3c23;
}

.monster-slider .ui-slider-handle::before {
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
	width: 6px;
	height: 6px;
	content: '';
	transform: translate(-50%, -50%);
	border-radius: 3px;
	background-color: #fff;
}

.monster-slider .ui-slider-tooltip {
	position: absolute;
	left: 50%;
	display: block;
	padding: 10px;
	content: '';
	transform: translate(-50%, 0);
	color: #303039;
	border: 1px solid;
	border-radius: 2px;
	font-weight: normal;
	font-size: 14px;
}

.monster-slider .ui-slider-handle.min .ui-slider-tooltip {
	top: -88px;
	border-color: #f8a506;
}

.monster-slider .ui-slider-handle.max .ui-slider-tooltip {
	bottom: -88px;
	border-color: #fe3c23;
}

.monster-slider .ui-slider-tooltip::before {
	position: absolute;
	display: block;
	left: 50%;
	transform: translate(-50%, 0);
	content: '';
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
}

.monster-slider .ui-slider-handle.min .ui-slider-tooltip::before {
	bottom: -7px;
	border-top: 6px solid #f8a506;
}

.monster-slider .ui-slider-handle.max .ui-slider-tooltip::before {
	top: -7px;
	border-bottom: 6px solid #fe3c23;
}

.monster-slider .ui-slider-tooltip::after {
	position: absolute;
	left: 50%;
	display: block;
	content: '';
	transform: translate(-50%, 0);
	border-right: 7px solid transparent;
	border-left: 7px solid transparent;
}

.monster-slider .ui-slider-handle.min .ui-slider-tooltip::after {
	bottom: -6px;
	border-top: 7px solid #fff;
}

.monster-slider .ui-slider-handle.max .ui-slider-tooltip::after {
	top: -6px;
	border-bottom: 7px solid #fff;
}

.monster-slider .ui-slider-tooltip .tooltip-text {
	margin-bottom: 10px;
	white-space: nowrap;
}

.monster-slider .ui-slider-tooltip .tooltip-value-wrapper {
	font-size: 26px;
	white-space: nowrap;
}

.monster-slider .ui-slider-handle.min .tooltip-value-wrapper {
	color: #f8a506;
}

.monster-slider .ui-slider-handle.max .tooltip-value-wrapper {
	color: #fe3c23;
}

.monster-slider .ui-slider-limit {
	position: absolute;
	top: -3px;
	white-space: nowrap;
}

.monster-slider .ui-slider-limit.min {
	right: 100%;
	padding-right: 10px;
}

.monster-slider .ui-slider-limit.max {
	left: 100%;
	padding-left: 10px;
}


/* Pretty JSON */
.renderjson                { max-height: 400px; overflow: auto; }
.renderjson a              { color: #AAA; text-decoration: none; }
.renderjson .disclosure    { font-size: 150%; }
.renderjson .key           { font-weight: bold; }

.renderjson.theme-dark                { background: #333; }
.renderjson.theme-dark .disclosure    { color: #EEE };
.renderjson.theme-dark .object.syntax { color: #EEE; }
.renderjson.theme-dark .array.syntax { color: #EEE; }
.renderjson.theme-dark .syntax        { color: #EEE; }
.renderjson.theme-dark .key           { color: #EEE; }
.renderjson.theme-dark .boolean       { color: yellow; }
.renderjson.theme-dark .number        { color: yellow; }
.renderjson.theme-dark .string        { color: peru; }
.renderjson.theme-dark .keyword       { color: red; }

.renderjson.theme-light                { background: #EEE; }
.renderjson.theme-light .disclosure    { color: #8a8a8a };
.renderjson.theme-light .object.syntax { color: #333; }
.renderjson.theme-light .array.syntax { color: #333; }
.renderjson.theme-light .syntax        { color: #333; }
.renderjson.theme-light .key           { color: #333; }
.renderjson.theme-light .boolean       { color: blue; }
.renderjson.theme-light .number        { color: blue; }
.renderjson.theme-light .string        { color: green; }
.renderjson.theme-light .keyword       { color: red; }

/************************************************************/
/************************** DIALPAD *************************/
/************************************************************/

.monster-dialpad {
	width: 230px;
}

.monster-dialpad .headline {
	margin-top: 15px;
}

.monster-dialpad .dialpad-action-button {
	width: 100%;
	margin-top: 20px;
}

.monster-dialpad .phone-header {
	padding: 15px 20px 15px 4px;
	background-color: $primary-color;
}

.monster-dialpad .dialbox-container {
	position: relative;
}

.monster-dialpad .dialbox {
	font-size: 24px;
	height: 24px;
	width: 100%;
	margin-bottom: 0;
	color: #fff;
	border: 0;
	background-color: transparent;
	box-shadow: none;
}

.monster-dialpad .dialbox:focus {
	box-shadow: none;
}

.monster-dialpad .dialbox-icon {
	font-size: 24px;
	position: absolute;
	top: 4px;
	cursor: pointer;
	color: #fff;
}

.monster-dialpad .dialpad-container {
	padding-top: 10px;
	background-color: #fff;
}

.monster-dialpad .dialpad-container::after {
	display: block;
	clear: both;
	content: '';
}

.monster-dialpad .dialpad-item {
	display: block;
	float: left;
	width: 33.333333%;
	min-height: 36px;
	padding: 0;
	padding-top: 20px;
	text-align: left;
	border: 0;
	background-color: #fff;
}

.monster-dialpad .dialpad-item .item-text {
	font-size: 24px;
	margin-left: 10px;
	color: $primary-color;
}

.monster-dialpad .dialpad-item .item-legend {
	font-size: 12px;
	margin-left: 8px;
	text-transform: uppercase;
	color: #c0c0c9;
}

.monster-dialpad .dialpad-item:hover {
	cursor: pointer;
	background-color: #f0f0f9;
}

.monster-dialpad .call-actions {
	padding: 25px 30px 30px 25px;
	border: 1px solid #c0c0c9;
	border-top: 0;
}

.monster-dialpad .call-actions button {
	font-size: 24px;
	width: 100%;
	height: 55px;
}

/* Monster-popover */
:not(.drop-target).monster-popover .monster-popover-title {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	background: $primary-color;
	border: 1px solid darken($primary-color, 10%);
	color:  $foreground-primary-color;
	padding: 1em;
	width: 100%;
	font-weight: bold;
}

:not(.drop-target).monster-popover .monster-popover-content {
	background:  $foreground-primary-color;
	padding: 1em;
}

/* Monster Overlay */

#monster_overlay {
	position: fixed;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	background-color: #000;
	opacity: .3;
}

.over-monster-overlay {
	/* position: relative !important; */
	z-index: 4 !important;
}

/************************************************************/
/********************* KEY-VALUE EDITOR *********************/
/************************************************************/
.monster-key-value-editor {
	.monster-key-value-data-container {
		.monster-key-value-editor-row {
			margin-bottom: 10px;
			display: flex;

			&:hover {
				.key-value-remove {
					opacity: 1;
				}
			}

			.data-key, .data-value {
				flex: 1;
				padding-right: 1rem;

				input {
					width: 100%;
					box-sizing: border-box;
					height: 30px;
				}
			}

			.key-value-remove {
				color: $font-primary-color;
				cursor: pointer;
				padding-top: 0.2rem;
				opacity: 0;
				transition: opacity 0.125s ease-in-out;

				&:hover {
					color: $danger-color;
				}
			}
		}
	}

	.key-value-add {
		font-size: 0.75rem;
	}
}

/************************************************************/
/***************** MONSTER COUNTRY SELECTOR *****************/
/************************************************************/

.monster-country-selector.chosen-container {
	span.monster-country-item-label {
		display: inline;
	}
	img.monster-country-item-flag {
		width: 1rem;
		max-height: 1rem;
		margin: -3px 6px 0 0;
		padding: 0;
	}
}

/************************************************************/
/***************** MONSTER STATE SELECTOR *****************/
/************************************************************/

.monster-state-selector.chosen-container {
	span.monster-state-item-label {
		display: inline;
	}
}

/************************************************************/
/************************ DATEPICKER ************************/
/************************************************************/
input.hasDatepicker[readonly] {
	background-color: $panel-background-color;
	cursor: pointer;
}
