.pdf-toolbar {
    min-height: 30px;
    padding: 5px 3px;
    background-color: #383532;
    width: 100%;
    display: flex;
    flex-wrap: wrap; /* Make the toolbar wrap on smaller screens */
    justify-content: center; /* Center controls on small screens */
    gap: 7px;
    position: relative;
    z-index: 10;
}

.pdf-toolbar-btn:hover {
    background-color: #ddd;
    color: black;
    cursor: pointer;
}

.pdf-toolbar-btn,
#btn-full-screen {
    background-color: #f1f1f1;
    color: black;
    display: inline-block;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    margin: 3px;
    line-height: 1;
    border: none;
}

.pdf-toolbar-title {
    color: wheat;
    font-weight: bold;
    margin-left: 10px;
    margin-right: 10px;
}

input[type="number"]#current-page {
    width: 35px;
    text-align: center;
    height: 30px;
    margin: 3px;
    border-radius: 5px;
    border: 2px solid #8593a2;
}

span#page-number, span#page-number-sep {
    color: wheat;
    margin-left: 5px;
}

select.pdf-toolbar-zoom {
    height: 30px;
    margin-left: 5px;
    width: 80px;
    text-align: center;
    border-radius: 5px;
    border: 2px solid #8593a2;
}

div#pdfviewer {
    height: 450px !important;
    width: 100%;
    
}

div#page-container {
    background-color: #cecece;
    position: relative;
    height: calc(100% - 40px); /* Adjust height to avoid overlap with toolbar */
    width: 100%;
    overflow-y: scroll;
    padding-top: 10px;
}

canvas.pdf-page {
    margin: 20px auto;
    display: block;
    max-width: 100%; /* Ensure canvas is responsive */
}
.pdfpre-mainvbox{
    width:100%;
    float:left;
    margin-bottom:12px;
    height: 100%;
    overflow: hidden;
}

@media (max-width: 576px) {
  
    .pdf-toolbar {
        padding: 10px 5px;
        gap: 5px;
    }

    .pdf-toolbar-btn,
    #btn-full-screen {
        width: 25px;
        height: 25px;
        padding: 2px;
    }

    input[type="number"]#current-page {
        width: 25px;
        height: 25px;
    }

    select.pdf-toolbar-zoom {
        width: 60px;
        height: 25px;
    }

    div#page-container {
        height: 300px; /* Reduce height on small screens */
        overflow-y: scroll;
    }
}

@media (min-width:991px){
      div#pdfviewer {
    height:600px !important;
    width: 100%;
}
}