* { padding: 0; margin: 0; }
html { height: 100%; font-size: 10px; }
body { height: 100%; background-color: #222; }
body, input, button, select { font: message-box; outline: none; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* ===== طبقة النص ===== */
.textLayer {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0.2;
}
.textLayer > div {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  -webkit-transform-origin: 0% 0%;
  -moz-transform-origin: 0% 0%;
  -o-transform-origin: 0% 0%;
  -ms-transform-origin: 0% 0%;
  transform-origin: 0% 0%;
}
.textLayer .endOfContent {
  display: block;
  position: absolute;
  left: 0px;
  top: 100%;
  right: 0px;
  bottom: 0px;
  z-index: -1;
  cursor: default;
  -webkit-user-select: none;
  -ms-user-select: none;
  -moz-user-select: none;
}
.textLayer .endOfContent.active { top: 0px; }

/* ===== صفحات PDF ===== */
.pdfViewer .canvasWrapper { overflow: hidden; }
.pdfViewer .page {
  direction: ltr;
  width: 816px;
  height: 1056px;
  margin: 0px auto -8px auto;
  position: relative;
  overflow: visible;
  border: 9px solid transparent;
  background-clip: content-box;
  border-image: url(images/shadow.png) 9 9 repeat;
  background-color: white;
}
.pdfViewer .page canvas { margin: 0; display: block; }
.pdfViewer .page .loadingIcon {
  position: absolute;
  display: block;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: url('images/loading-icon.gif') center no-repeat;
}

/* ===== الحاويات الرئيسية ===== */
#outerContainer { width: 100%; height: 100%; position: relative; }
#mainContainer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  min-width: 320px;
  -webkit-transition-duration: 200ms;
  -webkit-transition-timing-function: ease;
  transition-duration: 200ms;
  transition-timing-function: ease;
}
#viewerContainer {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  position: absolute;
  top: 32px;
  right: 0;
  bottom: 0;
  left: 0;
  outline: none;
}
html[dir='ltr'] #viewerContainer { box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05); }
html[dir='rtl'] #viewerContainer { box-shadow: inset -1px 0 0 hsla(0,0%,100%,.05); }

/* ===== الشريط العلوي ===== */
.toolbar { position: relative; left: 0; right: 0; z-index: 9999; cursor: default; }
#toolbarContainer { width: 100%; }
#toolbarContainer {
  position: relative;
  height: 32px;
  background-color: #015836; /* اللون الأخضر الغامق الأساسي */
  background-image: none; /* إزالة الصورة النمطية القديمة */
}
html[dir='ltr'] #toolbarContainer {
  box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08),
              inset 0 1px 1px hsla(0,0%,0%,.15),
              inset 0 -1px 0 hsla(0,0%,100%,.05),
              0 1px 0 hsla(0,0%,0%,.15),
              0 1px 1px hsla(0,0%,0%,.1);
}
html[dir='rtl'] #toolbarContainer {
  box-shadow: inset -1px 0 0 hsla(0,0%,100%,.08),
              inset 0 1px 1px hsla(0,0%,0%,.15),
              inset 0 -1px 0 hsla(0,0%,100%,.05),
              0 1px 0 hsla(0,0%,0%,.15),
              0 1px 1px hsla(0,0%,0%,.1);
}
#toolbarViewer { height: 32px; }

/* ===== شريط التحميل ===== */
#loadingBar {
  position: relative;
  width: 100%;
  height: 4px;
  background-color: #333;
  border-bottom: 1px solid #333;
}
#loadingBar .progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background-color: #047021; /* لون أخضر فاتح للتقدم */
  overflow: hidden;
  -webkit-transition: width 200ms;
  transition: width 200ms;
}

/* ===== أزرار الأدوات ===== */
.toolbarButton,
.secondaryToolbarButton,
.overlayButton {
  border: 0 none;
  background: none;
  width: 32px;
  height: 25px;
}
.toolbarButton > span {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
}
.toolbarButton[disabled],
.secondaryToolbarButton[disabled],
.overlayButton[disabled] { opacity: .5; }
.toolbarButton.group { margin-right: 0; }

