/* Popups: various widgets that have popup windows. Dialogs, tooltips, hovercards, etc. */

/* ======================================================== */
/* Modal element - used to block out the screen under popup controls */
.ipsModal {
	background: rgba( var(--theme-area_background_dark), 0.7 );
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 15000;
}

/* ======================================================== */
/* DIALOG WINDOWS */
.ipsDialog {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	z-index: 20000;
	padding-bottom: 15px;
}

	.ipsDialog.ipsDialog_fixed {
		position: fixed;
	}

	.ipsDialog > div {
		display: block;
		width: 90%;
		max-width: 1200px;
		background: rgb( var(--theme-area_background_reset) );
		margin: 3% auto 0 auto;
		box-shadow: var(--dialog--boxShadow);
		position: relative;
		border-radius: var(--radius-2);
	}

		.ipsDialog.ipsDialog_fixed > div {
			height: 90%;
			max-height: 90%;	
		}

	.ipsDialog .ipsDialog_loading {
		background-color: rgb( var(--theme-area_background_reset) );
		height: 200px;
	}

	/* Sizes */
	.ipsDialog.ipsDialog_narrow > div {
		max-width: 500px;
	}

	.ipsDialog.ipsDialog_medium > div {
		max-width: 850px;
	}

	.ipsDialog.ipsDialog_wide > div {
		max-width: 1000px;
	}

	.ipsDialog.ipsDialog_fullscreen > div {
		position: absolute;
		top: 10px;
		right: 10px;
		bottom: 10px;
		left: 10px;
		max-width: 100%;
		max-height: 100%;
		width: auto;
		height: auto;
		margin: 0;
	}

	/* Dialog elements */
	.ipsDialog_close {
		position: absolute;
		top: 3px;
		display: block;
		color: rgb( var(--theme-text_dark) ) !important;
		width: 44px;
		height: 44px;
		line-height: 48px;
		font-size: 34px;
		font-weight: 300;
		text-align: center;
		z-index: 1000;
		transition: 0.2s all linear;
	}
	html[dir="ltr"] .ipsDialog_close {
		right: 4px;
	}
	html[dir="rtl"] .ipsDialog_close {
		left: 4px;
	}

	.ipsDialog_title {
		color: rgb( var(--theme-text_dark) );
		font-size: {fontsize="x_large"};
		font-weight: bold;
		text-align: left;
		line-height: 1.3;
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
		margin: 0;
		padding: var(--sp-4) var(--sp-4) 0 var(--sp-4);
	}
	html[dir="rtl"] .ipsDialog_title {
		text-align: right;
	}
		
		.ipsDialog_title ~ .ipsHr {
			margin: 12px 15px 0 15px;
		}

	.ipsDialog_fixed .ipsDialog_content {
		top: 0;
		bottom: 0;
		left: 0;
		right: 0;
		position: absolute;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-box-align: stretch;
		-webkit-box-flex: 1;
		-webkit-overflow-scrolling: touch;
		overflow: auto;
	}

		.ipsDialog_fixed .ipsDialog_title ~ .ipsDialog_content {
			top: 56px;
		}

	.ipsDialog_footer {
		position: fixed;
		bottom: 60px;
		left: 0;
		right: 0;
	}

