/* Photo Viewer Styles */
.photo-viewer-container {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #1e1e1e;
}

.photo-viewer-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: #333;
    border-bottom: 1px solid #444;
}

.zoom-level {
    color: #fff;
    font-size: 14px;
}

.reset-button {
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.reset-button:hover {
    background-color: #555;
}

/* Update cursor for body when dragging */
body.dragging {
    cursor: grabbing !important;
}

.photo-viewer {
    position: relative;
    overflow: hidden;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab; /* Set default cursor */
    /* We want to disable scrolling but not zooming */
    touch-action: pan-x pan-y; /* Allow standard panning but we'll handle zoom */
    
    /* This will help isolate scroll events */
    overscroll-behavior: contain;
    flex-grow: 1;
}

.photo-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none; /* This prevents the image from capturing mouse events */
}

/* Add this class for HTML scrolling control */
.overflow-hidden {
    overflow: hidden !important;
}
.facephoto {
    max-width: 600px;
    max-height: 500px;
}

/* PDF Viewer Styles */
.pdf-viewer-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 60%;
    min-height: 800px;
    
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #1e1e1e;
    margin-left: auto;
}

.pdf-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: #333;
    border-bottom: 1px solid #444;
}

.pdf-navigation, .pdf-zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-nav-button, .pdf-zoom-button {
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.pdf-nav-button:hover, .pdf-zoom-button:hover {
    background-color: #555;
}

.pdf-nav-button:disabled, .pdf-zoom-button:disabled {
    background-color: #3a3a3a;
    color: #777;
    cursor: not-allowed;
}

.page-indicator, .zoom-level {
    color: #fff;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
}

.pdf-viewer-content {
    flex: 1;
    overflow: auto;
    background-color: #2a2a2a;
    position: relative;
    min-width: 50%;
}

.pdf-frame {
    border: none;
    width: 100%;
    height: 100%;
    background-color: white;
}

.pdf-viewer-status {
    padding: 8px 15px;
    background-color: #333;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 12px;
}

.nav-icon, .zoom-icon {
    font-weight: bold;
    font-size: 16px;
}

/* JSON Viewer Styles */
.json-viewer-container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 60%;
    min-height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-left: auto;
}

.json-viewer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #444;
}

.json-viewer-title {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

.json-viewer-content {
    flex: 1;
    overflow: auto;
    position: relative;
    min-width: 50%;
}

.json-frame {
    border: none;
    width: 100%;
    height: 100%;
    background-color: white;
    /* Add zoom properties to make iframe content zoomable */
    transform-origin: 0 0;
    -ms-zoom: 1;
    -moz-transform: scale(1);
    -moz-transform-origin: 0 0;
    -o-transform: scale(1);
    -o-transform-origin: 0 0;
    -webkit-transform: scale(1);
    -webkit-transform-origin: 0 0;
}

/* Apply to all iframes for consistency */
iframe {
    transform-origin: 0 0;
}