/* Placid Waters Interactive Community Map */

:root {
    --pw-background: #f8f3ed;
    --pw-blue: #12366b;
    --pw-blue-dark: #0b2852;
    --pw-focus: #77a9d4;
    --pw-white: #ffffff;
}


/* =========================================================
   PAGE
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--pw-background);
    color: var(--pw-blue);
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   IMAGE MAP
   ========================================================= */

#image-map-pro {
    width: 100%;
    min-height: 0;
    height: auto;
}


/* =========================================================
   HEADER AND INSTRUCTIONS
   ========================================================= */

.map-instructions {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 18px 155px 14px 28px;
    box-sizing: border-box;
    background-color: var(--pw-background);
    border: none;
    border-bottom: 2px solid var(--pw-blue);
    color: var(--pw-blue);
    text-align: left;
}

.map-instructions > *:not(.community-logo) {
    max-width: 1000px;
}

.map-instructions h1 {
    margin: 0 0 2px;
    padding: 0;
    color: var(--pw-blue);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.15;
}

.map-location {
    margin: 0 0 12px;
    color: var(--pw-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    line-height: 1.2;
}

.map-quick-instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 14px 9px;
    color: var(--pw-blue);
    font-size: 15px;
    line-height: 1.4;
}

.map-click-icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}


/* =========================================================
   LOGO
   ========================================================= */

.community-logo {
    position: absolute;
    top: 10px;
    right: 18px;
    display: block;
    width: 120px;
    max-width: 120px;
    height: auto;
    object-fit: contain;
}


/* =========================================================
   IMAGE MAP PRO ZOOM CONTROLS
   ========================================================= */

#image-map-pro .imp-ui-top-right {
    top: 15px !important;
    right: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    z-index: 9999 !important;
}


/* =========================================================
   ADDRESS AND RESIDENT SEARCH
   ========================================================= */

.map-area {
    position: relative;
}

.address-search {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10000;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 7px;
    box-sizing: border-box;
    border: 1px solid var(--pw-blue);
    border-radius: 6px;
    background-color: var(--pw-background);
}

.address-search input {
    width: 180px;
    min-width: 0;
    padding: 7px 9px;
    box-sizing: border-box;
    border: 1px solid var(--pw-blue);
    border-radius: 4px;
    background-color: var(--pw-white);
    color: var(--pw-blue);
    font: inherit;
}

.address-search button {
    padding: 7px 12px;
    border: 0;
    border-radius: 4px;
    background-color: var(--pw-blue);
    color: var(--pw-white);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.address-search button:hover,
.address-search button:focus {
    background-color: var(--pw-blue-dark);
}

.address-search input:focus-visible,
.address-search button:focus-visible {
    outline: 3px solid var(--pw-focus);
    outline-offset: 2px;
}

.address-search-status {
    position: absolute;
    top: 100%;
    left: 0;
    margin: 5px 0 0;
    padding: 4px 7px;
    background-color: var(--pw-background);
    color: var(--pw-blue);
    font-size: 12px;
    line-height: 1.3;
}

.address-search-status:empty {
    display: none;
}


/*
   Keep the search controls visible while the user moves
   through multiple matching residents or addresses.
*/

.address-search.has-multiple-results {
    position: fixed;
    top: 12px;
    right: auto;
    left: 50%;
    width: min(520px, calc(100vw - 24px));
    transform: translateX(-50%);
    box-shadow: 0 4px 14px rgba(18, 54, 107, 0.25);
}

.address-search.has-multiple-results input {
    width: auto;
    flex: 1;
}

.address-search.has-multiple-results .address-search-status {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--pw-blue);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(18, 54, 107, 0.18);
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}


/* =========================================================
   ADDRESS SEARCH RESULT HIGHLIGHT
   ========================================================= */

#image-map-pro .imp-object.address-search-result polygon,
#image-map-pro .imp-object.address-search-result path,
#image-map-pro .imp-object.address-search-result rect,
#image-map-pro .imp-object.address-search-result circle,
#image-map-pro .imp-object.address-search-result ellipse {
    fill: rgba(255, 213, 0, 0.55) !important;
    stroke: #d94b00 !important;
    stroke-width: 4px !important;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(
        0 0 5px rgba(255, 213, 0, 0.95)
    );
}


/* =========================================================
   FOOTER
   ========================================================= */

.map-footer {
    width: 80%;
    margin: auto;
    padding: 14px 28px 18px;
    box-sizing: border-box;
    background-color: var(--pw-background);
    border-top: 2px solid var(--pw-blue);
    color: var(--pw-blue);
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.map-footer p {
    margin: 0;
}

.map-footer-links {
    margin-bottom: 10px !important;
}

.map-footer a {
    color: var(--pw-blue);
    font-weight: 600;
    text-decoration: underline;
}

.map-footer a:hover {
    text-decoration: none;
}

.map-footer-separator {
    margin: 0 8px;
}

.map-footer-note {
    font-size: 12px;
}


/* =========================================================
   REQUEST BUTTON
   ========================================================= */

.map-request-wrapper {
    margin: 18px 0;
    text-align: center;
}

a.map-request-button,
a.map-request-button:link,
a.map-request-button:visited {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 6px;
    background-color: var(--pw-blue);
    color: var(--pw-white) !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

a.map-request-button:hover,
a.map-request-button:focus {
    background-color: var(--pw-blue-dark);
    color: var(--pw-white) !important;
    text-decoration: none;
}

a.map-request-button:focus-visible {
    outline: 3px solid var(--pw-focus);
    outline-offset: 3px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .map-instructions {
        padding: 11px 80px 10px 14px;
        border-bottom-width: 1px;
    }

    .community-logo {
        top: 8px;
        right: 10px;
        width: 60px;
        max-width: 60px;
    }

    .map-instructions h1 {
        margin-bottom: 2px;
        font-size: 20px;
        line-height: 1.15;
    }

    .map-location {
        margin-bottom: 8px;
        font-size: 9px;
        letter-spacing: 1px;
        line-height: 1.2;
    }

    .map-quick-instructions {
        gap: 6px;
        padding: 4px 0 2px;
        font-size: 13px;
        line-height: 1.3;
    }

    .map-click-icon {
        width: 18px;
        height: 18px;
    }

    .address-search {
        top: 8px;
        right: 55px;
        left: 8px;
    }

    .address-search input {
        width: auto;
        flex: 1;
    }

    .address-search.has-multiple-results {
        top: 8px;
        right: 8px;
        left: 8px;
        width: auto;
        transform: none;
    }

    .map-footer {
        padding: 12px 14px 40px;
        font-size: 12px;
    }

    .map-footer-links {
        line-height: 1.8;
    }

    .map-footer-separator {
        margin: 0 4px;
    }

    .map-footer-note {
        font-size: 11px;
        line-height: 1.4;
    }
}