/* wm-bridge.css — production additions to the Warm Edition prototype.
   Keeps wm.css (the design handoff) pristine. */

/* ───────────────────────────────────────────────────────────
   Smart Card — context-aware hero (tasyriq, arafah, dhuha…)
   ─────────────────────────────────────────────────────────── */
.wm-app .wm-smart-card {
  position: relative;
  margin: 14px 18px 0;
  padding: 18px 18px 16px;
  border-radius: 20px;
  overflow: hidden;
  color: var(--ink, #2C2A22);
  background: var(--white, #FFFFFF);
  border: 1px solid var(--line, #ECE4D3);
  box-shadow: 0 8px 22px rgba(60,50,30,0.05);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wm-app .wm-smart-card:active { transform: scale(0.985); }

/* manual dismiss (×) for proximity heroes — light chip on the dark jewel cards */
.wm-app .wm-sc-dismiss {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.92);
  font: 400 19px/1 var(--ui, system-ui); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.wm-app .wm-sc-dismiss:active { background: rgba(255,255,255,0.28); }

/* ── Deep Islamic jewel tone system — every hero is a deep/dark jewel gradient
   with white text, a gold/light Arabic + eyebrow, and a warm-gold CTA. ── */
.wm-app .wm-smart-card.tone-emerald, .wm-app .wm-smart-card.tone-teal,
.wm-app .wm-smart-card.tone-saffron, .wm-app .wm-smart-card.tone-violet,
.wm-app .wm-smart-card.tone-indigo, .wm-app .wm-smart-card.tone-azure,
.wm-app .wm-smart-card.tone-rose, .wm-app .wm-smart-card.tone-hijrah,
.wm-app .wm-smart-card.tone-raya, .wm-app .wm-smart-card.tone-holy,
.wm-app .wm-smart-card.tone-slate, .wm-app .wm-smart-card.tone-heal,
.wm-app .wm-smart-card.tone-sejadah,
.wm-app .wm-smart-card.tone-sultan, .wm-app .wm-smart-card.tone-kebangsaan, .wm-app .wm-smart-card.tone-guru {
  color: #FFFDF7; border: none; box-shadow: 0 12px 26px rgba(20,18,30,0.22);
}
.wm-app .wm-smart-card.tone-emerald { background: linear-gradient(135deg,#053E2E 0%,#065F46 55%,#0B7A57 100%); }
.wm-app .wm-smart-card.tone-teal    { background: linear-gradient(135deg,#0B3B38 0%,#115E59 55%,#0F766E 100%); }
.wm-app .wm-smart-card.tone-saffron { background: linear-gradient(135deg,#5C2E0A 0%,#92400E 50%,#B45309 100%); }
.wm-app .wm-smart-card.tone-violet  { background: linear-gradient(150deg,#2E1065 0%,#4C1D95 55%,#5B21B6 100%); }
.wm-app .wm-smart-card.tone-indigo  { background: linear-gradient(150deg,#1E1B4B 0%,#312E81 55%,#3730A3 100%); }
.wm-app .wm-smart-card.tone-azure   { background: linear-gradient(150deg,#0A1A40 0%,#16306B 55%,#1E3A8A 100%); }
.wm-app .wm-smart-card.tone-rose    { background: linear-gradient(135deg,#4C0519 0%,#831843 55%,#9F1239 100%); }
.wm-app .wm-smart-card.tone-hijrah  { background: linear-gradient(140deg,#072A38 0%,#0E4A5F 55%,#155E75 100%); }
.wm-app .wm-smart-card.tone-raya    { background: linear-gradient(125deg,#064E3B 0%,#0B7A52 42%,#CFA02C 100%); }
.wm-app .wm-smart-card.tone-holy    { background: linear-gradient(135deg,#04261F 0%,#053E2E 55%,#065F46 100%); }
.wm-app .wm-smart-card.tone-slate   { background: linear-gradient(135deg,#1E293B 0%,#334155 55%,#475569 100%); }
.wm-app .wm-smart-card.tone-heal    { background: linear-gradient(135deg,#0B3B38 0%,#115E59 55%,#0E7490 100%); }
.wm-app .wm-smart-card.tone-sejadah { background: linear-gradient(150deg,#0A2747 0%,#134E86 55%,#1769B5 100%); }
/* National (civic) tones — outside the Islamic jewel palette */
.wm-app .wm-smart-card.tone-sultan     { background: linear-gradient(135deg,#4A3508 0%,#8A6A12 52%,#C19A2E 100%); }
.wm-app .wm-smart-card.tone-kebangsaan { background: linear-gradient(135deg,#4A0A0E 0%,#7E1218 55%,#A81822 100%); }
.wm-app .wm-smart-card.tone-guru       { background: linear-gradient(135deg,#3A0D3D 0%,#5E1A5E 55%,#7C2A7A 100%); }
/* title white, sub soft-white, CTA warm-gold (light for cool tones) — deep tones */
.wm-app .wm-smart-card[class*="tone-"] .wm-sc-title { color: #FFFFFF; }
.wm-app .wm-smart-card[class*="tone-"] .wm-sc-sub { color: rgba(255,255,255,0.86); }
.wm-app .wm-smart-card[class*="tone-"] .wm-sc-cta { background: #FCD34D; color: #3A2A08; box-shadow: 0 3px 10px rgba(0,0,0,0.25); }
.wm-app .wm-smart-card.tone-rose .wm-sc-cta { background: #F0C36B; color: #3A1620; }
/* Light warm tones (green/gold/clay/sage) keep the cream card background, so the
   broad tone-* white-text rule above makes their title/sub unreadable. Restore
   dark text for these — deep jewel tones (tone-deep etc.) keep white text. */
.wm-app .wm-smart-card.tone-green .wm-sc-title,
.wm-app .wm-smart-card.tone-gold .wm-sc-title,
.wm-app .wm-smart-card.tone-clay .wm-sc-title,
.wm-app .wm-smart-card.tone-sage .wm-sc-title { color: var(--ink, #2C2A22); }
.wm-app .wm-smart-card.tone-green .wm-sc-sub,
.wm-app .wm-smart-card.tone-gold .wm-sc-sub,
.wm-app .wm-smart-card.tone-clay .wm-sc-sub,
.wm-app .wm-smart-card.tone-sage .wm-sc-sub { color: var(--ink2, #736E60); }
.wm-app .wm-smart-card.tone-slate .wm-sc-cta { background: #E2E8F0; color: #1E293B; }
.wm-app .wm-smart-card.tone-violet .wm-sc-cta, .wm-app .wm-smart-card.tone-azure .wm-sc-cta, .wm-app .wm-smart-card.tone-sejadah .wm-sc-cta,
.wm-app .wm-smart-card.tone-sultan .wm-sc-cta, .wm-app .wm-smart-card.tone-guru .wm-sc-cta { background: #FFFFFF; color: #1A1A2A; }
/* Arabic + eyebrow accent per tone */
.wm-app .tone-emerald .wm-sc-ar, .wm-app .tone-emerald .wm-sc-eye,
.wm-app .tone-indigo .wm-sc-ar, .wm-app .tone-indigo .wm-sc-eye,
.wm-app .tone-holy .wm-sc-ar, .wm-app .tone-holy .wm-sc-eye { color: #FCD34D; }
.wm-app .tone-saffron .wm-sc-ar, .wm-app .tone-saffron .wm-sc-eye { color: #FDE9B5; }
.wm-app .tone-teal .wm-sc-ar, .wm-app .tone-teal .wm-sc-eye,
.wm-app .tone-heal .wm-sc-ar, .wm-app .tone-heal .wm-sc-eye { color: #5EEAD4; }
.wm-app .tone-violet .wm-sc-ar, .wm-app .tone-violet .wm-sc-eye { color: #D8B4FE; }
.wm-app .tone-azure .wm-sc-ar, .wm-app .tone-azure .wm-sc-eye { color: #BFDBFE; }
.wm-app .tone-rose .wm-sc-ar, .wm-app .tone-rose .wm-sc-eye { color: #F0C36B; }
.wm-app .tone-hijrah .wm-sc-ar, .wm-app .tone-hijrah .wm-sc-eye { color: #E9C46A; }
.wm-app .tone-raya .wm-sc-ar, .wm-app .tone-raya .wm-sc-eye { color: #FFE3A3; }
.wm-app .tone-slate .wm-sc-ar, .wm-app .tone-slate .wm-sc-eye { color: #CBD5E1; }
.wm-app .tone-sejadah .wm-sc-ar, .wm-app .tone-sejadah .wm-sc-eye { color: #BAE6FD; }
.wm-app .tone-sultan .wm-sc-ar, .wm-app .tone-sultan .wm-sc-eye { color: #FFE9A8; }
.wm-app .tone-kebangsaan .wm-sc-ar, .wm-app .tone-kebangsaan .wm-sc-eye { color: #FCD34D; }
.wm-app .tone-guru .wm-sc-ar, .wm-app .tone-guru .wm-sc-eye { color: #F0C2EF; }

.wm-app .wm-sc-motif {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.16), transparent 42%),
    radial-gradient(circle at 0% 110%, rgba(0,0,0,0.28), transparent 60%);
  pointer-events: none;
}

.wm-app .wm-sc-eye {
  position: relative;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--goldD, #8E6E33);
  margin-bottom: 8px;
}
.wm-app .wm-smart-card.tone-deep .wm-sc-eye {
  color: #D4AF37;
}

.wm-app .wm-sc-ar {
  position: relative;
  font-family: 'Amiri', serif;
  font-size: 23px;
  line-height: 1.3;
  color: var(--gold, #B08A45);
  margin-bottom: 6px;
  direction: rtl;
}
.wm-app .wm-smart-card.tone-deep .wm-sc-ar {
  color: #D4AF37;
}

.wm-app .wm-sc-title {
  position: relative;
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #2C2A22);
  line-height: 1.15;
  margin-bottom: 4px;
}
.wm-app .wm-smart-card.tone-deep .wm-sc-title {
  color: #FBF7EF;
}

.wm-app .wm-sc-sub {
  position: relative;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink2, #736E60);
  margin-bottom: 14px;
}
.wm-app .wm-smart-card.tone-deep .wm-sc-sub {
  color: rgba(251,247,239,0.85);
}

.wm-app .wm-sc-cta {
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  background: var(--green, #3C6B54);
  color: #FBF7EF;
  border: none;
  border-radius: 14px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wm-app .wm-smart-card.tone-gold .wm-sc-cta {
  background: var(--gold, #B08A45);
}
.wm-app .wm-smart-card.tone-deep .wm-sc-cta {
  background: #D4AF37;
  color: #1A1A2A;
}
.wm-app .wm-smart-card.tone-clay .wm-sc-cta {
  background: var(--clay, #A9724E);
}
.wm-app .wm-sc-cta:active { transform: scale(0.96); }

/* Ummah Berzikir now uses the standard .wm-entry pill (see wm.css) */

/* ───────────────────────────────────────────────────────────
   Musafir live status banner
   ─────────────────────────────────────────────────────────── */
.wm-app .wm-msf-live {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 18px 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #F4EBD4 0%, #FBF7EF 100%);
  border: 1px solid #E0CE9C;
}
.wm-app .wm-msf-live-mukim {
  background: linear-gradient(135deg, #E7EFE7 0%, #FBF7EF 100%);
  border-color: #B6CFBC;
}
.wm-app .wm-msf-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold, #B08A45);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(176,138,69,0.18);
  animation: wm-msf-pulse 2s ease-in-out infinite;
}
.wm-app .wm-msf-live-mukim .wm-msf-dot {
  background: var(--green, #3C6B54);
  box-shadow: 0 0 0 3px rgba(60,107,84,0.18);
}
@keyframes wm-msf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.wm-app .wm-msf-live-body {
  flex: 1;
}
.wm-app .wm-msf-live-title {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink, #2C2A22);
  margin-bottom: 2px;
}
.wm-app .wm-msf-live-sub {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  color: var(--ink2, #736E60);
  line-height: 1.4;
}
.wm-app .wm-msf-flag {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* ───────────────────────────────────────────────────────────
   Musafir smart-card — country-themed gradient + flag + stripe
   ─────────────────────────────────────────────────────────── */
.wm-app .wm-smart-card.wm-sc-musafir {
  padding-bottom: 22px;
  border-width: 0;
  box-shadow: 0 14px 32px rgba(0,0,0,0.22);
  color: #FBF7EF;
}
/* Flag watermark — lightened + desaturated rather than just faded, so a same-hue
   flag (red flag on a red gradient: SG, JP, ID, CN, VN…) stays visible. Filters
   touch only the flag pixels, so no haze in the empty corner. --flag-url is set
   inline per country; absent (none) → nothing renders. Sits behind the content
   (which is position:relative) and the motif veil. */
.wm-app .wm-sc-musafir::before {
  content: '';
  position: absolute;
  top: -34px;
  right: -48px;
  width: 230px;
  height: 150px;
  background-image: var(--flag-url, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.5;
  filter: brightness(1.45) saturate(0.45) contrast(0.95) drop-shadow(0 1px 5px rgba(0,0,0,0.28));
  transform: rotate(-12deg);
  pointer-events: none;
  border-radius: 4px;
  z-index: 0;
}
.wm-app .wm-sc-eye-musafir {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
}
.wm-app .wm-sc-flag {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.wm-app .wm-sc-ar-musafir {
  color: rgba(255,255,255,0.92);
}
.wm-app .wm-sc-title-musafir {
  color: #FBF7EF;
}
.wm-app .wm-sc-sub-musafir {
  color: rgba(255,255,255,0.82);
}
.wm-app .wm-sc-musafir .wm-sc-cta {
  background: rgba(255,255,255,0.95);
  color: #1F1F2A;
}
.wm-app .wm-sc-accent {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  pointer-events: none;
}
