@import "template.less";
@import "../../../../media/jui/less/bootstrap-rtl.less";

.navbar {
	.admin-logo {
		float: right;
		padding: 7px 15px 0px 12px;
	}
	.brand {
		float: left;
		padding: 6px 10px;
	}
	.nav {
		margin: 0 0 0 10px;
		> li > a {
			padding: 6px 10px;
		}
		> li ul {
			overflow-y: auto;
			overflow-x: hidden;
			-webkit-overflow-scrolling: touch;
			-moz-overflow-scrolling: touch;
			-ms-overflow-scrolling: touch;
			-o-overflow-scrolling: touch;
			overflow-scrolling: touch;
			height: auto;
			max-height: 500px;
			margin: 0;
			&::-webkit-scrollbar {
				-webkit-appearance: none;
				width: 7px;
			}
			&::-webkit-scrollbar-thumb {
				border-radius: 4px;
				background-color: rgba(0,0,0,.5);
				-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
			}
		}
	}
	.nav-user .dropdown-menu li span {
	padding-left: 0;
	padding-right: 10px;
	}
	.nav > .dropdown.open:after {
		right: 10px;
		width: 0;
	}
	.empty-nav {
		display: none;
	}
}

#toolbar {
	.btn {
	    padding: 0 10px;
	}
	[class^="icon-"], [class*=" icon-"] {
	    border-radius: 0 3px 3px 0;
	    border-right: 0;
	    border-left: 1px solid #b3b3b3;
	    margin: 0 -10px 0 6px;
	}
}
.chzn-container-single .chzn-single {
    padding-left: 8px;
    div {
	    border-left: 0;
	    border-right: 1px solid #cccccc;
	}
	abbr {
    	left: 36px;
	}
}
.chzn-container-active.chzn-with-drop .chzn-single div {
    background-color: #f3f3f3;
    border-bottom: 1px solid #cccccc;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 3px;
    border-left: 1px solid #cccccc;
}
.chzn-container-multi .chzn-choices .search-choice {
    padding-left: 7px;
    .search-choice-close {
	    margin-left: 0;
	    margin-right: 3px;
	}
}
.chzn-container .chzn-single.chzn-color[rel="value_0"] div,
.chzn-container .chzn-single.chzn-color[rel="value_1"] div {
  border-right: none;
}
.chzn-container-single .chzn-search::after {
    left: 20px;
    right: auto;
}

.container-logo {
	padding-top: 0;
	float: left;
	text-align: left;
}

.page-title {
	[class^="icon-"],
	[class*=" icon-"] {
		margin-right: 0;
		margin-left: 16px;
	}
}

@media (max-width: @md-max) {
	.navbar {
		.admin-logo {
			margin-right: 10px;
			padding: 9px 9px 0 9px;
		}
		.btn-navbar {
			float: left;
			margin-right: 5px;
			margin-left: 3px;
		}
		.nav-collapse .nav.pull-left {
			float: none;
			margin-left: 0;
			margin-right: 0;
		}
	}

	.nav-collapse .nav > li {
		float: none;
	}

	.page-title {
		[class^="icon-"],
		[class*=" icon-"] {
			margin-left: 10px;
		}
	}
}

/* Status module */
#status {
	padding: 4px 10px;

	.btn-group {
		margin: 0;
	}
	.btn-group.separator:after {
		content: ' ';
		display: block;
		float: left;
		background: #ADADAD;
		margin: 0 10px;
		height: 15px;
		width: 1px;
	}
	.badge {
		margin-left: .25em;
		margin-right: 0;
	}
}

/* Menus */
.dropdown-menu > li > a {
	text-align: right;
}

/* btn-group */
.btn-group.btn-group-yesno > .btn, .btn-group > .btn, .btn-group > .btn + .dropdown-toggle {
	float: none;
}

/* For grid.boolean */
a.grid_false {
	display: inline-block;
	height: 16px;
	width: 16px;
	background-image: url('../images/admin/publish_r.png');
}

a.grid_true {
	display: inline-block;
	height: 16px;
	width: 16px;
	background-image: url('../images/admin/icon-16-allow.png');
}

/* Login */
.view-login {
	.login-joomla {
		position: absolute;
		right: 50%;
		height: 24px;
		width: 24px;
		margin-right: -12px;
		font-size: 22px;
	}
	.input-medium {
		width: 169px;
	}
}
.login {
	.chzn-single {
		width: 219px !important;
	}
	.chzn-container,
	.chzn-drop {
		width: 227px !important;
		max-width: 227px !important;
	}
	.input-prepend .chzn-container-single .chzn-single {
		.border-radius(3px 0 0 3px);
		border-right:0px;
	}
}