.splitToolbarButton.toggled .toolbarButton { margin: 0; }
.splitToolbarButton:hover > .toolbarButton,
.splitToolbarButton:focus > .toolbarButton,
.splitToolbarButton.toggled > .toolbarButton,
.toolbarButton.textButton {
  background-color: hsla(0,0%,0%,.12);
  background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
  background-clip: padding-box;
  border: 1px solid hsla(0,0%,0%,.35);
  border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
  box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
              0 0 1px hsla(0,0%,100%,.15) inset,
              0 1px 0 hsla(0,0%,100%,.05);
  -webkit-transition-property: background-color, border-color, box-shadow;
  -webkit-transition-duration: 150ms;
  -webkit-transition-timing-function: ease;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease;
}
.splitToolbarButton > .toolbarButton:hover,
.splitToolbarButton > .toolbarButton:focus,
.dropdownToolbarButton:hover,
.overlayButton:hover,
.overlayButton:focus,
.toolbarButton.textButton:hover,
.toolbarButton.textButton:focus {
  background-color: hsla(0,0%,0%,.2);
  box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
              0 0 1px hsla(0,0%,100%,.15) inset,
              0 0 1px hsla(0,0%,0%,.05);
  z-index: 199;
}
.splitToolbarButton > .toolbarButton { position: relative; }
html[dir='ltr'] .splitToolbarButton > .toolbarButton:first-child,
html[dir='rtl'] .splitToolbarButton > .toolbarButton:last-child {
  position: relative;
  margin: 0;
  margin-right: -1px;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  border-right-color: transparent;
}
html[dir='ltr'] .splitToolbarButton > .toolbarButton:last-child,
html[dir='rtl'] .splitToolbarButton > .toolbarButton:first-child {
  position: relative;
  margin: 0;
  margin-left: -1px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  border-left-color: transparent;
}
.splitToolbarButtonSeparator {
  padding: 8px 0;
  width: 1px;
  background-color: hsla(0,0%,0%,.5);
  z-index: 99;
  box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
  display: inline-block;
  margin: 5px 0;
}
html[dir='ltr'] .splitToolbarButtonSeparator { float: left; }
html[dir='rtl'] .splitToolbarButtonSeparator { float: right; }
.splitToolbarButton:hover > .splitToolbarButtonSeparator,
.splitToolbarButton.toggled > .splitToolbarButtonSeparator {
  padding: 12px 0;
  margin: 1px 0;
  box-shadow: 0 0 0 1px hsla(0,0%,100%,.03);
  -webkit-transition-property: padding;
  -webkit-transition-duration: 10ms;
  -webkit-transition-timing-function: ease;
  transition-property: padding;
  transition-duration: 10ms;
  transition-timing-function: ease;
}

.toolbarButton,
.dropdownToolbarButton,
.secondaryToolbarButton,
.overlayButton {
  min-width: 16px;
  padding: 2px 6px 0;
  border: 1px solid transparent;
  border-radius: 2px;
  color: hsla(0,0%,100%,.8);
  font-size: 12px;
  line-height: 14px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: default;
  -webkit-transition-property: background-color, border-color, box-shadow;
  -webkit-transition-duration: 150ms;
  -webkit-transition-timing-function: ease;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease;
}

html[dir='ltr'] .splitToolbarButton { margin: 3px 2px 4px 0; display: inline-block; }
html[dir='rtl'] .splitToolbarButton { margin: 3px 0 4px 2px; display: inline-block; }
html[dir='ltr'] .splitToolbarButton > .toolbarButton { border-radius: 0; float: left; }
html[dir='rtl'] .splitToolbarButton > .toolbarButton { border-radius: 0; float: right; }

html[dir='ltr'] .toolbarButton,
html[dir='ltr'] .overlayButton,
html[dir='ltr'] .dropdownToolbarButton { margin: 3px 2px 4px 0; }
html[dir='rtl'] .toolbarButton,
html[dir='rtl'] .overlayButton,
html[dir='rtl'] .dropdownToolbarButton { margin: 3px 0 4px 2px; }

.toolbarButton:hover,
.toolbarButton:focus,
.dropdownToolbarButton,
.overlayButton,
.secondaryToolbarButton:hover,
.secondaryToolbarButton:focus {
  background-color: hsla(0,0%,0%,.12);
  background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
  background-clip: padding-box;
  border: 1px solid hsla(0,0%,0%,.35);
  border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
  box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
              0 0 1px hsla(0,0%,100%,.15) inset,
              0 1px 0 hsla(0,0%,100%,.05);
}

