/*
 RIC Homepage 2026 — Stage D
 Next Salah Intelligence

 SAFETY:
 - no body hiding
 - no loader
 - no audio control
 - no Adhan mutation
 - no prayer-time calculation changes
*/

.ric-d-next-panel{
  width:100%;
  margin:clamp(10px,1.3vw,18px) 0;
  padding:clamp(14px,2vw,22px);
  border-radius:20px;

  display:grid;
  grid-template-columns:
    minmax(180px,.8fr)
    minmax(270px,1.5fr);

  gap:clamp(12px,2vw,24px);
  align-items:center;

  color:#fff;

  background:
    linear-gradient(
      130deg,
      rgba(0,82,61,.98),
      rgba(0,48,40,.98)
    );

  border:1px solid rgba(238,190,76,.42);

  box-shadow:
    0 12px 30px rgba(0,52,42,.14),
    inset 0 1px rgba(255,255,255,.08);
}

.ric-d-next-main{
  min-width:0;
}

.ric-d-next-kicker{
  display:flex;
  align-items:center;
  gap:7px;

  margin-bottom:5px;

  font-size:11px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;

  color:#f5c75a;
}

.ric-d-next-kicker::before{
  content:"";
  width:8px;
  height:8px;
  flex:none;

  border-radius:50%;
  background:#efbd4f;

  box-shadow:
    0 0 0 4px rgba(239,189,79,.13);
}

.ric-d-next-name{
  margin:0;

  color:#fff;

  font-size:clamp(1.65rem,3.2vw,3rem);
  line-height:1;
}

.ric-d-next-time{
  margin-top:7px;

  font-size:clamp(1rem,1.6vw,1.2rem);
  font-weight:750;

  color:#e9f5f0;
}

.ric-d-countdown-wrap{
  min-width:0;
}

.ric-d-countdown{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));

  gap:clamp(6px,1vw,11px);
}

.ric-d-count-unit{
  min-width:0;
  padding:clamp(10px,1.5vw,16px) 6px;

  text-align:center;

  border-radius:14px;

  background:rgba(0,0,0,.22);

  border:
    1px solid rgba(255,255,255,.13);
}

.ric-d-count-unit strong{
  display:block;

  font-size:clamp(1.55rem,4vw,3.4rem);
  line-height:.98;

  font-variant-numeric:tabular-nums;

  color:#fff;
}

.ric-d-count-unit small{
  display:block;
  margin-top:5px;

  font-size:10px;
  font-weight:700;

  color:#dceee7;
}

.ric-d-progress-shell{
  margin-top:11px;
}

.ric-d-progress-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;

  margin-bottom:5px;

  font-size:11px;

  color:#dceee7;
}

.ric-d-progress-track{
  height:7px;

  overflow:hidden;

  border-radius:999px;

  background:rgba(255,255,255,.14);
}

.ric-d-progress-bar{
  width:0%;
  height:100%;

  border-radius:inherit;

  background:
    linear-gradient(
      90deg,
      #efbd4f,
      #f8d87f
    );

  transition:width 1s linear;
}

.ric-d-status{
  margin-top:8px;

  min-height:18px;

  font-size:12px;
  font-weight:750;

  color:#edf8f3;
}

/* ---------------------------------------------------------
   NEXT PRAYER CARD
--------------------------------------------------------- */

[data-prayer].ric-d-is-next{
  position:relative;
  z-index:2;

  border:
    2px solid #efbd4f !important;

  box-shadow:
    0 0 0 3px rgba(239,189,79,.11),
    0 12px 26px rgba(204,154,36,.19) !important;

  transform:translateY(-3px);

  transition:
    transform .35s ease,
    box-shadow .35s ease;
}

[data-prayer].ric-d-is-next::after{
  content:"NEXT";

  position:absolute;

  top:8px;
  right:8px;

  z-index:8;

  padding:4px 8px;

  border-radius:999px;

  color:#173e34;

  background:#efbd4f;

  font-size:9px;
  line-height:1;
  font-weight:950;
  letter-spacing:.06em;
}

/* ---------------------------------------------------------
   PRE-ADHAN VISUAL STATE — FINAL 2 MINUTES
--------------------------------------------------------- */

.ric-d-next-panel.ric-d-preparing{
  border-color:#ffd166;

  box-shadow:
    0 0 0 4px rgba(255,209,102,.10),
    0 0 30px rgba(239,189,79,.24);
}

.ric-d-next-panel.ric-d-preparing
.ric-d-next-kicker{
  color:#ffd166;
}

.ric-d-next-panel.ric-d-preparing
.ric-d-next-kicker::before{
  animation:ricDPreparingPulse 1.4s ease-in-out infinite;
}

.ric-d-next-panel.ric-d-preparing
.ric-d-progress-bar{
  background:
    linear-gradient(
      90deg,
      #ffd166,
      #fff0af
    );
}

@keyframes ricDPreparingPulse{
  0%,100%{
    transform:scale(1);
    box-shadow:
      0 0 0 4px rgba(255,209,102,.12);
  }

  50%{
    transform:scale(1.32);
    box-shadow:
      0 0 0 8px rgba(255,209,102,.06);
  }
}

/* ---------------------------------------------------------
   AT PRAYER TIME
--------------------------------------------------------- */

.ric-d-next-panel.ric-d-at-prayer{
  border-color:#fff0ad;
}

.ric-d-next-panel.ric-d-at-prayer
.ric-d-status{
  color:#fff0ad;
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width:760px){

  .ric-d-next-panel{
    grid-template-columns:1fr;
  }

}

@media (max-width:390px){

  .ric-d-count-unit{
    padding-inline:3px;
  }

}

/* ---------------------------------------------------------
   ACCESSIBILITY
--------------------------------------------------------- */

@media (prefers-reduced-motion:reduce){

  [data-prayer].ric-d-is-next{
    transform:none;
  }

  .ric-d-next-panel.ric-d-preparing
  .ric-d-next-kicker::before{
    animation:none;
  }

  .ric-d-progress-bar{
    transition:none;
  }

}
