@import "media";

.state {
    transition: all 100ms ease;
    fill: #dddddd;
}

.state:hover {
    fill: #aaaaaa;
    cursor: pointer;
}

.state--available {
    fill: $mggg-blue;
}

.state--available:hover {
    fill: $mggg-dark-blue;
}

.state--available:active {
    fill: $mggg-very-dark-blue;
}

.state--zoomed,
.state--zoomed:hover,
.state--zoomed:active {
    opacity: 0;
    cursor: auto;
}

.state--selected,
.state--selected:hover,
.state--selected:active {
    opacity: 1;
}

.dc-annotation {
    fill: none;
    stroke: $mggg-very-dark-blue;
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.place-map {
    display: flex;
    min-width: 375px;
    max-height: 80vh;
    min-height: 400px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    grid-area: map;
    width: 960px;
    height: 450px;
    margin: 4rem auto 0;
    overflow: hidden;
}

@supports (display: grid) {
    .place-map {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }
}

.place-map__search {
    font-size: 2rem;
    color: $mggg-blue;
    font-family: $font-family;
    border: none;
    border-bottom: 0.125rem solid $mggg-blue;
    transition: all 100ms ease;
    background: none;
    outline: none;
    caret-color: $mggg-blue;
    text-align: center;
    margin: 0 0.5rem;
    border-radius: 0;
    padding: 4px 8px;
    -webkit-appearance: none;
    -moz-appearance: none;
    text-indent: 1px;
    text-overflow: '';
}

.place-map__search::selection {
    background-color: $mggg-blue;
    color: white;
}

.place-map__search--unavailable {
    color: #aaa;
    border-bottom-color: #aaa;
    caret-color: #aaa;
}

.place-map__form {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: absolute;
    grid-area: form;
}

.place-map__state-modules {
    width: 50%;
    position: absolute;
    height: auto;
    right: 0;
    grid-column: 3 / 4;
    grid-row: 3 / 4;
    z-index: 1000;
}

.place-map__state-modules--hidden {
    display: none;
}

.local {
    fill: #fff;
    display: none;
    opacity: 1;

    &:hover {
        fill: #aaa;
        opacity: 1;
    }

    &:target {
        fill: #aaa;
        opacity:1;
    }
}

@supports (display: grid) {
    .place-map__form {
        position: static;
    }
    .place-map__state-modules {
        width: auto;
        position: static;
        right: unset;
    }
}

@media (max-width: 400px) {
    .place-map__state-modules {
        grid-column: 2 / 4;
    }
}
