/* quran/css/quran.css */

.stf__wrapper {
  gap: 0 !important;
}

.stf__block {
  margin: 0 !important;
  padding: 0 !important;
}

.stf__shadow {
  display: none !important;
}

.st-page-flip .stf__block {
  box-shadow: none !important;
}

.st-page-flip {
  position: relative;
}

.st-page-flip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #e5e7eb;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}

/* fullscreen state */
#mushafArea.mushaf-fullscreen .st-page-flip {
  width: 500px !important;
  height: 710px !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#mushafArea.mushaf-fullscreen #mushafZoomWrapper {
  transform: scale(1.4);
  transform-origin: center center;
}

#mushafArea.mushaf-fullscreen {
  background: #000;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#mushafArea.mushaf-fullscreen #mushafFullscreenBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

#mushafArea.mushaf-fullscreen .tools-panel {
  display: none !important;
}

.page-content {
  position: relative;
}

/* Ayah overlay layer over page image */
.ayah-layer {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

/* Clickable box above each ayah */
.ayah-box {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;

  /* Reduce vertical touch area to avoid overlaps */
  transform: scaleY(0.70);
  transform-origin: center;
}

.ayah-box:hover {
  background: transparent;
}

/* Ayah highlight rectangles in the SVG */
.ayah-polygon {
  fill: transparent;
  transition: fill 0.2s ease;
}

.ayah-polygon.ayah-hover {
  fill: rgba(199, 206, 206, 0.35) !important;
}

.ayah-polygon.ayah-active {
  fill: rgba(255, 249, 191, 0.39) !important;
}

/* Hide side panels only in reading mode (old helper – optional) */
.reading-mode-page #sidebarMenuWrapper,
.reading-mode-page #recitationPanelWrapper {
  display: none !important;
}

/* ================= READING MODE ================= */

/* Clean white background & bigger mushaf in reading mode */
#mushafArea.reading-mode {
  background: #ffffff !important;
}

/* Make the flipbook wider in reading mode */
#mushafArea.reading-mode #mushafFlipBook {
  max-width: 1400px !important; /* tweak this value if you want it even bigger/smaller */
}

/* Reduce vertical spacing around the flipbook */
#mushafArea.reading-mode #mushafFlipContainer {
  margin-top: 0 !important;
}

/* Disable any interaction on ayah layer */
#mushafArea.reading-mode .ayah-layer {
  pointer-events: none !important;
}

/* No hand cursor on ayah boxes */
#mushafArea.reading-mode .ayah-box {
  cursor: default !important;
}

/* Cancel ALL highlight colors (hover + active) */
#mushafArea.reading-mode .ayah-polygon,
#mushafArea.reading-mode .ayah-polygon.ayah-hover,
#mushafArea.reading-mode .ayah-polygon.ayah-active {
  fill: transparent !important;
  transition: none !important;
}


/* Hide ayah context menu in reading mode */
#mushafArea.reading-mode #ayahMenu {
  display: none !important;
}

