/* Iqamah Prayer Times Widget — Embeddable Styles */
/* All selectors scoped under .iqamah-widget to avoid host-page conflicts */

.iqamah-widget {
  --w-bg: #ffffff;
  --w-surface: #f6f8f7;
  --w-text: #0a1a22;
  --w-text-2: #3b4d58;
  --w-muted: #6b8090;
  --w-brand: #0b4f52;
  --w-brand-2: #176b61;
  --w-gold: #b08b3b;
  --w-line: #dfe7e1;
  --w-active: rgba(11, 79, 82, 0.08);
  --w-radius: 14px;
  --w-font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  font-family: var(--w-font);
  color: var(--w-text);
  background: var(--w-bg);
  border: 1px solid var(--w-line);
  border-radius: var(--w-radius);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.iqamah-widget *,
.iqamah-widget *::before,
.iqamah-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Header ── */
.iqw-header {
  padding: 16px 18px 14px;
  background: linear-gradient(135deg, var(--w-brand) 0%, var(--w-brand-2) 100%);
  color: #fff;
}

.iqw-mosque-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
}

.iqw-date {
  font-size: 0.78rem;
  opacity: 0.7;
  font-weight: 500;
}

/* ── Prayer rows ── */
.iqw-prayers {
  padding: 4px 0;
}

.iqw-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--w-line);
  transition: background 0.15s ease;
}

.iqw-row:last-child {
  border-bottom: none;
}

.iqw-row.iqw-active {
  background: var(--w-active);
}

.iqw-prayer-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--w-text);
}

.iqw-active .iqw-prayer-name {
  color: var(--w-brand);
}

.iqw-adhan {
  font-size: 0.85rem;
  color: var(--w-muted);
  font-weight: 500;
  text-align: right;
  min-width: 52px;
}

.iqw-iqamah {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--w-brand);
  text-align: right;
  min-width: 56px;
}

.iqw-active .iqw-iqamah {
  color: var(--w-brand);
}

/* Column headers */
.iqw-col-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 8px 18px 4px;
  border-bottom: 1px solid var(--w-line);
}

.iqw-col-header span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--w-muted);
}

.iqw-col-header span:nth-child(2),
.iqw-col-header span:nth-child(3) {
  text-align: right;
  min-width: 52px;
}

.iqw-col-header span:nth-child(3) {
  min-width: 56px;
}

/* ── Jumuah section ── */
.iqw-jumuah {
  padding: 10px 18px 12px;
  background: var(--w-surface);
  border-top: 1px solid var(--w-line);
}

.iqw-jumuah-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--w-muted);
  margin-bottom: 8px;
}

.iqw-jumuah-slot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
}

.iqw-jumuah-slot + .iqw-jumuah-slot {
  border-top: 1px solid var(--w-line);
  padding-top: 8px;
  margin-top: 4px;
}

.iqw-jumuah-time {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--w-brand);
  white-space: nowrap;
}

.iqw-jumuah-meta {
  font-size: 0.82rem;
  color: var(--w-text-2);
}

.iqw-jumuah-speaker {
  font-weight: 600;
}

/* ── Footer / branding ── */
.iqw-footer {
  padding: 8px 18px;
  text-align: center;
  border-top: 1px solid var(--w-line);
}

.iqw-footer a {
  font-size: 0.7rem;
  color: var(--w-muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.iqw-footer a:hover {
  color: var(--w-brand);
}

/* ── Theme: Dark ── */
.iqamah-widget.iqw-theme-dark {
  --w-bg: #0f1c1e;
  --w-surface: #152426;
  --w-text: #e8ede9;
  --w-text-2: #a0b5aa;
  --w-muted: #6b8878;
  --w-line: #1e3234;
  --w-active: rgba(23, 107, 97, 0.15);
}

.iqw-theme-dark .iqw-header {
  background: linear-gradient(135deg, #0b3f42 0%, #145e55 100%);
}

/* ── Theme: Gold ── */
.iqamah-widget.iqw-theme-gold .iqw-header {
  background: linear-gradient(135deg, #8a6c2a 0%, #b08b3b 100%);
}

.iqw-theme-gold .iqw-iqamah,
.iqw-theme-gold .iqw-active .iqw-prayer-name {
  color: #8a6c2a;
}

/* ── Theme: Minimal ── */
.iqamah-widget.iqw-theme-minimal {
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.iqw-theme-minimal .iqw-header {
  background: var(--w-surface);
  color: var(--w-text);
  border-bottom: 1px solid var(--w-line);
}

.iqw-theme-minimal .iqw-mosque-name {
  color: var(--w-brand);
}

.iqw-theme-minimal .iqw-date {
  color: var(--w-muted);
  opacity: 1;
}

/* ── Theme: Compact ── */
.iqamah-widget.iqw-theme-compact .iqw-header {
  padding: 12px 14px 10px;
}

.iqw-theme-compact .iqw-mosque-name {
  font-size: 0.92rem;
}

.iqw-theme-compact .iqw-row {
  padding: 7px 14px;
}

.iqw-theme-compact .iqw-col-header {
  padding: 6px 14px 3px;
}

/* ── Responsive ── */
@media (max-width: 360px) {
  .iqw-header {
    padding: 12px 14px 10px;
  }
  .iqw-row,
  .iqw-col-header {
    padding-left: 14px;
    padding-right: 14px;
  }
  .iqw-mosque-name {
    font-size: 0.95rem;
  }
}
