/*
 * rakah-tracker.css — styling for the automatic rakah counter (native only).
 * Pairs with rakah-tracker.js. Platform carried on [data-sp-platform] so iOS
 * gets a grouped bottom-sheet and Android a Material sheet. Brand emerald.
 */
:root { --sp-rk-emerald: #10b981; --sp-rk-emerald-d: #0e9f74; }

/* ── promo card launcher (banner under "Daily Hadith") ────────────────────── */
.sp-rk-card-wrap { width: 100%; }
.sp-rk-card {
  width: 100%; display: flex; align-items: center; gap: 13px; text-align: left;
  border: 0; cursor: pointer; border-radius: 16px; padding: 14px 16px;
  background: linear-gradient(135deg, var(--sp-rk-emerald), var(--sp-rk-emerald-d));
  color: #fff; box-shadow: 0 6px 18px rgba(16,185,129,.32);
  transition: transform .14s ease, box-shadow .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.sp-rk-card:active { transform: scale(.985); box-shadow: 0 3px 10px rgba(16,185,129,.3); }
.sp-rk-card-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; color: #fff;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
}
.sp-rk-card-txt { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.sp-rk-card-title { font-size: 15.5px; font-weight: 700; line-height: 1.2; }
.sp-rk-card-sub { font-size: 12.5px; font-weight: 500; line-height: 1.3; color: rgba(255,255,255,.85); margin-top: 2px; }
.sp-rk-card-cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px;
  font-size: 13.5px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.2); border-radius: 999px; padding: 6px 10px 6px 12px;
}
.sp-rk-card[data-sp-platform="ios"] { border-radius: 18px; }
@media (prefers-color-scheme: dark) { .sp-rk-card { box-shadow: 0 6px 18px rgba(0,0,0,.35); } }

