/**
 * Mosque TV prayer widgets — compatibility-first CSS.
 * Avoids CSS Grid, clamp(), dvh, and webfonts so older smart-TV
 * browsers (and Chromium forks) can render a full-screen board.
 */

html.ict-tv,
body.prayer-tv-body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #041611;
  color: #f4f7f5;
  font-family: Arial, Helvetica, "Segoe UI", sans-serif;
  overflow: hidden;
}

body.prayer-tv-body {
  display: block;
}

.prayer-tv {
  width: 100%;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 2% 2.5%;
  background: #041611;
  background: -webkit-linear-gradient(top left, #06231b 0%, #041611 55%, #03140f 100%);
  background: linear-gradient(165deg, #06231b 0%, #041611 55%, #03140f 100%);
}

.prayer-tv__header {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1.5%;
}

.prayer-tv__brand {
  float: left;
  width: 62%;
}

.prayer-tv__mark {
  float: left;
  width: 56px;
  height: 56px;
  margin-right: 14px;
}

.prayer-tv__brand-text {
  overflow: hidden;
}

.prayer-tv__org {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb5a8;
}

.prayer-tv__location {
  margin: 4px 0;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 700;
  color: #f4f7f5;
}

.prayer-tv__address {
  margin: 0;
  font-size: 16px;
  color: #9cb5a8;
}

.prayer-tv__dates {
  float: right;
  width: 36%;
  text-align: right;
}

.prayer-tv__hijri,
.prayer-tv__gregorian {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.prayer-tv__hijri {
  color: #d4b36a;
  direction: rtl;
  font-family: "Times New Roman", Times, serif;
}

.prayer-tv__gregorian {
  margin-top: 8px;
  color: #f4f7f5;
}

.prayer-tv__hero {
  width: 100%;
  overflow: hidden;
  margin: 0 0 1.5%;
}

.prayer-tv__clock-block,
.prayer-tv__countdown {
  float: left;
  width: 31.5%;
  margin-right: 2%;
  box-sizing: border-box;
  padding: 1.4% 1.6%;
  background: #0f3a2c;
  border: 1px solid rgba(244, 247, 245, 0.12);
  -webkit-border-radius: 16px;
  border-radius: 16px;
  min-height: 140px;
}

.prayer-tv__countdown--adhan {
  margin-right: 0;
}

.prayer-tv__label {
  margin: 0 0 8px;
  color: #9cb5a8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  font-weight: 700;
}

.prayer-tv__clock {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  color: #d4b36a;
  line-height: 1.1;
}

.prayer-tv__digits {
  overflow: hidden;
}

.prayer-tv__digits span {
  float: left;
  margin-right: 14px;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.prayer-tv__digits small {
  font-size: 14px;
  color: #9cb5a8;
  text-transform: uppercase;
  margin-left: 4px;
}

.prayer-tv__countdown--adhan .prayer-tv__digits span {
  color: #f0c14b;
}

.prayer-tv__countdown--iqamah .prayer-tv__digits span {
  color: #8fd98b;
}

.prayer-tv__next-line {
  margin: 12px 0 0;
  font-size: 18px;
  clear: both;
}

.prayer-tv__next-line strong {
  color: #d4b36a;
}

.prayer-tv__countdown.is-hidden {
  opacity: 0.35;
  filter: alpha(opacity=35);
}

.prayer-tv__table-wrap {
  clear: both;
  width: 100%;
  margin: 0 0 1%;
  height: 48%;
}

.prayer-tv__table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  background: #0a2a20;
  border: 1px solid rgba(244, 247, 245, 0.12);
  font-size: 2.2vw;
}

.prayer-tv__table th,
.prayer-tv__table td {
  padding: 1.2vh 0.6vw;
  text-align: center;
  border: 1px solid rgba(244, 247, 245, 0.12);
  vertical-align: middle;
}

.prayer-tv__table thead th {
  background: rgba(212, 179, 106, 0.12);
  font-weight: 700;
}

.prayer-tv__table thead th span {
  display: block;
}

.prayer-tv__table .ar {
  color: #d4b36a;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.05em;
  margin-bottom: 2px;
}

.prayer-tv__table tbody th {
  text-align: left;
  width: 14%;
  background: rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

.prayer-tv__table [data-row="iqamah"] td {
  color: #8fd98b;
  font-weight: 700;
}

.prayer-tv__table td.is-next,
.prayer-tv__table th.is-next {
  background: #f0c14b;
  color: #10241c !important;
}

.prayer-tv__table td.is-passed {
  opacity: 0.45;
  filter: alpha(opacity=45);
}

.prayer-tv__jumah-list {
  overflow: hidden;
  text-align: left;
}

.prayer-tv__jumah-item {
  float: left;
  margin-right: 28px;
  text-align: left;
}

.prayer-tv__jumah-item strong {
  display: block;
  color: #d4b36a;
}

.prayer-tv__jumah-item.is-active {
  background: rgba(212, 179, 106, 0.18);
  padding: 6px 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}

.prayer-tv__footer {
  clear: both;
  overflow: hidden;
  color: #9cb5a8;
  font-size: 14px;
}

.prayer-tv__footer p {
  margin: 0;
}

.prayer-tv__footer [data-tv-status] {
  float: left;
}

.prayer-tv__note {
  float: right;
  opacity: 0.8;
  filter: alpha(opacity=80);
}

/* Very wide TVs */
@media screen and (min-width: 1600px) {
  .prayer-tv__location { font-size: 48px; }
  .prayer-tv__clock { font-size: 64px; }
  .prayer-tv__digits span { font-size: 56px; }
  .prayer-tv__table { font-size: 28px; }
}

/* Smaller / older panels */
@media screen and (max-width: 1100px) {
  .prayer-tv__location { font-size: 28px; }
  .prayer-tv__clock { font-size: 36px; }
  .prayer-tv__digits span { font-size: 32px; }
  .prayer-tv__table { font-size: 16px; }
  .prayer-tv__clock-block,
  .prayer-tv__countdown {
    min-height: 110px;
  }
}
