/* t308 — سبحة مستقبلية: مستطيل بمقاس الكورة، كرتين فوق بعض */
:root {
  --sf-w: 68px;
  --sf-card: 56px;
  --sf-tool: 22px;
}

/* إلغاء الكورة العائمة والهيدر الذهبي والبلونة الكبيرة التلقائية */
#subha-head,
.subha-head,
.subha-dismiss,
#subha-hud,
.subha-hud,
#subha-sheet,
.subha-sheet,
#subha-launcher,
.subha-launcher,
button#subha-launcher {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

#sebha-futura {
  position: fixed;
  left: 10px;
  right: auto;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px));
  width: var(--sf-w);
  z-index: 260;
  pointer-events: auto;
  direction: rtl;
  font-family: "Cairo", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}

/* خيط التعليق في الواجهة */
#sebha-futura::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  margin-left: -1px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15), #d4af37);
  border-radius: 2px;
  pointer-events: none;
}
#sebha-futura::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 1.6px solid #d4af37;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(6, 16, 12, 0.9), 0 0 8px rgba(212, 175, 55, 0.35);
  pointer-events: none;
  background: #0c1a14;
}

.sf-frame {
  position: relative;
  width: var(--sf-w);
  padding: 6px 6px 8px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 243, 176, 0.16), transparent 42%),
    linear-gradient(180deg, #163224 0%, #08140f 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 176, 0.22),
    inset 0 -8px 16px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  overflow: visible;
}