.toolbarButton:hover:active,
.overlayButton:hover:active,
.dropdownToolbarButton:hover:active,
.secondaryToolbarButton:hover:active {
  background-color: hsla(0,0%,0%,.2);
  background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
  border-color: hsla(0,0%,0%,.35) hsla(0,0%,0%,.4) hsla(0,0%,0%,.45);
  box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
              0 0 1px hsla(0,0%,0%,.2) inset,
              0 1px 0 hsla(0,0%,100%,.05);
  -webkit-transition-property: background-color, border-color, box-shadow;
  -webkit-transition-duration: 10ms;
  -webkit-transition-timing-function: linear;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 10ms;
  transition-timing-function: linear;
}

.toolbarButton.toggled,
.splitToolbarButton.toggled > .toolbarButton.toggled,
.secondaryToolbarButton.toggled {
  background-color: hsla(0,0%,0%,.3);
  background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
  border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.45) hsla(0,0%,0%,.5);
  box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
              0 0 1px hsla(0,0%,0%,.2) inset,
              0 1px 0 hsla(0,0%,100%,.05);
  -webkit-transition-property: background-color, border-color, box-shadow;
  -webkit-transition-duration: 10ms;
  -webkit-transition-timing-function: linear;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 10ms;
  transition-timing-function: linear;
}

.toolbarButton.toggled:hover:active,
.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active,
.secondaryToolbarButton.toggled:hover:active {
  background-color: hsla(0,0%,0%,.4);
  border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.5) hsla(0,0%,0%,.55);
  box-shadow: 0 1px 1px hsla(0,0%,0%,.2) inset,
              0 0 1px hsla(0,0%,0%,.3) inset,
              0 1px 0 hsla(0,0%,100%,.05);
}

/* ===== القائمة المنسدلة للتقريب ===== */
.dropdownToolbarButton {
  width: 120px;
  max-width: 120px;
  padding: 0;
  overflow: hidden;
  background: url(images/toolbarButton-menuArrows.png) no-repeat;
}
html[dir='ltr'] .dropdownToolbarButton { background-position: 95%; }
html[dir='rtl'] .dropdownToolbarButton { background-position: 5%; }
.dropdownToolbarButton > select {
  min-width: 140px;
  font-size: 12px;
  color: hsl(0,0%,95%);
  margin: 0;
  padding: 3px 2px 2px;
  border: none;
  background: rgba(0,0,0,0);
}
.dropdownToolbarButton > select > option { background: hsl(0,0%,24%); }
#customScaleOption { display: none; }
#pageWidthOption { border-bottom: 1px rgba(255, 255, 255, .5) solid; }

html[dir='ltr'] .splitToolbarButton:first-child,
html[dir='ltr'] .toolbarButton:first-child,
html[dir='rtl'] .splitToolbarButton:last-child,
html[dir='rtl'] .toolbarButton:last-child { margin-left: 4px; }
html[dir='ltr'] .splitToolbarButton:last-child,
html[dir='ltr'] .toolbarButton:last-child,
html[dir='rtl'] .splitToolbarButton:first-child,
html[dir='rtl'] .toolbarButton:first-child { margin-right: 4px; }

/* ===== أيقونات الأزرار ===== */
.toolbarButton::before,
.secondaryToolbarButton::before {
  position: absolute;
  display: inline-block;
  top: 4px;
  left: 7px;
}
html[dir='ltr'] .toolbarButton.pageUp::before { content: url(images/toolbarButton-pageUp.png); }
html[dir='rtl'] .toolbarButton.pageUp::before { content: url(images/toolbarButton-pageUp-rtl.png); }
html[dir='ltr'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-pageDown.png); }
html[dir='rtl'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-pageDown-rtl.png); }
.toolbarButton.zoomOut::before { content: url(images/toolbarButton-zoomOut.png); }
.toolbarButton.zoomIn::before { content: url(images/toolbarButton-zoomIn.png); }
.toolbarButton.presentationMode::before,
.secondaryToolbarButton.presentationMode::before { content: url(images/toolbarButton-presentationMode.png); }

