@import '../index.css';

div[id="gallery"] {
    width: 100%;
}
.grid-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    place-items: center;
    grid-gap: .4rem;
    padding-top: .5rem;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}


.grid-gallery > img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--rounded-md);
    cursor: pointer;
}

.gallery-modal {
    margin: auto;
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    text-align: center;
}

.gallery-modal-content {
    margin: auto;
    display: block;
    width: 70%;
    max-width: 800px;
    max-height: 90%;
    object-fit: contain;
}

.gallery-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: rgba(255, 255, 255, .5);
    font-size: 2.5rem;
    font-weight: bold;
    transition: 300ms;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}
.gallery-close:hover, .gallery-close:focus {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    cursor: pointer;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 4rem;
    color: rgba(255, 255, 255, .5);
    font-size: 2rem;
    font-weight: bold;
    transition: 300ms ease;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.next {
    right: 0;
}
  
.prev {
    left: 0;
}

.prev:hover, .next:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 45rem) {
    .gallery-modal-content {
      width: 80%;
    }
    .prev, .next {
        padding: 0.8rem;
    }
}

@media (min-width: 35em) {
    .grid-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 45em) {
    .grid-container {
        text-align: left;
        column-gap: var(--container-gap, 2rem);
        grid-template-columns: minmax(2rem, 1fr) repeat(2, minmax(0, 30rem)) minmax(2rem, 1fr);
    }
    
    .grid-container > *:first-child {
        grid-column: 2;
        outline: 1px solid red;
    }

    .grid-container > *:last-child {
        grid-column: 3;
        outline: 1px solid yellow;
    }

    .grid-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
}