/* Layout */
@media (min-width: 980px) {
    #page {
        padding-top: 60px;
    }
}
html,
body {
	height: 100%;
}
.container-fluid { /* set a max-width for horizontal fluid layout and make it centered */
	margin-right: auto;
	margin-left: auto;
	max-width: 1600px; /* or 950px */
}
@media (min-width: 980px) {
	#wrap { /* Wrapper for page content to push down footer */
		min-height: 100%;
		height: auto !important;
		height: 100%;
		margin: 0 auto -60px; /* Negative indent footer by it's height */
	}
}
#push,
#footer {
    margin-top: 40px;
    padding-top: 20px;
	height: 60px;
}
#footer {
	text-align: center;
	background-color: #eee;
}

/* Projects */
table .status-on_hold td, table .status-on_hold th {
	background-color: #fcc !important;
}
table .status-started td, table .status-started th {
	background-color: #cfc !important;
}
table .status-completed td, table .status-completed th {
	background-color: #ccf !important;
}
table .status-canceled td, table .status-canceled th {
	background-color: #ccc !important;
}

table .project-parts-status-prepare_parts td, table .project-parts-status-prepare_parts th {
	background-color: #fec !important;
}
table .project-parts-status-awaits_parts td, table .project-parts-status-awaits_parts th {
	background-color: #ffc !important;
}
table .project-parts-status-ready td, table .project-parts-status-ready th {
	background-color: #cfb !important;
}

table .part-status-unknown td, table .part-status-unknown th {
	background-color: #eee !important;
}
table .part-status-ordered td, table .part-status-ordered th {
	background-color: #ffc !important;
}
table .part-status-received td, table .part-status-received th {
	background-color: #cfb !important;
}
table .part-status-ready td, table .part-status-ready th {
	background-color: #9f9 !important;
}

table .supplierorder-status-open td, table .supplierorder-status-open th {
	background-color: #eee !important;
}
table .supplierorder-status-sent td, table .supplierorder-status-sent th {
	background-color: #ffc !important;
}
table .supplierorder-status-received_partial td, table .supplierorder-status-received_partial th {
	background-color: #cfb !important;
}
table .supplierorder-status-received_complete td, table .supplierorder-status-received_complete th {
	background-color: #9f9 !important;
}

table .supplierpart-status-ordered td, table .supplierpart-status-ordered th {
	background-color: #ffc !important;
}
table .supplierpart-status-received td, table .supplierpart-status-received th {
	background-color: #9f9 !important;
}

#partFormGroup .accordion-group {
	border: none;
}

#project-hours {
    padding-top: 0;
}

/* Project side tables */
#project-hours_c0 {
	width: 70px;
}
#project-hours_c1 {
	width: 50px;
}
#project-hours_c2 {
	width: 40px;
}

/* Invoices */
table .status-open td, table .status-open th {
	background-color: #eee !important;
}
table .status-paid td, table .status-paid th {
	background-color: #9f9 !important;
}
table .status-canceled td, table .status-canceled th {
	background-color: #ccc !important;
}
#invoiceparts-grid tr.empty-part-line td {
	color: #fff;
}

/* Dialogs */
@media (min-width: 980px) {
	.modal {
		top: 50px !important; /* override fade-in */
	}
	.modal-body {
		max-height: 670px;
	}
}
#project-dialog.modal {
	left: 0;
	width: 90%;
	margin: 0;
	margin-left: 5%;
}


/* Generic */
.grid-view table.items tr.selected td {
	background: #99f !important;
}
.grid-view.clickableRows tbody tr:hover {
	cursor: pointer;
}
.grid-view .search-form {
	float: left;
}
.grid-view .search-form form {
	margin-bottom: 2px;
}
.grid-view .search-form label {
	margin-right: 5px !important;
}
.grid-view .summary {
	float: right;
}
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
	background-color: #f0f0f0;
}
.help-block {
	color: #999;
}
.ui-autocomplete .ui-menu-item-separated {
	border-top: 1px dotted #999;
	margin-top: 5px;
}
.grid-view table th,
.grid-view table td {
	white-space: pre;
}
.grid-view table select {
	min-width: 80px;
	margin-right: -15px; /* compensate weird 15px padding default in bootstrap yii.css */
}
.grid-view table .expand {
	width: 100%;
}

.grid-view .shrink {
    white-space: nowrap;
}


/* Responsive tweaks */
@media (max-width: 767px) {
	h1 {
		font-size: 30px;
	}
	h2 {
		font-size: 25px;
	}
	h3 {
		font-size: 20px;
	}
	h4 {
		font-size: 15px;
	}
	h1, h2, h3, h4 {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.grid-view .summary {
		display: none;
	}

	#project-grid th:nth-child(n+2):nth-child(-n+4),
	#project-grid td:nth-child(n+2):nth-child(-n+4),
	#project-grid th:nth-child(n+9),
	#project-grid td:nth-child(n+9),
	#projectparts-grid th:nth-child(n+6):nth-child(-n+8),
	#projectparts-grid td:nth-child(n+6):nth-child(-n+8),
	#customer-grid th:nth-child(n+3):nth-child(-n+4),
	#customer-grid td:nth-child(n+3):nth-child(-n+4),
	#customer-grid th:nth-child(n+6),
	#customer-grid td:nth-child(n+6),
	#car-grid th:nth-child(n+4),
	#car-grid td:nth-child(n+4),
	#invoice-grid th:nth-child(n+5),
	#invoice-grid td:nth-child(n+5),
	#supplierorder-grid th:nth-child(n+2):nth-child(-n+6),
	#supplierorder-grid td:nth-child(n+2):nth-child(-n+6),
	#supplierorder-grid th:last-child,
	#supplierorder-grid td:last-child,
	#part-grid th:nth-child(n+3),
	#part-grid td:nth-child(n+3),
	#employee-grid th:nth-child(n+4),
	#employee-grid td:nth-child(n+4) {
		display: none;
	}

	.table:not(#tablePlanning) th,
	.table:not(#tablePlanning) td {
		max-width: 300px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	#planningEmployeeSelect {
		margin-bottom: 1em;
	}
	#planningEmployeeSelect .btn {
		max-width: 13%;
		white-space: nowrap;
		overflow: hidden;
	}
}



.iframe-label {
	width: 800px;
	height: 200px;
}


@media print {
	.navbar,
	.breadcrumbs,
	.btn-group,
	.yiiPager,
	.filters,
	#footer {
		display: none;
	}
	a[href]:after {
		content: ""; /*disable link printing*/
	}
}