@mixin location-details
{
    a.title
    {
        @include normal-text;

        display: block;
        margin-bottom: steps(-1);

        font-weight: bold;
        color: $color-text-darker;
        text-decoration: none;

        @include for-at-least-normal-tablets
        {
            margin-bottom: 0;
        }
    }

    .details
    {
        @include baseline-box(14px, steps(2.5), 0.6px);

        margin-bottom: 0;

        color: $color-text-normal;

        .address,
        .working-hours
        {
            display: block;
        }

        .phone,
        .email
        {
            margin-right: steps(1);
        }

        .phone
        {
            @include icon("phone", $color-link-normal);

            padding-left: steps(2);
            margin-left: -3px;

            &::before
            {
                margin-left: -22px;
                margin-right: 2px;
            }

            @include for-at-least-normal-tablets
            {
                &::before
                {
                    content: svg-image-data-url("phone", $color-text-normal);
                }
            }
        }

        .email
        {
            @include icon("email", $color-link-normal);

            padding-left: steps(2.5);

            &::before
            {
                margin-left: -27px;
                margin-right: 7px;
            }
        }

        @include for-at-least-normal-tablets
        {
            @include baseline-box(16px, steps(3), 0.5px);
        }
    }
}

@mixin map-hint
{
    @include normal-text;

    position: relative;

    padding-left: steps(4);
    margin-top: steps(-1);

    &:last-child
    {
        margin-bottom: steps(-1.5);
    }

    &:before
    {
        content: svg-image-data-url("fingers", $fill: $color-text-lighter);

        position: absolute;
        left: 0;
        top: 0;
    }

    @include for-at-least-normal-tablets
    {
        display: none;
    }
}

main
{
    .field.filter
    {
        .label
        {
            @include visually-hidden;
        }

        .control
        {
            width: auto;
        }
    }

    .content.map
    {
        @include two-thirds-column;

        height: steps(40);

        @include for-at-most-small-tablets
        {
            padding: 0;
        }

        @include for-at-least-normal-tablets
        {
            height: steps(60);
        }
    }

    .content.locations
    {
        @include one-third-column;

        @include for-at-least-normal-tablets
        {
            display: flex;
            flex-direction: column;
            height: steps(60);
        }

        .field.filter
        {
            display: none;

            @include for-at-least-normal-tablets
            {
                flex: none;
                display: block;
                margin-bottom: steps(4);
            }
        }

        ul
        {
            border: solid $color-border-normal;
            border-width: 0 0 1px;

            @include for-at-least-normal-tablets
            {
                flex: 1 1;

                overflow-y: auto;
                border-width: 1px 0;
            }
        }

        li
        {
            @include location-details;
            @include transition("background");

            width: 100%;
            padding-top: steps(2);
            padding-bottom: steps(1.5) - 1px;
            border-top: 1px solid $color-border-normal;
            margin-top: -1px;

            text-align: left;

            @include for-at-least-normal-tablets
            {
                padding: steps(1) steps(2) steps(2);

                &:not(.selected):hover
                {
                    background: $color-background-lighter;
                    cursor: pointer;
                }

                &.selected
                {
                    background-color: $color-background-normal;
                }
            }
        }

        .more
        {
            @include small-text;
            // @include baseline-box(14px, steps(2.5), 0.6px);

            margin-top: steps(-1);

            a
            {
                @include icon("marker", $color-link-normal);

                padding-left: steps(2.5);

                &::before
                {
                    margin-left: -27px;
                    margin-right: 7px;
                }
            }

            @include for-at-least-normal-tablets
            {
                margin-top: 0;

                .js &
                {
                    display: none;
                }
            }
        }
    }
}

.google-map
{
    height: 100%;

    .map-static {
        display: none;

        height: 100%;
        width: 100%;
        position: relative;

        &__image {
            object-fit: cover;
            width: 100%;
            height: 100%;
        }

        &__dialog {
            box-shadow: 0 7px 10px 0 rgba(0, 0, 0, 0.22);

            background-color: $color-background-lightest;
            max-width: steps(34);
            width: 100%;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translateX(-50%) translateY(-50%);
            border-radius: 8px;
        }

        &__close {
            position: absolute;
            top: 2px;
            right: 2px;
            width: steps(1.5);
            height: steps(1.5);

            svg {
                width: steps(1.5);
                height: steps(1.5);
            }
        }

        .details {
            @include sans-serif-font-family;
            padding: steps(2) steps(2);
            display: flex;
            flex-direction: column;

            .information {
                @include baseline-box(14px, steps(2.5), 0.6px);

                text-align: center;
                margin-bottom: steps(2);

                @include for-at-least-normal-tablets {
                    @include baseline-box(16px, steps(2.5), 0.5px);
                }
            }

            .button {
                @include baseline-box(14px, steps(2), 0.6px, steps(0.5) - 1px, steps(0.5) - 1px);
            }
        }
    }

    .location-details
    {
        @include location-details;
        @include sans-serif-font-family;

        max-width: steps(27);
        padding: steps(1) steps(2);

        @include for-at-least-normal-tablets
        {
            max-width: steps(40);
            padding-left: steps(3);
            padding-right: steps(3);
        }

        .more
        {
            @include buttons;

            margin-top: steps(2);
            margin-right: steps(-2);

            .button
            {
                @include baseline-box(14px, steps(2), 0.6px, steps(0.5) - 1px, steps(0.5) - 1px);
            }

            @include for-at-least-normal-tablets
            {
                display: none;
            }
        }
    }
}

// customize gmaps info window close element
.gm-style-iw + div
{
    top: 13px !important;
    right: 11px !important;

    width: steps(3) !important;
    height: steps(3) !important;
    padding: steps(0.5);

    &::before
    {
        content: svg-image-data-url("x", $color-link-normal);

        display: block;
        width: steps(2);
        height: steps(2);
    }

    &:hover::before
    {
        content: svg-image-data-url("x", $color-link-active);
    }

    img
    {
        display: none;
    }
}
