/* zirikana — minimal app styles (dark theme) */
:root {
  --bg: #0d0d0d;
  --fg: #e8e8e8;
  --muted: #9a9a9a;
  --accent: #8fa855;
  --border: #2a2a2a;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--accent);
}

.logo-home {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

.logo-img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  object-fit: cover;
  flex-shrink: 0;
}

.ijambo-date-row {
  padding: 0.75rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.tagline-date,
.tagline-date-btn {
  font-size: 0.9rem;
  color: var(--muted);
}

.tagline-date-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tagline-date-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.tagline-date-btn .header-date-icon {
  font-size: 1rem;
  opacity: 0.8;
}

.tagline-date-btn:hover .header-date-icon {
  opacity: 1;
}

.tagline-liturgical {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--accent);
}

.nav-tabs {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.nav-tab:hover {
  color: var(--fg);
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.view {
  margin-top: 0.5rem;
}

/* ——— Calendar (Ijambo ry'Imana date picker) ——— */
.calendar-panel {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calendar-nav {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.calendar-nav:hover {
  color: var(--accent);
}

.calendar-month-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.cal-weekday {
  padding: 0.25rem 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.cal-day--empty {
  visibility: hidden;
}

.cal-day--disabled {
  color: var(--muted);
  opacity: 0.5;
}

.cal-day--available {
  color: var(--fg);
  cursor: pointer;
}

.cal-day--available:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.cal-day--today {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.cal-day--active {
  background: var(--accent);
  color: var(--bg);
}

.cal-day--active:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ——— Bibiliya: secondary segment nav (OT | NT | Psalms) ——— */
/* ——— Bibiliya: segment tabs (AELF filled-background style) ——— */
.bibiliya-segments {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
}

.bibiliya-segment-btn {
  flex: 1;
  padding: 0.55rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.bibiliya-segment-btn:hover {
  color: var(--fg);
}

.bibiliya-segment--active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ——— Bibiliya: single-column content area ——— */
.bibiliya-content {
  margin-top: 0;
}

.bibiliya-books-loading {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

/* AELF-style book rows */
.bibiliya-books-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bibiliya-books-list li {
  border-bottom: 1px solid var(--border);
}

.bibiliya-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 0.25rem;
  background: none;
  border: none;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
}

.bibiliya-book-row:hover {
  color: var(--accent);
}

.bibiliya-book-chevron {
  font-size: 1.1rem;
  color: var(--muted);
}

/* Back button */
.bibiliya-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  padding: 0.6rem 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.bibiliya-back:hover {
  color: var(--accent);
}

/* Chapter grid */
.bibiliya-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
  gap: 0.4rem;
}

.bibiliya-chapter-btn {
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.bibiliya-chapter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.bibiliya-verses {
  margin-top: 0.5rem;
}

.bibiliya-verse {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.bibiliya-verse-num {
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.25rem;
}

.bibiliya-verse-text {
  color: var(--fg);
}

/* ——— Reading content (Ijambo + shared) ——— */
.reading {
  margin-top: 0.5rem;
}

.reading .liturgical-title {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: var(--accent);
}

.reading .meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.block {
  margin-bottom: 1.5rem;
}

.block .block-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--accent);
  text-transform: none;
  letter-spacing: normal;
}

.block h4,
.block .ref {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--muted);
}

.block .citation {
  font-style: italic;
  margin: 0.5rem 0;
  padding-left: 0.5rem;
  border-left: 3px solid var(--accent);
}

.block .text {
  white-space: pre-wrap;
  margin: 0;
}
