/* ==========================================================
   Adhkar UI (Light + Dark) — Mawaqeeti
   يعتمد على body.theme-dark و body.theme-light
   ========================================================== */

/* Light (default) — scoped */
.adhkar-page{
  --bg: #f9fafb;
  --text: #0f172a;
  --muted: #475569;

  --card: rgba(255,255,255,.9);
  --card-border: rgba(15,23,42,.08);

  --accent: #38BDF8;
  --accent-2: rgba(56,189,248,.18);

  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --radius: 18px;
}

/* Dark — supports your theme system + fallback */
body.mawaqeeti-body.theme-dark .adhkar-page,
body.theme-dark .adhkar-page{
  --bg: #020617;
  --text: #e5e7eb;
  --muted: rgba(226,232,240,.75);

  --card: rgba(2,6,23,.62);
  --card-border: rgba(148,163,184,.14);

  --accent: #38BDF8;
  --accent-2: rgba(56,189,248,.18);

  --shadow: 0 14px 40px rgba(0,0,0,.38);
}


/* حاوية الصفحة */
.adhkar-page{
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 16px 44px;
  color: var(--text);
}

/* Card helper */
.card-soft{
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* HERO */
.adhkar-hero{
  overflow: hidden;
  position: relative;
}

.adhkar-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, var(--accent-2), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(15,23,42,.06), transparent 55%);
  pointer-events: none;
}

body.theme-dark .adhkar-hero::before{
  background:
    radial-gradient(circle at 10% 20%, rgba(56,189,248,.16), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(15,23,42,.55), transparent 55%);
}

.adhkar-hero-inner{
  position: relative;
  z-index: 1;
  padding: 28px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}

/* Breadcrumb */
.adhkar-breadcrumb{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.adhkar-breadcrumb-link{
  color: var(--muted);
  text-decoration: none;
}

.adhkar-breadcrumb-link:hover{
  color: var(--text);
  text-decoration: underline;
}

.adhkar-breadcrumb-sep{
  opacity: .6;
}

.adhkar-breadcrumb-current{
  color: var(--text);
  opacity: .85;
}

/* Title / subtitle */
.adhkar-title{
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -.02em;
}

.adhkar-subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 62ch;
}

.adhkar-note{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  opacity: .95;
}

/* Stats */
.adhkar-stats{
  display: grid;
  grid-template-columns: 180px 180px;
  gap: 14px;
  align-self: center;
}

.adhkar-stat{
  background: rgba(255,255,255,.55);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px 16px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.theme-dark .adhkar-stat{
  background: rgba(2,6,23,.45);
}

.adhkar-stat-label{
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.adhkar-stat-value{
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

/* Progress circle */
.adhkar-progress-wrap{
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.adhkar-progress-ring{
  width: 92px;
  height: 92px;
  position: relative;
}

.adhkar-progress-svg{
  width: 92px;
  height: 92px;
  transform: rotate(-90deg);
}

.adhkar-progress-bg{
  fill: none;
  stroke: rgba(71,85,105,.25);
  stroke-width: 3.2;
}

body.theme-dark .adhkar-progress-bg{
  stroke: rgba(226,232,240,.20);
}

.adhkar-progress-fg{
  fill: none;
  stroke: rgba(56,189,248,.85);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray .25s ease;
}

.adhkar-progress-center{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.adhkar-progress-percent{
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.adhkar-progress-count{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* List */
.adhkar-list{
  margin-top: 18px;
}

.adhkar-list-head{
  margin-bottom: 14px;
}

.adhkar-list-title{
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}

.adhkar-list-subtitle{
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

/* Grid */
.adhkar-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.adhkar-card{
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.adhkar-card:hover{
  transform: translateY(-2px);
  border-color: rgba(56,189,248,.45);
  box-shadow: 0 14px 30px rgba(56,189,248,.10);
}

.adhkar-card-title{
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  font-weight: 800;
}

.adhkar-card-title-link{
  color: var(--text);
  text-decoration: none;
}

.adhkar-card-title-link:hover{
  text-decoration: underline;
}

.adhkar-card-desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

.adhkar-card-actions{
  margin-top: auto;
}

/* Button (نفس فكرة btn في المدونة) */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(56,189,248,.35);
  background: rgba(56,189,248,.14);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

body.theme-dark .btn{
  background: rgba(56,189,248,.10);
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(56,189,248,.12);
}

.btn.btn-sm{
  padding: 10px 12px;
  font-size: 14px;
}

.adhkar-read-btn{
  width: fit-content;
}

.adhkar-read-arrow{
  font-weight: 900;
}

/* Empty */
.adhkar-empty{
  padding: 18px;
  margin-top: 16px;
  color: var(--muted);
}

/* ==========================
   Dhikr Card (Category page)
   ========================== */

.dhikr-card{
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dhikr-topbar{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.dhikr-counter{
  display: inline-flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-dark .dhikr-counter{
  background: rgba(2,6,23,.40);
}

.dhikr-counter-btn{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(56,189,248,.35);
  background: rgba(56,189,248,.10);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease;
}

.dhikr-counter-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(56,189,248,.10);
}

.dhikr-counter-center{
  min-width: 120px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2px 8px;
}

.dhikr-counter-label{
  font-size: 12px;
  color: var(--muted);
}

.dhikr-counter-value{
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.dhikr-counter-max{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-inline-start: 6px;
}

.dhikr-tools{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dhikr-tool-btn{
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,.55);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-dark .dhikr-tool-btn{
  background: rgba(2,6,23,.40);
}

.dhikr-tool-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(56,189,248,.40);
  box-shadow: 0 12px 22px rgba(15,23,42,.08);
}

.dhikr-status{
  margin-top: 2px;
}

.dhikr-remaining-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(71,85,105,.12);
  color: var(--text);
  border: 1px solid var(--card-border);
}

body.theme-dark .dhikr-remaining-badge{
  background: rgba(226,232,240,.10);
}

.dhikr-remaining-badge.completed{
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.35);
}

.dhikr-text{
  margin: 0;
  font-size: 18px;
  line-height: 2.0;
  white-space: pre-line;
}

.dhikr-meta{
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.dhikr-meta strong{
  color: var(--text);
  font-weight: 900;
}

/* Responsive */
@media (max-width: 980px){
  .adhkar-hero-inner{
    grid-template-columns: 1fr;
  }
  .adhkar-stats{
    grid-template-columns: 1fr 1fr;
    justify-content: start;
  }
  .adhkar-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .adhkar-title{
    font-size: 30px;
  }
  .adhkar-stats{
    grid-template-columns: 1fr;
  }
  .adhkar-grid{
    grid-template-columns: 1fr;
  }
  .adhkar-hero-inner{
    padding: 18px 18px;
  }
  .dhikr-counter{
    width: 100%;
    justify-content: space-between;
  }
  .dhikr-tools{
    width: 100%;
  }
  .dhikr-tool-btn{
    flex: 1 1 auto;
    text-align: center;
  }
}
