/* SDCC Quran Mushaf — POSI Academy /quran-read manuscript style */
.sdcc-mushaf-app {
  --mushaf-bg: #f4f7fa;
  --mushaf-paper: #fffdf6;
  --mushaf-frame: #ece3c2;
  --mushaf-gold: #c9b270;
  --mushaf-gold-dark: #9f8a53;
  --mushaf-ink: #141e31;
  --mushaf-muted: #5a6478;
  --mushaf-accent: #17213a;
  --mushaf-btn-gold: linear-gradient(#f6e19a, #dcbd64);
  --mushaf-ar-size: 1.55rem;
  --mushaf-line-spacing: 2.1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--mushaf-bg);
  color: var(--mushaf-ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.sdcc-mushaf-app[data-theme="sepia"] {
  --mushaf-bg: #e8dcc8;
  --mushaf-paper: #f5ead6;
  --mushaf-frame: #ddd0b0;
}

.sdcc-mushaf-app[data-theme="dark"] {
  --mushaf-bg: #0d1330;
  --mushaf-paper: #17263d;
  --mushaf-frame: #2a3a55;
  --mushaf-ink: #ecf1fa;
  --mushaf-muted: #9aa3c8;
  --mushaf-accent: #1c2e48;
  --mushaf-gold: #c9a24b;
}

.sdcc-mushaf-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: var(--mushaf-accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.sdcc-mushaf-toolbar a.sdcc-mushaf-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  margin-right: 0.35rem;
  white-space: nowrap;
}

.sdcc-mushaf-toolbar label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.sdcc-mushaf-toolbar select,
.sdcc-mushaf-toolbar input[type="number"] {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1a2e1a;
  max-width: 130px;
}

.sdcc-mushaf-toolbar input[type="number"] {
  width: 4rem;
  text-align: center;
}

.sdcc-mushaf-toolbar input[type="range"] {
  width: 80px;
  accent-color: #dcbd64;
}

.sdcc-mushaf-btn {
  min-height: 34px;
  min-width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sdcc-mushaf-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sdcc-mushaf-btn--primary {
  background: var(--mushaf-btn-gold) !important;
  border: 1px solid #eed590 !important;
  color: #142443 !important;
}

.sdcc-mushaf-btn.is-active {
  background: #fff;
  color: var(--mushaf-accent);
}

.sdcc-mushaf-status {
  margin: 0;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  text-align: center;
  color: var(--mushaf-muted);
}

.sdcc-mushaf-status--error {
  color: #9b2c2c;
  background: #fde8e8;
}

.sdcc-mushaf-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1.25rem 0.75rem 1rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* Gold manuscript frame — POSI style */
.sdcc-mushaf-page-frame {
  width: 100%;
  padding: 18px;
  border-radius: 1px;
  border: 1px solid #c8b67c;
  background: var(--mushaf-frame);
  background-image: radial-gradient(circle at 50% 50%, rgba(201, 178, 112, 0.15) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: 0 4px 18px rgba(20, 32, 57, 0.09);
  position: relative;
}

.sdcc-mushaf-page-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: double 3px var(--mushaf-gold);
  pointer-events: none;
}

.sdcc-mushaf-page-inner {
  position: relative;
  padding: 6px 14px 20px;
  border: double 3px var(--mushaf-gold-dark);
  background: var(--mushaf-paper);
  background-image: radial-gradient(rgba(189, 170, 112, 0.04) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  min-height: 68vh;
}

.sdcc-mushaf-manuscript-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  margin: 0 0 18px;
  border: double 4px #ad975b;
  background: #f6f0dc;
  background-image: radial-gradient(circle, rgba(201, 178, 112, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  padding: 5px 8px;
}

.sdcc-mushaf-heading-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  min-height: 58px;
  border: double 3px #9e8a56;
  border-radius: 40%;
  background: #fffdf4;
  font-family: Amiri, serif;
  font-size: 12px;
  color: #1c2538;
}

.sdcc-mushaf-heading-pill strong {
  font-size: 16px;
  font-weight: 700;
}

.sdcc-mushaf-manuscript-heading h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 58px;
  margin: 0;
  background: #fffdf4;
  border: double 3px #ad975b;
  border-radius: 28px;
  font-family: 'Scheherazade New', Amiri, serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 400;
  color: #141e31;
  padding: 0 0.5rem;
}

.sdcc-mushaf-surah-banner {
  text-align: center;
  margin: 0.75rem 0 0.35rem;
  padding: 0.35rem;
  font-family: 'Scheherazade New', Amiri, serif;
  font-size: calc(var(--mushaf-ar-size) * 0.95);
  color: var(--mushaf-ink);
}

.sdcc-mushaf-basmala-line {
  text-align: center;
  font-family: 'Scheherazade New', Amiri, serif;
  font-size: calc(var(--mushaf-ar-size) * 1.05);
  line-height: var(--mushaf-line-spacing);
  margin: 0.25rem 0 0.5rem;
  color: var(--mushaf-ink);
}

.sdcc-mushaf-lines {
  padding: 0.25rem 0;
}

.sdcc-mushaf-line-row {
  padding: 2px 0;
}

.sdcc-mushaf-line-text {
  margin: 0;
  text-align: center;
  line-height: var(--mushaf-line-spacing);
  word-spacing: 0.025em;
  font-family: 'Scheherazade New', Amiri, serif;
  font-size: var(--mushaf-ar-size);
  color: var(--mushaf-ink);
}

.sdcc-mushaf-word {
  cursor: pointer;
  padding: 0 0.05em;
  border-radius: 4px;
}

.sdcc-mushaf-word-glow,
.sdcc-mushaf-ayah-marker.is-active {
  background: #e5effd;
  outline: 1px solid #a4c9f5;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.sdcc-mushaf-ayah-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  height: 1.6em;
  margin-inline: 0.35em;
  padding: 0 0.25em;
  background: #fffdf6 !important;
  border: 1px solid #a3926c;
  outline: 1px solid #c6b995;
  outline-offset: 1px;
  border-radius: 42% !important;
  color: #26304a !important;
  font-size: 0.52em;
  font-family: Amiri, serif;
  cursor: pointer;
  vertical-align: middle;
}

.sdcc-mushaf-english-list {
  display: grid;
  gap: 0.65rem;
}

.sdcc-mushaf-english-verse {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(20, 32, 57, 0.08);
  cursor: pointer;
}

.sdcc-mushaf-english-verse.is-selected,
.sdcc-mushaf-english-verse.is-playing {
  background: #e5effd;
  border-color: #a4c9f5;
}

.sdcc-mushaf-english-verse__key {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mushaf-muted);
}

.sdcc-mushaf-english-verse__ar {
  font-family: 'Scheherazade New', Amiri, serif;
  font-size: var(--mushaf-ar-size);
  line-height: 1.9;
  margin: 0.35rem 0;
}

.sdcc-mushaf-english-verse__en {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--mushaf-muted);
  margin: 0;
}

.sdcc-mushaf-trans-panel {
  position: sticky;
  bottom: 0;
  z-index: 25;
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  background: #fff;
  border-top: 1px solid #e4e8ef;
  box-shadow: 0 -4px 18px rgba(20, 32, 57, 0.08);
}

.sdcc-mushaf-app--translation-open .sdcc-mushaf-main {
  padding-bottom: 0.5rem;
}

.sdcc-mushaf-trans-panel__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mushaf-muted);
}

.sdcc-mushaf-trans-panel__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--mushaf-ink);
}

.sdcc-mushaf-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--mushaf-muted);
}

@media (max-width: 640px) {
  .sdcc-mushaf-toolbar {
    padding: 0.45rem;
    gap: 0.3rem;
  }

  .sdcc-mushaf-page-frame {
    padding: 10px;
  }

  .sdcc-mushaf-page-inner {
    padding: 5px 6px 15px;
  }

  .sdcc-mushaf-manuscript-heading {
    min-height: 58px;
    margin-bottom: 14px;
  }

  .sdcc-mushaf-heading-pill {
    width: 40px;
    min-height: 46px;
    font-size: 10px;
  }

  .sdcc-mushaf-manuscript-heading h1 {
    font-size: 1.25rem;
    min-height: 46px;
  }
}
