/* maptool.css */

html,body {
    height:100%;
    overflow: hidden;
}

body .hide {
    display:none !important;
}

#canada_all_provinces {
    display: block;
    width:100%;
    pointer-events: none; /* prevent user dragging image */
}

/* custom tags which should render as block elements */
big-map-wrapper {
    display:block;
}

/* --- VISIBILITY CLASSES --- */
@media only screen and (min-width:1020.1px) {
    body .hide-on-desktop {
        display:none !important;
    }
}
@media only screen and (min-width:768.1px) and (max-width:1020px) {
    body .hide-on-tablet {
        display:none !important;
    }
}
@media only screen and (max-width:768px) {
    body .hide-on-mobile {
        display:none !important;
    }
}

big-map-wrapper {
    position: relative;
    user-select: none;
    height:100%;
    overflow: auto;
}
big-map-wrapper.zoomed-in {
    overflow:hidden;
}
big-map-wrapper.zoomed-in province-zone {
    pointer-events: none;
}
big-map-wrapper:not(.zoomed-in) + zoom-out {
    opacity:0;
    pointer-events: none;
}
zoomable-wrapper {
    display:block;
    position:relative;
    margin:0px auto;
    max-width: 133vh;
    cursor: pointer;
    transition: transform 500ms; /* for translation and scale */
}
.new-pin-tracking .zoom-target {
    cursor:crosshair;
}
zoom-out {
    position: fixed;
    bottom:10px;
    left:50%;
    transform: translateX(-50%);
}
add-map-pin {
    cursor:pointer;
    position:fixed;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    padding:5px;
    background-color:white;
    opacity:0;
    pointer-events: none;
}
add-map-pin:hover {
    background-color:lightblue;
}
.new-pin-tracking add-map-pin {
    background-color: rgba(0,255,0,0.5);
}
add-map-pin .tool-icon {
    fill:white;
    width:32px;
    height:32px;
    cursor: pointer;
    display:block;
    margin:0px auto;
}
/* add-map-pin:not(.show) {
    pointer-events: none;
} */
big-map-wrapper.zoomed-in:not(.hide-add-map-pin) ~ add-map-pin {
    opacity:1;
    pointer-events: all;
}
pin-details-bubble:not(.show) {
    display:none;
}
pin-details-bubble.show {
    opacity:1;
    transition-delay: 0.5s;
}
pin-details-bubble {
    display: block;
    position:fixed;
    opacity: 0;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    min-width: 300px;
    padding:20px;
    border:2px solid gray;
    background-color: rgba(255,255,255,0.9);
    border-radius: 5px;
    box-shadow: 2px 2px 0px white;
    font:18px/1.2 sans-serif;
    transition: opacity 1s;
    transition-delay: 0.5s; /* slow reveal, instant conceal */
    z-index: 1;
}
new-pin-form-wrapper {
    display: block;
    position: fixed;
    right:20px;
    top:20px;
    max-width: 50vw;
    outline:1px solid transparent;
    background-color: rgba(255,255,255,0.9);
    transform: translate(calc(100% + 22px),0%);
    transition: transform 0.5s, outline 0.1s;
}
@media only screen and (max-width:768px) {
    new-pin-form-wrapper {
        left:0px;
        right:0px;
        top:auto; /* release binding to top edge */
        bottom:0px;
        width:100%;
        max-height:60vh;
        max-width: none;
        transform:translate(0%,100%);
    }
}
big-map-wrapper.new-pin-details new-pin-form-wrapper {
    transform:translate(0%, 0%);
    outline-color: black;
}
input:focus::placeholder,
textarea:focus::placeholder {
    opacity:0; /* obscure placeholder because evidently an element with focus shouldn't present placeholder value */
}
.input-row input,.input-row textarea {
    display:inline-block;
    width:100%;
    font-family:sans-serif;
}
.input-row,
.submit-result {
    padding:10px 15px;
}
.input-row:first-of-type {
    padding-top:15px;
}
.general-button,
.input-row button {
    padding:5px 20px;
    border-radius:10px;
    background-color:white;
    font-weight:bold;
    border:1px solid black;
}
.submit-btn-row {
    display:flex;
    justify-content:center;
    background-color: rgba(0,0,0,0.1);
}
.submit-btn-row:not(.success,.failure) + .submit-result {
    display:none;
}

