﻿/******************************************************
    SHARED STYLES FOR PUBLIC REPORT MAPS
*******************************************************/


html,
body,
#viewDiv {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}


#vScale {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 10;
    background: rgba(255,255,255,.85);
    padding: 4px 8px;
    font-size: 11px;
    color: #333;
    border-radius: 3px;
}

#map_title_bar {
    position: absolute;
    top: 0;
    width: 100%;
    height: 64px;
    background-color: #0f4578;
    color: #fff;
    z-index: 100;
}

#map_title_bar {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 60px 1fr;
    -ms-grid-rows: 44px 20px;
    grid-columns: 60px 1fr;
    grid-rows: 44px 20px;
    grid-template-columns: 60px 1fr;
    grid-template-rows: 44px 20px;
}

#nav_btn {
    height: 64px;
    width: 60px;
    display: inline-block;
    cursor: pointer;
    transition: 0.5s;
}

#nav_btn {
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    -ms-grid-row-span: 2;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

    #nav_btn:hover {
        background-color: #3e6a93;
        transition: 0.5s;
    }

    #nav_btn.closed {
        background-image: url('https://cceo.org/Report/img/menu_white.png');
        background-size: 36px 36px;
        background-position: center;
        background-repeat: no-repeat;
    }

    #nav_btn.open {
        background-image: url('https://cceo.org/Report/img/close_white.png');
        background-size: 36px 36px;
        background-position: center;
        background-repeat: no-repeat;
    }

#map_title_bar h1 {
    margin: 0 0 0 10px;
    font-family: sans-serif;
    -ms-grid-column: 2;
    -ms-grid-row: 1;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

#map_title_bar span {
    margin-left: 10px;
    width: fit-content;
    font-family: sans-serif;
    font-size: 12px;
    -ms-grid-column: 2;
    -ms-grid-row: 2;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

#nav_menu_dropdown {
    position: absolute;
    top: 64px;
    left: 0px;
    width: 200px;
    z-index: 100;
}

    #nav_menu_dropdown.closed {
        display: none;
    }

    #nav_menu_dropdown .nav_menu_item {
        height: 36px;
        width: 200px;
        background-color: #e1e1e1;
        display: -ms-grid;
        display: grid;
        -ms-grid-columns: 60px 1fr;
        -ms-grid-rows: 36px;
        grid-columns: 60px 1fr;
        grid-rows: 36px;
        grid-template-columns: 60px 1fr;
        grid-template-rows: 36px;
    }

        #nav_menu_dropdown .nav_menu_item span {
            display: block;
        }

    #nav_menu_dropdown #menu_item_legend .nav_menu_item_icon {
        -ms-grid-column: 1;
        -ms-grid-row: 1;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    #nav_menu_dropdown #menu_item_legend .nav_menu_item_icon {
        width: 58px;
        height: 36px;
        background-image: url('https://cceo.org/Report/img/bulleted_list_black.png');
        background-size: 24px 24px;
        background-position: center;
        background-repeat: no-repeat;
    }

    #nav_menu_dropdown .nav_menu_item span:last-child {
        margin: 10px;
        -ms-grid-column: 2;
        -ms-grid-row: 1;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }


/* Close button added to Legend Widget */
#legend_header {
    height: 26px;
    width: 100%;
    margin-bottom: -2px;
    background-color: #0f4578;
    border-radius: 3px 3px 0 0;
}

#close_legend_btn {
    height: 26px;
    width: 25px;
    position: absolute;
    right: 0;
    background-image: url('https://cceo.org/Report/img/close_white.png');
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* Class added to the Legend widget to allow closing */
.esri-ui .esri-legend.closed {
    display: none;
}


/*  Popup box when map is clicked
*******************************************************/
.popup-wrap {
    width: 100%;
    height: 100%;
    display: none;
    position: absolute;
    top: 0px;
    left: 0px;
    content: '';
    background: rgba(0,0,0,0.20);
    z-index: 1000;
}

.popup-box {
    width: 350px;
    padding: 5px 10px;
    transform: translate(-50%, -50%) scale(0.5);
    position: absolute;
    bottom: -4%;
    left: 50%;
    box-shadow: 0px 2px 16px rgba(0,0,0,0.5);
    border-radius: 3px;
    background: #fff;
    text-align: center;
}

    .popup-box h2, .popup-box h3 {
        color: #888;
        font-size: 21px;
        font-family: sans-serif;
    }

    .popup-box p a {
        color: #f5f5f5;
        display: inline-block;
        font-size: 17px;
        padding: 5px;
        margin: 0 6px;
        width: 70px;
        background-color: grey;
        border-radius: 20px;
        text-decoration: none;
        font-family: Calibri;
        font-weight: bold;
    }

        .popup-box p a:first-child {
            background-color: #0f4578;
        }

        .popup-box p a:hover {
            box-shadow: 0px 0px 6px black;
        }


.transform-in, .transform-out {
    -webkit-transition: all ease 0.5s;
    transition: all ease 0.5s;
}

.transform-in {
    display: block;
    -webkit-transform: translate(-50%, -50%) scale(1);
    transform: translate(-50%, -50%) scale(1);
}

.transform-out {
    -webkit-transform: translate(-50%, -50%) scale(0.5);
    transform: translate(-50%, -50%) scale(0.5);
    display: none;
}