/* ===== حقول الإدخال والتسميات ===== */
.toolbarField {
  padding: 3px 6px;
  margin: 4px 0 4px 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background-color: hsla(0,0%,100%,.09);
  background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
  background-clip: padding-box;
  border: 1px solid hsla(0,0%,0%,.35);
  border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
  box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset,
              0 1px 0 hsla(0,0%,100%,.05);
  color: hsl(0,0%,95%);
  font-size: 12px;
  line-height: 14px;
  outline-style: none;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease;
}
.toolbarField.pageNumber {
  -moz-appearance: textfield;
  min-width: 16px;
  text-align: right;
  width: 40px;
}
.toolbarField.pageNumber::-webkit-inner-spin-button,
.toolbarField.pageNumber::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.toolbarField:hover {
  background-color: hsla(0,0%,100%,.11);
  border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.43) hsla(0,0%,0%,.45);
}
.toolbarField:focus {
  background-color: hsla(0,0%,100%,.15);
  border-color: hsla(204,100%,65%,.8) hsla(204,100%,65%,.85) hsla(204,100%,65%,.9);
}
.toolbarLabel {
  min-width: 16px;
  padding: 3px 6px 3px 2px;
  margin: 4px 2px 4px 0;
  border: 1px solid transparent;
  border-radius: 2px;
  color: hsl(0,0%,85%);
  font-size: 12px;
  line-height: 14px;
  text-align: left;
  -webkit-user-select: none;
  -moz-user-select: none;
  cursor: default;
}

/* ===== رسالة الخطأ ===== */
#errorWrapper {
  background: none repeat scroll 0 0 #FF5555;
  color: white;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 1000;
  padding: 3px;
  font-size: 0.8em;
}
.loadingInProgress #errorWrapper { top: 37px; }
#errorMessageLeft { float: left; }
#errorMessageRight { float: right; }
#errorMoreInfo {
  background-color: #FFFFFF;
  color: black;
  padding: 3px;
  margin: 3px;
  width: 98%;
}
.clearBoth { clear: both; }

/* ===== شاشات الريتنا ===== */
@media screen and (min-resolution: 2dppx) {
  .toolbarButton::before {
    -webkit-transform: scale(0.5);
    transform: scale(0.5);
    top: -5px;
  }
  html[dir='ltr'] .toolbarButton::before,
  html[dir='rtl'] .toolbarButton::before { left: -1px; }
  html[dir='ltr'] .toolbarButton.pageUp::before { content: url(images/toolbarButton-pageUp@2x.png); }
  html[dir='rtl'] .toolbarButton.pageUp::before { content: url(images/toolbarButton-pageUp-rtl@2x.png); }
  html[dir='ltr'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-pageDown@2x.png); }
  html[dir='rtl'] .toolbarButton.pageDown::before { content: url(images/toolbarButton-pageDown-rtl@2x.png); }
  .toolbarButton.zoomIn::before { content: url(images/toolbarButton-zoomIn@2x.png); }
  .toolbarButton.zoomOut::before { content: url(images/toolbarButton-zoomOut@2x.png); }
  .toolbarButton.presentationMode::before,
  .secondaryToolbarButton.presentationMode::before { content: url(images/toolbarButton-presentationMode@2x.png); }
}

/* ===== التجاوب مع الشاشات ===== */
@media all and (max-width: 700px) {
  #outerContainer .hiddenLargeView { display: none; }
  #outerContainer .visibleLargeView { display: inherit; }
}
@media all and (max-width: 660px) {
  #outerContainer .hiddenMediumView { display: none; }
  #outerContainer .visibleMediumView { display: inherit; }
}
@media all and (max-width: 600px) {
  .hiddenSmallView { display: none; }
  .visibleSmallView { display: inherit; }
  .toolbarButtonSpacer { width: 0; }
}

@media all and (max-width: 540px) {
#pageNumberLabel,

#scaleSelectContainer {
        display: none !important;
    }
}

#viewerContainer::-webkit-scrollbar { width: 4px; height: 4px; }
#viewerContainer::-webkit-scrollbar-track { background: #1e3a5f; }
#viewerContainer::-webkit-scrollbar-thumb { background: #1e3a5f; }
#viewerContainer::-webkit-scrollbar-thumb:hover { background: #047021; }

.splitToolbarButton input#pageNumber,
.splitToolbarButton input#pageNumber.loading { background-image: none !important; }

