body {
    overflow-y: scroll;
    overflow-x: hidden;
}

.galleries {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding-top: 0px !important;
    margin-bottom: 50px;
    margin-top: -20px;
    overflow: hidden;
}

.gallery {
    width: 100%;
}

.images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 20px;
    background-color: rgb(250, 250, 250);
}

.images a {
    position: relative;
    display: inline-block;
    margin: 2px;
    transition: 0.3s all;
}

.images a:hover .img-caption {
    transform: translateY(0);
}

.images a img {
    border-radius: 8px;
    max-width: 100%;
    transform: scale(1);
}

.title {
    width: fit-content;
    background: #e86f00;
    padding: 5px 35px 25px 35px;
    border-radius: 20px 20px 0px 0px;
    position: relative;
    top: 20px;
}

.title h2 {
    color: #ffffff;
    text-transform: uppercase;
    font-size: clamp(16px, 3vw, 20px);
}

.loader-overlay {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    height: calc(100dvh - 90px);
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.app {
    width: calc(100% - var(--sidebar-width));
    height: calc(100dvh - 75px);
    top: 75px;
    left: var(--sidebar-width);
    z-index: 10;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ccc;
    border-top-color: #222;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/*App*/
h2.no-style {
    font-weight: bold;
    margin: 0;
}

.galleries.app {
    padding-top: 0px !important;
    margin-top: -20px;
    gap: 4px;
}

input[type="submit"].rename-submit {
    background-color: transparent !important;
    border-radius: 0;
}
input[type="submit"].rename-submit:hover {
    background: transparent !important;
    transform: none;
}
input.rename-name {
    width: 100%;
    border-radius: 5px;
    border: none;
    padding: 2px 8px;
    min-width: 50px;
    font-size: 16px;
}

.title.app {
    padding: 5px 15px 25px 15px;
    max-width: 100%;
    width: 100%;
    display: flex;
    gap: 5px;
    align-items: center;
    z-index: 1;
}
.title.app form {
    width: 100%;
}

.handle.gall {
    position: static;
}
.handle.img {
    top: 5px;
    left: 5px;
    z-index: 10;
}
.handle svg {
    color: white;
}
.handle:hover {
    background-color: #21212175;
}

.rename-flex {
    display: flex;
    gap: 5px;
}

.image-item {
    position: relative;
    height: 175px;
}

.img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: white;
    padding: 15px;
    font-weight: 600;
    transform: translateY(100%);
    transition: 0.3s;
}

.image-item img {
    border-radius: 10px;
    height: 100%;
    max-width: 100%;
    user-select: none;
}
@media (max-width: 500px) {
    .image-item {
        height: auto;
    }

    .image-item img {
        width: 100%;
        height: auto;
        object-fit: cover;
        min-height: 80px;
    }
}
.image-item a {
    position: absolute;
    top: 5px;
    right: 5px;
    color: rgb(255, 255, 255);
    padding: 5px 6px;
    line-height: 1;
    background-color: rgba(255, 0, 0, 0.747) !important;
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s all;
    user-select: none;
}
.image-item a::after {
    display: none;
}
.image-item a:hover {
    transform: scale(1.075);
    background-color: rgba(255, 0, 0, 0.808) !important
}

.image-item .title-input {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 0px 0px 10px 10px;
}

.title-edit {
    width: 100%;
    padding: 3px;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    padding: 2px 8px;
}

.gallery-bellow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
.gallery-bellow p {
    font-size: 14px;
    color: rgb(125, 125, 125);
    font-style: italic;
}
.gallery-actions {
    display: flex;
    justify-content: end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.gallery-actions a {
    background-color: rgb(210, 0, 0);
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    transition: 0.3s all;
}

.gallery-actions a:hover {
    transform: translateY(-2px);
}

.gallery-actions a:first-of-type {
    background-color: #e86f00;
}

.gallery.inactive .images {
    filter: grayscale(100%);
    background-color: rgb(235, 235, 235);
    transition: filter 0.3s, opacity 0.3s;
}
.gallery.inactive .title {
    background-color: #a0a0a0;
}
.images.app {
    padding: 10px;
    position: relative;
    z-index: 2;
}
.add-images {
    width: 175px;
    background-color: #e9c455;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    height: 175px;
}
.add-images p {
    font-size: 18px;
}
.hidden {
    display: none;
}

body.loading {
    overflow-x: hidden;
}