﻿/* Contains map UI specific styles */




/*************************************************
* Google Map Wrapper
*************************************************/
#map-wrapper {
    position: relative;
    background-color: #eee;
}

    #map-wrapper #google-map {
        width: 100%;
        height: 590px;
        transition: ease all 200ms;
    }

@media (max-width: 991px) {
    #map-wrapper #google-map {
        height: 350px;
    }
}

/* Standard fullscreen map with no footer. VH - header - breadcrumbs */
body.fullscreen #map-wrapper #google-map {
    height: calc(100vh - 72px - 64px);
}

/* Special sizing for these map pages, they have bottom control bars */
body.fullscreen #map-wrapper.map-with-toolbar #google-map {
    height: calc(100vh - 72px - 64px - 124px);
}

@media (max-width: 991px) {
    body.fullscreen #map-wrapper #google-map {
        height: calc(100vh - 49px - 64px);
    }

    body.fullscreen #map-wrapper.map-with-toolbar #google-map {
        height: calc(100vh - 49px - 64px - 124px);
    }
}

/* Misc controls - these should be removed at some point in favour of standard toolbar controls */
#map-wrapper .map-expand {
    top: 23px;
    right: 23px;
    position: absolute;
    z-index: 50;
}

@media (max-width: 991px) {
    #map-wrapper .map-expand {
        top: 5px;
        right: 5px;
    }
}

#map-wrapper .map-expand.map-locate-self {
    right: auto;
    top: auto;
    right: 5px;
    bottom: 18px;
}

    #map-wrapper .map-expand.map-locate-self i.fa-map-marker-alt {
        color: #EA35E5;
    }

#map-wrapper .map-hover {
    text-align: center;
    bottom: 23px;
    left: 50%;
    margin-left: -145px;
    background: rgba(0,0,0,0.6);
    min-width: 290px;
    position: absolute;
    padding: 10px;
    z-index: 100;
}

#map-wrapper .map-overlay {
    top: 67px;
    right: 23px;
    position: absolute;
    z-index: 100;
}

#map-wrapper .map-ndvi {
    right: 23px;
    top: 65px;
    background: rgba(0,0,0,0.6);
    width: 100px;
    min-height: 80px;
    position: absolute;
    padding: 5px;
    z-index: 100;
}

#map-wrapper #map-ndvi #map-ndvi-captures a span {
    font-size: 10px;
    color: #fff;
    text-decoration: none;
    line-height: 10px;
    display: block;
}

#map-wrapper #map-ndvi #map-ndvi-captures img {
    max-height: 75px;
    opacity: 0.8;
    transition: all ease 200ms;
}

#map-wrapper #map-ndvi #map-ndvi-captures a:hover img {
    opacity: 1;
}



#map-wrapper #map-search {
    right: 23px;
    top: 65px;
    background: rgba(0,0,0,0.6);
    width: 250px;
    position: absolute;
    padding: 5px;
    z-index: 999;
    text-align: center;
}

@media (max-width: 991px) {
    #map-wrapper #map-search {
        right: 5px;
        top: 50px;
        background: rgba(0,0,0,0.75);
    }
}

.map-marker-with-label {
    display: inline-block;
    font-size: 12px;
    background-color: rgba(255,255,255,0.6);
    padding: 3px;
    z-index: 9999;
}



/*************************************************
* Map hover overlay (toolbox / controls)
*************************************************/

#map-wrapper .map-insert {
    background: rgba(0,0,0,0.75);
    min-width: 320px;
    width: 320px;
    position: absolute;
    padding: 0;
    top: 0;
    left: 0;
    z-index: 45;
    line-height: 1.2;
    max-height: 100%;
    overflow-y: auto; 
}

#map-wrapper .map-insert.map-insert-right {
    left: auto;
    right: 0;
}

#map-wrapper .map-insert.map-insert-bottom {
    top: auto;
    bottom: 0;
}

