/* ==========================================================================
   V6 QUR'AN, READING TIPS, LEARNING CENTER & LIVING ECHOES OVERRIDES
   Owned exclusively by WS3
   ========================================================================== */

/* 1. Real-Time Audio Word-by-Word Highlight (fb4-07..fb4-09) */
.sm3-ayah-word.is-audio-word-active {
  background-color: rgba(212, 157, 46, 0.28) !important;
  box-shadow: 0 0 0 2px rgba(212, 157, 46, 0.44), 0 4px 12px rgba(212, 157, 46, 0.16);
  border-radius: 7px;
  color: #111111;
  transition: background-color 0.08s ease, box-shadow 0.08s ease;
}

/* 2. Reading Tips Toggle & Non-Blocking Dot + Popover Card (fb4-01..fb4-06) */
.sm3-mushaf-parchment.has-reading-tips .sm3-ayah-arabic {
  line-height: 2.36 !important;
  padding-top: 8px;
}

.sm3-mushaf-parchment.has-reading-tips .sm3-mushaf-tip-bar {
  margin-bottom: 14px;
}

/* Suppress word-hover translation popup while Reading Tip card or dot is active/hovered */
.sm3-ayah-word.has-reading-tip:has(.sm3-rt-anchor.is-rt-open) .sm3-word-hover-tip,
.sm3-ayah-word.has-reading-tip:has(.sm3-rt-anchor:hover) .sm3-word-hover-tip {
  opacity: 0 !important;
  visibility: hidden !important;
}

.sm3-rt-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(182, 198, 218, 0.9) !important;
  background: #FFFFFF !important;
  color: #2B2420 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sm3-rt-toggle-btn.is-on {
  background: linear-gradient(180deg, #FFFDF5 0%, #FCF4DC 100%) !important;
  border-color: rgba(212, 157, 46, 0.68) !important;
  color: #111111 !important;
  box-shadow: 0 3px 10px rgba(212, 157, 46, 0.14);
}

.sm3-rt-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9CA3AF;
  display: inline-block;
  flex-shrink: 0;
}

.sm3-rt-toggle-btn.is-on .sm3-rt-toggle-dot {
  background: radial-gradient(circle at 35% 35%, #FCE078 0%, #D49D2E 75%, #9C6F12 100%);
  box-shadow: 0 0 0 2px rgba(212, 157, 46, 0.25);
}

.sm3-ayah-word.has-reading-tip {
  position: relative;
}

.sm3-rt-anchor {
  position: absolute;
  bottom: calc(100% - 3px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 48;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  line-height: 1;
}

.sm3-rt-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  background: radial-gradient(circle at 32% 32%, #FFE68A 0%, #E0A82E 68%, #A57410 100%);
  box-shadow: 0 0 0 2px rgba(212, 157, 46, 0.34), 0 2px 6px rgba(17, 17, 17, 0.18);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  display: block;
}

.sm3-rt-dot:hover,
.sm3-rt-anchor.is-rt-open .sm3-rt-dot {
  transform: scale(1.22);
  box-shadow: 0 0 0 3px rgba(212, 157, 46, 0.48), 0 4px 10px rgba(17, 17, 17, 0.22);
}

.sm3-rt-card {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(calc(-50% + var(--rt-shift-x, 0px)));
  width: min(272px, 74vw);
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF0 100%);
  border: 1.5px solid rgba(212, 157, 46, 0.72);
  box-shadow: 0 14px 32px rgba(24, 16, 12, 0.18), 0 2px 6px rgba(212, 157, 46, 0.15);
  color: #1A1614;
  text-align: left;
  direction: ltr;
  z-index: 75;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.sm3-rt-anchor.is-rt-open .sm3-rt-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: sm3RtPopIn 0.22s ease;
}

@keyframes sm3RtPopIn {
  from {
    opacity: 0;
    transform: translateX(calc(-50% + var(--rt-shift-x, 0px))) translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(calc(-50% + var(--rt-shift-x, 0px))) translateY(0) scale(1);
  }
}

.sm3-rt-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.sm3-rt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #855A09;
  background: #FCF4DC;
  border: 1px solid rgba(212, 157, 46, 0.45);
  border-radius: 999px;
  padding: 2px 8px;
}