/* ======================================================== */
/* HOVERCARD */
.ipsHovercard {
	background: rgb( var(--theme-area_background_reset) );
	box-shadow: var(--popup--boxShadow);
	border: var(--popup--border);
	background-clip: padding-box;
	border-radius: var(--popup--radius);
	position: relative;
}
	
	.ipsHovercard > div {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}

	/* Hovercard stem */
	.ipsHovercard:not( .ipsHovercard_noStem ) .ipsHovercard_stem {
		color: rgb( var(--theme-area_background_reset) );
		border-color: inherit;
		display: block;
		position: absolute;
		width: 2em;
		height: 2em;
		font-size: 10px;
		pointer-events: none !important;
	}

		.ipsHovercard_stem::before,
		.ipsHovercard_stem::after {
			content: '';
			display: block;
			position: absolute;
			width: 0;
			height: 0;
			border: 1em solid transparent;
		}

	.ipsHovercard.ipsHovercard_stemTop { margin-top: -10px; }
	.ipsHovercard.ipsHovercard_stemBottom {	margin-top: 10px; }
	.ipsHovercard.ipsHovercard_stemLeft { margin-left: -20px; }
	.ipsHovercard.ipsHovercard_stemRight { margin-left: 20px; }

	.ipsHovercard_stemLeft .ipsHovercard_stem { left: 3em; }
	.ipsHovercard_stemRight .ipsHovercard_stem { right: 3em; }

	.ipsHovercard_stemTop .ipsHovercard_stem {
		top: 100%;
	}
		.ipsHovercard_stemTop .ipsHovercard_stem::before {
			top: 1px;
			border-top-color: inherit;
		}
		.ipsHovercard_stemTop .ipsHovercard_stem::after{
			border-top-color: currentColor;
		}

	.ipsHovercard_stemBottom .ipsHovercard_stem {
		bottom: 100%;
	}
		.ipsHovercard_stemBottom .ipsHovercard_stem::before {
			bottom: 1px;
			border-bottom-color: inherit;
		}
		.ipsHovercard_stemBottom .ipsHovercard_stem::after{
			border-bottom-color: currentColor;
		}

	/* Hovercard elements */
	.ipsHovercard_loading {
		width: 30px;
		height: 30px;
		border-radius: var(--popup--radius);
		padding: 5px;
		box-shadow: 0px 5px 40px rgba(0,0,0,0.4);
		background-color: rgb( var(--theme-area_background_reset) );
		pointer-events: none;
	}

		.ipsHovercard_loading .ipsLoading_tinyIcon {
			width: 20px;
			height: 20px;
			font-size: 20px;
		}
		
		.ipsHovercard_loading:after {
			content: '';
			display: block;
			position: absolute;
			width: 0;
			height: 0;
			border-width: 5px;
			border-style: solid;
			border-color: rgb( var(--theme-area_background_reset) ) transparent transparent transparent;
			left: 50%;
			top: 100%;
		}
		html[dir="ltr"] .ipsHovercard_loading:after {
			margin-left: -5px;
		}
		html[dir="rtl"] .ipsHovercard_loading:after {
			margin-right: -5px;
		}

/* ======================================================== */
/* TOOLTIPS */
/* This is an ID because we always reuse the same element */
.ipsTooltip {
	background: #2a2a2a;
	border-color: #2a2a2a;
	padding-top: 4px !important;
	padding-bottom: 4px !important;
	font-size: {fontsize="x_small"};
	color: #fff;
	position: absolute;
	padding: 0 8px;
	pointer-events: none;
	border-radius: var(--popup--radius);
	{prefix="user-select" value="none"}
}

	body[data-dragging] .ipsTooltip {
		display: none !important;
	}

	.ipsTooltip.ipsTooltip_top {
		margin-top: -2px;
	}

	.ipsTooltip.ipsTooltip_bottom {
		margin-top: 2px;
	}

	.ipsTooltip:after {
		content: '';
		display: block;
		position: absolute;
		width: 0;
		height: 0;
		border: 5px solid transparent;
		left: 50%;
		margin-left: -5px;
	}

		.ipsTooltip.ipsTooltip_right:after {
			left: auto;
			right: 4px;
			margin-left: 0;
		}

		.ipsTooltip.ipsTooltip_left:after {
			left: 4px;
			margin-left: 0;
		}

	.ipsTooltip.ipsTooltip_top:after {
		border-top-color: inherit;
		bottom: -10px;
	}

	.ipsTooltip.ipsTooltip_bottom:after {
		border-bottom-color: inherit;
		top: -10px;
	}

	.ipsTooltip a {
		color: currentColor;
		border-bottom: 1px dotted currentColor;
	}
/* ======================================================== */
/* PAGE ACTIONS */
/* Page actions are used primarily for moderation, presenting a floating toolbar of actions for selected items */
.ipsPageAction {
	background: rgb(32,32,32);
	border: 1px solid rgba(0,0,0,0.4);
	box-shadow: var(--dialog--boxSHadow);
	position: fixed;
	left: 50%;
	bottom: 10px;
	border-radius: 40px;
	padding: 0 var(--sp-4);
	z-index: 2000;
	color: #cdcdcd;
}

	.ipsPageAction > ul[data-role='actionItems'] > li {
		padding: 8px 12px;
		margin: 0;
		float: left;
		border-right: 1px solid rgba(0,0,0,0.3);
		min-width: 58px;
		line-height: var(--sp-7);
		text-align: center;
	}
	html[dir="rtl"] .ipsPageAction > ul[data-role='actionItems'] > li {
		float: right;
	}

	.ipsPageAction > ul > li.ipsPageAction_active {
		background: #000;
	}

		.ipsPageAction > ul > li.ipsPageAction_active .ipsPageAction_icon {
			color: #fff;
		}

	.ipsPageAction .ipsPageAction_icon {
		display: inline-block;
		min-width: 26px;
		line-height: 32px;
		color: #d9d9d9;
		font-size: 26px;
		text-shadow: 0px 1px 2px #000;
		border-radius: 2px;
		vertical-align: middle;
		text-align: center;
	}

	.ipsPageAction [data-role="actionMenu"]:hover, .ipsPageAction [data-role="actionButton"]:hover {
		cursor: pointer;
	}

	.ipsPageAction [data-role="actionMenu"]:hover .ipsPageAction_icon, .ipsPageAction [data-role="actionButton"]:hover .ipsPageAction_icon {
		color: #fff;
	}

	.ipsPageAction select {
		padding: 5px 10px;
	}

