.image-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.thumbnail-container {
    min-width: 100px;
    max-width: 120px;
    margin-bottom: 5px;
    position: relative;
    transition: transform 0.2s ease-in-out;
}

.thumbnail-container:active {
    transform: scale(0.95);
}

.thumbnail-container img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.thumbnail-date {
    font-size: 10px;
    text-align: center;
    background-color: rgba(0,0,0,0.6);
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.image-viewer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.zoomable-image {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
    transform-origin: center;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoomable-image.loaded {
    opacity: 1;
}

/* Custom modal styling for when we're not using Bootstrap's JS */
.modal.show {
    display: block;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Loading spinner for images */
.image-viewer-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    z-index: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.zoom-instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 8px;
    font-size: 14px;
    opacity: 0.8;
    pointer-events: none;
    animation: fadeOut 3s forwards;
    animation-delay: 4s;
}

@keyframes fadeOut {
    to { opacity: 0; }
}
