#flipbook {
    background: #f0f0f0;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transform-origin: center center;
    transition: transform 0.3s ease;
    margin-top: 50px;
    cursor: grab;
    position: relative;
    margin: 0 auto!important;
    display: none; /* Hidden initially */
}

#flipbook.dragging {
    cursor: grabbing;
}

#flipbook .page {
    width: 100%;
    height: auto;
    background-color: white;
    text-align: center;
    user-select: none;
    position: relative;
    display: flex;
    align-items: center;
	object-fit: cover;
}

#flipbook .page canvas {
	height: auto;
	width: auto;
    max-width: 100% !important; /* Make the canvas fill the entire width of its container */
    max-height: 100% !important; /* Keep the aspect ratio */
    display: block;
    margin: 0 auto;
}

#pdf_viewer .btn {
    outline: none!important;
	border-radius: 8px;
	background: none;
	font-size: 14px;
	background: #fff;
}

#pdf_viewer .btn:active{box-shadow: none!important}


#pdf_viewer .btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pdf_viewer .btn-primary{
	background: #92722a!important;
	border: 1px solid transparent;
	border-color: #92722a!important;
	color: #fff!important;
}
#pdf_viewer .btn-primary:hover{
	background: #b68a35!important;
	box-shadow: 0 0 0 6px #f2eccf;
	border-color: #b68a35!important;
}
#pdf_viewer .btn-outline-primary{
	color: #92722a;
	border-width: 1px;
	border-style: solid;
	border-color: #92722a;
}

#pdf_viewer .btn-outline-primary:hover{
	background: #f9f7ed;
}



#pdf_viewer .btn-icon{ font-size: 14px}



#exit-fullscreen {
    display: none;
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
}

.modal-dialog.modal-fluid {
    width: 100%;
    height: 100%;
    background: none;
    margin: 0;
}

.modal-dialog.modal-fluid .modal-content {
    background: none;
    box-shadow: none;
    border: none;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--bs-modal-color);
    pointer-events: auto;
}

.modal-dialog.modal-fluid .modal-header {
    border: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
	background:none;
	color: #fff;
	text-align: left;
	height: 0;
	padding: 0;
}


.modal-dialog.modal-fluid button.close {
    position: absolute;
    z-index: 99999;
    text-shadow: none;
    color: #000;
    opacity: 1;
    font-size: 36px;
    right: 2rem;
    top: 2rem;
    line-height: 100%;
    border-radius: 50%;
}
.modal-dialog.modal-fluid .modal-footer {
    border: none;
    position: absolute;
    z-index: 999;
    background: rgba(255,255,255,1.0);
    justify-content: center;
    display: flex;
    bottom: 0;
    padding:5px 15px;
    box-shadow: 0 0 10px rgb(0 0 0 / 15%);
    width: 100%;
}

.modal-dialog.modal-fluid .modal-body {
    position: relative;
    padding: 20px;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    overflow: hidden;
    max-height: 100%;
    padding: 0;
    margin-top: -20px;
}

#flipbook .page:after {
    content: ".";
    position: absolute;
    left: 0;
    background: none;
    right: auto;
    width: 1px;
    box-shadow: 6px 0px 14px rgb(0 0 0 / 60%);
    background: #d8d8d8;
    color: #d8d8d8;
	top: 0; 
	height: 100%;
}

#flipbook .page.even:after {
    left: auto;
    right: -1px;
    box-shadow: -4px 0 14px rgb(0 0 0 / 60%);
    background: #d8d8d8;
    color: #d8d8d8;
}

/* Spinner Styles */
#loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid #ccc;
    border-top: 8px solid #253b81;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    display: block; /* Show spinner initially */
}

.pdf-change{ position: relative;}
.pdf-change span {
    position: absolute;
    bottom: calc(100% + 10px);
    background: #000;
    width: 200px;
    left: 50%;
    margin-left: -100px;
    padding: 10px 15px;
    font-size: 15px;
    color: #fff;
    border-radius: 4px;
    display: none;
	font-size: 16px;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.pdf-change span:empty, .current-pdf:empty{ display: none!important;}
.pdf-change:hover span{display: block;}

.total-pdf {
    display: inline-flex;
    align-items: center;
    align-self: center;
    padding: 6px 15px;
	font-weight: 600;
	color: #333;
}

button#prev-page {
    position: fixed;
    left: 0;
    top: 50%;
    margin-top: -20px;
    margin-left: 0;
    left: 1rem;
    width: 40px;
    height: 40px;
}

button#next-page {
    position: fixed;
    right: 1rem;
    top: 50%;
    margin-top: -20px;
    width: 40px;
    height: 40px;
    left: auto !important;
}

#controls [disabled]{pointer-events: none;}
.current-pdf {
    font-size: 13px;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-dialog.modal-fluid {
    top: 0;
}
div#pdf_viewer {
    z-index: 999999;
}
a.open-pdf {
    background: var(--tan);
    border: 1px solid var(--tan);
    border-radius: 4px !important;
    min-width: 32px !important;
    display: inline-flex;
    justify-content: center;
    line-height: 1.72em;
    text-align: center;
    cursor: pointer;
    color: #333;
    height: 29px;
    font-size: 1rem;
    align-items: center;
    position: relative;
    top: -4px;
}

a.open-pdf i {
    color: #333;
}
span#page-number {
    width: auto;
    font-size: 13px;
    color: #fff !important;
    box-shadow: none;
    pointer-events: none;
    text-shadow: none!important;
	margin-left: 5px;
}


#pdf_viewer .modal-title{pointer-events: none; display: inline-block;background: rgba(146, 114, 42, 0.7);padding: 5px 10px; border-radius: 0 0 10px 0}

/*div#controls {
    display: flex;
    position: fixed;
    bottom: 10px;
    width: 600px;
    justify-content: center;
    left: 50%;
    margin-left: -300px;
}*/
#pdf_viewer .btn-icon i {
    font-size: 16px;
    line-height: 100%;
}
html[lang="ar"] body a.open-pdf {
    top: -3.5px;
}

a.open-pdf:hover {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

a.open-pdf:hover i {
    color: #fff;
}
.col1 a.open-pdf:hover {
    background: var(--theme-red);
}

.col3 a.open-pdf:hover {
    background: var(--theme-grey);
}

.col4 a.open-pdf {
    background:#000;
    border-color: #fff!important;
}


.col4 a.open-pdf:hover {
    background: #333;
}