/* Misbahah (مسبحة) - UI */
.misbaha {
  direction: rtl;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, Arial, "Cairo", "Tajawal", sans-serif;
  --bg: #fbf7ee;
  --card: #ffffff;
  --text: #202020;
  --muted: #6a6a6a;
  --accent: #d3b26d;
  --accent2: #b8923b;
  --border: rgba(0,0,0,.08);
  --shadow: 0 16px 40px rgba(0,0,0,.08);
  color: var(--text);
}

.misbaha--page {
  padding: 24px 12px;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(211,178,109,.22), transparent 60%),
              radial-gradient(900px 500px at 10% 0%, rgba(184,146,59,.14), transparent 55%),
              var(--bg);
  border-radius: 16px;
}

.misbaha--widget { padding: 10px 0; }

.misbaha__card {
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.98));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.misbaha--widget .misbaha__card {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.misbaha__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.misbaha__title { font-size: 20px; font-weight: 800; letter-spacing: .2px; }

.misbaha__sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.misbaha__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(251,247,238,.65);
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}

.misbaha__badgeDot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(211,178,109,.18);
}


/* Top actions (Reset + Badge) */
.misbaha__topActions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.misbaha__resetTop{
  appearance: none;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  color: var(--text);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 10px 18px rgba(0,0,0,.05);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.misbaha__resetTop:hover{ background: rgba(251,247,238,.7); }
.misbaha__resetTop:active{ transform: translateY(1px) scale(.99); }

/* Selected Dhikr (big + prominent) */
.misbaha__selected{
  padding: 4px 18px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.misbaha__selectedLabel{
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
  margin-bottom: 8px;
}
.misbaha__selectedValue{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(211,178,109,.18);
  border: 1px solid rgba(184,146,59,.20);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .2px;
  min-width: 240px;
}
.misbaha__selected.is-empty .misbaha__selectedValue{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.06);
  color: var(--muted);
  font-weight: 800;
}

.misbaha__dhikrRow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.misbaha__dhikrLabel { font-size: 12px; color: var(--muted); }

.misbaha__dhikrValue {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  min-width: 160px;
}

.misbaha__linkBtn {
  background: transparent;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  padding: 6px 8px;
  border-radius: 8px;
}

.misbaha__linkBtn:hover { background: rgba(211,178,109,.12); }

.misbaha__counter{
  width: 280px;
  height: 280px;
  margin: 18px auto 14px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.10);
  background: radial-gradient(circle at 30% 25%, rgba(211,178,109,.18), rgba(255,255,255,.85));
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.02), 0 18px 34px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  padding: 0;
}

.misbaha__count {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .5px;
  color: #111;
  text-shadow: 0 2px 0 rgba(0,0,0,.03);
}

.misbaha--widget .misbaha__count { font-size: 52px; }

.misbaha--widget .misbaha__counter{ width: 210px; height: 210px; }

.misbaha__hint { margin-top: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }

.misbaha__actions {
  display: flex;
  gap: 10px;
  padding: 0 18px 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.misbaha__btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 11px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 10px 20px rgba(0,0,0,.04);
}

.misbaha__btn:active { transform: translateY(1px) scale(.99); }

.misbaha__btn--primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #1b1406;
  border-color: rgba(0,0,0,.06);
  box-shadow: 0 12px 26px rgba(211,178,109,.28);
  min-width: 140px;
}

.misbaha__btn--ghost { background: rgba(251,247,238,.7); }

.misbaha__btn--mini {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: none;
}

.misbaha__adhkar {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
  background: rgba(251,247,238,.45);
}

.misbaha__sectionTitle { font-size: 13px; font-weight: 900; margin-bottom: 10px; }

.misbaha__chips { display: flex; flex-wrap: wrap; gap: 8px; }

.misbaha__chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: background .2s ease, border-color .2s ease;
}

.misbaha__chip:hover { background: rgba(211,178,109,.12); }
.misbaha__chip.is-active {
  border-color: rgba(184,146,59,.45);
  background: rgba(211,178,109,.18);
}

.misbaha__custom { display: flex; gap: 8px; margin-top: 12px; }

.misbaha__input {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline: none;
  font-weight: 700;
  background: #fff;
}

.misbaha__input:focus {
  border-color: rgba(184,146,59,.55);
  box-shadow: 0 0 0 4px rgba(211,178,109,.16);
}

.misbaha__note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 18px;
}

.misbaha__widgetFooter { margin-top: 10px; text-align: center; }

.misbaha__openPage {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 900;
  font-size: 13px;
  color: var(--accent2);
  text-decoration: none;
}

.misbaha__openPage:hover { background: rgba(211,178,109,.10); }

@media (max-width: 480px) {
  .misbaha__top { padding: 16px 14px 10px; }
  .misbaha__dhikrRow { padding: 0 14px 12px; }
  .misbaha__counter{
  width: 280px;
  height: 280px;
  margin: 18px auto 14px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.10);
  background: radial-gradient(circle at 30% 25%, rgba(211,178,109,.18), rgba(255,255,255,.85));
  box-shadow: inset 0 0 0 8px rgba(0,0,0,.02), 0 18px 34px rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  padding: 0;
}
  .misbaha__actions { padding: 0 14px 16px; }
  .misbaha__adhkar { padding: 14px 14px 16px; }
  .misbaha__count { font-size: 58px; }
}