@media (max-width: 767px) {

    #map-wrapper .map-insert {
        background: rgba(0,0,0,0.75);
        top: 0;
        left: 0;
        right: 0;
        z-index: 65;
    }

}

#map-wrapper .map-insert .map-insert-header {
    position: fixed;
    height: 40px;
    z-index: 60;
    background-color: #000;
    padding: 10px;
    min-width: 320px;
}

#map-wrapper .map-insert .map-insert-header h4 {
    padding-right: 35px;
}

    #map-wrapper .map-insert .map-insert-header .btn-hide {
        position: absolute;
        top: 3px;
        right: 5px;
        padding: 0;
        font-size: 1.2rem;
        height: 30px;
        width: 30px;
        min-width: 30px;
    }

#map-wrapper .map-insert .map-insert-inner {
    padding: 40px 10px 10px 10px;
    z-index: 50;
    width: 100%;
}




/*************************************************
* Farm & Field Manager
*************************************************/

#map-wrapper #map-overlay-fields,
#map-wrapper #map-overlay-fields .map-insert-header {
    width: 350px;
}

    #map-wrapper #map-overlay-fields .map-insert-inner {
        width: 100%;
    }

.field-accordion .card,
.field-accordion .card .card-header,
.field-accordion .card .card-body {
    border-radius: 0;
    border: none;
    background-color: transparent;
}

    .field-accordion .card .card-header .btn-full {
        border: none;
        transition: all ease 200ms;
        background-color: transparent !important;
        color: #fff !important;
    }

        .field-accordion .card .card-header .btn-full:not(.collapsed) {
            background-color: rgba(19, 99, 75, 0.7) !important;
        }

    .field-accordion .card .card-buttons {
    }

    .field-accordion .card .card-body {
        background-color: rgba(19, 99, 75, 0.7) !important;
    }

.field-accordion .card {
    border-bottom: solid 1px #13634b;
}

    .field-accordion .card .card-body .btn-full {
        border-radius: 3px;
    }


/* Admin tools panel; only for administators */
#field-manager .farm-admin-tools {
    position: absolute;
    background: rgba(0,0,0,0.75);
    bottom: 0;
    width: 300px;
    right: -300px;
    z-index: 999;
    color: #fff;
}



/*************************************************
* Sample Planner / Locator Tool
*************************************************/

#sample-locator-wrapper {
    position: relative;
}

.btn-marker {
}

.btn-marker-zone-a {
    border-color: #3560EA;
    background-color: #3560EA;
    color: #fff !important;
}

    .btn-marker-zone-a:hover, .btn-marker-zone-a:active {
        border-color: #6580ff;
        background-color: #6580ff;
    }

.btn-marker-zone-b {
    border-color: #caa625;
    background-color: #CAA625;
    color: #fff !important;
}

    .btn-marker-zone-b:hover, .btn-marker-zone-b:active {
        border-color: #DAB745;
        background-color: #DAB745;
    }

.btn-marker-zone-c {
    border-color: #ea4335;
    background-color: #EA4335;
    color: #fff !important;
}

    .btn-marker-zone-c:hover, .btn-marker-zone-c:active {
        border-color: #fE6F55;
        background-color: #fE6F55;
    }


img.inline-marker {
    width: auto;
    height: 30px;
}



/*************************************************
* Map alerts block
*************************************************/
#map-alert-wrapper {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 95;
}

@media (min-width: 992px) {
    #map-alert-wrapper {
        width: 960px;
        left: 50%;
        margin-left: -480px;
    }
}

@media (min-width: 1200px)  {
    #map-alert-wrapper {
        width: 1140px;
        left: 50%;
        margin-left: -570px;
    }
}

#map-alert-wrapper span.inner {
    display: block;
}

#map-alert-wrapper img.map-icon {
    height: 25px;
    width: auto;
}

#map-alert-wrapper .alert .close {
    padding: 2px;
}

