body {
    height: 100%;
    width: 100%;
    position: absolute;
    padding: 0; margin: 0;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/***** SPAN 6 *****/
.row-fluid > .span6 > .pull-right {
	margin-top: 5px;
	/*margin-right: 5px;*/
	padding-right: 12px;

}

/***** Bootstrap customizations ******/

.groupfields {
    margin-bottom: 15px;
}

.dropdown-menu {
    z-index: 9999;
}

.btn-group.disabled .btn img {
    opacity: 0.5;
}

select[multiple] {
    min-height: 180px;
}

/***** Chosen override ******/

.chosen-container-active .chosen-choices {
    border: 1px solid #AAA;
}

.chosen-container .chosen-results .highlighted {
    background-color: #919191;
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#919191', endColorstr='#747474', GradientType=0 );
    background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #919191), color-stop(90%, #747474));
    background-image: -webkit-linear-gradient(top, #919191 20%, #747474 90%);
    background-image: -moz-linear-gradient(top, #919191 20%, #747474 90%);
    background-image: -o-linear-gradient(top, #919191 20%, #747474 90%);
    background-image: linear-gradient(#919191 20%, #747474 90%);
    color: #fff;
}

.chosen-container .chosen-choices {
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

/* Bootstrap style */

.chosen-container .chosen-single {
    background-image: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    -box-shadow: none;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    font-size: 14px;
    font-weight: normal;
    color: #555555;
    height: 28px;
    line-height: 28px;
    text-align: left;
    vertical-align: middle;
    padding-left: 10px;

    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.chosen-container-single .chosen-single div b {
    background-position-y: 5px;
}

.table th, .table td {
    padding: 4px;
    line-height: 25px;
}

/***** Reusables ******/

.centered {
	text-align: center;
}

.autohide {
    display: none;
}

.scrollable {
    overflow-y: auto;
    clear: both;
}


/***** Alerts ******/

#alert-box {
	position: absolute;
	top: 3px;
	left: 50%;
	width: 50%;
	margin: 0 0 0 -25%;
	z-index: 1000;
}

#alert-box li.alert {
    list-style-type: none; margin-bottom: 3px;
}

/**** Navigation bar ****/

#entitylist-dropdown {
    margin-right: 5px;
}

#entitylist-dropdown ul > li {
    position: relative;
}

#entitylist-dropdown ul > li > a:first-child {
    padding-right: 70px;
    text-align: left;
}

#entitylist-dropdown ul > li > div.add-btn {
    position: absolute;
    right: 8px;
    top: 2px;
}

.navbar {
    margin-bottom: 0px;
}

.navbar .brand {
    padding-top: 7px;
    padding-right: 5px;
}

.navbar-inner {
    padding-left: 5px;
    padding-right: 5px;
    border: 0px;
    border-bottom: 1px solid #d4d4d4;

    -webkit-border-radius: 0px;
    -moz-border-radius: 0px;
    border-radius: 0px;

    -moz-box-shadow: 0 0px 0px;
    -webkit-box-shadow: 0 0px 0px;
    box-shadow: 0 0px 0px;
}

.navbar .nav > li.history > a,
.navbar .nav > li.history button:first-child {
    padding-left: 18px;
    padding-right: 10px;
}

.navbar .nav > li.history.active > a,
.navbar .nav > li.history.active > a:hover,
.navbar .nav > li.history > a:hover {
    border-bottom: 1px solid white;
    margin-bottom: -1px;
    border-left: 1px solid #d4d4d4;
    border-right: 1px solid #d4d4d4;
    background-color: white;
    box-shadow: 0px -3px 3px 1px rgba(0, 0, 0, 0.125);
}

.navbar .nav > li.history > a,
.navbar .nav > li.history button:first-child {
    background-position-x: 2px;
    background-position-y: 50%;
    background-repeat: no-repeat;
}

.navbar .nav > li.history.first > a {
    font-weight: bolder;
    font-size: 16px;
}

.navbar .nav .close {
    float: none;
}

/**** Maps ****/

.leaflet-container {
    min-height: 600px;
}

.map-fogged .leaflet-container {
     background-color: #000;
}
.map-fogged .leaflet-tile-pane .leaflet-layer .leaflet-tile-loaded,
.map-fogged .leaflet-tile-pane .leaflet-fade-anim .leaflet-tile {
    opacity: 0.75;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
}

.map-error {
    border: 5px solid red;
}

.leaflet-container .leaflet-control-information {
    font-size: 1.2em;
}

.screenshot-control {
    background-image: url(images/screenshot-control.png);
}

.leaflet-draw.leaflet-control {
    margin-top: 35px;
}

.leaflet-draw.leaflet-control:before{
    content: "";
    position: absolute;
    display: block;
    left: -5px;
    right: -5px;
    top: -5px;
    bottom: -5px;
    border: 1px solid white;
    z-index: -1;
}

@media(max-height: 800px) {
    .leaflet-control-layers-group {
        max-height: 150px;
        overflow-y: auto;
    }
}

.leaflet-control-layers input[type="checkbox"] {
    margin: -2px 0 0;
}

.leaflet-control-filelayer .leaflet-bar-part {
    text-align: center;
    margin-bottom: 0px;
}

.leaflet-control-filelayer.leaflet-control-zoom-in {
    background-image: none;
}

.leaflet-control-filelayer i {
    margin-top: 4px;
}


/*
 * Show enumeration values and map icons, only in print mode.
 * (in document export, values will appear too since HTML is put in doc)
 * See https://github.com/makinacorpus/django-mapentity/issues/35
 */
.enumeration-icon, .enumeration-value {
    display: none;
}

body.screamshot .enumeration-icon,
body.screamshot .enumeration-value {
    display: inline-block;
}

.enumeration-icon {
    background-color: #000042 !important;
    text-align: center;
    vertical-align: middle;
    width: 16px !important;
    height: 16px !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
    line-height: 16px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}


/**** Widgets ****/

.axislabel {
	color: blue;
	font-size: 10px;
}

tr.selected-row td {
    /* Button green color #5BB75B */
    background-color: #DF8 !important;
    opacity: 1 !important;
}

.filter-set {
    font-weight: bold;
    color: black !important;
    border: 2px solid black !important;
}

#maphead {
    position: absolute;
    padding-top: 3px;
    z-index: 999;
    width: 100%;
}

