/*
    --------------------------------
    VIEWER
    --------------------------------
*/

.viewer-page {

    width: 100vw;
    height: 100vh;

    background: #111;

    overflow: hidden;

}


#viewer {

    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

}


/*
    Top toolbar
*/

.viewer-topbar {

    position: fixed;

    z-index: 1000;

    top: 0;
    left: 0;
    right: 0;

    min-height: 70px;

    padding:
        10px 15px;

    display: flex;

    align-items: center;

    gap: 18px;

    color: white;

    background:
        rgba(0, 0, 0, 0.72);

    backdrop-filter:
        blur(5px);

}


/*
    Title area
*/

.viewer-title-container {

    flex: 1;

    min-width: 0;

}


.viewer-title {

    font-size: 18px;

    font-weight: bold;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.viewer-description {

    margin-top: 3px;

    font-size: 13px;

    opacity: 0.75;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


/*
    Right-side viewer controls
*/

.viewer-controls {

    display: flex;

    align-items: center;

    gap: 6px;

    flex-shrink: 0;

}


/*
    Generic toolbar button
*/

.viewer-button {

    border: none;

    border-radius: 4px;

    padding:
        9px 12px;

    min-width: 38px;

    background:
        rgba(255, 255, 255, 0.15);

    color: white;

    text-decoration: none;

    font-size: 14px;

    font-family: inherit;

    cursor: pointer;

    text-align: center;

}


.viewer-button:hover {

    background:
        rgba(255, 255, 255, 0.28);

}


/*
    Previous / next
*/

.nav-button {

    position: fixed;

    z-index: 900;

    top: 50%;

    transform:
        translateY(-50%);

    width: 55px;
    height: 80px;

    border: none;

    background:
        rgba(0, 0, 0, 0.4);

    color: white;

    font-size: 48px;

    font-weight: 200;

    cursor: pointer;

    opacity: 0.7;

}


.nav-button:hover {

    opacity: 1;

    background:
        rgba(0, 0, 0, 0.7);

}


.nav-previous {

    left: 0;

    border-radius:
        0 5px 5px 0;

}


.nav-next {

    right: 0;

    border-radius:
        5px 0 0 5px;

}


/*
    Image counter
*/

.image-counter {

    position: fixed;

    z-index: 1000;

    left: 50%;

    bottom: 18px;

    transform:
        translateX(-50%);

    padding:
        7px 12px;

    border-radius: 4px;

    background:
        rgba(0, 0, 0, 0.65);

    color: white;

    font-size: 13px;

}


/*
    OpenSeadragon navigator

    Give it some distance from the image
    counter and screen edges.
*/

.openseadragon-container
.navigator {

    margin:
        0 10px 10px 0;

}


/*
    Small screens
*/

@media (max-width: 800px) {

    .viewer-topbar {

        gap: 8px;

        padding:
            8px;

    }


    .viewer-description {

        display: none;

    }


    .viewer-controls {

        gap: 3px;

    }


    .viewer-button {

        padding:
            8px 9px;

        font-size:
            13px;

    }


    .nav-button {

        width: 42px;

        height: 65px;

        font-size: 38px;

    }

}


/*
    Very small phones
*/

@media (max-width: 560px) {

    /*
        Hide less important controls.
        Mouse/touch gestures still work.
    */

    #zoom-in-button,
    #zoom-out-button,
    #rotate-button {

        display: none;

    }


    .viewer-title {

        font-size: 15px;

    }


    .viewer-topbar {

        min-height: 56px;

    }

}