/* For collapsible sidebar */
.j-sidebar-container {
	position: absolute;
	display: block;
	left: auto;
	right: -16.5%;
	padding-top: 28px;
	padding-bottom: 40px;
	clear: both;
	margin: -10px -1px 0 0;
	border-right: 0;
	border-left: 1px solid #d3d3d3;
}

.j-sidebar-container.j-sidebar-hidden {
	left: auto;
	right: -16.5%;
}

.j-sidebar-container.j-sidebar-visible {
	left: auto;
	right: 0;
}

.j-toggle-sidebar-header {
	padding: 10px 19px 10px 0;
}

.sidebar {
	padding: 3px 4px 3px 3px;
}

.j-toggle-button-wrapper {
	&.j-toggle-hidden {
		right: auto;
		left: -24px;
	}
	&.j-toggle-visible {
		right: auto;
		left: 10px;
	}
}

.j-sidebar-container .icon-folder-2 {
    line-height: 15px;
    padding-left: 0;
}

#system-message-container,
#j-main-container {
	padding: 0 5px 0 0;
}

#system-message-container.j-toggle-main,
#j-main-container.j-toggle-main,
#system-debug.j-toggle-main {
	float: left;
}

@media (max-width: @lg-max) {
	.j-toggle-button-wrapper.j-toggle-hidden {
		right: auto;
		left: -20px;
	}
}

@media (max-width: @md-max) {
	.j-sidebar-container {
		position: relative;
		padding: 0;
		border-right: 0;
		border-left: 0;
	}

	.j-sidebar-container.j-sidebar-hidden {
		margin-left: auto;
		margin-right: 16.5%;
	}

	.j-sidebar-container.j-sidebar-visible {
		margin-left: auto;
		margin-right: 0;
	}

	/* login */
	.view-login {
		select {
			width: 229px
		}
	}
}

#j-main-container.expanded {
	margin-right: 0;
}

/* Modal batch */
@media (min-width: @md) {
	.row-fluid [class*="span"] {
		margin-right: 15px;
		margin-left: 0;
	}

	.row-fluid .modal-batch [class*="span"] {
		margin-right: 0;
	}
}

.row-fluid .modal-batch [class*="span"] {
	margin-right: 0;
}

/* Extended Responsive Styles */
@media (max-width: @sm-max) {
	.btn-toolbar .btn-wrapper .btn {
		width: 100% !important;
		margin-right:0px;
	}
	.btn-toolbar .btn-wrapper {
		margin:0 10px 5px 10px;
	}
}

@media (max-width: 420px) {
	.j-sidebar-container {
		margin: 0;
	}
	/* login */
	.view-login {
		.input-medium {
			width: 173px;
		}
		select {
			width: 229px
		}
	}
}

/* Stats plugin */
.js-pstats-data-details dd {
	margin-right: 240px;
}

/* Modal footer */
.modal-footer button {
	float: left;
}

/* Modal Header text align right even if parent container centered */
.modal-header {
	text-align: right;
}


/* Media Manager */
#mediamanager-form .thumbnails-media .thumbnail {
    margin-left: 18px !important;
    margin-right: 0;
    direction: ltr;
    text-align: center;
}
.thumbnails-media .imgThumb label::before, .thumbnails-media .imgThumb .imgThumbInside::before {
	left: 0;
	right: auto;
	border-radius: 3px 0;
}
.thumbnails-media .thumbnail input[type="radio"], .thumbnails-media .thumbnail input[type="checkbox"] {
    left: auto;
    right: 5px;
}
.thumbnails-media .imgDelete a.close {
	border-radius: 0 3px;
}
.thumbnails-media .imgPreview a, .thumbnails-media .imgDetails {
    border-radius: 3px 0;
    border-width: 1px;
    left: 0;
    right: 0;
    text-align: left;
    direction: ltr;
}
.thumbnails-media .imgPreview a {
	width: 100%;
}

/* SubForms (Table) */
.subform-table-layout {
	td {
		padding-left: 10px;
		&::before {
			content: attr(data-column);
			left: auto;
			right: 10px;
			padding-left: 10px;
			padding-right: 0;
		}
	}
	.subform-repeatable tbody td:last-of-type {
		text-align: left;
	}
	.form-horizontal .controls {
		margin-top: 0;
	}
}

/* com_templates */
.tree-holder {
	ul {
		ul {
			padding-right: 15px;
			box-shadow: 3px 0 0 rgba(0, 0, 0, 0.08);
			padding-left: 0;
			.folder-url, .file {
				box-shadow: 3px 0 0 @linkColor;
				border-right: 0;
				border-left: 1px solid rgba(0, 0, 0, 0.08);
			}
		}
	}
}