/* CSS Variables */
:root {
    --modal-background: #749c91;
    --modal-h3-color: #fff;
    --modal-content-color: #fff;
    --modal-a-color: #2b5e2f;
    --modal-a-color-hover: #dfece9;
    --modal-close-button-color: #2b5e2f;
    --modal-close-button-color-hover: #dfece9;
    --modal-focus-color: #fff;
}

/* disable scrolling for main body when modal is active */
html.disable-scroll,
body.disable-scroll {
    overflow: hidden;
}

/* adjust for 17px scrollbar width */
html.disable-scroll {
    padding: 0 17px 0 0;
}

.off {
    pointer-events: none;
    cursor: not-allowed;
}

.location-page-modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 10000000000;

    .location-page-modal-content {
        background: var(--modal-background);
        padding: 20px;
        border-radius: 10px;
        position: relative;
        max-width: 1000px;
        width: 90%; /* add padding at the left & right sides */
        max-height: 90%; /* add padding at the top & bottom */
        overflow: auto;
        margin: auto;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        top: 50%;
        transform: translateY(-50%);

        h3 {
            color: var(--modal-h3-color);
            margin: 0 auto 25px;
            max-width: 90%;
            text-align: center;
            font-size: 40px;
            line-height: 1.25;
        }

        /* Content color, excluding the HTML elements within the "not()" varirable */
        *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(a):not(button):not(input):not(select):not(textarea) {
            color: var(--modal-content-color);
        }

        /* <a> color & hover color, except for <a class="btn"> elements */
        a:not(.btn):not(.btn-alt) {
            color: var(--modal-a-color);

            &:hover {
                color: var(--modal-a-color-hover);
            }
        }

        ul,
        ol {
            overflow: visible; /* prevent from cropping or hiding on certain screen widths & heights */
            margin-bottom: 0;
        }

        .btn,
        .btn-alt {
            max-width: max-content;
            margin: 10px 0;

            &.center {
                margin: 10px auto;
            }
        }

        /* Show outline for tab & shift-tab key events */
        & :focus-visible {
            outline: 2px solid var(--modal-focus-color) !important; /* over-ride site or default color */
            outline-offset: 2px;
            transition: none;
        }

        /* Hide outline for mouse click events  */
        & :focus:not(:focus-visible) {
            outline: none !important;
            transition: none;
        }

        /* Fallback for older browsers that don't support "focus-visible" */
        & :focus {
            outline: 2px solid var(--modal-focus-color) !important; /* over-ride site or default color */
            outline-offset: 2px;
            transition: none;
        }

        .close-location-page-modal {
            position: absolute;
            background: transparent;
            top: 10px;
            right: 10px;
            font-size: 30px;
            cursor: pointer;
            line-height: 1;
            color: var(--modal-close-button-color);

            &:hover {
                color: var(--modal-close-button-color-hover);
            }
        }
    }
}