#outerContainer #mainContainer {
  width: 100% !important;
  margin: 0 !important;
  left: 0 !important;
  right: 0 !important;
}
#viewerContainer {
  width: 100% ;
  padding: 0 ;
  margin: 0 auto ;
  display: flex ;
  flex-direction: column ;
  align-items: center ;
}
.pdfViewer .page {
  margin: 0 0 5px 0 ;
  left: 0 ;
  right: 0 ;
  border: none ;
  box-shadow: 0 0 1px rgba(0,0,0,0.15) ;
}
.annotationLayer .annotLink > a {
  display: none !important;
  pointer-events: none !important;
  user-select: none !important;
}
.annotationLayer .annotLink {
  background: none !important;
  border: none !important;
}




  #sidebarContainer,
  #printContainer,
  #toolbarSidebar,
  #fileInput,
  #viewThumbnail,
  #viewOutline,
  #viewAttachments,
  #sidebarContent,
  #outlineView,
  #attachmentsView,
  #sidebarResizer,
  #findbar,
  #findbarInputContainer,
  #findInput,
  #findPrevious,
  #findNext,
  #findbarOptionsOneContainer,
  #findHighlightAll,
  #findMatchCase,
  #findbarOptionsTwoContainer,
  #findEntireWord,
  #findResultsCount,
  #findbarMessageContainer,
  #findMsg,
  #secondaryToolbar,
  #secondaryToolbarButtonContainer,
  #secondaryPresentationMode,
  #secondaryOpenFile,
  #secondaryPrint,
  #secondaryDownload,
  #secondaryViewBookmark,
  #firstPage,
  #lastPage,
  #pageRotateCw,
  #pageRotateCcw,
  #cursorSelectTool,
  #cursorHandTool,
  #scrollVertical,
  #scrollHorizontal,
  #scrollWrapped,
  #spreadNone,
  #spreadOdd,
  #spreadEven,
  #toggleHandTool,
  #documentProperties,
  #toolbarViewerLeft,
  #sidebarToggle,
  #viewFind,
  #toolbarViewerRight,
  #openFile,
  #print,
  #download,
  #viewBookmark,
  #secondaryToolbarToggle,
  #toolbarViewerMiddle,
  #viewerContextMenu,
  #contextFirstPage,
  #contextLastPage,
  #contextPageRotateCw,
  #contextPageRotateCcw,
  #overlayContainer,
  #passwordOverlay,
  #passwordText,
  #password,
  #passwordCancel,
  #passwordSubmit,
  #printServiceOverlay,
  #printCancel,
  #documentPropertiesOverlay,
  #fileNameField,
  #fileSizeField,
  #titleField,
  #authorField,
  #subjectField,
  #keywordsField,
  #creationDateField,
  #modificationDateField,
  #creatorField,
  #producerField,
  #versionField,
  #pageCountField,
  #documentPropertiesClose,
  #pageSizeField,
  #linearizedField,
  #mozPrintCallback-shim,
  #scale75,
  #scale100,
  #scale125,
  #scale200,
  #scale300,
  #scale400,
  #thumbnailView {
    display: none ;
  }


/* ===== 1) الكود الأصلي داخل وسم <style> في الرأس ===== */
:root {
  --primary-green: #015836; /* أخضر غامق جداً */
  --dark-green: #0d5417; /* أخضر غامق */
  --accent-green: #047021; /* أخضر متوسط */
  --light-green: #88a626; /* أخضر فاتح */
}

#loadingBar {
  background-color: #e1ebec ;
}

#loadingBar .progress {
  background-color: var(--accent-green) ;
}

#scaleSelect option {
  color: #333;
  background: #fff;
}

.toolbarButton:hover,
.splitToolbarButton button:hover {
  background-color: var(--light-green) ;
  border-radius: 2px;
}

/* ===== 2) الأنماط المضمّنة عبر خاصية style على العناصر ===== */

/* الشريط العلوي */
#toolbarContainer {
  background: var(--primary-green) ;
  border-top: 0;
  border-radius: 0;
  border-bottom: 2px solid var(--dark-green);
}

#toolbarViewer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 9px;
  box-sizing: border-box;
  color-scheme: light ;
}

