/* css/image-viewer.css */
.zoomable-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zoomable-image:hover {
    transform: scale(1.02);
}

.image-viewer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    overflow: hidden;
}

.image-viewer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-viewer-image {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-height: 98vh;
    max-width: 98vw;
    object-fit: contain;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    transform-origin: center;
    will-change: transform;
}

.image-viewer-image.zoomed {
    left: 50%;
    top: 50%;
    transform-origin: 50% 50%;
}

.image-viewer-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: env(safe-area-inset-bottom, 0px);
}

.image-viewer-help {
    display: none;
}

.image-viewer-zoom-controls {
    display: flex;
    gap: 8px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}


/* New unified control button style */
.control-button {
    color: white;
    font-size: 40px;
    width: 60px;
    height: 60px;
    line-height: 56px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.control-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-zoom {
    font-size: 36px;
}

.image-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.image-viewer-error {
    color: white;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

.control-button.reset-zoom {
    font-size: 36px;
    padding-top: 0px;
    line-height: 50px;
}
