/* Masjid Service — Gaya susun atur laman web Fasa 2 (layouts.js).
   Kelas berawalan .ly- supaya tidak bertembung dengan styles.css.
   Semua susun atur berkongsi pemboleh ubah tema (--primary, --gold). */

/* ---------- Kongsi ---------- */
#layout-root { margin-top: 0; }
.ly-logo-img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; background: #fff; flex: none; }
.ly-crescent { flex: none; }
.ly-event-banner {
  background: #fffbeb; border: 1px solid var(--gold); border-left: 5px solid var(--gold);
  border-radius: 10px; padding: 12px 16px; margin-top: 20px; font-size: 1rem;
}
.ly-event-banner .ly-event-days { font-weight: 700; color: var(--primary); }
.ly-events-list { margin: 8px 0 0; padding-left: 20px; }
.ly-events-list li { margin: 6px 0; }
.ly-qr-img { max-width: 220px; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.ly-donation-form { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.ly-ref-out { background: var(--primary-soft); border: 1px dashed var(--gold); border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.ly-comment { border-left: 4px solid var(--gold); background: var(--bg); padding: 10px 14px; border-radius: 0 10px 10px 0; margin-top: 10px; }
.ly-comment p { margin: 4px 0 0; }
.ly-comment .date { color: var(--muted); font-size: .85rem; font-weight: 400; }
.ly-comment-actions { display: flex; gap: 8px; margin-top: 6px; }
.ly-mini-btn { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; font-size: .85rem; cursor: pointer; color: var(--muted); }
.ly-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.ly-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary);
  border-radius: 999px; padding: 12px 20px; font-size: 1rem; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.ly-fab:hover { background: var(--primary-dark); }
.ly-contact-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 90; width: min(360px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.ly-contact-panel h3 { margin-top: 0; }
/* Ticker bawah (Classic hitam, Bold hitam) — teks bergerak perlahan. */
.ly-ticker {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: #000; color: #fff; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; font-size: 1rem; overflow: hidden; white-space: nowrap;
}
.ly-ticker-label { background: var(--gold); color: #1a1a1a; font-weight: 800; padding: 2px 12px; border-radius: 6px; flex: none; }
.ly-ticker-text { display: inline-block; animation: ly-ticker-scroll 30s linear infinite; }
@keyframes ly-ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* Tab solat HARI INI / BESOK / BULAN INI. */
.ly-tab-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ly-tab-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; font-size: .95rem; font-weight: 700; cursor: pointer; color: var(--text);
}
.ly-tab-btn.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.ly-today-row { background: var(--primary-soft); font-weight: 700; }
/* Baris solat dengan ikon (Bold). */
.ly-prayer-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.ly-prayer-row:last-child { border-bottom: none; }
.ly-prayer-row.next { background: var(--primary-soft); border-radius: 10px; }
.ly-prayer-row.next .ly-prayer-name, .ly-prayer-row.next .ly-prayer-time { color: var(--primary); font-weight: 700; }
.ly-prayer-icon { font-size: 1.5rem; width: 36px; text-align: center; flex: none; }
.ly-prayer-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ly-prayer-name { font-weight: 600; }
.ly-prayer-sub { font-size: .85rem; color: var(--muted); }
.ly-prayer-time { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.ly-map { width: 100%; height: 260px; border: 1px solid var(--border); border-radius: 10px; }

/* ---------- LITE ---------- */
.ly-lite .ly-lite-brand { display: flex; gap: 12px; align-items: flex-start; }
.ly-lite .ly-lite-brand h2 { margin: 0; }
.ly-lite .ly-lite-next { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; }
.ly-lite .prayer-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---------- CLASSIC ---------- */
.ly-classic-header {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between; box-shadow: var(--shadow);
}
.ly-classic-brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ly-classic-brand h2 { margin: 0; font-size: 1.5rem; }
.ly-classic-brand .crescent { border-color: var(--gold); color: var(--gold); }
.ly-classic-pill {
  background: var(--primary); color: #fff; border-radius: 999px; padding: 10px 20px;
  font-size: .95rem; white-space: nowrap;
}
.ly-classic-pill strong { color: var(--gold-soft); }
.ly-classic-pill .countdown { font-weight: 700; }
.ly-classic-nav {
  background: #1d4ed8; border-radius: 10px; margin-top: 12px; padding: 0 8px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.ly-classic-nav a {
  color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 12px 14px; letter-spacing: .03em;
}
.ly-classic-nav a:hover { background: rgba(255, 255, 255, .15); border-radius: 8px; }
.ly-classic-nav .ly-nav-infaq { margin-left: auto; background: var(--gold); color: #1a1a1a; border-radius: 8px; padding: 8px 18px; margin-top: 6px; margin-bottom: 6px; }
.ly-classic-hero {
  margin-top: 12px; border-radius: var(--radius); min-height: 320px;
  background-size: cover; background-position: center 38%;
  display: flex; align-items: flex-end; overflow: hidden; box-shadow: var(--shadow);
}
.ly-classic-hero-text {
  background: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
  color: #fff; padding: 60px 24px 24px; width: 100%;
}
.ly-classic-hero-text h2 { color: #fff; font-size: 2rem; margin: 0 0 4px; }
.ly-classic-hero-text p { margin: 0 0 12px; color: rgba(255, 255, 255, .9); }
.ly-classic-footer { margin-bottom: 60px; }

/* ---------- BOLD ---------- */
.ly-bold-header {
  background: #fff; border-radius: 999px; box-shadow: var(--shadow);
  margin-top: 20px; padding: 10px 12px 10px 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.ly-bold-brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ly-bold-brand strong { display: block; line-height: 1.2; }
.ly-bold-brand span { display: block; font-size: .8rem; color: var(--muted); }
.ly-bold-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.ly-bold-nav a { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.ly-bold-nav a:hover { background: var(--bg); }
.ly-bold-infaq { background: #111; border-color: #111; color: #fff; border-radius: 999px; }
.ly-bold-infaq:hover { background: #333; border-color: #333; color: #fff; }
.ly-bold-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 20px; align-items: start; }
.ly-bold-hero {
  border-radius: 24px; min-height: 520px; background-size: cover; background-position: center 38%;
  padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.ly-bold-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 55%); }
.ly-bold-hero > * { position: relative; }
.ly-bold-welcome {
  position: absolute; top: 24px; left: 24px; background: rgba(255, 255, 255, .9); color: #111;
  font-weight: 800; letter-spacing: .1em; font-size: .85rem; padding: 6px 14px; border-radius: 999px;
}
.ly-bold-hero h2 { color: #fff; font-size: 2.2rem; margin: 0 0 4px; }
.ly-bold-hero p { margin: 0; color: rgba(255, 255, 255, .9); }
.ly-bold-dots { margin-top: 16px; color: var(--gold-soft); font-size: .8rem; }
.ly-bold-arrows { position: absolute; top: 50%; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 12px; transform: translateY(-50%); pointer-events: none; }
.ly-bold-arrow {
  pointer-events: auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .45); color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.ly-bold-arrow:hover { background: rgba(0, 0, 0, .7); }
.ly-bold-side { display: flex; flex-direction: column; gap: 20px; }
.ly-bold-side .card { margin-top: 0; }
.ly-bold-next {
  background: #1d4ed8; color: #fff; border-radius: 18px; padding: 22px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow);
}
.ly-bold-next-label { font-weight: 800; letter-spacing: .04em; }
.ly-bold-count { font-size: 3rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ly-bold-prayer .prayer-grid { grid-template-columns: 1fr; }
.ly-bold-prayer .prayer-cell { text-align: left; display: flex; gap: 12px; align-items: baseline; }
.ly-bold-prayer .prayer-cell .prayer-time { margin-left: auto; }

/* ---------- APP ---------- */
.ly-app { max-width: 480px; margin: 0 auto; background: #eef1f4; border-radius: 0 0 16px 16px; padding: 0 12px 24px; }
.ly-app .card { margin-top: 12px; }
.ly-app-nav {
  display: flex; gap: 4px; background: #fff; border-radius: 999px; padding: 6px;
  margin-top: 16px; box-shadow: var(--shadow); overflow-x: auto;
}
.ly-app-nav a {
  flex: 1; text-align: center; text-decoration: none; color: var(--text); font-weight: 600;
  font-size: .85rem; padding: 8px 6px; border-radius: 999px; white-space: nowrap;
}
.ly-app-nav a.active { background: #1d4ed8; color: #fff; }
.ly-app-nav a.ly-app-nav-gold { background: var(--gold); color: #1a1a1a; }
.ly-app-ticker {
  background: #fff; border-radius: 999px; padding: 8px 16px; margin-top: 12px;
  overflow: hidden; white-space: nowrap; font-size: .9rem; box-shadow: var(--shadow);
}
.ly-app-ticker span { display: inline-block; animation: ly-ticker-scroll 30s linear infinite; }
.ly-app-hero {
  margin-top: 12px; border-radius: 20px; min-height: 220px; background-size: cover;
  background-position: center 38%; padding: 18px; display: flex; flex-direction: column;
  justify-content: flex-end; color: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.ly-app-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, 0) 60%); }
.ly-app-hero > * { position: relative; }
.ly-app-hero-date { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--gold-soft); }
.ly-app-hero h2 { color: #fff; margin: 4px 0 0; font-size: 1.5rem; }
.ly-app-hero p { margin: 0; color: rgba(255, 255, 255, .9); font-size: .9rem; }
.ly-app-next { text-align: center; }
.ly-app-next h2 { font-size: 1.05rem; letter-spacing: .03em; }
.ly-app-count { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primary); line-height: 1.1; }
.ly-app-next .btn-row { justify-content: center; }
.ly-app-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ly-app-feature {
  background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 8px;
  text-decoration: none; color: var(--text); text-align: center; display: flex;
  flex-direction: column; gap: 4px; align-items: center; box-shadow: var(--shadow);
}
.ly-app-feature span { font-size: 1.5rem; }
.ly-app-feature strong { font-size: .9rem; line-height: 1.25; }
.ly-app-feature small { color: var(--muted); font-size: .8rem; }
.ly-app-carousel .announce { margin-top: 10px; }
.ly-app .ly-fab { background: var(--gold); border-color: var(--gold); color: #1a1a1a; font-weight: 700; }

@media (max-width: 820px) {
  .ly-bold-grid { grid-template-columns: 1fr; }
  .ly-bold-hero { min-height: 340px; }
  .ly-bold-count { font-size: 2.2rem; }
  .ly-classic-pill { white-space: normal; }
  .ly-app-features { grid-template-columns: repeat(3, 1fr); }
}
