/**
 * E-Paper Viewer Stylesheet
 * 100% Responsive for Mobile, Tablet, and Desktop
 */

.epaper-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Thumbnail Strip (Bottom or Top) */
.epaper-thumbnails {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #eeeeee;
    scrollbar-width: thin;
}

.epaper-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.epaper-thumbnails::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.thumb-item {
    min-width: 100px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.thumb-item img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #dddddd;
}

.thumb-item.active {
    border: 2px solid #0d47a1;
}

.thumb-item span {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    font-weight: bold;
}

/* Main Viewer Area */
.epaper-main-viewer {
    position: relative;
    width: 100%;
    height: 80vh; /* Responsive height */
    overflow: hidden;
    background: #e9ecef;
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
}

.epaper-main-viewer:active {
    cursor: grabbing;
}

#main-paper-image {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.1s ease-out;
    transform-origin: center center;
    object-fit: contain;
}

/* Viewer Controls (Zoom in/out buttons) */
.viewer-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.9);
    padding: 10px;
    border-radius: 30px;
    border: 1px solid #cccccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.control-btn {
    background: #0d47a1;
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #002171;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .epaper-main-viewer {
        height: 60vh;
    }
    .thumb-item {
        min-width: 80px;
    }
    .viewer-controls {
        bottom: 10px;
        right: 10px;
    }
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}