/* زر ملء الشاشة */
#fullscreen {
  background: none ;
  border: none;
  padding: 0;
  margin: 0;
  width: 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: static ;
  margin-left: 4px ;
}

#externalZoomIn { width: 30px; }
#externalZoomOut { width: 30px; }

/* حاوية أزرار التكبير الخارجية (أول splitToolbarButton) */
#toolbarViewer > .splitToolbarButton:first-of-type {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 24px;
  width: 55px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 ;
}

/* حاوية أزرار التنقل بين الصفحات */
#navButtonsContainer {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 24px;
  width: 55px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 !important;
}

/* زر الصفحة السابقة والتالية */
#previous,
#next {
  width: 27px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* تبييض أيقونات التنقل */
#previous::before,
#next::before {
    filter: brightness(0) invert(1) !important; /* يجعل الأيقونة بيضاء */
}

/* حاوية رقم الصفحة */
#toolbarViewer > .splitToolbarButton:nth-of-type(3) {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 25px;
  margin: 0 !important;
}

#pageNumberLabel {
  margin-left: 3px;
  color: #fff;
}

#pageNumber {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: none;
  border-radius: 4px;
  text-align: center;
  min-width: 15px;
  height: 20px;
  box-sizing: border-box;
  box-shadow: none;
}

#numPages {
  display: inline-block;
  min-width: 15px;
  text-align: center;
  margin-left: 3px;
  color: #fff;
}

/* قائمة اختيار التقريب */
#scaleSelectContainer {
  width: 90px;
}

#scaleSelect {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 25px;
  margin: 0 !important;
  color: #fff;
  border: none;
}

/* حاوية أزرار التكبير الداخلية */
#toolbarViewer > .splitToolbarButton:nth-of-type(4) {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 24px;
  width: 55px;
  margin: 0 !important;
}

#zoomOut,
#zoomIn {
  width: 27px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: opacity 0.2s ease, transform 0.1s ease !important;
}

/* رابط المنصة في الشريط */
#toolbarViewer > a {
  text-decoration: none;
  border-radius: 3px;
  padding: 0;
  margin: 0;
  width: 26px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: static !important;
  background: #ffffff !important;
}

/* زر تحديث الملف العائم */
#reloadPdfBtn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  z-index: 90;
  width: 38px;
  height: 38px;
  background-color: var(--primary-green); /* أخضر غامق */
  color: rgba(255,255,255,1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

/* خلفية منطقة عرض الملف */
#viewerContainer {
  background: #aaadac;
}

/* عنصر pdf-deps الذي يُنشأ عبر JavaScript */
.pdf-deps {
  display: none !important;
  visibility: hidden;
  height: 0;
  width: 0;
  overflow: hidden;
  position: absolute;
}




.annotationLayer section {
  display: none !important;
}


.pdfViewer .page {
    margin: 0 0 6px 0 !important;      
    border: none !important;   
}




/* تنسيقات زر تحديث الملف */
#reloadPdfBtn {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 90;
  width: 33px;
  height: 33px;
  background-color: var(--primary-green); /* أخضر غامق */
  color: rgba(255, 255, 255, 1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

#reloadPdfBtn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
  opacity: 1;
}

/* تنسيقات زر التصغير */
#externalZoomOut {
  position: fixed;
  bottom: 40px;
  left: 10px;
  z-index: 90;
  width: 27px;
  height: 27px;
  background-color: var(--primary-green); /* أخضر غامق */
  color: rgba(255, 255, 255, 1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

#externalZoomOut img {
  width: 14px;
  height: 14px;
  filter: invert(1);
  pointer-events: none;
}

/* تنسيقات زر التكبير */
#externalZoomIn {
  position: fixed;
  bottom: 8px;
  left: 10px;
  z-index: 90;
  width: 27px;
  height: 27px;
  background-color: var(--primary-green); /* أخضر غامق */
  color: rgba(255, 255, 255, 1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

#externalZoomIn img {
  width: 14px;
  height: 14px;
  filter: invert(1);
  pointer-events: none;
}



/* تنسيق رابط الموقع */
.toolbarButton-site {
  text-decoration: none;
  border-radius: 3px;
  padding: 0;
  margin: 0;
  width: 26px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: static !important;
  
}

.toolbarButton-site img {
  width: 32px;
  height: 22px;
}


