/* =========================
   GALLERY SECTION
   ========================= */
section.gallery {
    z-index: 100000;
    padding: 1rem 0 3rem;
}

/* =========================
   GALLERY FILTER
   ========================= */
.gallery-filter-container {
    padding: 0 2rem 2rem;
    display: flex;
    justify-content: flex-end;
}

/* nsfw slider */
.nsfw-filter {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.25rem;
}

.nsfw-filter h3 {
    font-size: 1.1rem;
    color: var(--red);

    text-shadow: 0 0 1rem var(--red);
}

.nsfw-button {
    position: relative;
    width: 3.5rem;
    height: 2rem;
}

.nsfw-button input {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.nsfw-button .knobs {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.nsfw-button .layer {
    position: absolute;
    inset: 0;
    width: 100%;
    border-radius: 2rem;

    backdrop-filter: blur(10px);
    border: 2px solid var(--red);
    box-shadow: 0 0 10px var(--red);

    transition: 0.3s ease all;
    z-index: 1;
}

/* .nsfw-button .knobs:before,
.nsfw-button .knobs:after {
    position: absolute;
    display: flex;
    align-items: center;
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
    font-weight: bold;

    color: var(--text);
    z-index: 1;
}

.nsfw-button .knobs:before {
    justify-content: flex-start;
    content: "NSFW";
    left: 0.5rem;
}

.nsfw-button .knobs::after {
    justify-content: flex-end;
    content: "SAFE";
    right: 0.5rem;
} */

.nsfw-button .knobs span {
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 1rem;
    width: 28px;
    height: 24px;
    top: 4px;
    left: 4px;

    background-color: var(--white);

    transition: 0.3s ease all;
    z-index: 2;
}

.nsfw-button input:checked+.knobs span {
    left: 24px;
}

.nsfw-button input:checked~.layer {
    background-color: var(--red);
}

/* =========================
   IMAGE GALLERY
   ========================= */
/* Gallery container */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

/* Image card */
.image-card {
    width: 18rem;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    /* user-select: none; */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
}

/* Image card ~ image */
.image-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* .image-card img.nsfw {
    filter: blur(5px);
} */
img.nsfw {
    filter: blur(5px);
}

/* Image card ~ info */
.image-card .info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
}

.image-card .info span {
    border-radius: 0.5rem;
    padding: 0.15rem;
}

.image-card .info .nsfw-tag[data-nsfw="true"] {
    background-color: var(--red-dark);
}

.image-card .info .nsfw-tag[data-nsfw="false"] {
    background-color: var(--green-dark);
}

/* =========================
   MODAL
   ========================= */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;

    backdrop-filter: blur(10px);
    background: hsla(0, 0%, 0%, 0.6);

    transition: opacity 0.3s;
    pointer-events: auto;
    opacity: 1;
}

.modal-container {
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 60%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hide modal */
.modal.hidden {
    pointer-events: none;
    opacity: 0;
}

/* Close modal button */
.close-modal-button {
    display: flex;
    justify-content: flex-end;
}

.close-modal-button input {
    display: none;
}

.close-modal-button label {
    cursor: pointer;
    font-size: 2.5rem;
}

/* =========================
   MODAL CONTAINER RESPONSIVE
   ========================= */
@media (max-width: 1400px) {

    .modal-container {
        max-width: 70%;
    }
}

@media (max-width: 1200px) {

    .modal-container {
        max-width: 80%;
    }
}

@media (max-width: 1044px) {

    .modal-container {
        max-width: 90%;
    }
}

/* =========================
   ITEM INFO MODAL
   ========================= */
#item-info-modal .modal-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 4rem);
}

#item-info-modal .modal-item {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0 1rem;
    flex: 1;
    overflow: hidden;
}

#item-info-modal .modal-image {
    flex: 1;
    display: flex;
    align-items: flex-start;

    position: relative;
    overflow: hidden;
}

#item-info-modal .modal-image .image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#item-info-modal .modal-image .image.active {
    opacity: 1;
}

#item-info-modal .modal-item .modal-image img {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#item-info-modal .modal-item .modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    text-align: left;
    padding-left: 2rem;
}

#item-info-modal .modal-item .modal-info .modal-title {
    font-size: 2.5rem;
    font-weight: 900;
}

#item-info-modal .modal-item .modal-info .modal-description {
    padding-bottom: 1rem;
}

#item-info-modal .modal-image-slider {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
}

#item-info-modal .modal-image-slider .slider-track {
    flex: 1;
    overflow: hidden;
}

#item-info-modal .modal-image-slider .slider-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: transform 0.3s ease;
}

#item-info-modal .modal-image-slider .slider-item {
    flex: 0 0 100px;
    aspect-ratio: 1 / 1;
}

#item-info-modal .modal-image-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

#item-info-modal .slider-button {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0);
    color: white;
    border: none;
    cursor: pointer;
}

@media (max-width: 992px) {
    #item-info-modal .modal-image-slider {
        display: none;
    }

    #item-info-modal .modal-item {
        flex-direction: column;
        gap: 1rem;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    #item-info-modal .modal-item .modal-info{
        align-items: center;
            padding-left: 0;
    }

    #item-info-modal .modal-item::-webkit-scrollbar {
        display: none;
    }

    #item-info-modal .modal-item .modal-image {
        flex: 2;
        aspect-ratio: 1 / 1;
    }
}

/* =========================
   NSFW WARNING MODAL
   ========================= */

#nsfw-warning-modal .modal-container {
    border: 2.5px solid var(--red);
    box-shadow: 0 0 15px var(--red);

    justify-content: flex-start;
    height: 35%;
}

#nsfw-warning-modal .close-modal-button label {
    color: var(--red);
}

#nsfw-warning-modal .modal-body {
    margin-top: -1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#nsfw-warning-modal .modal-title {
    color: var(--red);
    text-shadow: 0 0 2rem var(--red);
}

#nsfw-warning-modal .modal-actions {
    padding-top: .5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#nsfw-warning-modal .btn {
    border: 2px solid var(--red);
    color: var(--red);

    box-shadow: 0 0 15px var(--red);
}

#nsfw-warning-modal .btn:hover {
    color: var(--white);
    background: var(--red);

    box-shadow: 0 0 30px var(--red);
}