/* ==========================================================================
   Prayer Times — Banner widget  ([prayer_times_banner])
   Depends on prayer-times-tokens.css.
   A wide, low-profile strip: a date + "next prayer" pill on top, then a
   self-wrapping grid of prayer tiles. No horizontal scrollbars, no boxed
   borders — the tiles reflow to fit whatever width they're given.
   ========================================================================== */

.prayer-times-banner-widget {
  container: ptcsv-banner / inline-size;
  margin: 1.25rem auto;
  padding: clamp(1rem, 3.5vw, 1.4rem);
}

/* ----- Head: date + next prayer pill ------------------------------------- */
.ptb-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  justify-content: space-between;
}

.ptb-title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ptb-title time {
  color: var(--pt-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.ptb-next {
  align-items: center;
  background: var(--pt-accent-soft);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.5rem 0.9rem;
}

.ptb-next-icon {
  align-items: center;
  color: var(--pt-accent);
  display: inline-flex;
  flex: 0 0 auto;
}

.ptb-next-icon i {
  font-size: 1.15rem;
}

.ptb-next-text {
  align-items: baseline;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.ptb-next-value {
  color: var(--pt-accent-ink);
  font-family: var(--pt-font-num);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
}

.ptb-next-value.is-clock {
  font-size: 1.1rem;
  white-space: nowrap;
}

.ptb-next-value.is-status {
  font-size: 0.85rem;
  white-space: normal;
}

/* ----- Tiles ------------------------------------------------------------- */
.ptb-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  margin-top: 1rem;
}

.ptb-cell {
  background: var(--pt-hero);
  border-radius: var(--pt-radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.85rem 0.95rem;
}

.ptb-cell.next-prayer {
  background: var(--pt-accent-soft);
}

.ptb-prayer {
  align-items: center;
  color: var(--pt-text);
  display: flex;
  font-size: 0.95rem;
  font-weight: 650;
  gap: 0.5rem;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
}

.ptb-icon {
  align-items: center;
  color: var(--pt-muted);
  display: inline-flex;
  flex: 0 0 auto;
}

.ptb-icon i {
  font-size: 1.1rem;
}

.ptb-cell.next-prayer .ptb-prayer,
.ptb-cell.next-prayer .ptb-icon {
  color: var(--pt-accent-ink);
}

.ptb-times {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ptb-group {
  align-items: baseline;
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

.ptb-label {
  color: var(--pt-faint);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.ptb-time {
  color: var(--pt-text);
  font-family: var(--pt-font-num);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
  text-align: right;
}

.ptb-time.is-clock {
  font-size: 1.05rem;
  white-space: nowrap;
}

.ptb-time.is-status {
  font-size: 0.8rem;
  line-height: 1.25;
  overflow-wrap: break-word;
  white-space: normal;
}

.ptb-group-jamaa .ptb-time.is-clock {
  color: var(--pt-accent-ink);
}

/* Non-clock jamā'ah value (e.g. a "combining" note) uses the full tile width. */
.ptb-note {
  color: var(--pt-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: break-word;
}

/* ----- Very narrow container --------------------------------------------- */
@container ptcsv-banner (max-width: 22rem) {
  .ptb-grid {
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  }
}