/*  ESRI OVERRIDES
*******************************************************/
.esri-legend .esri-legend__service .esri-legend__layer-caption {
    display: none;
}
/*.esri-legend .esri-legend__service .esri-widget__header { display: none; } */


.esri-legend .esri-legend__service .esri-legend__layer {
    margin-left: 0;
}

.esri-legend .esri-legend__layer .esri-legend__layer-table {
    margin-bottom: 5px;
}
/* Removes extra space below line items */

/* Reduces the width of the legend when viewed on smaller screens */
.esri-view .esri-view-root .esri-ui .esri-ui-corner .esri-legend {
    width: 230px;
}

/* Reduces the line height of the legend items */
.esri-legend .esri-legend__service .esri-legend__layer-table .esri-legend__layer-row {
    height: 18px;
    padding-top: 0;
    padding-bottom: 0;
}

    .esri-legend .esri-legend__service .esri-legend__layer-table .esri-legend__layer-row .esri-legend__layer-cell {
        font-size: 11px;
        padding-top: 0;
        padding-bottom: 0;
    }

/* =========================================================
   MOBILE LEGEND
   ========================================================= */

@media screen and (max-width:600px) {

    .esri-ui-bottom-right {
        right: 5px !important;
        bottom: 55px !important;
        max-width: calc(100vw - 10px) !important;
    }

    .esri-view .esri-view-root .esri-ui .esri-ui-corner .esri-legend {
        width: 175px !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 140px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        padding: 4px !important;
        margin: 0 !important;
    }

    .esri-legend .esri-legend__service {
        padding: 4px 2px 0 2px !important;
    }

    .esri-legend .esri-legend__layer-table {
        margin-bottom: 2px !important;
    }

    .esri-legend .esri-legend__layer-row {
        height: auto !important;
        min-height: 16px !important;
    }

    .esri-legend .esri-legend__layer-cell {
        font-size: 10px !important;
        padding: 0 2px !important;
        min-width: 0 !important;
    }
}


.sassy-theme .esri-widget,
.sassy-theme .esri-widget--button,
.sassy-theme .esri-menu,
.sassy-theme .esri-popup__main-container,
.sassy-theme .esri-popup .esri-popup__pointer-direction,
.sassy-theme .esri-popup .esri-popup__button,
.sassy-theme .esri-button,
.sassy-theme .esri-input,
.sassy-theme .esri-widget a {
    background-color: #E8F5F6;
    color: #000000;
}

    .sassy-theme .esri-widget--button:focus,
    .sassy-theme .esri-widget--button:hover,
    .sassy-theme .esri-menu li:focus,
    .sassy-theme .esri-menu li:hover {
        background-color: #E8F5F6;
        color: #000000;
    }

    .sassy-theme .esri-button:focus,
    .sassy-theme .esri-button:hover {
        color: #E8F5F6;
    }

.sassy-theme .esri-search__input::-moz-placeholder {
    color: #000000;
    opacity: 1;
}

.sassy-theme .esri-search__input:-ms-input-placeholder {
    color: #000000;
}

.sassy-theme .esri-search__input::-webkit-input-placeholder {
    color: #000000;
}




@media screen and (max-width:978px) {

    #map_title_bar h1 {
        margin: 0 0 0 5px;
        padding-top: 5px;
        font-size: 26px;
    }

    #map_title_bar span {
        margin-left: 5px;
        font-size: 11px;
    }

    .popup-box h3 {
        color: #888;
        font-size: 16px;
    }

    .popup-box {
        width: 280px;
        padding: 12px 15px;
    }

        .popup-box h2 {
            font-size: 19px;
            line-height: 1.25;
            margin: 8px 0 12px 0;
        }

        .popup-box h3 {
            color: #888;
            font-size: 16px;
            line-height: 1.3;
            margin: 8px 0 12px 0;
        }

        .popup-box p {
            margin-bottom: 5px;
        }

    .esri-ui-corner .esri-legend {
        min-width: 130px;
        padding: 0;
        border-radius: 8px;
    }

    /* Reduces the width of the legend when viewed on smaller screens */
    .esri-view .esri-view-root .esri-ui .esri-ui-corner .esri-legend {
        width: 190px;
    }

    .esri-legend .esri-legend__service {
        padding: 8px 4px 0px 4px;
    }

    .esri-legend__layer .esri-legend__layer-table {
        margin-bottom: 2px;
    }

    /*
    .esri-legend__layer-table .esri-legend__layer-caption {
        display: none;
    }
    */

    .esri-legend__layer-body .esri-legend__layer-cell {
        min-width: 0;
    }
}



#nav_btn.closed {
    position: relative;
    background-image: none;
}

    #nav_btn.closed::before {
        content: "☰";
        position: absolute;
        top: 13px;
        left: 15px;
        font-size: 32px;
        line-height: 32px;
        color: white;
    }

#nav_btn.open {
    position: relative;
    background-image: none;
}

    #nav_btn.open::before {
        content: "×";
        position: absolute;
        top: 10px;
        left: 17px;
        font-size: 38px;
        line-height: 38px;
        color: white;
    }

#nav_menu_dropdown #menu_item_legend .nav_menu_item_icon {
    position: relative;
    background-image: none;
}

    #nav_menu_dropdown #menu_item_legend .nav_menu_item_icon::before {
        content: "☷";
        position: absolute;
        left: 17px;
        top: 3px;
        font-size: 28px;
        line-height: 28px;
        color: #000;
    }
