
/* RIC 041 — scheduled prayer weather + Adhan experience */

.ric-weather-now{
  font-size:.65rem;
  color:#5f796f;
}
.ric-adhan-sound-toggle{
  margin-top:.28rem;
  border:1px solid rgba(46,90,75,.15);
  border-radius:999px;
  padding:.32rem .58rem;
  background:rgba(255,255,255,.54);
  color:#365a4f;
  font:inherit;
  font-size:.66rem;
  font-weight:800;
  cursor:pointer;
}
.ric-adhan-sound-toggle.enabled{
  background:#e7f4eb;
  color:#185b45;
  border-color:#b9dac7;
}

/* Global scheduled atmosphere */
body.ric-auto-prayer-experience:after{
  content:"";
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  opacity:1;
  transition:opacity 1.4s ease,filter 1.4s ease;
  animation:ricAutoPrayerBreathe 9s ease-in-out infinite alternate;
}
body.ric-auto-prayer-experience main,
body.ric-auto-prayer-experience header,
body.ric-auto-prayer-experience .language-dropdown-shell,
body.ric-auto-prayer-experience .ric-salah-strip,
body.ric-auto-prayer-experience footer{
  position:relative;
  z-index:3;
}
body.ric-auto-prayer-experience .ric-3d-background{z-index:2}
body.ric-auto-prayer-experience .ric-salah-strip{
  box-shadow:0 18px 46px rgba(34,70,60,.20);
}

/* Prayer time-of-day bases */
body.auto-fajr:after{
  background:
    radial-gradient(circle at 72% 10%,rgba(255,221,190,.84),transparent 22%),
    radial-gradient(circle at 26% 5%,rgba(199,205,247,.74),transparent 28%),
    linear-gradient(180deg,rgba(178,202,231,.76),rgba(232,198,193,.58) 45%,rgba(129,178,164,.37));
}
body.auto-dhuhr:after{
  background:
    radial-gradient(circle at 72% 5%,rgba(255,247,178,.95),transparent 20%),
    linear-gradient(180deg,rgba(162,224,235,.74),rgba(218,240,222,.52) 60%,rgba(92,163,141,.30));
}
body.auto-asr:after{
  background:
    radial-gradient(circle at 76% 17%,rgba(255,213,127,.90),transparent 23%),
    linear-gradient(180deg,rgba(231,208,153,.62),rgba(190,211,177,.50) 55%,rgba(85,148,128,.34));
}
body.auto-maghrib:after{
  background:
    radial-gradient(circle at 72% 12%,rgba(255,161,83,.94),transparent 23%),
    radial-gradient(circle at 18% 13%,rgba(152,103,170,.50),transparent 30%),
    linear-gradient(180deg,rgba(231,129,101,.67),rgba(100,117,149,.52) 62%,rgba(43,91,80,.40));
}
body.auto-isha:after{
  background:
    radial-gradient(circle at 75% 10%,rgba(244,227,165,.20),transparent 12%),
    linear-gradient(180deg,rgba(35,72,103,.77),rgba(29,82,79,.65) 62%,rgba(17,58,49,.56));
}

/* Live weather layers */
.ric-live-weather-layer{
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  overflow:hidden;
}
.ric-live-weather-layer .sun,
.ric-live-weather-layer .moon,
.ric-live-weather-layer .cloud,
.ric-live-weather-layer .rain,
.ric-live-weather-layer .snow,
.ric-live-weather-layer .fog,
.ric-live-weather-layer .flash{
  display:none;
}

/* Sunny / clear */
body.weather-sunny .ric-live-weather-layer .sun,
body.weather-partly-cloudy .ric-live-weather-layer .sun{
  display:block;
  position:absolute;
  width:180px;height:180px;
  border-radius:50%;
  right:7%;top:7%;
  background:radial-gradient(circle,#fff9c7 0 15%,#ffd66f 35%,rgba(255,200,65,.22) 60%,transparent 72%);
  filter:blur(.2px);
  animation:ricSunPulse 6s ease-in-out infinite alternate;
}
body.weather-clear-night .ric-live-weather-layer .moon{
  display:block;
  position:absolute;
  width:120px;height:120px;
  right:9%;top:8%;
  border-radius:50%;
  box-shadow:-28px 10px 0 0 rgba(255,242,184,.74);
  transform:rotate(20deg);
}

/* Cloud */
body.weather-cloudy .ric-live-weather-layer .cloud,
body.weather-partly-cloudy .ric-live-weather-layer .cloud,
body.weather-rain .ric-live-weather-layer .cloud,
body.weather-thunder .ric-live-weather-layer .cloud,
body.weather-snow .ric-live-weather-layer .cloud{
  display:block;
  position:absolute;
  left:-14%;top:12%;
  width:140%;height:30%;
  opacity:.34;
  background:
    radial-gradient(ellipse at 20% 50%,rgba(255,255,255,.72) 0 10%,transparent 11%),
    radial-gradient(ellipse at 36% 44%,rgba(244,247,247,.65) 0 12%,transparent 13%),
    radial-gradient(ellipse at 54% 55%,rgba(230,237,239,.62) 0 14%,transparent 15%),
    radial-gradient(ellipse at 72% 43%,rgba(255,255,255,.58) 0 12%,transparent 13%);
  animation:ricCloudDrift 23s linear infinite alternate;
}

/* Rain */
body.weather-rain .ric-live-weather-layer .rain,
body.weather-thunder .ric-live-weather-layer .rain{
  display:block;
  position:absolute;
  inset:0;
  opacity:.18;
  background-image:repeating-linear-gradient(105deg,transparent 0 18px,rgba(215,235,242,.9) 19px 21px,transparent 22px 37px);
  background-size:46px 70px;
  animation:ricRainFall .7s linear infinite;
}

/* Snow */
body.weather-snow .ric-live-weather-layer .snow{
  display:block;position:absolute;inset:-10%;
  opacity:.44;
  background-image:
    radial-gradient(circle,rgba(255,255,255,.9) 0 2px,transparent 2.5px),
    radial-gradient(circle,rgba(255,255,255,.75) 0 1.5px,transparent 2px);
  background-size:65px 65px,95px 95px;
  background-position:0 0,28px 18px;
  animation:ricSnowFall 9s linear infinite;
}

/* Fog */
body.weather-fog .ric-live-weather-layer .fog{
  display:block;position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(245,249,245,.42),rgba(224,236,231,.28),rgba(245,249,245,.34));
  filter:blur(8px);
  animation:ricFogMove 8s ease-in-out infinite alternate;
}

