/* Urdu Books — RTL typography + online reader. Works on top of books.css / book-reader.css. */

.urdu-text {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Noto Naskh Arabic', serif;
  line-height: 2.1;
}
.urdu-hero-title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.9; }
.urdu-search-input { text-align: right; font-family: 'Noto Nastaliq Urdu', serif; }

.urdu-card-title { font-size: 1.05rem; line-height: 2.1; margin: 0 0 .35rem; text-align: right; color: #6b7280; }
.book-card-lang-urdu { background: #0f766e; color: #fff; font-family: 'Noto Nastaliq Urdu', serif; }

.urdu-description { line-height: 1.8; margin: 1.25rem 0; }
.urdu-note { margin-top: 1.5rem; padding: .85rem 1rem; border-radius: .5rem; background: #f4f6f8; color: #444; }

/* ---------------------------------------------------------------- reader */
.urdu-reader {
  --ur-bg: #1f2937; --ur-bar: #111827; --ur-fg: #f9fafb; --ur-accent: #f59e0b;
  background: var(--ur-bg); border-radius: 12px; overflow: hidden; margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.urdu-reader:fullscreen { border-radius: 0; margin: 0; display: flex; flex-direction: column; height: 100%; }
.urdu-reader:fullscreen .ur-stage { flex: 1; max-height: none; }

.ur-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap; padding: .6rem .9rem; background: var(--ur-bar); color: var(--ur-fg);
}
.ur-toolbar-title { flex: 1 1 200px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.ur-toolbar-title i { color: var(--ur-accent); margin-inline-end: .35rem; }
.ur-toolbar-nav, .ur-toolbar-tools { display: flex; align-items: center; gap: .35rem; }

.ur-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.08); color: var(--ur-fg); text-decoration: none; transition: background .15s;
}
.ur-btn:hover:not(:disabled) { background: rgba(255,255,255,.2); color: var(--ur-fg); }
.ur-btn:disabled { opacity: .35; cursor: default; }

.ur-page-indicator { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--ur-fg); }
.ur-page-input { width: 62px; text-align: center; border: 0; border-radius: 6px; padding: .3rem; background: rgba(255,255,255,.12); color: var(--ur-fg); -moz-appearance: textfield; }
.ur-page-input::-webkit-outer-spin-button, .ur-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ur-progress { height: 3px; background: rgba(255,255,255,.1); direction: rtl; }
.ur-progress-bar { display: block; height: 100%; width: 0; background: var(--ur-accent); transition: width .2s; }

.ur-stage {
  position: relative; overflow: auto; text-align: center; padding: 12px;
  max-height: 85vh; min-height: 320px; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
}
.ur-canvas { display: block; margin: 0 auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); max-width: none; }
.ur-status {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
  color: var(--ur-fg); background: rgba(31,41,55,.82); font-size: 1rem; padding: 1rem; text-align: center;
}
.ur-status[hidden] { display: none; }
.ur-hint { padding: .45rem .9rem; text-align: center; font-size: .75rem; color: #9ca3af; background: var(--ur-bar); }

@media (max-width: 640px) {
  .ur-toolbar { padding: .5rem; }
  .ur-toolbar-title { flex-basis: 100%; }
  .ur-btn { width: 40px; height: 40px; }
  .ur-hint { display: none; }
}
