#images-grid {
    display: grid;
    grid-gap: 0.5rem;
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
    padding-bottom: 5.5rem; /* so pagination doesnt cut off bottom image */
}

@media screen and (min-width: 420px) {
    #images-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.image-item {
    width: 100%;
    position: relative;
    align-content: center;
    background-color: var(--background-tertiary-color);
    border-radius: 0.5rem;
}

.image-item img {
    width: 100%;
    border-radius: 0.5rem;
}

.image-item span {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: var(--background-secondary-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.pagination-container {
    width: 100%;
    height: 6rem;
    box-sizing: border-box;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

.pagination-controls {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    background-color: var(--background-secondary-color);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-direction: row;
    box-shadow: 0px 0px 10px 1px var(--background-primary-color);
}

.pagination-button {
    height: 3rem;
    width: 3rem;
    background-color: var(--background-tertiary-color);
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary-color);
    text-decoration: none;
    font-size: 1.5rem;
}

#page-input {
    border: none;
    text-align: center;
    width: 4rem;
}

#subfolders-list {
    width: 100%;
    gap: 0.5rem;
    display: flex;
    flex-direction: row;
    overflow-y: auto;
    white-space: nowrap;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.subfolder-link::before {
    content: '📁';
    padding-right: 0.5ch;
}

.subfolder-link {
    flex: 0 0 auto;
    color: var(--text-primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem;
    background-color: var(--background-secondary-color);
    margin: 0.5rem 0;
    border-radius: 0.5rem;
}

#scroll-buttons {
    margin-bottom: 5.5rem !important;
    /* to account for pagination */
}