/* Layout (based on "Conflicting position" trick) */
#container {position: absolute; top: 39px; bottom: 0; left: 0; right: 0;}
#panelleft {position: absolute; top: 2px; bottom: 0; width: 50%; left: 0;}
#panelright {position: absolute; top: 2px; bottom: 0; width: 50%; right: 0;}

#mainmap {position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px;}


.map-panel.detail {position: absolute; top: 2px; bottom: 0px; right: 0px;}
#detailmap {height: 100%;}


/***** Entity List ******/

#list-panel {
    margin-left: 60px;
    padding: 4px;
    height: 95%;
}

@media (max-width: 1280px) {
    #list-panel {
        margin-left: 34px;
    }
}

#list-panel .table th,
#list-panel .table td {
    padding: 5px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
#list-panel .pagination a, .pagination span {
    line-height: 30px;
}

#list-panel .table tbody tr.success > td {
    background-color: #75E376;
}

#list-panel .table tbody tr.success > td a {
    color: black;
    font-weight: bold;
    text-decoration: underline;
}




/* Left menu */
#entitylist {
    position: absolute;
    top: 0px;
    left: 0;
    width: 60px;
}

@media (max-width: 1280px) {
    #entitylist {
        width: 32px;
    }
}

#entitylist ul {
    margin-bottom: 0;
}

#entitylist li img {
    opacity: 0.3;
}

#entitylist li.active img, #entitylist li a:hover img {
    opacity: 1.0;
}

#entitylist a {
    padding: 0px;
}

#entitylist .nav-pills.nav-stacked > li > a {
    margin-bottom: 0;
}

