/**
 * [CBR]
 * 2012-11-21
 *
 * Intended to be used on top of twitter's bootstrap CSS
 * twitter.github.com/bootstrap/
 */

html {overflow-y: scroll;}
html, body {height: 100%;}

#primary_container {padding-top: 50px;}

body.development {padding-top: 150px;}  /* Since menu links wrap in development */

/* Bootstrap tweaks */
.navbar .nav > li > a {padding: 10px 10px;}
.alert ol {margin-bottom: 0;}
.form-horizontal label.control-label {text-align: left;}

.repeatable-rows {}
.repeatable .icon-plus {cursor: pointer;}
.repeatable .icon-remove {cursor: pointer;}

#orders_index {}
#orders_index .popover {max-width: none;} /* some wide tables in the order index popovers (html) extend beyond bootstrap's 276px max width */

#orders_to_match tr {cursor: pointer;}
#orders_to_match tr.inserted {cursor: default;}
#orders_to_match tr table tr {cursor: default;} /* nested tables */

#invoices_to_approve {}
#invoices_to_approve td {border-top: none;}
#invoices_to_approve tr.info-row {}
#invoices_to_approve tr.info-row td {border-top: 1px solid #ddd;}
#invoices_to_approve tr.rel-row {background-color: #f9f9f9;}
#invoices_to_approve .popover {max-width: 720px;} /* some wide tables in the invoice approve popovers (html) extend beyond bootstrap's 276px max width */
#dca_invoices_to_approve .popover {max-width: 720px;} /* some wide tables in the invoice approve popovers (html) extend beyond bootstrap's 276px max width */

.wide-popovers .popover {max-width: 720px;}  /* Where our popovers breach bootstrap's 276px max width */

/* http://css-tricks.com/snippets/css/fixed-footer/ */
#console {
	bottom:0px;
	background: #fff;
	border-top: 3px solid #cdcdcd;
	left:0px;
	height: 100px;
	overflow-y: hidden;
	position:fixed;
	width:100%;

}
#console h5 {background-color: #f9f9f9; border-bottom: 1px solid #aaa; font-size: 11px; font-weight: 700; line-height: 24px; margin: 0; padding-left: .5em; text-transform: uppercase;}
#log {font-family: monospace; font-size: 11px; height: 70px; overflow-y: scroll; padding-left: .5em; margin-bottom: 0;}
#log li {}
#log li.processing {color: #999;}
#log li.error {color: FireBrick;}
#log li.complete {color: ForestGreen;}


#page_footer {margin-bottom: 100px;}

/* Misc classes (sometimes added using JS) */
span.tip {border-bottom: 1px dotted #444;}
span.has-popover {border-bottom: 1px dotted #444; cursor: pointer;}
.no-js .show-js {display: none;}
.js .hide-js {display: none;}
.text-danger {color: FireBrick;}
.text-muted {color: #777;}
.text-strike {text-decoration: line-through;}
.text-center {text-align: center;}
.text-right {text-align: right;}
.text-left {text-align: left;}
.has-popover[data-trigger="click"] {cursor: pointer;}
.has-tall-popover .popover {max-height: 75vh; overflow-y: scroll;}

ul.list-unstyled {margin: 0; padding: 0; list-style: none;}
ul.list-unstyled li {margin: 0; padding: 0;}

.companion {margin-bottom: 1.5em; padding: 1em;}
.companion h4 {font-size: 16px; margin-bottom: .5em;}
.companion table {font-size: 11px; margin-top: 1em;}
/* companion colors */
.bg-one {background-color: floralWhite;}
.bg-two {background-color: aliceBlue;}
.bg-three {background-color: whiteSmoke;}

.activity-log {list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: scroll;}
.activity-log li {font-size: 11px; margin-bottom: .5em;}
.activity-log time {color: #777; display: block; font-family: monospace; font-style: italic;}

.simplebox {outline: none; border:none !important; box-shadow:none !important;} /* Removes various outlines for input[type=number] polyfill */
.less-opaque {
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
    filter: alpha(opacity=60);
    -moz-opacity: 0.6;
    -khtml-opacity: 0.6;
    opacity: 0.6;
}

/* Sometimes table rows are waiting for action from the logged in user */
/* (e.g. orders waiting specifically for logged in user's approval) */
tr.waiting-on-user td {border-bottom: 1px solid #b94a48; border-top: 1px solid #b94a48;}
tr.waiting-on-user td:first-child {border-left: 1px solid #b94a48;}
tr.waiting-on-user td:last-child {border-right: 1px solid #b94a48;}

/* Sometimes several forms are crammed together (single-button forms that perform POST actions) */
form.inline-block {display: inline-block; margin: 0;}

/* Sometimes elements are invalid for an instance of a cloneable row, until cloned */
.hidden-until-cloned {display: none;}

/**
 * Plugin CSS
 */

.mandatory-field {
	font-weight:bold;
	color:red;
}

/* typeahead.js */
/* http://stackoverflow.com/q/20198247 */
.tt-query {
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
     -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.tt-hint {
  color: #999
}

.tt-menu {
  width: 422px;
  margin-top: 4px;
  padding: 4px 0;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  -webkit-border-radius: 4px;
     -moz-border-radius: 4px;
          border-radius: 4px;
  -webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
     -moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
          box-shadow: 0 5px 10px rgba(0,0,0,.2);
}

.tt-suggestion {
  padding: 3px 20px;
  line-height: 24px;
}

.tt-suggestion.tt-cursor {
  color: #fff;
  background-color: #0097cf;
}

.tt-suggestion:hover {
  background-color: #0097cf;
  color: #fff;
  cursor: pointer;
}

.tt-suggestion p {
  margin: 0;
}

/**
 * tablesort
 * https://github.com/tristen/tablesort/
 * http://tristen.ca/tablesort/demo/
 */

 th[role=columnheader]:not([data-sort-method="none"]) {
	cursor: pointer;
}

th[role=columnheader]:not([data-sort-method="none"]):after {
	content: '';
	float: right;
	margin-top: 7px;
	border-width: 0 4px 4px;
	border-style: solid;
	border-color: #404040 transparent;
	visibility: hidden;
	opacity: 0;
	-ms-user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

th[aria-sort=ascending]:not([data-sort-method="none"]):after {
	border-bottom: none;
	border-width: 4px 4px 0;
}

th[aria-sort]:not([data-sort-method="none"]):after {
	visibility: visible;
	opacity: 0.4;
}

th[role=columnheader]:not([data-sort-method="none"]):hover:after {
	visibility: visible;
	opacity: 1;
}