.photo-drop {
    aspect-ratio: 1 / 1;
}

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

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

    background: rgba(0, 0, 0, 0.75);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.photo-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* Background */

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
}


/* Main modal container */

.photo-modal-container {
    position: relative;
    z-index: 1;

    width: 80%;
    max-height: 80%;

    margin: 5vh 0;

    padding: 3rem;

    background: #534e46;
    border-radius: 2rem;

    overflow-y: auto;
}


/* Close button */

.photo-modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;

    width: 40px;
    height: 40px;

    border: none;
    background: transparent;

    color: #F2E5D7;
    font-size: 2.5rem;
    line-height: 1;

    cursor: pointer;

    z-index: 5;
}

.photo-modal-close:hover {
    color: #7C886D;
}


/* Header */

.photo-modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.photo-modal-date {
    margin: 0 0 0.25rem;

    color: #ABB3A0;
    font-size: 1rem;
}

.photo-modal-header h2 {
    margin: 0;

    color: #F2E5D7;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
}

.photo-modal-count {
    margin: 0.5rem 0 0;

    color: #C2B4B4;
    font-size: 1rem;
}


/* Photography grid */

.photo-modal-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 1.5rem;
}


/* Individual photos */

.photo-modal-photo {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    border-radius: 1rem;
}


/* Prevent extremely tall images from taking over */

.photo-modal-photo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.15);

    border-radius: 1rem;

    overflow: hidden;
}

@media (max-width: 768px) {

    .photo-modal-container {
        width: 100vw;
        height: 100vh;

        padding: 4rem 1.25rem 2rem;

        border-radius: 0;
    }

    .photo-modal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
 
    .photo-modal-container {
    position: relative;
    z-index: 1;

    max-width: 500px;
    max-height: 80%;

    margin: 5vh 0;

    padding: 3rem;

    background: #534e46;
    border-radius: 2rem;

    overflow-y: auto;
    }
}