/* Muttasil website embed — px-sized (it lives in an iframe, not on a wall).
   Same brand tokens as /tv: dome green, brass, marble cream. The page itself
   is transparent so rounded corners show the host site behind them; each
   section paints its own ground so it reads on any host background. */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: transparent; }
body {
  font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; gap: 14px; /* board layout stacks sections */
}
body[data-theme="dark"] {
  --bg: #07361F; --text: #F7F3E9; --sub: rgba(247,243,233,0.66); --faint: rgba(247,243,233,0.42);
  --line: rgba(247,243,233,0.12); --accent: #E3C87A; --accent-soft: rgba(227,200,122,0.1);
  --accent-border: rgba(227,200,122,0.35); --well: #F7F3E9; --well-text: #07361F;
}
body[data-theme="light"] {
  --bg: #F7F3E9; --text: #07361F; --sub: rgba(7,54,31,0.66); --faint: rgba(7,54,31,0.45);
  --line: rgba(7,54,31,0.12); --accent: #C69239; --accent-soft: rgba(198,146,57,0.1);
  --accent-border: rgba(198,146,57,0.4); --well: #07361F; --well-text: #F7F3E9;
}
body[data-theme="dark"] .light, body[data-theme="light"] .dark { display: none; }

/* ---- Prayer card ---- */
#card { background: var(--bg); border-radius: 16px; padding: 22px 22px 16px; }

.head { display: flex; align-items: center; gap: 12px; }
#logo, .initials { width: 44px; height: 44px; border-radius: 10px; flex: none; object-fit: cover; }
.initials {
  background: var(--well); color: var(--well-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
}
.id { min-width: 0; }
.name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.dates { font-size: 12px; color: var(--sub); margin-top: 2px; }
.dates b { color: var(--accent); font-weight: 400; }

.next {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.next .lbl { font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); }
.next .val { font-size: 22px; font-weight: 300; }
.next .val b { color: var(--accent); font-weight: 400; }
.next .val b small, td small { font-size: 0.7em; margin-left: 2px; letter-spacing: 0.04em; }
.next .in { margin-left: auto; font-size: 12px; color: var(--sub); }

table { width: 100%; border-collapse: collapse; margin-top: 14px; font-variant-numeric: tabular-nums; }
th {
  font-size: 10px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--faint); text-align: right; padding: 6px 6px;
}
th:first-child, td:first-child { text-align: left; }
td { padding: 10px 6px; border-top: 1px solid var(--line); text-align: right; font-size: 15px; color: var(--sub); font-weight: 300; }
td:first-child { font-weight: 500; color: var(--text); letter-spacing: 0.06em; }
td.iq { color: var(--accent); font-weight: 500; font-size: 18px; }
tr.now td { background: var(--accent-soft); }
tr.now td:first-child { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }

.jum { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; row-gap: 6px; }
.jum .line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.jum .line span { color: var(--sub); }
.jum .line b { color: var(--accent); font-weight: 500; white-space: nowrap; }

.foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--faint); }
.brand { display: inline-flex; align-items: center; gap: 6px; }
.brand img.mark { height: 14px; width: 14px; opacity: 0.8; }

/* ---- Announcements: stacked rows, urgent ones inverted ---- */
#ann { display: grid; gap: 8px; }
.an {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); font-size: 14px; line-height: 1.4;
}
.an.urgent { background: var(--text); color: var(--bg); border-color: transparent; }
.an svg { width: 18px; height: 18px; flex: none; }
.an .pill {
  flex: none; font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text);
}
.an.urgent .pill { background: var(--accent); color: #07361F; }
.an .txt { min-width: 0; flex: 1; }
.an .when { margin-left: auto; flex: none; font-size: 12px; opacity: 0.6; white-space: nowrap; }
@media (max-width: 420px) { .an { flex-wrap: wrap; } .an .when { width: 100%; margin-left: 30px; } }

/* ---- Events: a card holding a date-tile list ---- */
#events { background: var(--bg); border-radius: 16px; padding: 18px 20px 14px; }
.sec-title { font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); }
.ev { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.ev:first-child { border-top: none; padding-top: 12px; }
.ev-date {
  flex: none; width: 54px; text-align: center; border-radius: 10px; padding: 7px 0;
  background: var(--well); color: var(--well-text);
}
.ev-date .m { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
body[data-theme="dark"] .ev-date .m { color: #C69239; } /* brass on the cream tile */
.ev-date .d { font-size: 21px; font-weight: 600; line-height: 1.1; }
.ev-body { min-width: 0; flex: 1; }
.ev-t { font-size: 16px; font-weight: 600; line-height: 1.3; }
.ev-w { font-size: 13px; color: var(--sub); margin-top: 3px; }
.ev-rec { display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.ev-d {
  font-size: 13px; color: var(--sub); margin-top: 5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ev-empty { padding: 22px 0 12px; text-align: center; color: var(--faint); font-size: 14px; }

/* ---- Notes: loading, errors, a section the mosque hasn't switched on ---- */
#status, .off {
  padding: 18px 22px; border-radius: 16px; background: var(--bg);
  font-size: 13px; color: var(--sub); text-align: center; line-height: 1.5;
}
