#modal-popup {
    display: none; 
}

.modalPopup {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.modalPopup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    /* width: 90vw; */
    max-width: 90%;
    max-height: 100vh;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    /* không cho scroll bên trong popup */
}

.modalPopup-content img {
    max-height: 65vh;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.modalPopup-content img.fade-out {
    opacity: 0;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.image-wrapper img {
    display: block;
    max-height: 80vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0C794D;
    border-color: #0C794D;
    color: #FFF;
    border: none;
    font-size: 3rem;
    padding: .10rem 1.2rem;
    cursor: pointer;
     border-radius: .2rem;
    z-index: 1;
    user-select: none;
}
.nav-prev {
    left: 0px;
}
.nav-next {
    right: 0px;
}
.nav-btn:hover {
    background-color: #047548;
    border-color: #047548;
}
.btn-close {
  position: absolute;
  top:5px;
  right:5px;
  width:25px;
  height:25px;
  border: none;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  font-size:18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.btn-close:hover {
  background-color: #333;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.download-group {
    position: relative;
    display: inline-block;
    margin-top: 15px;
}

.dropdown-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: -5px;
    z-index: 10;
    border-radius: 5px;
    background: transparent;
    padding-bottom: 6px;
}
.dropdown-content a {
    font-size: 1.6rem;
    color: #222;
    padding: 5px 0 5px 10px;
    width: 130px;
    text-decoration: none;
    display: block;
    background-color: #ddd;
    margin: 1px 0;
    text-align: left;
    border-radius: 5px;
}
#downloadJPG{
    color: #FFF;
    background-color: #0d6efd;
    border-color: #0d6efd;
}
#downloadJPG:hover{
    background-color: #0461ec;
    border-color: #0461ec;
}
#downloadWEBP{
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}
#downloadWEBP:hover{
    background-color: #04b3d6;
    border-color: #04b3d6;
}
#downloadPDF{
    background-color: #ffc107;
    border-color: #ffc107;
}
#downloadPDF:hover{
    background-color: #e8b007;
    border-color: #e8b007;
}
/* .dropdown-content a:hover {
    background-color: #ddd;
} */
/* .download-group:hover .dropdown-content,
.download-group:focus-within .dropdown-content {
display: block;
} */
.download-group:hover .dropdown-content, .download-group:focus-within .dropdown-content {
    display: block;
}
.download-group button {
    background-color: #0C794D;
    color: #FFF;
    text-align: left;
    padding: 5px 10px 5px 10px;
    /* width: 130px; */
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.6rem;
}
.download-group button:hover {
    background-color: #024e2f;   
}
.print-btn {
    background-color: #ffc107;
    margin-left: .5rem;
    padding: 5px 15px 5px 10px;
    text-align: left;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.6rem;
}
.print-btn:hover {
    background-color: #e8b007;
}
.thumbnail-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 12px;
    scrollbar-width: thin;
}

.thumbnail-bar a {
    flex-shrink: 0;
}

.thumbnail-bar a img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border 0.3s;
    cursor: pointer;
}

.thumbnail-bar a img.active {
    border-color: #0C794D;
}

.image-counter {
    padding: 4px 8px;
    font-size: 14px;
    font-weight: bold;
}
@media (max-width: 768px) {
    .nav-btn {
        font-size: 2rem;
        padding: .10rem .6rem;
    }
    .download-group button{
        font-size: 1.2rem;
        padding: 2px 10px;
    }
    .print-btn {
        font-size: 1.2rem;
         padding: 2px 10px;
    }
    .dropdown-content a {
        font-size: 1.3rem;
         width: 130px;
    }
}