/* jQueryUI (Redmond theme) */

.ui-widget,
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
	font-family: inherit;
	font-size: inherit;
}

.ui-widget-content { background: var(--cerb-color-background) none; color: var(--cerb-color-text); }
.ui-widget-content a { color: inherit; }
.ui-widget-header { background: rgb(92,156,204) none; }

.ui-widget.ui-widget-content {
	border: 0;
}

.ui-widget-overlay {
	background: var(--cerb-color-background-overlay) none;
	opacity: .3;
	filter: Alpha(Opacity=30); /* support: IE8 */
}

.ui-state-default, .ui-widget-content .ui-state-default { background: rgb(232,242,254) none; font-weight: normal; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { background: rgb(208,229,245) none; }
.ui-state-active, .ui-widget-content .ui-state-active { background: rgb(245,248,249) none; font-weight: bold; }

.ui-state-highlight, .ui-widget-content .ui-state-highlight { 
	background: rgb(251,236,136) none;
}

.ui-state-error, .ui-widget-content .ui-state-error {
	background: rgb(254,241,236) none;
}

.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: block; }

/* Menu */

UL.ui-menu {
	border: 0;
	-moz-box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	-webkit-box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	min-width: 150px;
}

.ui-menu .ui-menu-item-wrapper {
	color: var(--cerb-color-menu-item-text);
	font-weight:normal;

	&.ui-state-active {
		.ui-menu-icon {
			background-image: url("../../devblocks.core/css/images/ui-icons_217bc0_256x240.png");
		}
	}
}

.ui-menu .ui-menu-divider {
	border: 0;
	margin: 5px;

	hr {
		border: 0;
		border-top: 1px solid var(--cerb-color-background-contrast-220);
	}
}

.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
	background-color: var(--cerb-color-menu-item-hover);
	border-color: var(--cerb-color-menu-item-hover);
	color: var(--cerb-color-text-inverse);
}

/* Autocomplete */

SPAN.ui-helper-hidden-accessible { display: none; }

UL.ui-autocomplete.ui-menu li.ui-menu-item {
	color: var(--cerb-color-menu-item-text);
	font-weight: bold;
}

UL.ui-autocomplete.ui-menu li.ui-menu-item.ui-state-focus {
	background-color: var(--cerb-color-menu-item-hover);
	color: white;
	font-weight: bold;
}

/* Tabs */

.ui-tabs {
	border: 0;
	padding: 0;
}
.ui-tabs .ui-tabs-panel {
	background: var(--cerb-color-background) none;
	padding: 0;
	margin: 5px 10px 0 10px;
}
.ui-tabs .ui-tabs-nav {
	background: var(--cerb-color-background) none;
	border: none;
	border-bottom: 1px solid var(--cerb-color-background-contrast-200);
	border-radius: 0;
}
.ui-tabs .ui-tabs-nav li {
	background: var(--cerb-color-background) linear-gradient(to bottom, var(--cerb-color-background), var(--cerb-color-background-contrast-240));
	border-color: var(--cerb-color-background-contrast-200);
	margin: 0.25em -0.3em -0.3em 0;
	float: none;
	display: inline-block;
	border-bottom-width: 1px;
}
.ui-tabs .ui-tabs-nav li a {
	outline: none;
	font-weight: normal;
}
.ui-tabs .ui-tabs-nav li.ui-state-hover {
	background: var(--cerb-color-background) linear-gradient(to bottom, var(--cerb-color-background), var(--cerb-color-background-contrast-200));
}
.ui-tabs .ui-tabs-nav li.ui-state-default a {
	color: var(--cerb-color-background-contrast-125);
}
.ui-tabs .ui-tabs-nav li.ui-state-hover a {
	color: var(--cerb-color-background-contrast-100);
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
	background: var(--cerb-tab-active) linear-gradient(to bottom, var(--cerb-tab-active) 0%, var(--cerb-tab-active-gradient) 50%);
	border-color: var(--cerb-tab-active-border);
	border-bottom: 1px solid var(--cerb-color-background);
	padding-top: 1px;
	margin-bottom: -4px;

	a {
		color: var(--cerb-tab-active-text);
		font-weight: bold;
		font-size: 0.95em;
	}
}