/* ── floating launcher (deprecated — replaced by the promo card above) ─────── */
.sp-rk-fab {
  position: fixed; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; border-radius: 50%; border: 0; z-index: 9000;
  background: linear-gradient(160deg, var(--sp-rk-emerald), var(--sp-rk-emerald-d));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(16,185,129,.45); cursor: pointer;
  transition: transform .15s ease;
}
.sp-rk-fab:active { transform: scale(.9); }
.sp-rk-fab[data-sp-platform="ios"] { background: rgba(16,185,129,.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ── overlay + sheet ────────────────────────────────────────────────────── */
.sp-rk-overlay {
  position: fixed; inset: 0; z-index: 9100; display: flex; align-items: flex-end;
  justify-content: center; background: rgba(0,0,0,0); transition: background .24s ease;
}
.sp-rk-overlay.sp-rk-in { background: rgba(0,0,0,.45); }
.sp-rk-sheet {
  width: 100%; max-width: 520px; background: #fff; color: #11201b;
  border-radius: 22px 22px 0 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,.25); text-align: center; max-height: 92vh; overflow-y: auto;
}
.sp-rk-overlay.sp-rk-in .sp-rk-sheet { transform: translateY(0); }
@media (prefers-color-scheme: dark) { .sp-rk-sheet { background: #14201c; color: #eaf3ef; } }

.sp-rk-grip { width: 38px; height: 5px; border-radius: 3px; background: rgba(127,127,127,.35); margin: 4px auto 12px; }
.sp-rk-title { font-size: 21px; font-weight: 700; margin: 4px 0 6px; }
.sp-rk-sub { font-size: 14px; line-height: 1.45; color: rgba(80,90,86,.9); margin: 0 0 16px; }
@media (prefers-color-scheme: dark) { .sp-rk-sub { color: rgba(190,205,198,.85); } }

/* prayer chips */
.sp-rk-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.sp-rk-chip {
  border: 1.5px solid rgba(16,185,129,.3); background: transparent; color: inherit;
  padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.sp-rk-chip.on { background: var(--sp-rk-emerald); border-color: var(--sp-rk-emerald); color: #fff; }
.sp-rk-chip-sm { padding: 7px 12px; font-size: 13.5px; }
.sp-rk-target { font-size: 15px; font-weight: 600; color: var(--sp-rk-emerald-d); margin-bottom: 14px; }
.sp-rk-label { font-size: 12.5px; font-weight: 600; color: rgba(120,130,126,.95); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 8px; }
.sp-rk-learn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 22px; margin: 12px 0 4px; flex-wrap: wrap; }
.sp-rk-learn-ok { font-size: 13px; font-weight: 600; color: var(--sp-rk-emerald-d); }
.sp-rk-learn-btn { border: 1.5px solid rgba(16,185,129,.35); background: transparent; color: var(--sp-rk-emerald-d); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.sp-rk-learn-btn:active { background: rgba(16,185,129,.12); }
.sp-rk-note { font-size: 12.5px; line-height: 1.5; color: rgba(120,130,126,.95); background: rgba(16,185,129,.08); border-radius: 12px; padding: 10px 12px; margin-bottom: 18px; }

/* primary / text buttons */
.sp-rk-primary {
  width: 100%; border: 0; border-radius: 14px; padding: 15px; font-size: 16px; font-weight: 700;
  color: #fff; background: linear-gradient(160deg, var(--sp-rk-emerald), var(--sp-rk-emerald-d));
  cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.sp-rk-primary:active { transform: scale(.98); }
.sp-rk-primary:disabled { opacity: .4; }
.sp-rk-text { width: 100%; border: 0; background: transparent; color: rgba(120,130,126,.95); font-size: 15px; padding: 12px; margin-top: 4px; cursor: pointer; }

/* calibration countdown */
.sp-rk-count { font-size: 72px; font-weight: 800; color: var(--sp-rk-emerald); margin: 20px 0 28px; }

/* tracking pulse */
.sp-rk-pulse { display: flex; align-items: center; justify-content: center; height: 120px; margin: 8px 0 20px; }
.sp-rk-pulse-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--sp-rk-emerald); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: sp-rk-pulse 1.6s infinite; }
@keyframes sp-rk-pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); } 70% { box-shadow: 0 0 0 34px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* result */
.sp-rk-result { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 10px; }
.sp-rk-step { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(16,185,129,.4); background: transparent; color: var(--sp-rk-emerald-d); font-size: 26px; line-height: 1; cursor: pointer; }
.sp-rk-step:active { background: rgba(16,185,129,.12); }
.sp-rk-bignum { display: flex; flex-direction: column; align-items: center; min-width: 96px; }
.sp-rk-bignum-n { font-size: 64px; font-weight: 800; color: var(--sp-rk-emerald); line-height: 1; }
.sp-rk-bignum-l { font-size: 14px; color: rgba(120,130,126,.95); margin-top: 2px; }
.sp-rk-dots { display: flex; gap: 8px; justify-content: center; margin: 6px 0 14px; }
.sp-rk-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sp-rk-emerald); }
.sp-rk-dot.low { background: #e0b84e; }
.sp-rk-advisory { font-size: 13.5px; line-height: 1.45; color: rgba(110,120,116,.95); margin-bottom: 18px; }
.sp-rk-advisory.warn { color: #c47d12; background: rgba(224,184,78,.12); border-radius: 10px; padding: 9px 12px; }

/* toast */
.sp-rk-toast { position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 12px); background: rgba(20,32,28,.95); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 9300; opacity: 0; transition: all .26s ease; }
.sp-rk-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Android Material flavor */
.sp-rk-overlay[data-sp-platform="android"] .sp-rk-sheet { border-radius: 28px 28px 0 0; }
.sp-rk-overlay[data-sp-platform="android"] .sp-rk-primary { border-radius: 999px; text-transform: none; }
.sp-rk-overlay[data-sp-platform="android"] .sp-rk-chip { border-radius: 10px; }
