/* t305 — تخطيط مازن والسبحة، قائمة الحساب، نجوم التقييم، منح الصلاحيات */

:root {
  --fab-size: 64px;
  --fab-lift: 16px;
  --mazen-dock: calc(var(--dock, 64px) + env(safe-area-inset-bottom, 0px));
}
body.view-mushaf,
body.mushaf-zen-fullscreen { --fab-lift: 74px; }
body.view-radio { --fab-lift: 16px; }
body.view-azan { --fab-lift: 16px; }
body.view-settings { --fab-lift: 16px; }

/* مازن = السبحة: نفس الحجم والمستوى */
.mazen-face {
  width: var(--fab-size) !important;
  height: var(--fab-size) !important;
  right: 12px !important;
  left: auto !important;
  bottom: calc(var(--mazen-dock) + var(--fab-lift)) !important;
  border-radius: 50% !important;
  overflow: hidden;
  padding: 0 !important;
  border: 1.6px solid rgba(212, 175, 55, 0.75) !important;
  background: #0c1c14 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(12, 28, 20, 0.4);
  z-index: 260 !important;
}
.mazen-face svg { display: none; }
.mazen-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  display: block;
  pointer-events: none;
}
.mazen-face.is-listening::after {
  inset: -3px !important;
  border-radius: 50% !important;
}
.mazen-welcome {
  right: calc(12px + var(--fab-size) + 8px) !important;
  bottom: calc(var(--mazen-dock) + var(--fab-lift) + 8px) !important;
  z-index: 259 !important;
}
.mazen-panel {
  bottom: calc(var(--mazen-dock) + var(--fab-lift) + 80px) !important;
}
.mazen-root.kb-open .mazen-face {
  bottom: calc(var(--mazen-kb) + 8px) !important;
}
.mazen-root.kb-open .mazen-panel {
  bottom: calc(var(--mazen-kb) + 92px) !important;
}

/* أيقونة السبحة: بدون كلمة، نفس حجم مازن، يسار */
#subha-launcher,
.subha-launcher,
button#subha-launcher {
  position: fixed !important;
  left: 12px !important;
  right: auto !important;
  bottom: calc(var(--mazen-dock) + var(--fab-lift)) !important;
  width: var(--fab-size) !important;
  height: var(--fab-size) !important;
  min-width: var(--fab-size) !important;
  min-height: var(--fab-size) !important;
  max-width: var(--fab-size) !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 1.6px solid rgba(212, 175, 55, 0.75) !important;
  background:
    radial-gradient(circle at 40% 32%, #2a5a40, #0e2218 68%) !important;
  color: #F6E27A !important;
  z-index: 260 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden !important;
  font-size: 0 !important;
  line-height: 0 !important;
  gap: 0 !important;
}
#subha-launcher span,
.subha-launcher span {
  display: block !important;
  font-size: 30px !important;
  line-height: 1 !important;
}
#subha-launcher .subha-launcher-icon,
.subha-launcher-icon {
  font-size: 30px !important;
  line-height: 1 !important;
  display: block !important;
}

/* إلغاء صفحة التسبيحة الحالية */
#subha-hud,
.subha-hud,
#subha-sheet,
.subha-sheet { display: none !important; visibility: hidden !important; pointer-events: none !important; }

/* فقاعة الترشيح الصغيرة بجانب السبحة */
.subha-suggest-pop {
  position: fixed;
  left: calc(12px + var(--fab-size) + 8px);
  bottom: calc(var(--mazen-dock) + var(--fab-lift) + 4px);
  max-width: min(68vw, 260px);
  background: linear-gradient(175deg, #1a3a2a, #0c1c14);
  color: #fff8dc;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  z-index: 259;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.subha-suggest-pop[hidden] { display: none !important; }
.ssp-phase { margin: 0 0 4px; color: #F6E27A; font-weight: 800; font-size: 0.72rem; }
.ssp-text { margin: 0 0 4px; font-weight: 700; }
.ssp-remain { margin: 0 0 8px; opacity: 0.8; font-size: 0.75rem; }
.ssp-go, .ssp-pick {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.14);
  color: #F6E27A;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0 0 6px 6px;
}
.ssp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ssp-close {
  position: absolute;
  top: 4px;
  left: 6px;
  background: none;
  border: 0;
  color: rgba(250, 246, 232, 0.6);
  font-size: 16px;
  cursor: pointer;
}

/* نجمتان فقط بدل كلمة تقييم — داخل إطار الموبايل */
.composer-input-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding-inline-end: 0;
}
#composer-quick-input {
  flex: 1 1 auto;
  min-width: 0 !important;
  max-width: 100%;
}
#composer-quick-btn,
.composer-send-btn,
#composer-quick-btn.composer-stars-only {
  flex: 0 0 auto !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  padding: 8px 4px !important;
  font-size: 18px !important;
  letter-spacing: -1px;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-indent: 0 !important;
  line-height: 1;
  color: #F6E27A !important;
  box-sizing: border-box;
}
.composer-star { color: #F6E27A; font-size: 18px; }

/* قائمة حساب مسيو */
#top-account-slot { position: relative; }
.mesue-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: min(78vw, 280px);
  background: linear-gradient(180deg, #163024, #0c1a14);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 4000;
  overflow: hidden;
  padding: 8px 0 6px;
  text-align: right;
  direction: rtl;
}
.mam-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}
.mam-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #1a3328;
  flex-shrink: 0;
}
.mam-id { min-width: 0; }
.mam-id strong {
  display: block;
  color: #FAF6E8;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mam-id small {
  display: block;
  color: rgba(250, 246, 232, 0.65);
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mam-item {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  text-align: right;
  padding: 11px 16px;
  color: #FAF6E8;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.mam-item:hover, .mam-item:focus { background: rgba(212, 175, 55, 0.12); }
.mam-item.mam-primary { color: #F6E27A; }
.mam-item.mam-logout {
  color: #f0b4b4;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  margin-top: 4px;
  font-weight: 600;
}

/* ورقة سماح مضغوطة بدل صفحة الصلاحيات */
.grant-sheet {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(6, 14, 10, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
}
.grant-card {
  width: min(100%, 420px);
  background: linear-gradient(180deg, #163024, #0c1a14);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 20px 20px 16px 16px;
  padding: 18px 18px 16px;
  color: #FAF6E8;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.grant-card h2 { margin: 0 0 6px; color: #F6E27A; font-size: 1.05rem; }
.grant-card p { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.55; opacity: 0.9; }
.grant-actions { display: flex; gap: 8px; }
.grant-allow {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 1rem;
  background: linear-gradient(135deg, #E6C65C, #D4AF37);
  color: #06100C;
  cursor: pointer;
}
.grant-later {
  appearance: none;
  border: 1px solid rgba(255, 243, 176, 0.25);
  background: transparent;
  color: #FFF3B0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

/* لا يخرج أي صف تقييم عن إطار الشاشة */
#radio-community-section,
.radio-community-section,
.inline-review-composer,
.reviews-feed {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* رأس السبحة العائمة: بدون كلمة سبحة بارزة */
.subha-head-title { display: none !important; }