/* Thunder */
body.weather-thunder .ric-live-weather-layer .flash{
  display:block;position:absolute;inset:0;
  background:rgba(255,255,235,.28);
  opacity:0;
  animation:ricLightning 8s steps(1,end) infinite;
}

/* Active adhan */
body.ric-adhan-playing .ric-salah-strip{
  border-color:rgba(201,163,76,.55);
  box-shadow:
    0 20px 55px rgba(42,86,72,.20),
    0 0 0 5px rgba(201,163,76,.09);
}
body.ric-adhan-playing .ric-salah-dot{
  animation:ricAdhanPulse 1.35s ease-in-out infinite;
}
.ric-adhan-now-badge{
  display:none;
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translateX(-50%);
  z-index:50;
  border-radius:999px;
  padding:.65rem 1rem;
  color:#173b31;
  background:rgba(255,248,224,.95);
  border:1px solid rgba(201,163,76,.42);
  box-shadow:0 16px 40px rgba(42,80,67,.20);
  font-size:.78rem;
  font-weight:900;
}
body.ric-adhan-playing .ric-adhan-now-badge{display:block}

.prayer-experience-explainer{align-self:start}
.prayer-sequence{display:grid;gap:.65rem;padding:0;list-style:none}
.prayer-sequence li{
  display:grid;grid-template-columns:150px 1fr;gap:.7rem;
  padding:.75rem;border-bottom:1px solid #e7eeea;
}
.prayer-sequence span{color:#647970}
.admin-table audio{max-width:220px;height:32px;vertical-align:middle;margin:.2rem .4rem}

@keyframes ricAutoPrayerBreathe{from{filter:saturate(.95) brightness(1)}to{filter:saturate(1.1) brightness(1.04)}}
@keyframes ricSunPulse{from{transform:scale(.96);opacity:.72}to{transform:scale(1.06);opacity:1}}
@keyframes ricCloudDrift{from{transform:translateX(-4%)}to{transform:translateX(7%)}}
@keyframes ricRainFall{from{background-position:0 0}to{background-position:34px 70px}}
@keyframes ricSnowFall{from{background-position:0 0,28px 18px}to{background-position:20px 130px,8px 175px}}
@keyframes ricFogMove{from{transform:translateX(-2%);opacity:.72}to{transform:translateX(2%);opacity:.95}}
@keyframes ricLightning{0%,92%,95%,100%{opacity:0}93%,94%{opacity:1}}
@keyframes ricAdhanPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 5px rgba(200,162,75,.14)}50%{transform:scale(1.25);box-shadow:0 0 0 11px rgba(200,162,75,.05)}}

@media(max-width:800px){
  .prayer-sequence li{grid-template-columns:1fr}
  .ric-adhan-sound-toggle{font-size:.62rem}
}
@media(prefers-reduced-motion:reduce){
  body.ric-auto-prayer-experience:after,
  .ric-live-weather-layer *,
  body.ric-adhan-playing .ric-salah-dot{animation:none!important}
}


/* 087 — explicit Adhan choice / manual preview */
#ricAdhanSoundToggle,
#ricAdhanPreviewButton,
#ricAdhanStopButton{
  appearance:none;
  border:1px solid rgba(214,173,79,.35);
  border-radius:999px;
  padding:.55rem .8rem;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
#ricAdhanSoundToggle{
  background:rgba(255,255,255,.08);
}
#ricAdhanSoundToggle.enabled{
  background:rgba(214,173,79,.18);
}
#ricAdhanPreviewButton{
  background:#d6ad4f;
  color:#14372f;
  margin-left:.4rem;
}
#ricAdhanStopButton{
  background:rgba(120,44,44,.14);
  color:#7a2c2c;
  margin-left:.35rem;
}