/* تنسيق الحاوية الرئيسية */
.zoom-controls {
  display: flex;
  align-items: center;
  background: #1a241c;
  border-radius: 3px;
  height: 24px;
  width: 55px;
  margin: 0 ;
}

/* تنسيق أزرار التكبير والتصغير */
.zoom-controls .toolbarButton {
  width: 27px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: opacity 0.2s ease, transform 0.1s ease ;
}

/* تنسيق الفاصل بين الأزرار */
.zoom-controls .splitToolbarButtonSeparator {
  background: rgba(255,255,255,0.2);
}

/* تنسيق خاص لزر التكبير */
.zoom-controls .zoomIn {
  cursor: pointer;
}


/* تنسيق حاوية رقم الصفحة */
.page-number-controls {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  height: 25px;
  margin: 0 !important;
}

/* تنسيق تسمية "صفحة" */
.page-number-controls .toolbarLabel {
  color: #ffffff;
}

.page-number-controls .toolbarLabel:first-child {
  margin-left: 0px;
}

/* تنسيق حقل إدخال رقم الصفحة */
.page-number-controls .pageNumber {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: none;
  border-radius: 4px;
  text-align: center;
  min-width: 15px;
  height: 20px;
  box-sizing: border-box;
  box-shadow: none;
}

/* تنسيق عرض إجمالي الصفحات */
.page-number-controls #numPages {
  display: inline-block;
  min-width: 15px;
  text-align: center;
  margin-left: 3px;
  color: #ffffff;
}

/* تنسيق شريط الأدوات الرئيسي */
.toolbar-viewer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 0px;
  box-sizing: border-box;
  color-scheme: light;
}

/* تنسيق زر ملء الشاشة */
.toolbar-viewer .fullscreen-btn {
  bottom: 1px;
}

.toolbar-viewer .fullscreen-btn img {
  /* يمكن إضافة تنسيقات للصورة هنا */
}

/* تنسيق زر وضع العرض التقديمي */
.toolbar-viewer .presentationMode {
  /* التنسيقات الموجودة مسبقاً في الكلاس */
}

/* تنسيق حاوية أزرار التكبير والتصغير */
.toolbar-viewer .zoom-controls {
  display: flex;
  align-items: center;
  background: #1a241c;
  border-radius: 3px;
  height: 24px;
  width: 55px;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 !important;
}



@media print{#printContainer div{page-break-after:always;page-break-inside:avoid}}#mozPrintCallback-shim{position:fixed;top:0;left:0;height:100%;width:100%;z-index:9999999;display:block;text-align:center;background-color:rgba(0,0,0,0.5)}#mozPrintCallback-shim[hidden]{display:none}@media print{#mozPrintCallback-shim{display:none}}#mozPrintCallback-shim .mozPrintCallback-dialog-box{display:inline-block;margin:-50px auto 0;position:relative;top:45%;left:0;min-width:220px;max-width:400px;padding:9px;border:1px solid hsla(0,0%,0%,.5);border-radius:2px;box-shadow:0 1px 4px rgba(0,0,0,0.3);background-color:#474747;color:hsl(0,0%,85%);font-size:16px;line-height:20px}#mozPrintCallback-shim .progress-row{clear:both;padding:1em 0}#mozPrintCallback-shim progress{width:100%}#mozPrintCallback-shim .relative-progress{clear:both;float:right}#mozPrintCallback-shim .progress-actions{clear:both}.dropdownToolbarButton{margin:0}#toolbarContainer{background:#015836;border-top-right-radius:5px;border-top-left-radius:5px;border-top:solid 1px #e5e5e5;border-bottom:solid 0 #e5e5e5}#pageNumber{background:#fff;color:#000;border-radius:5px}#print{border:1px solid #fffcfc;background:#015836}#numPages{color:#fff}.dropdownToolbarButton{color:#015836!important;border:1px solid!important;border-radius:5px!important}#mainContainer{min-width:100px}#pageNumber{background:white;color:black;border-radius:5px}#print{border:1px solid #fffcfc;background:#015836}#numPages{color:white}.dropdownToolbarButton{color:#015836!important;border:1px solid!important;border-radius:5px!important}#toolbarSidebar{background-color:#424242;background-image:url(images/texture.png),linear-gradient(hsla(0,0%,30%,.99),hsla(0,0%,25%,.95))}#toolbarContainer,.findbar,.secondaryToolbar{background-color:#474747;background-image:url(images/texture.png),linear-gradient(hsla(0,0%,32%,.99),hsla(0,0%,27%,.95))}#toolbarContainer{background:#015836;border-top-right-radius:5px;border-top-left-radius:5px;border-top:solid 1px #e5e5e5;border-bottom:solid 0 #e5e5e5}background-color:#222;background-color:#000;background-color:#333;background-color:#474747;background-color:#424242;color:hsl(0,0%,85%);color:hsl(0,0%,95%);color:white;color:black;background-color:rgb(180,0,170);background-color:rgb(0,100,0);background:rgb(0,0,255);background-color:#FFFF99;background-color:#FF5555;background-color:#339d4a;background-color:#A6B7D0;background-color:rgb(255,102,102);background-image:url(images/texture.png),linear-gradient(hsla(0,0%,30%,.99),hsla(0,0%,25%,.95));background-image:url(images/texture.png),linear-gradient(hsla(0,0%,32%,.99),hsla(0,0%,27%,.95));background-image:linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background:repeating-linear-gradient(135deg,#bbb 0,#999 5px,#999 45px,#ddd 55px,#ddd 95px,#bbb 100px);background-image:url(images/texture.png),linear-gradient(hsla(0,0%,32%,.99),hsla(0,0%,27%,.95))
/* ===== التعديلات النهائية ===== */

/* 1. تبييض جميع أيقونات التنقل والتكبير */
#previous::before,
#next::before,
#zoomOut::before,
#zoomIn::before {
    filter: brightness(0) invert(1) !important;
}