#entitylist .nav-pills > li > a {
	border-radius: 0px;
	-moz-border-radius: 0px;
	border-bottom: 1px solid #DDDDDD;
	border-right: 1px solid #DDDDDD;
	margin-bottom: 0px;
	margin-top: 0px;
	background-color: #F3F3F3;
}

#entitylist .nav-pills > .active > a,
#entitylist .nav-pills > .active > a:hover {
    border-right: 1px solid #fff;
    background-color: #fff;
    color: #333333;
}

#entitylist .nav-pills > li > a > img  {
    padding-bottom: 4px;
}

@media (max-width: 1280px) {
    #entitylist .nav-pills > li > a > img  {
        width: 30px;
    }
}





/* Datatables customization for filters and pagination */
.dataTables_wrapper {
    height: inherit;
}

#list-download-toolbar,
#objects-list_filter,
div.dataTables_paginate {
    position: absolute;
    bottom: 5px;
}
div.dataTables_paginate {
    bottom: 0px;
}

#list-download-toolbar {
    padding-bottom: 10px;
}

div.dataTables_paginate {
    right: 5px;
}

#objects-list_filter {
    left: 160px;
}

@media (max-width: 1280px) {
    #objects-list_filter {
        left: 130px;
    }
}




/* Filters popover */

#mainfilter {
    width: 480px;
}

#mainfilter .left {
    width: 240px;
    float: left;
}

#mainfilter .right {
    width: 240px;
    float: right;
}

#mainfilter .actions {
    clear: both;
    text-align: right;
}

#mainfilter label {
    display: none;
}

#mainfilter input, #mainfilter select {
    font-family: sans-serif;
    font-size: 13px;
    border: 1px solid #AAA;
}

#mainfilter select {
    color: #999;
}

#mainfilter select option {
    color: black;
}

#mainfilter select option:first-child {
    color: #999;
}


#filters-panel .well {
    padding: 5px;
}

#filters-panel form {
    margin-bottom: 0px;
}

#filters-close {
    position: absolute;
    right: 3px;
}

#filters-close a {
    width: 20px;
    height: 20px;
    padding: 4px;
}

.popover {
    border: 5px solid rgba(0, 0, 0, 0.5);
    font-size: 14px;
    max-width: none;
}

span.filter-info {
    font-weight: bold;
}


/***** Entity detail ******/


.details-panel {
    padding-left: 40px;
}

.details-panel .table {
    table-layout: fixed;
    margin-right: 10px;
}

.details-panel .table th {
    width: 40%;
}

.details-panel h3 {
	border-bottom: 1px solid #333333;
}

.details-panel td {
	color: #636363;
}

.details-panel th, .details-panel td {
    border-top: 0px;
    border-bottom: 1px solid #DDDDDD;
}

.details-panel td ul li {
    list-style: none;
}

.details-panel span.none {
	opacity: 0.4;
}

.details-panel td .autohide {
    float: right;
}

.details-panel td ul {
	margin: 0px;
}

.details-panel td p {  /* Autohide add buttons within <p> */
    margin: 0px;
}

.details-panel .hover {
    background-color: rgba(240, 240, 240, 0.5);
}

.download-group {
    clear: both;
    line-height: 35px;
    display: block;
    height: 35px;
}

.details-panel .nav-tabs {
    margin-left: 40px;
}

.details-panel .nav-tabs li:first-child {
    margin-left: 10px;
}

.map-panel .leaflet-control-attribution {
    display: none;
}

.map-panel .leaflet-control-information {
    display: block;
}

.map-panel p.nomap {
    color: lightgray;
    font-size: 2em;
    text-align: center;
    margin-top: 2em;
}

#history .btn {
    float: right;
    margin-top: 10px;
}

/* Map capture */

body.screamshot #maphead {
    display: none;
}

body.screamshot .map-fogged .leaflet-tile.leaflet-tile-loaded {
    opacity: 1.0;
}

body.screamshot .leaflet-control {
    display: none;
}

body.screamshot .leaflet-control-scale {
    display: block;
}

body.screamshot .leaflet-control-attribution {
    display: block;
    text-shadow: 1px 0 0 #fff, -1px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
    background: none;
    font-size: 15px;
    color: black;
}

