/* Creeds & Catechisms cards, and the looping listen screen.
   The cards match the Learn Hebrew & Greek menu. */

.creeds-menu {
  display: none;
}

.creeds-menu.is-on {
  display: block;
  position: fixed;
  inset: 0;
  height: 100svh;
  max-height: 100svh;
  z-index: 11000;
  overflow: hidden;
  background: #d9d6d0;
  color: #1c1c1c;
}

.creeds-menu,
.creeds-menu * {
  box-sizing: border-box;
}

.creeds-menu-view {
  width: min(100%, 520px);
  height: 100%;
  margin: 0 auto;
  background: #f3f2ef;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.creeds-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: max(6px, env(safe-area-inset-top)) 8px 6px;
}

.creeds-head h2 {
  margin: 0;
  font: 600 18px/1.2 Inter, "Segoe UI", system-ui, sans-serif;
  color: #1c1c1c;
}

.creeds-back {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}

.creeds-cards {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px max(12px, env(safe-area-inset-bottom));
}

.creeds-card {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  color: #1c1c1c;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font: 600 clamp(17px, 4.8vw, 22px)/1.25 Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.02em;
  -webkit-tap-highlight-color: transparent;
}

.creeds-card span {
  display: block;
  max-width: 18em;
}

.creeds-card:active { filter: brightness(1.06); }

.creeds-card:focus-visible,
.creeds-back:focus-visible {
  outline: 2px solid #7aa2ff;
  outline-offset: -2px;
}

[data-theme="dark"] .creeds-menu.is-on,
[data-theme="oled"] .creeds-menu.is-on,
[data-theme="dark"] .creeds-menu-view,
[data-theme="oled"] .creeds-menu-view {
  background: var(--bg);
  color: var(--fg);
}

[data-theme="dark"] .creeds-head h2,
[data-theme="oled"] .creeds-head h2,
[data-theme="dark"] .creeds-back,
[data-theme="oled"] .creeds-back {
  color: var(--fg);
}

[data-theme="dark"] .creeds-card,
[data-theme="oled"] .creeds-card {
  background: var(--ui-chrome);
  color: var(--fg);
}

body.creeds-menu-open .app-topbar,
body.creeds-menu-open .reader-wrapper,
body.creeds-menu-open .reader,
body.creeds-menu-open .bible-sidecar,
body.creeds-menu-open #bible-sidecar,
body.creeds-menu-open #desktop-right-panel,
body.clisten-open .app-topbar,
body.clisten-open .reader-wrapper,
body.clisten-open .reader,
body.clisten-open .bible-sidecar,
body.clisten-open #bible-sidecar,
body.clisten-open #desktop-right-panel {
  visibility: hidden !important;
}

body.clisten-open #clisten-overlay.overlay {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  transform: none !important;
  background: var(--overlay-bg) !important;
  z-index: 11000 !important;
}

body.clisten-open #clisten-overlay .overlay-header {
  padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
}

#clisten-overlay .overlay-title {
  text-align: left;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.clisten-body {
  flex: 1;
  overflow: auto;
  padding: 1.25rem 1.25rem 2.5rem;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.clisten-pick {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clisten-note {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  color: var(--fg-secondary);
  margin: 0;
}

.clisten-pick label,
.clisten-pace {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-family-sans);
  font-size: 0.8rem;
  color: var(--fg-secondary);
}

.clisten-pace {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--fg);
}

.clisten-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.clisten-pick select {
  font-family: var(--font-family-sans);
  font-size: 16px;
  border: 1px solid var(--ui-chrome-border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 0.6rem;
  padding: 0.55rem 0.65rem;
  width: 100%;
  box-sizing: border-box;
}

#clisten-start,
#clisten-change {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0;
  padding: 0.7rem 1rem;
  font-family: var(--font-family-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  border: 1px solid var(--ui-chrome-border);
  background: var(--bg);
  color: var(--fg);
  border-radius: 999px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

#clisten-start:disabled {
  opacity: 0.45;
  cursor: default;
}

#clisten-change { margin-top: 1.25rem; }

.clisten-pick[hidden],
#clisten-work[hidden] { display: none !important; }

.clisten-playline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  font-family: var(--font-family-sans);
  color: var(--fg);
}

#clisten-playing:empty { display: none; }

.clisten-pace input[type="range"] {
  width: 7.5rem;
  margin: 0;
  accent-color: var(--button-primary, #0066cc);
}

#clisten-words {
  font-family: var(--font-family-serif);
  font-size: 1.45rem;
  line-height: 1.7;
}

.clisten-sec { margin: 0 0 0.9rem; }

.clisten-label {
  font-family: var(--font-family-sans);
  font-size: 0.62em;
  font-weight: 600;
  color: var(--fg-secondary);
  margin-right: 0.35rem;
}

.clisten-word {
  display: inline;
}

.clisten-word.is-paced {
  background: #ffe08a;
  color: #1a1a1a;
  box-shadow: inset 0 -3px 0 #e0a100;
  border-radius: 0.35rem;
}