/* 2. حاويات الأزرار - أخضر غامق واضح */
#navButtonsContainer,
#toolbarViewer > .splitToolbarButton:first-of-type,
#toolbarViewer > .splitToolbarButton:nth-of-type(4),
#toolbarViewer > .splitToolbarButton:nth-of-type(3),
.page-number-controls {
    background: rgba(10,50,5,0.2) ;
    border-radius: 5px;
}

#navButtonsContainer,
#toolbarViewer > .splitToolbarButton:first-of-type,
#toolbarViewer > .splitToolbarButton:nth-of-type(4) {
    height: 24px;
    width: 55px;
}

#toolbarViewer > .splitToolbarButton:nth-of-type(3),
.page-number-controls {
    height: 25px;
}

/* 3. قائمة اختيار التقريب */
#scaleSelect {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    height: 25px;
    color: #fff;
    border: none;
}

/* 4. رابط المنصة - خلفية شفافة */
#toolbarViewer > a {
    background: transparent !important;
}

/* 5. الأزرار العائمة - خلفية شفافة مع تأثير ضبابي */
#reloadPdfBtn,
#externalZoomOut,
#externalZoomIn {
    background-color: rgba(1, 88, 54, 0.6) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* 6. شريط التمرير - تدرجات الأخضر */
#viewerContainer::-webkit-scrollbar-track {
    background: #0a2e1a;
}

#viewerContainer::-webkit-scrollbar-thumb {
    background: #015836;
    border-radius: 2px;
}

#viewerContainer::-webkit-scrollbar-thumb:hover {
    background: #047021;
}


/* تلوين حاوية أزرار الزوم */
.splitToolbarButton.zoom-controls {
    background: rgba(1, 88, 54, 0.85) ;
    border-radius: 3px;
    height: 24px;
    width: 55px;
    box-sizing: border-box;
    overflow: hidden;
}

/* تبييض أيقونات التكبير والتصغير */
#zoomOut::before,
#zoomIn::before {
    filter: brightness(0) invert(1) !important;
}

/* تلوين الفاصل بين الأزرار */
.splitToolbarButton.zoom-controls .splitToolbarButtonSeparator {
    background: rgba(255, 255, 255, 0.3);
}

/* تبييض أيقونة ملء الشاشة */
#fullscreen img {
    filter: brightness(0) invert(1) !important;
}


#reloadPdfBtn, #externalZoomOut, #externalZoomIn {
    opacity: 0;
    transform: translateY(30px);
    visibility: hidden;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#reloadPdfBtn.show-btn, #externalZoomOut.show-btn, #externalZoomIn.show-btn {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}
