.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-body {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.modal-image-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    margin: 0 auto;
    padding: 40px;
    background-color: white;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-image-wrapper img {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
}

.modal-tags {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 10px;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

.tag-link {
    margin-bottom: 5px;
    margin-left: 5px;
    color: #007bff;
    text-decoration: none;
    font-size: small;
}

.tag-link:hover {
    text-decoration: underline;
}

.nav-left, .nav-right {
    position: absolute;
    top: 50%;
    z-index: 1000;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
    transition: opacity 0.5s ease;
}

.nav-left {
    left: 10px;
}

.nav-right {
    right: 10px;
}

.chevron-left, .chevron-right {
    font-size: 2rem;
}

/* hide chevrons by default for displays with hover (mouse) capabilities */
@media (hover: hover) and (pointer: fine) {
  .nav-left, .nav-right {
      opacity: 0;
  }
  .modal-body:hover .nav-left, .modal-body:hover .nav-right {
      opacity: 1;
  }
}
/* always on for mobile devices */
@media (hover: none) {
  .nav-left, .nav-right {
      opacity: 1;
  }
}