/* ======================================================== */
/* ALERT BOXES */
/* Gives the user choices, like OK, Cancel etc. Replaces the ugly javascript alert() */
.ipsAlert {
	background: rgb( var(--theme-area_background_reset) );
	padding: var(--sp-5);
	width: 480px;
	position: fixed;
	top: 100px;
	border-radius: var(--popup--radius);
	box-shadow: var(--dialog--boxShadow);
	left: 50%;
	margin-left: -240px;
	text-align: center;
}

.ipsAlert_icon {
	font-size: 36px;
	display: block;
	margin-bottom: var(--sp-5);
	color: rgb( var(--theme-text_light) );
}

.ipsAlert_msg {
	font-size: 16px;
	line-height: 1.25;
}

	.ipsAlert_msg > .ipsType_normal {
		margin-top: var(--sp-2);
	}

.ipsApp .ipsToolList.ipsAlert_buttonRow {
	margin-top: var(--sp-5);
	margin-bottom: 0;
}

	.ipsAlert_buttonRow > li{
		flex: 1 1 auto;
		min-width: 0;
	}

/* ======================================================== */
/* jQuery UI Date Picker */
/* Not strictly part of our framework, but used globally */

.ui-datepicker {
	background: rgb( var(--theme-area_background_reset) );
	box-shadow: var(--popup--boxShadow);
	width: 375px;
	border-radius: var(--popup--radius);
	z-index: 10051 !important; /* override the z-index: 1 that the datepicker itself assigns */
}

.ui-datepicker-header {
	line-height: 36px;
	font-size: 14px;
	text-align: center;
	background: rgb( var(--theme-area_background_dark) );
	color: #fff;
	border-bottom: 1px solid rgb( var(--theme-area_background_dark) );
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

.ui-datepicker-prev, .ui-datepicker-next {
	position:absolute;
	top: 10px;
	cursor: pointer;
}

.ui-datepicker-prev:after, .ui-datepicker-next:after {
	font-family: 'FontAwesome';
	color: #fff;
	display: block;
	position: absolute;
	top: -9px;
	width: 20px;
	height: 20px;
}
html[dir="ltr"] .ui-datepicker-prev:after, .ui-datepicker-next:after {
	right: 9px;
}
html[dir="rtl"] .ui-datepicker-prev:after, .ui-datepicker-next:after {
	left: 9px;
}

html[dir="ltr"] .ui-datepicker-next {
	right: 9px;
}
html[dir="rtl"] .ui-datepicker-next {
	left: 9px;
}

	html[dir="ltr"] .ui-datepicker-next:after {
		content: '\f054';	
	}
	html[dir="rtl"] .ui-datepicker-next:after {
		content: '\f053';	
	}

html[dir="ltr"] .ui-datepicker-prev {
	left: 0px;
}
html[dir="rtl"] .ui-datepicker-prev {
	right: 0px;
}

	html[dir="ltr"] .ui-datepicker-prev:after {
		content: '\f053';
	}
	html[dir="rtl"] .ui-datepicker-prev:after {
		content: '\f054';
	}

.ui-datepicker-next span, .ui-datepicker-prev span {
	visibility: hidden;
}

.ui-datepicker table {
	width: 100%;
	margin-bottom: 5px;
}

.ui-datepicker th {
	padding: 4px 0;
	background: rgba( var(--theme-text_color), 0.15 );
}
.ui-datepicker td, .ui-datepicker th {
	text-align: center;
}

.ui-datepicker td a {
	display: block;
	width: 50px;
	height: 100%;
	padding: 5px 0px;
}

.ui-datepicker td a:hover, .ui-datepicker-current-day {
	background-color: rgba( var(--theme-text_color), 0.1 );
}

.ui-datepicker-today {
	background-color: rgba( var(--theme-text_color), 0.15 );
}

	.ui-datepicker-title select, .ui-datepicker-title option {
		color: rgb( var(--theme-text_color) );
	}