/* Add transparency to the alert backgrounds, but NOT the contents*/
#map-alert-wrapper .alert.alert-success {
    background-color: rgba(212, 237, 218, 0.85);
}

#map-alert-wrapper .alert.alert-info {
    background-color: rgba(209, 236, 241, 0.85);
}

#map-alert-wrapper .alert.alert-warning {
    background-color: rgba(255, 243, 205, 0.85);
}

#map-alert-wrapper .alert.alert-danger {
    background-color: rgba(248, 215, 218, 0.85);
}




/*************************************************
* Footer toolbar styling
*************************************************/

/* NOTE: This may still be cutoff by the actual map screen size (173px desktop, 214px mobile )*/
#map-toolbar {
    min-height: 124px;
    overflow-x: scroll;
    scrollbar-width: thin;
    scrollbar-color: #666 #000;
}

    /* Webkit */
    #map-toolbar::-webkit-scrollbar {
        height: 8px;
    }

    #map-toolbar::-webkit-scrollbar-track {
        background-color: #000;
    }

    #map-toolbar::-webkit-scrollbar-thumb {
        background-color: #666;
        border-radius: 4px;
    }

    #map-toolbar p {
        line-height: 1.2;
        margin-bottom: 5px;
    }

#map-toolbar .map-module {
    min-height: 109px;
    padding: 10px 20px 0 20px;
    border-right: solid 1px #888;
    min-width: 175px;
    flex-shrink: 0;
    color: #fff; /* default to white */
}

/* Default white buttons - note we don't want to use text-white */
#map-toolbar .map-module .btn {
    color: #fff;
    border-color: #fff; 
}

/* Toggle button styling */
#map-toolbar .btn-toggle .fa-check {
    color: #000;
}

#map-toolbar .btn-toggle.active .fa-check {
    color: #fff;
}

/* Standard dropdown styling for footer */
#map-toolbar select {
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}



#chart-wrapper-activity {
    min-height: 400px;
}

    #chart-wrapper-activity #chart-activity-trendline {
        width: 100%;
        height: 400px;
    }




/* Misc overlay controls */
#map-wrapper #map-overlay-new-field,
#map-wrapper #map-overlay-new-field .map-insert-header {
    width: 350px;
}

#map-module-loader {
}

#map-module-loader select {
    max-width: 125px !important;
}

#map-module-samples {
    max-width: 550px;
}

#map-module-sample-planner {
    max-width: 450px;
}



/*************************************************
* Livestock / Ceres Tag Tracking
*************************************************/

#map-overlay-livestock {
    height: 100%; /* This will resize dynamically, much easier to do it this way */
}

#map-overlay-livestock .has-animal {
    color: #ff3333;
}

#map-overlay-livestock .no-animal {
    color: #666666;
}

#map-overlay-livestock .current {
    color: #33ff33;
}

#map-overlay-livestock .marker-find {
    cursor: pointer;
}

span.activity {
    margin-top: 5px;
    display: block;
    line-height: 1.2 !important;
}


/* Ceres tag blue / green styling (is this still used anywhere?) */
.text-ceres-tag {
    color: #9DBB25;
}

.btn-activity-legend {
    width: 85px;
}

    .btn-activity-legend.morning {

    }

        .btn-activity-legend.morning.active {
            color: #00b336 !important;
            border-color: #00b336 !important;
        }

    .btn-activity-legend.midday {
        
    }

        .btn-activity-legend.midday.active {
            color: #ff951c !important;
            border-color: #ff951c !important;
        }

    .btn-activity-legend.afternoon {
        
    }

        .btn-activity-legend.afternoon.active {
            color: #4461ff !important;
            border-color: #4461ff !important;
        }

    .btn-activity-legend.night {
        
    }

        .btn-activity-legend.night.active {
            color: #dd00be !important;
            border-color: #dd00be !important;
        }
