.modal {
    display: none; /* Hidden by default */
    margin: auto;
    position: fixed; /* Stay in place */
    z-index: 20; /* Sit on top */
    left: 0;
    top: 0;
    width: 100vw; /* Full width */
    height: 100vh; /* Full height */
    color: var(--text-light);
    font-size: 1rem;
    align-items: center;
    justify-items: center;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0);
    background-color: rgba(31, 30, 30, 0.95);
    
    .modalWrapper {
        background-color: #dae5d6;
        display: grid;
        min-height: auto;
        max-height: 100vh;
        min-width: 40%;
        max-width: 1000px;
        div:has(> .close) { grid-area: close; }
        .modalContent { grid-area: image; }
        #caption { grid-area: caption; }
        .details { grid-area: details; }
        hr {grid-area: divider; }
        margin: auto;
        padding: 0px 10px 10px 10px;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 30px minmax(0, 4fr) 1rem minmax(0, 1.25fr);
        grid-template-areas:
            ". close"
            "image image"
            "divider divider"
            "caption details";
            };
    }


.modalContent {
  display: flex;
  max-height: 100%;
  max-width: 100%;
  justify-content: center;
  justify-self: center;
  align-self: center;
  min-height: 0;
  object-fit: contain;
    cursor: zoom-in;
  }

#caption {
    text-align: justify;
    background-color: #bccfc0;
    overflow: auto;
    padding: 20px;
    color: black;
}

.details {
    display: grid;
    grid-template-columns: 20px 1fr;
    background-color: #bccfc0;
    margin-left: 10px;
    padding: 10px;
    color: var(--dark-accent);
    overflow: auto;
}

div:has(>.close) {
    display: flex;
    align-items: center;
    justify-content: end;
    position: relative;
}
.close {
    position: absolute;
    color: var(--dark-accent);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    padding-right: 5px;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.modalAndIcon {
    display: flex;
    align-items: center;
    i {
        padding-right: 0.5rem;
    }
}

