﻿.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    grid-auto-rows: 1fr;
    grid-gap: 10px;
}

.gallery--stretched {
    grid-template-rows: 1fr;
}

.gallery__image {
    display: flex;
    position: relative;
    overflow: hidden;
    border-radius: .25rem;
    min-height: 200px;
}

.gallery__image:last-child {
    margin-right: 0;
}

.image__source {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    color: var(--primary-color);
    background: url('/media/icons/pothole_sign_64.png');
    background-size: 30% auto;
    background-repeat: no-repeat;
    background-position: center 50%;
}

.image__source::before {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
    backdrop-filter: brightness(90%);
    padding-top: 20px;
}

.image__details {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 8px;
    color: white;
    text-align: center;
    font-size: 0.75em;
    background-color: var(--primary-color);
    padding: 8px;
    border-radius: .25rem; 
    width: calc(100% - 16px);
    /*text-shadow: 0px 0px 8px var(--primary-color);*/
}

.image__form {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.image__button {
    opacity: 0;
    pointer-events: none;
    touch-action: none;
    transition: all 0.25s;
}

.gallery__image:hover .image__button, .gallery__image--active .image__button {
    opacity: 1;
    pointer-events: all;
    touch-action: auto;
    transition: all 0.25s;
}

.gallery__no-results {
    width: 100%;
    grid-column: 1/-1;
}

.input-current-page::-webkit-outer-spin-button,
.input-current-page::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-current-page {
    -moz-appearance: textfield;
    width: 40px;
}

@media screen and (max-width: 991px) {
    .gallery {
        grid-template-columns: 1fr 1fr;
    }
}