.sm3-rt-close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(189, 18, 47, 0.36);
  background: #FFF8F9;
  color: #BD122F;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.sm3-rt-title {
  font-family: var(--font-display, Georgia, serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #141118;
  margin-bottom: 3px;
  line-height: 1.3;
}

.sm3-rt-body {
  font-size: 12px;
  line-height: 1.48;
  color: #362E2B;
}

/* 3. Learning Center Dropdown Cleanup & Non-Overlapping Bottom Scroll Arrow (fb4-11..fb4-16, fb5-16..fb5-17) */
.sm3-bselect-wrap--learning-center .sm3-bselect-sticky-hdr {
  display: none !important;
}

.sm3-bselect-wrap--learning-center[data-lc-mode="mushaf"] .sm3-bselect-item[data-val="mushaf"] {
  display: none !important;
}

.sm3-bselect-wrap--learning-center .sm3-bselect-list {
  max-height: min(440px, 68vh) !important;
}

.sm3-bselect-scroll-more,
.sm3-noor-drop-scroll-more {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin-top: 4px;
  border: 0;
  border-top: 1px solid rgba(212, 157, 46, 0.32);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #FFFDF7 0%, #FCF4DC 100%);
  color: #7A5411;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.sm3-bselect-scroll-more[hidden],
.sm3-noor-drop-scroll-more[hidden] {
  display: none !important;
}

.sm3-bselect-scroll-more:hover,
.sm3-noor-drop-scroll-more:hover {
  background: #FAF0CD;
  color: #111111;
}

/* 4. Living Qur'an Inline Echoes & Similar Ayahs (fb5-18..fb6-04) */
.sm3-living-echoes-bar[open] {
  border-color: rgba(212, 157, 46, 0.78) !important;
  box-shadow: 0 6px 20px rgba(212, 157, 46, 0.14);
}

.sm3-living-echoes-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
}

.sm3-living-echo-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sm3-living-echo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(182, 198, 218, 0.9);
  background: #FFFFFF;
  color: #18181B;
  font-family: inherit;
  font-size: 12.2px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sm3-living-echo-pill:hover {
  border-color: rgba(212, 157, 46, 0.72);
  background: #FFFDF6;
}

.sm3-living-echo-pill.is-active {
  background: linear-gradient(180deg, #FFFDF5 0%, #FCF4DC 100%);
  border-color: #D49D2E;
  box-shadow: 0 4px 12px rgba(212, 157, 46, 0.16);
  color: #111111;
}

.sm3-living-echo-detail {
  width: 100%;
  background: #FFFFFF;
  border: 1.5px solid rgba(212, 157, 46, 0.52);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 22px rgba(24, 16, 12, 0.06);
}

.sm3-living-echo-detail[hidden] {
  display: none !important;
}

.sm3-living-echo-detail-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.sm3-living-echo-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.sm3-living-echo-theme-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: #FDF9EE;
  border: 1px solid rgba(212, 157, 46, 0.42);
  color: #5C3D08;
}

/* 5. Daily Sadaqah Custom Input & Consistent Sunnah Cards (fb6-06, fb6-08, fb6-09) */
.sm3-sadaqah-custom-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 2px 4px 2px 8px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid rgba(212, 157, 46, 0.48);
}

.sm3-sadaqah-custom-input {
  width: 72px;
  border: none !important;
  background: transparent !important;
  padding: 3px 4px !important;
  font-size: 12px !important;
  font-weight: 700;
  color: #111111;
  text-align: center;
  outline: none;
}

.sm3-sadaqah-custom-input::-webkit-outer-spin-button,
.sm3-sadaqah-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 600px) {
  .sm3-rt-card {
    width: min(244px, 80vw);
    padding: 9px 10px;
  }
  .sm3-mushaf-audio-row {
    gap: 6px !important;
  }
}