.ui-dialog {
	border: 2px solid var(--cerb-color-background-contrast-220);
	padding: 2px;
	-moz-box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	-webkit-box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	box-shadow: 0 0 10px 3px var(--cerb-color-shadow-menu);
	overflow: visible;
	
	h1 {
		color: var(--cerb-color-widget-header);
	}
}

.ui-dialog .ui-dialog-titlebar {
	background-color: rgb(85,125,230);
	border: 0;
	font-size: 16px;
	font-weight: bold;
	padding: 5px 5px 5px 10px;
}

.ui-dialog fieldset select {
	max-width: 450px;
}

.ui-dialog .ui-dialog-buttonset button {
	height: 26px;
	vertical-align: middle;
	color: var(--cerb-color-button-text);
	padding: 5px;
	font-weight: bold;
	border: 0;
	cursor: pointer;

	background: linear-gradient(to bottom, var(--cerb-color-button-gradient), var(--cerb-color-button-gradient-to));
	border-radius: 5px;

	&:hover {
		background: linear-gradient(to bottom, var(--cerb-color-button-gradient), var(--cerb-color-button-gradient-to--hover));
		color: var(--cerb-color-button-icon--hover);
		cursor:pointer;

		SPAN.glyphicons {
			color: var(--cerb-color-button-icon--hover);
		}
	}
}

.ui-accordion {
	.ui-accordion-header {
		background: none;
		color: var(--cerb-color-text);
		border-color: var(--cerb-color-fieldset-border);
		outline: none;
	}
	
	.ui-accordion-content {
		border-color: var(--cerb-color-fieldset-border);
	}
}

/* Tooltip */

.ui-widget-shadow {
	-webkit-box-shadow: 0 0 8px #aaaaaa;
	box-shadow: 0 0 8px #aaaaaa;
}
.ui-tooltip, .arrow:after {
	background: var(--cerb-color-background-inverse);
}
.ui-tooltip.ui-widget-content {
	background: var(--cerb-color-background-inverse);
	color: var(--cerb-color-text-inverse);
}
.arrow {
	width: 70px;
	height: 16px;
	overflow: hidden;
	position: absolute;
	left: 0;
	margin-left: -35px;
	bottom: -16px;
}
.arrow.top {
	top: -16px;
	bottom: auto;
}
.arrow.bottom {
}
.arrow.left {
	left: 0;
	margin-left: -20px;
}
.arrow.center {
	left: 50%;
	margin-left: -35px;
}
.arrow.right {
	left: 100%;
	margin-left: -46px;
}
.arrow:after {
	content: "";
	position: absolute;
	left: 20px;
	top: -20px;
	width: 25px;
	height: 25px;
	box-shadow: 6px 5px 9px -9px black;
	-webkit-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
}
.arrow.top:after {
	bottom: -20px;
	top: auto;
}

/* Datepicker */

.ui-datepicker {
	.ui-widget-header {
		background: var(--cerb-color-table-header-background) none;
	}

	.ui-datepicker-calendar {
		box-shadow:0 0 10px 0 var(--cerb-color-background-contrast-150);

		.ui-state-default {
			background: var(--cerb-color-background-contrast-230);
			color: var(--cerb-color-text);
			border: 0;
		}

		.ui-state-hover {
			background: var(--cerb-color-background-contrast-200);
		}

		.ui-datepicker-today {
			.ui-state-default {
				font-weight: bold;
				color: var(--cerb-color-tag-orange);
			}
		}

		.ui-datepicker-current-day {
			background: var(--cerb-color-button-icon--hover);
			.ui-state-active {
				color: var(--cerb-color-text);
			}
		}
	}
}