/*
 * @author Roy Arisse <support@perfacilis.com>
 * @copyright (c) 2019, Perfacilis
 */
address p:last-child {
    margin-bottom: 0;
}

.alert {
    margin-bottom: 0;
    border-radius: 0;
}

.badge + .badge {
    margin-left: .5em;
}

body { overflow: hidden; }

.bg-highway {
    background: #000 url(/assets/img/bg-highway.jpg) center center fixed;
    background-size: cover;
}
.bg-light-sidewalk {
    background: #fff url(/assets/img/bg-sidewalk.jpg) center center fixed;
    background-size: cover;
}

.navbar.fixed-bottom {
    background-color: rgba(255, 255, 255, .8);
}

.navbar-brand {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

header { z-index: 100; }

.loading {
    pointer-events: none;
    position: relative;
}

.loading * {
    opacity: .9;
    filter: blur(1px);
}

.loading:after {
    font: 900 2em "Font Awesome 5 Free";
    line-height: 1;
    content: "\f14e";
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    animation: fa-spin 2s infinite linear;
    width: 2em;
    line-height: 2em;
    margin-left: -1em;
    margin-top: -1em;
}

.navbar {
    padding: 0;
}
.nav-item.active {
    background-color: #3f74b8;
}

main:after {
    position: relative;
    width: 100%;
    height: 90px;
    display: block;
    content: '';
}

/* filter */
.bg-secondary .btn-group { border: 1px solid rgba(255, 255, 255, .8) !important; }
.bg-secondary .btn-secondary { border: 0 none; }
.bg-secondary .btn-secondary.active {
    background-color: rgba(255, 255, 255, .8) !important;
    color: #3f74b8 !important;
}

/* cards */
@media (min-width: 576px) {
    .card-deck .card {
        margin-bottom: 15px;
        margin-right: 0;
        min-width: 300px;
        flex: 1 0 20%;
    }
}

.card-deck .card .col-auto {
    max-width: 50%;
}

.icon-before {
    position: absolute;
    left: 0;
    top: auto;
    padding-top: 3px;
}

.timeline {
    width: 100%;
    height: 2px;
    background-color: #3f74b8;
    display: flex;
    margin-bottom: .25rem; /* line height */
}
.timeline:before, .timeline:after,
.timeline-v-start:before, .timeline-v-end:before {
    content: '';
    display: block;
    border-radius: 50%;
    border: 2px solid #3f74b8;
    background-color: #fff;
    width: 8px;
    height: 8px;
    position: absolute;
    top: -3px;
    left: 0;
    z-index: 2;
}
.timeline:after {
    right: 0;
    left: auto;
}

.timeline-v-start:before, .timeline-v-end:before {
    top: 6px;
    left: 0;
}

.timeline-v-start:after {
    width: 2px;
    height: calc(100% + 1rem);
    position: absolute;
    content: '';
    background-color: #3f74b8;
    top: 10px;
    left: 3px;
}

ul.card-deck {
    margin-bottom: 0;
    padding-left: 0;
}

.bg-light .bg-light {
    background-color: #d3d3d3 !important;
    border-color: #d3d3d3;
}

[data-toggle=collapse] {
    cursor: pointer;
}

/* form */
.input-group-text .fa {
    color: #3f74b8;
    -webkit-text-stroke: 1px #3f74b8;
    -webkit-text-fill-color: white;
}

/* add asterisk */
.form-control:required {
    padding-right: calc(1.5em + .25rem);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%23DC3545' d='M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z'></path></svg>");
    background-repeat: no-repeat;
    background-position: center right calc(.375em + .1875rem);
    background-size: .75em .75em;
}

.btn.btn-android-toggle {
    border-radius: 2rem;
    position: relative;
    text-indent: -1000rem;
    background-color: #fff !important;
}
.btn.btn-android-toggle.active {
    background-color: #48b745 !important;
    border-color: #48b745 !important;
}
.btn.btn-android-toggle:after {
    content: '';
    display: block;
    width: 1.5em; /* linheight 1.5 */
    height: 1.5em; /* linheight 1.5 */
    position: absolute;
    left: .375rem; /* padding: .375rem .75rem */
    top: .375rem; /* padding: .375rem .75rem */
    border-radius: 50%;
    background-color: #48b745 !important;
}
.btn.btn-android-toggle.active:after {
    left: auto;
    right: .375rem;
    background-color: #fff !important;
}
.btn.btn-sm.btn-android-toggle:after { left: .25rem; top: .25rem; }
.btn.btn-sm.btn-android-toggle.active:after { left: auto; right: .25rem; }

.input-group-append .btn.close {
    margin-left: -1.5em;
    width: 1.5em;
    position: relative;
    z-index: 3;
}

.debug .tab-content {
    height: 200px;
    max-height: 20%;
    overflow-x: hidden;
    overflow-y: auto;
}

.form-check-switch {
    display: inline-block;
    height: 36px;
    position: relative;
    width: 62px;
}
.form-check-switch input { display: none; }

.form-check-switch label {
    background-color: #fff;
    border: 1px solid #ced4da;
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    transition: .4s;
    cursor: pointer;
    display: block;
    color: transparent;
    border-radius: 34px;
}

.form-check-switch .form-check-input:disabled~.form-check-label {
    color: transparent;
    background-color: #e9ecef;
}

.form-check-switch label:before {
    background-color: #ced4da;
    bottom: 4px;
    content: "\f00d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    text-indent: 0;
    text-align: center;
    line-height: 26px;
    padding: 0;
    color: #fff;
}

.form-check-switch .form-check-input:disabled~.form-check-label:before {
    opacity: .5;
}

.form-check-switch input:checked + label:before {
  background-color: #66bb6a;
  transform: translateX(26px);
  content: "\f00c";
}

/* Bootstrap overrides */
body {
    /*font-size: .9rem;*/
}

.alert {
    border-radius: 0;
}

.badge {
    border-radius: 0;
}
.badge {
    padding: .5em;
    color: #fff;
}

.bg-inactive, .text-bg-inactive { background-color: #ced4da !important; }
.bg-primary, .text-bg-primary { background-color: #e51726 !important; }
.bg-secondary, .text-bg-secondary { background-color: #3f74b8 !important; }
.bg-info, .text-bg-info { background-color: #17a2b8 !important; }
.bg-light, .text-bg-light { background-color: #e9e9e9 !important; }
.bg-warning, .text-bg-warning { background-color: #f39600 !important; }
.bg-danger, .text-bg-danger { background-color: #e51726 !important; }
.bg-success, .text-bg-success { background-color: #48b745 !important; }
.bg-dark, .text-bg-dark { background-color: #212529 !important; }
.text-bg-inactive, .text-bg-light { color: #000; }

.bg-light .text-bg-light { background-color: #fff !important; }

.btn {
    border-radius: 0;
}
.btn-primary {
    background-color: #e51726;
    background-color: rgba(229, 23, 38, .8);
    border-color: #e51726;
    border-color: rgba(229, 23, 38, .8);
}
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:hover {
    background-color: #e51726;
    border-color: #e51726;
}

.btn-secondary {
    background-color: #3f74b8;
    background-color: rgba(63, 116, 184, 0.8);
    border-color: #3f74b8;
    border-color: rgba(63, 116, 184, 0.8);
}
.btn-secondary:not(:disabled):not(.disabled):active,
.btn-secondary:not(:disabled):not(.disabled).active,
.btn-secondary:hover {
    background-color: #3f74b8;
    border-color: #3f74b8;
}

.card {
    border-radius: 0;
}

.form-control {
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.8);
}

.h6 { font-weight: bold; }

.input-group>.form-control:not(:last-child) {
    border-right-width: 0;
}
.input-group>.form-control:not(:first-child) {
    border-left-width: 0;
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0;
}
.input-group-append .input-group-text {
    border-left-width: 0;
}
.input-group-prepend .input-group-text {
    border-right-width: 0;
}

mark, .mark {
    padding: .2em 0;
}

.text-primary { color: #e51726 !important; }
.text-secondary { color: #3f74b8 !important; }

/* Font awesome */
.fa-layers {
    display: inline-block;
    position: relative;
}

.fa-layers-counter {
    display: inline-block;
    position: absolute;
    text-align: center;

    background-color: #ff253a;
    border-radius: 1em;
    color: #fff;
    height: 1.5em;
    line-height: 1;
    max-width: 5em;
    min-width: 1.5em;
    overflow: hidden;
    padding: .25em;
    right: -25%;
    top: -25%;
    text-overflow: ellipsis;
}