/* Basics */

.mapbox-directions-inputs,
.mapbox-directions-errors,
.mapbox-directions-routes,
.mapbox-directions-instructions {
    font:15px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

.mapbox-directions-inputs,
.mapbox-directions-inputs *,
.mapbox-directions-errors,
.mapbox-directions-errors *,
.mapbox-directions-routes,
.mapbox-directions-routes *,
.mapbox-directions-instructions,
.mapbox-directions-instructions * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Inputs */

.mapbox-directions-origin,
.mapbox-directions-destination {
    background-color: white;
    position: relative;
}

.mapbox-form-label {
    cursor: pointer;
    position: absolute;
    left: 0;
    top: 0;
    background: #444;
    color: rgba(0,0,0,.75);
    font-weight: bold;
    text-align: center;
    padding: 10px;
    line-height: 20px;
    font-size: 12px;
}

.mapbox-directions-origin .mapbox-form-label {
    background-color: #3bb2d0;
}

.mapbox-directions-inputs input {
    font-size: 12px;
    width: 100%;
    border: 0;
    background-color: transparent;
    height: 40px;
    margin: 0;
    color: rgba(0,0,0,.5);
    padding: 10px 10px 10px 50px;
}

.mapbox-directions-inputs input:focus {
    color: rgba(0,0,0,.75);
    outline:0;
    box-shadow: none;
    outline: thin dotted\8;
}

.mapbox-directions-destination input {
    border-top: 1px solid rgba(0,0,0,.1);
}

.mapbox-directions-reverse-input {
    position: absolute;
    z-index: 10;
    background: white;
    left: 50px;
    top: 30px;
    cursor: pointer;
}

.mapbox-directions-inputs .mapbox-close-icon {
    opacity: .5;
    z-index: 2;
    position: absolute;
    right: 5px;
    top: 10px;
    cursor: pointer;
}

input:not(:valid) + .mapbox-close-icon {
    display: none;
}

.mapbox-close-icon:hover {
    opacity: .75;
}

/* Errors */

.mapbox-directions-error {
    color: white;
    display: inline-block;
    padding: 0 5px;
}

/* Routes */

.mapbox-directions-routes ul {
    list-style: none;
    margin: 0;
    padding: 10px 10px 0 10px;
    border-bottom: 1px solid rgba(255,255,255,.25);
}

.mapbox-directions-routes li {
    font-size: 12px;
    padding: 10px 10px 10px 80px;
    display: block;
    position: relative;
    cursor: pointer;
    color: rgba(255,255,255,.5);
    min-height: 60px;
}

.mapbox-directions-routes li:hover,
.mapbox-directions-routes .mapbox-directions-route-active {
    color: white;
}

.mapbox-directions-route-heading {
    position: absolute;
    left: 10px;
    top: 10px;
}

.mapbox-directions-route-summary {
    display: none;
}

.mapbox-directions-route-active .mapbox-directions-route-summary {
    display: block;
}

.mapbox-directions-route-details {
    font-size: 12px;
    color: rgba(255,255,255,.5);
}

/* Instructions */

.mapbox-directions-steps {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mapbox-directions-step {
    position: relative;
    color: rgba(255,255,255,.75);
    cursor: pointer;
    padding: 20px 20px 20px 40px;
    font-size: 20px;
    line-height: 25px;
}

.mapbox-directions-step-distance {
    color: rgba(255,255,255,.5);
    position: absolute;
    padding: 5px 10px;
    font-size: 12px;
    left: 30px;
    bottom: -15px;
}

.mapbox-directions-step:hover {
    color: white;
}

.mapbox-directions-step:after {
    content: "";
    position: absolute;
    top: 50px;
    bottom: -20px;
    border-left: 2px dotted rgba(255,255,255,.2);
    left: 20px;
}

.mapbox-directions-step:last-child:after,
.mapbox-directions-step:last-child .mapbox-directions-step-distance {
    display: none;
}

/* icons */

.mapbox-directions-icon {
    background-image: url('mapbox.directions.png');
    -webkit-background-size: 280px 20px;
    background-size: 280px 20px;
    background-repeat: no-repeat;
    margin: 0;
    content: '';
    display: inline-block;
    vertical-align: top;
    width: 20px;
    height: 20px;
}

.mapbox-directions-instructions .mapbox-directions-icon {
    position: absolute;
    left: 10px;
    top: 25px;
    margin: auto;
}

.mapbox-continue-icon         { background-position: 0 0; }
.mapbox-sharp-right-icon      { background-position: -20px 0; }
.mapbox-turn-right-icon       { background-position: -40px 0; }
.mapbox-bear-right-icon       { background-position: -60px 0; }
.mapbox-u-turn-icon           { background-position: -80px 0; }
.mapbox-sharp-left-icon       { background-position: -100px 0; }
.mapbox-turn-left-icon        { background-position: -120px 0; }
.mapbox-bear-left-icon        { background-position: -140px 0; }
.mapbox-depart-icon           { background-position: -160px 0; }
.mapbox-enter-roundabout-icon { background-position: -180px 0; }
.mapbox-arrive-icon           { background-position: -200px 0; }
.mapbox-close-icon            { background-position: -220px 0; }
.mapbox-reverse-icon          { background-position: -240px 0; }
.mapbox-error-icon            { background-position: -260px 0; }

.mapbox-marker-drag-icon {
    display: block;
    background-color: #444;
    border-radius: 50%;
    box-shadow: 0 0 5px 0 rgba(0,0,0,0.5);
}

.mapbox-marker-drag-icon-step {
    background-color: #3BB2D0;
}
/* leaflet overrides */

/* FIXME this is really bad. Breaks LRM.
path.leaflet-clickable {
    stroke: #3BB2D0;
    stroke-width: 4px;
    stroke-opacity:.75;
}
*/
