/* t309 — قائمة الحساب، كروت الأذان، عكس مازن/السبحة، سبحة حرّة */
/* قائمة الحساب: ثابتة جوه إطار الشاشة، فوق كل حاجة */
#top-account-slot { overflow: visible !important; position: relative; z-index: 50; }
header.top, .top, .top-bar, #app-header, .app-header {
  overflow: visible !important;
}
.mesue-account-menu {
  position: fixed !important;
  z-index: 12000 !important;
  width: min(86vw, 280px) !important;
  max-width: calc(100vw - 16px) !important;
  max-height: min(70vh, 440px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
}

/* عكس مكان مازن (يسار) والسبحة (يمين) */
.mazen-face {
  left: 12px !important;
  right: auto !important;
}
.mazen-welcome {
  left: calc(12px + var(--fab-size, 64px) + 8px) !important;
  right: calc(10px + var(--sf-w, 68px) + 8px) !important;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px) + 72px) !important;
}
.mazen-root.kb-open .mazen-face {
  left: 12px !important;
  right: auto !important;
}

#sebha-futura {
  left: auto !important;
  right: 10px !important;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px));
  touch-action: none;
  cursor: grab;
}
#sebha-futura.is-dragging {
  cursor: grabbing;
  transition: none !important;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.65));
}
#sebha-futura.is-hidden,
#sebha-futura[hidden] {
  display: none !important;
}

/* زر إعادة فتح بعد السحب */
#sebha-reopen {
  position: fixed;
  right: 12px;
  left: auto;
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  z-index: 260;
  border: 1.5px solid rgba(212, 175, 55, 0.8);
  background: radial-gradient(circle at 40% 32%, #2a5a40, #0e2218 68%);
  color: #F6E27A;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
}
#sebha-reopen[hidden] { display: none !important; }

#subha-suggest-pop,
.subha-suggest-pop {
  left: auto !important;
  right: calc(10px + var(--sf-w, 68px) + 8px) !important;
  border-radius: 16px 16px 6px 16px !important;
}

/* منطقة الإغلاق بالسحب */
#sebha-futura-dismiss,
.subha-dismiss {
  display: grid !important;
  visibility: visible;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: 72px;
  height: 72px;
  margin-left: -36px;
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 107, 107, 0.2);
  border: 2px solid rgba(255, 107, 107, 0.6);
  color: #ff8f8f;
  font-size: 30px;
  z-index: 12100;
  transform: translate3d(0, 20px, 0) scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}
.subha-dismiss.is-show,
#sebha-futura-dismiss.is-show {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
}
.subha-dismiss.is-hot,
#sebha-futura-dismiss.is-hot {
  background: rgba(255, 107, 107, 0.5) !important;
  border-color: #ff6b6b !important;
  color: #fff !important;
  transform: translate3d(0, 0, 0) scale(1.15) !important;
}

/* صفحة الأذان: الكروت تتوسع على محتواها، مش مقفولة */
#view-azan {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 14px 14px calc(var(--dock, 64px) + 24px) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#view-azan .next-card {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px 16px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 16px 18px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#view-azan .next-card > * {
  min-width: 0;
  max-width: 100%;
  overflow: visible !important;
}
#view-azan .next-card #next-name,
#view-azan .next-card #next-clock,
#view-azan .next-card #place-line,
#view-azan .next-card #next-left {
  overflow: visible !important;
  white-space: normal !important;
  max-width: 100% !important;
  word-break: break-word;
}
#view-azan .next-card #next-clock {
  font-size: clamp(1.4rem, 7vw, 2.1rem) !important;
}
#view-azan .next-card #next-name {
  font-size: clamp(1.2rem, 6vw, 1.75rem) !important;
}

#view-azan #prayer-grid,
#view-azan .times {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
  height: auto !important;
}
#view-azan #prayer-grid article,
#view-azan .times article {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px 14px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 58px !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
  padding: 14px 16px !important;
  box-sizing: border-box !important;
  transform: none !important;
}
#view-azan #prayer-grid article .k,
#view-azan .times article .k,
#view-azan #prayer-grid article .t,
#view-azan .times article .t {
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: unset !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  line-height: 1.4 !important;
  font-size: 1rem !important;
}
#view-azan #prayer-grid article .t,
#view-azan .times article .t {
  flex: 0 0 auto !important;
  font-size: 1.15rem !important;
  font-variant-numeric: tabular-nums;
}

#view-azan .azan-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
  height: auto !important;
  align-items: stretch !important;
}
#view-azan .azan-actions .tool,
#view-azan .azan-actions .switch,
#view-azan .azan-actions #btn-setup {
  flex: 1 1 calc(50% - 10px) !important;
  min-height: 46px !important;
  height: auto !important;
  white-space: normal !important;
  overflow: visible !important;
  text-align: center;
}
#view-azan .azan-voice-picker,
#view-azan #azan-sound-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
  margin: 12px 0 !important;
}
#view-azan #azan-sound-select {
  width: 100% !important;
  min-height: 48px !important;
  height: auto !important;
  font-size: 16px !important;
}
.qibla-card {
  overflow: visible !important;
  height: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 12px 0 18px !important;
}
.qibla-stage {
  width: min(64vw, 260px) !important;
  height: min(64vw, 260px) !important;
  max-width: 100%;
}

/* ضبط مازن: الأزرار ما تتراكبش */
body.mazen-dict-open #sebha-futura,
body.mazen-dict-open #sebha-reopen,
body.mazen-dict-open .mazen-face,
body.mesue-drawer-open #sebha-futura,
body.mesue-drawer-open #sebha-reopen {
  display: none !important;
}

/* نسمة مازن — رد سريع يخجل ويختفي */
.mazen-nasma {
  position: fixed;
  left: calc(12px + var(--fab-size, 64px) + 8px);
  bottom: calc(var(--mazen-dock, 80px) + var(--fab-lift, 16px) + 10px);
  max-width: min(58vw, 230px);
  padding: 8px 12px;
  border-radius: 16px 16px 16px 6px;
  background: rgba(14, 34, 24, 0.94);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: #FFF3B0;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  z-index: 9000;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.mazen-nasma.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#sf-overlay-grant {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 13000;
  width: min(92vw, 340px);
  background: #0e2218;
  border: 1.5px solid rgba(212, 175, 55, 0.55);
  border-radius: 18px;
  padding: 16px 16px 12px;
  color: #eaf6ef;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
#sf-overlay-grant p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.5; }
#sf-overlay-grant .samah {
  appearance: none;
  border: 0;
  background: linear-gradient(135deg, #F6E27A, #D4AF37);
  color: #0a1610;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 32px;
  font-size: 1.05rem;
  cursor: pointer;
}
#sf-overlay-grant .skip {
  display: block;
  margin: 10px auto 0;
  background: transparent;
  border: 0;
  color: #A3C9B8;
  cursor: pointer;
  font-size: 0.85rem;
}
#sebha-futura.is-left ~ #subha-suggest-pop,
body.sf-left #subha-suggest-pop,
#subha-suggest-pop.sf-left {
  left: calc(10px + var(--sf-w, 68px) + 8px) !important;
  right: auto !important;
  border-radius: 16px 16px 16px 6px !important;
}

/* اخفاء السبحة القديمة تماماً */
#subha-head, #subha-launcher, .subha-head, .subha-launcher,
#subha-bubble-root .subha-head, #subha-bubble-root .subha-launcher {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  transform: none !important;
}
