.gallery-container {
    .form-switch {
        display: none;
    }

    .gallery-results-header {
        display: none;
    }

    #displaycount {
        display: none;
    }

    #resultslist {
        margin-bottom: 1em;
        .gallery-item-container {
            .gallery-item {
                display: flex;
                flex-flow: column-reverse;
                padding: 0.75rem;

                &::after {
                    position: absolute;
                    content: "";
                    width: 100%;
                    height: 0;
                    top: 0;
                    left: 0;
                    padding: 0;
                    background: var(--itap-primary);
                    transition-duration: 200ms;
                    z-index: -10;
                }

                &:hover::after {
                    height: 100%;
                    transition-duration: 600ms;
                }

                .gallery-item-thumbnail {
                    img {
                        width: 100%;
                        height: 14rem;
                        object-fit: cover;
                        object-position: 50% 50%;
                    }
                }
            }

            .gallery-item-buttons {
                display: none;
                position: absolute;
                width: 100%;
                bottom: -20px;
                left: 0;

                .btn {
                    color: var(--itap-primary);
                    background-color: var(--itap-beigeUb);
                    border: 1px solid var(--itap-primary);
                    display: inline-flex;
                    margin: 0 2px;
                    width: 3rem;
                    height: 3rem;
                    align-items: center;
                    justify-content: center;
                    font-weight: normal;

                    &:hover {
                        color: var(--itap-beigeUb);
                        background-color: var(--itap-primary);
                        border-color: white;
                    }
                }
            }

            &:hover .gallery-item-buttons {
                display: block;
            }

            .gallery-item-title {
                background-color: var(--itap-masticUb);
                height: 7rem;

                h3 {
                    font-size: 1rem;
                    font-weight: bold;
                }

                span {
                    font-size: 0.8rem;
                    color: white;
                    position: absolute;
                    bottom: 1rem;
                    width: 100%;
                    left: 0;
                }
            }

            .item-details {
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background-color: white;
                transition-duration: 1000ms;
                transition: ease-in-out;
                z-index: -5;

                &.visible {
                    top: 0;
                }
            }
        }
    }

    #loadmore {
        width: 100%;
        display: none;
    }
}

#filterBox {
//max-height: 120px;
//padding-top: 0.5em;
    transition: max-height 1000ms;
    background-color: var(--itap-masticUb);

    &.hide {
        padding-top: 0;
        max-height: 0;
        transition: max-height 1000ms;
    }

    .dropdown {
        border-radius: 0.2rem;
        font-size: 0.875rem;
        min-height: calc(1.5em + 0.5rem + 2px);
        padding: 0.25rem 0.5rem;
    }
}
.filterRow {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-content: flex-start;
    align-items: flex-start;

    .filterCell {
        flex: 2 1;
        margin: 10px;
        padding: 0.25rem;
        text-align: left;

        label {
            font-weight: bold;
        }
    }

    &:last-child {
        .filterCell {
            flex: 3 1;

            &:last-child {
                flex: 1 1;
                text-align: center;
            }
        }
    }
}

.admin-page {
    .filterRow {
        &:last-child {
            .filterCell {
                flex: 2 1;

                &:last-child {
                    flex: 1 1;
                    text-align: center;
                }
            }
        }
    }
}

.drawer {
    position: fixed;
    z-index: 1500;
    width: 600px;
    height: 100vh;
    /*calc(100vh - 70px);*/
    top: 0;
    /*70px;*/
    right: 0;
    bottom: 0;
    transform: translateX(100%);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--itap-beigeUb);
    overflow-x: hidden;
    overflow-y: auto;

    /*-webkit-animation: slide-in-right 1s ease-in-out forwards;
                animation: slide-in-right 1s ease-in-out forwards;
                */
    &.open {
        transform: translateX(0);
        box-shadow: -3px -5px 12px 2px var(--itap-marronUb);
    }

    #closeDrawer {
        /*float: left;*/
        top: 1em;
        left: 0;
        position: absolute;
        background-color: var(--itap-primary);
        color: white;
        font-size: 2em;
        font-weight: bold;
        padding: 0.5em;
        margin: 0;
        line-height: 1em;
        /* width: 1em; */
        border: 1px solid black;
        border-left: 0;
    }

    .details-loader {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-weight: bold;
    }

    .details-content {
        padding: 1em;

        h2 {
            line-height: 1.5em;
            margin: 0 0 0.3em 1.2em;
            text-align: center;
        }

        .classification {
            margin: 2em 0;
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            justify-content: center;
            align-items: stretch;
            align-content: stretch;
        }

        .classification-item {
            display: block;
            flex-grow: 1;
            flex-shrink: 1;
            flex-basis: auto;
            align-self: auto;
            text-align: center;
            margin: 0 1em;
        }

        h3 {
            font-size: 1.2em;
            border-bottom: 2px solid var(--itap-primary);
            margin-top: 2em;
        }

        ul.taglist {
            margin: 0 0 1em 0;
            padding: 0;
            list-style-type: none;

            li {
                display: inline-block;
            }

            li::after {
                content: ";";
                margin: 0 0.5em;
            }

            li:last-child::after {
                content: "";
            }
        }
    }
}

.overlay {
    position: absolute;
    top: 0;
    /*70px;*/
    left: 0;
    width: 100%;
    height: 100%;
    /*calc(100vh - 70px);*/
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    background: #000;

    &.overlaymask {
        opacity: 0.3;
        visibility: visible;
    }
}

@media (max-width: 800px) {
    .drawer.open {
        width: 100vw;
        left: 0;
    }
}