body.screamshot .leaflet-top.leaflet-left {
    background-image: url(images/compass.svg);
    display: block;
    min-height: 60px;
    min-width: 60px;
    background-size: 60px;
    margin-left: 5px;
    margin-top: 5px;
}

body.screamshot .leaflet-control-scale {
    border: 3px solid black;
    border-top: none;
    box-shadow: 2px 2px 0 white;
    color: black;
    text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
    max-height: 7px;
}

body.screamshot .leaflet-control-scale-line {
    border: none;
    background: none;
    font-size: 15px;
    font-weight: bold;
    overflow: auto;
    margin-top: -12px;
    text-align: center;
}

/***** Entity form ******/

.form-panel {
    margin-top: 10px;
}

.form-panel > form {
    padding-left: 10px;
    margin-bottom: 0px;
}

.form-panel .form-actions {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    margin: 0px;
    padding: 10px;
    height: 30px;
}

.form-panel .scrollable {
    margin-bottom: 55px;
}

.form-panel .tab-content .nav {
    margin-bottom: 5px;
}

.form-panel .nav-tabs .error {
    color: #B94A48;
}

label.requiredField {
    font-weight: bold;
}

label.requiredField .asteriskField {
    color: red;
}

.help-inline {
    font-size: 0.7em;
}

.form-horizontal .control-group {
    margin-bottom: 5px;
}


.form-horizontal .control-label {
    width: 140px;
}

.form-horizontal .controls {
    margin-left: 145px;
}

@media (max-width: 1280px) {

    .form-horizontal .control-label {
        width: 95px;
    }

    .form-horizontal .controls {
        margin-left: 100px;
    }
}

.translatable:hover, .control-group:hover {
    background-color: rgba(240, 240, 240, 0.5);
}

/*
 * Form tabs Main/Advanced
 */

.form-horizontal .nav-tabs:first-child {
    margin-left: 80px;
}

.form-panel .nav-tabs:first-child li:first-child {
    margin-left: 100px;
}

@media (max-width: 1280px) {
    .form-panel .nav-tabs:first-child li:first-child {
        margin-left: 22px;
    }
}


/*
 * Multilang pills
 */

.translatable {
    margin-bottom: 7px;
}

.form-panel .translatable .nav {
    margin-bottom: 0px;
}

.translatable .nav-pills li a {
    padding-top: 2px;
    padding-bottom: 2px;
}

.translatable .nav-pills {
    margin-left: 145px;
}

.translatable .controls > .radio:first-child,
.translatable .controls > .checkbox:first-child {
    padding-top: 0px;
}

.form-horizontal .translatable .control-group {
    margin-bottom: 0px;
}

@media (max-width: 1280px) {

    .translatable .nav-pills {
        margin-left: 100px;
    }
}


/*
 * Many-to-many fields
 */
.form-row.inline.controls {
    border: solid 1px lightgray;
    padding: 5px;
    margin: 1px;
}

.form-row.inline.controls:last-of-type {
    border: none;
}

fieldset.formset .form-row:last-of-type a.delete-row {
    display: none;
}



#geomfield {
    position: absolute;
    top: 2px;
    bottom: 51px;
    right: 0px;
}
#geomfield .leaflet-container,
#geomfield .control-group,
#geomfield .controls {
    height: 100%;
    margin-left: 0;
}

#geomfield .control-group.error .help-block {
    z-index: 1;
    position: absolute;
}

/* Tired of bootstrap ?
TODO: please help;
 */
#modelfields.span4 {
    width: 33%;
}
#geomfield.span8 {
    width: 66%;
}

#geomfield label.control-label {
    position: absolute;
    z-index: 2000;
    background-color: rgba(255,255,255,0.7);
    padding: 5px;
    border-radius: 5px;
    top: 9px;
    left: 48px;
    width: auto;
}

.file-attachment-form {
    margin-top: 1.5em;
    padding-left: 1em;
    padding-right: 1em;
    border: solid 1px lightgray;
    width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.file-attachment-form form {
    margin-bottom: 0px;
}