/* تذكير دائم بالورد */
.sf-remind {
  width: 100%;
  text-align: center;
  padding: 3px 3px 1px;
  pointer-events: none;
}
.sf-remind-phase {
  display: block;
  font-size: 8px;
  font-weight: 800;
  color: #e6c65c;
  letter-spacing: 0.2px;
  line-height: 1.2;
}
.sf-remind-text {
  display: block;
  font-size: 9px;
  font-weight: 800;
  color: #fff8dc;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
  padding: 0 1px;
}
.sf-remind-frac {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #f6e27a;
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}
.sf-remind.is-done .sf-remind-phase { color: #9ee0b0; }
.sf-remind.is-done .sf-remind-frac { color: #9ee0b0; }

/* الكرتان */
.sf-card {
  position: relative;
  width: var(--sf-card);
  height: var(--sf-card);
  border-radius: 50%;
  flex-shrink: 0;
}

.sf-card-top {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 243, 176, 0.28), transparent 50%),
    radial-gradient(circle at 50% 50%, #1d4a34, #0a1c14 72%);
  border: 1.6px solid #e6c65c;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.45),
    inset 0 0 0 3px rgba(8, 20, 15, 0.45),
    0 0 14px rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf-count {
  appearance: none;
  background: none;
  border: 0;
  color: #fff3b0;
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 10px rgba(255, 243, 176, 0.35);
}

.sf-cycle {
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: var(--sf-tool);
  height: var(--sf-tool);
  border-radius: 50%;
  border: 1.4px solid #06120d;
  background: linear-gradient(145deg, #f0d56a, #b8902a);
  color: #06120d;
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  z-index: 3;
  line-height: 1;
}
.sf-cycle:active { transform: scale(0.9) rotate(30deg); }

/* كرة البصمة */
.sf-card-print {
  background:
    radial-gradient(circle at 50% 50%, #123226 0%, #07140f 70%);
  border: 1.6px solid rgba(212, 175, 55, 0.85);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.5),
    inset 0 0 0 4px rgba(212, 175, 55, 0.1),
    inset 0 0 18px rgba(212, 175, 55, 0.12);
  overflow: visible;
}
.sf-print {
  appearance: none;
  background: transparent;
  border: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sf-print svg {
  width: 30px;
  height: 30px;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 4px rgba(246, 226, 122, 0.45));
}
.sf-rings {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.28);
  pointer-events: none;
  z-index: 1;
}
.sf-rings::before,
.sf-rings::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
  inset: 5px;
}
.sf-rings::after { inset: 10px; border-color: rgba(212, 175, 55, 0.32); }

.sf-scan {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 10px;
  top: 8%;
  background: linear-gradient(180deg, transparent, rgba(255, 243, 176, 0.45), transparent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  animation: sf-scan 2.4s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes sf-scan {
  0% { top: 10%; opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { top: 72%; opacity: 0; }
}
.sf-card-print.is-tapping {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 18px rgba(212, 175, 55, 0.65),
    inset 0 0 16px rgba(255, 243, 176, 0.28);
  transform: scale(0.94);
}
.sf-card-print.is-tapping .sf-scan { animation: none; opacity: 1; top: 40%; }
.sf-count.is-pop {
  animation: sf-pop 0.18s ease-out;
}
@keyframes sf-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.sf-reset,
.sf-rash {
  position: absolute;
  width: var(--sf-tool);
  height: var(--sf-tool);
  border-radius: 50%;
  border: 1.4px solid #06120d;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  font-weight: 800;
  line-height: 1;
}
.sf-reset {
  bottom: -2px;
  right: -3px;
  background: linear-gradient(145deg, #2a4a3a, #13261c);
  color: #f6e27a;
  font-size: 13px;
  border-color: rgba(212, 175, 55, 0.7);
}
.sf-rash {
  bottom: -2px;
  left: -3px;
  background: linear-gradient(145deg, #f0d56a, #b8902a);
  color: #06120d;
  font-size: 11px;
}
.sf-reset:active,
.sf-rash:active { transform: scale(0.9); }
.sf-rash.is-on {
  box-shadow: 0 0 10px rgba(246, 226, 122, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .sf-scan { animation: none; opacity: 0.5; top: 40%; }
  .sf-count.is-pop { animation: none; }
}

/* بلونة رشّحلي المضغوطة — تظهر فقط عند الطلب */
#subha-suggest-pop,
.subha-suggest-pop {
  position: fixed !important;
  left: calc(10px + var(--sf-w) + 8px) !important;
  right: auto !important;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px)) !important;
  top: auto !important;
  width: min(58vw, 228px) !important;
  max-width: min(58vw, 228px) !important;
  max-height: min(42vh, 320px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: linear-gradient(175deg, #1a3a2a, #0c1c14) !important;
  color: #fff8dc !important;
  border: 1px solid rgba(212, 175, 55, 0.55) !important;
  border-radius: 16px 16px 16px 6px !important;
  padding: 12px 12px 10px !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
  z-index: 261 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
  pointer-events: auto !important;
}
.subha-suggest-pop[hidden] { display: none !important; }
.ssp-phase { margin: 0 18px 4px 0; color: #F6E27A; font-weight: 800; font-size: 0.72rem; }
.ssp-text { margin: 0 0 4px; font-weight: 700; font-size: 0.84rem; }
.ssp-remain { margin: 0 0 8px; opacity: 0.85; font-size: 0.75rem; }
.ssp-go, .ssp-pick {
  appearance: none;
  display: block;
  width: 100%;
  text-align: right;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.1);
  color: #fff3b0;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0 0 6px;
  line-height: 1.45;
}
.ssp-list { display: flex; flex-direction: column; gap: 4px; }
.ssp-close {
  position: absolute;
  top: 6px;
  left: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  color: #faf6e8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

/* مساحة آمنة عشان السبحة ما تغطيش المحتوى */
#view-settings .settings-scroll,
#view-azan,
#view-radio .radio-scroll-container,
#view-quran,
body.view-settings .settings-scroll {
  padding-left: 6px;
  padding-bottom: 8px;
}
.settings-group,
#view-settings .settings-group {
  padding-left: 6px;
}

/* فقاعة ترحيب مازن من غير قص أو تداخل مع السبحة */
.mazen-welcome {
  right: calc(12px + var(--fab-size, 64px) + 8px) !important;
  left: calc(10px + var(--sf-w) + 8px) !important;
  width: auto !important;
  max-width: none !important;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px) + 72px) !important;
  z-index: 258 !important;
  overflow: visible !important;
  word-break: break-word;
  line-height: 1.55;
}
.mazen-welcome p,
.mazen-welcome .mazen-bubble-text {
  overflow: visible !important;
  white-space: normal !important;
  max-height: none !important;
}
body.grant-open .mazen-welcome,
body.has-grant-sheet .mazen-welcome {
  visibility: hidden !important;
}

/* بانر الضبط: منع يتم كلمة لوحدها */
.settings-header-banner p,
.settings-header-banner .settings-lead {
  text-wrap: pretty;
  overflow-wrap: anywhere;
  line-height: 1.55;
  font-size: 0.82rem;
}

/* نموذج التقييم: نجمتين فقط، من غير قيّم تفيض */
#modal-star-picker .star-pick[data-val="3"],
#modal-star-picker .star-pick[data-val="4"],
#modal-star-picker .star-pick[data-val="5"] {
  display: none !important;
}
#review-modal .review-modal-title,
#review-modal-title {
  font-size: 0.95rem;
  line-height: 1.4;
  overflow: hidden;
}
.guest-row,
.review-guest,
#composer-guest-hint,
.composer-guest-label {
  white-space: normal !important;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* صفحة ضبط مازن: إخفاء الأيقونات العائمة */
body.mazen-dict-open #sebha-futura,
body.mazen-dict-open #subha-suggest-pop,
body.mesue-drawer-open #sebha-futura,
body.mesue-drawer-open #subha-suggest-pop {
  display: none !important;
}