.new-pin-tracking .zoom-target {
    cursor:pointer;
}
.fixed-pin,
#floating-pin {
    position: fixed;
    display: block;
    cursor:move;
    transform:translate(-50%,-100%);
    left:50%;
    top:50%;
    width: 32px;
    height: 32px;
}
big-map-wrapper:not(.new-pin-tracking) #floating-pin,
.new-pin-tracking .fixed-pin.moving {
    display:none;
}
#pins_list, .fixed-pin {
    position: absolute;
}
i.fixed-pin {
    font-size:32px;
    /* line-height: 1; */
    pointer-events:all;
    cursor: pointer;
    transform:translate(-50%,-90%); /* improve placement */
}
.outline-pins .fixed-pin {
    outline:1px solid deeppink;
}

.fixed-pin.unlocked {
    color:gray;
    cursor:move;
    animation: fade_gray 1.5s linear infinite;
}
.fixed-pin:not(.unlocked):hover {
    color:brown;
    animation: fade_brown 1.5s linear infinite;
}

@keyframes fade_gray {
    50% { color:black; }
    100% { color:gray; }
}
@keyframes fade_brown {
    50% { color:black; }
    100% { color:brown; }
}

#pins_list {
    top:0%;
    left:0%;
    height: 100%;
    width: 100%;
    pointer-events: none;
    z-index: 1;
}
province-zone {
    outline:2px solid transparent;
}
province-zone:hover {
    outline-color: orange;
    background-color:rgba(0,0,0,0.2);
}
.testing province-zone,
.zoomed-in province-zone.zoom-target {
    outline-color: blueviolet;
}

province-zone {
    position: absolute;
    cursor: pointer;
    background: transparent;
    touch-action: none; /* help pointer tracking function */
}
#zone_alberta {
    left: 24%; top: 56.8%; width: 11%; height: 27.6%;
}
#zone_british_columbia {
    left: 4%; top: 56.8%; width: 26.5%; height: 29%;
}
#zone_manitoba {
    left: 43.5%; top: 56.8%; width: 14.5%; height: 27.7%;
}
#zone_new_brunswick {
    left: 79.7%; top: 86.1%; width: 5.9%; height: 7%;
}
#zone_newfoundland_and_labrador {
    left: 80.7%; top: 55.1%; width: 17.5%; height: 35%;
}
#zone_nova_scotia {
    left: 80.7%; top: 88.1%; width: 9.4%; height: 8%;
}
#zone_ontario {
    left: 51.2%; top: 65.1%; width: 23.7%; height: 34%;
}
#zone_prince_edward_island {
    left: 84.4%; top: 88.4%; width: 3.3%; height: 3%;
}
#zone_quebec {
    left: 67.8%; top: 48.8%; width: 25.3%; height: 44.1%;
}
#zone_saskatchewan {
    left: 34.8%; top: 56.5%; width: 10%; height: 28.1%;
}
#zone_northwest_territories {
    left: 6.1%; top: 0.7%; width: 38.1%; height: 56.7%;
}
#zone_nunavut {
    left: 23.7%; top: 2.3%; width: 65%; height: 55%;
}
#zone_yukon {
    left: 0.9%; top: 23.1%; width: 19.1%; height: 34.2%;
}

/* Special container for tracking of pointer movement */
/* .new-pin-tracking */
big-map-wrapper:not(.show-red-dashes) ~ #elem_bounds {
    display: none;
}
#elem_bounds.top-left-set .top,
#elem_bounds.top-left-set .left,
#elem_bounds.bottom-right-set .bottom,
#elem_bounds.bottom-right-set .right {
  opacity:0;
}
.elem_box.left, .elem_box.top, .elem_box.bottom, .elem_box.right {
    position:absolute;
    z-index:1000;
    outline:1px dashed red;
    pointer-events: none; /* no interaction, just decoration */
  }
  .elem_box.left, .elem_box.right {
    height:100%;
    top:0;
    position:fixed; /* keep these in view as page scrolls */
  }
  .elem_box.top, .elem_box.bottom {
    width:100%;
    left:0;
  }
  