/*
 * Salah — Reusable Worship Detail
 *
 * Shared presentation for dhikr, duʿā, reflection and
 * personal-routine detail cards.
 *
 * Qurʾān cards are intentionally NOT styled here.
 */


/* ============================================================
   OVERLAY
   ============================================================ */

.worship-detail-overlay {
  position: fixed;
  z-index: 95;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 28px;

  background: rgba(9,31,25,.46);
  backdrop-filter: blur(7px);

  opacity: 0;

  transition:
    opacity .18s ease;
}

.worship-detail-overlay[hidden] {
  display: none !important;
}

.worship-detail-overlay.open {
  opacity: 1;
}

body.worship-detail-open {
  overflow: hidden;
}


/* ============================================================
   CARD
   ============================================================ */

.worship-detail-card {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 56px));

  overflow-y: auto;
  overflow-x: hidden;

  border: 1px solid rgba(14,59,46,.10);
  border-radius: 22px;

  background: #fffdf8;

  box-shadow:
    0 28px 80px rgba(9,31,25,.28);

  transform: translateY(10px) scale(.985);

  transition:
    transform .18s ease;

  scrollbar-width: thin;
  scrollbar-color:
    rgba(14,59,46,.18)
    transparent;
}

.worship-detail-overlay.open
.worship-detail-card {
  transform: translateY(0) scale(1);
}

.worship-detail-card::-webkit-scrollbar {
  width: 6px;
}

.worship-detail-card::-webkit-scrollbar-track {
  background: transparent;
}

.worship-detail-card::-webkit-scrollbar-thumb {
  background: rgba(14,59,46,.18);
  border-radius: 999px;
}


/* ============================================================
   HEADER
   ============================================================ */

.worship-detail-head {
  position: sticky;
  top: 0;
  z-index: 3;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  padding: 22px 24px 18px;

  border-bottom: 1px solid rgba(14,59,46,.07);

  background:
    rgba(255,253,248,.96);

  backdrop-filter: blur(8px);
}

.worship-detail-head h2 {
  margin: 0;

  color: #0e3b2e;

  font-family:
    'Libre Baskerville',
    serif;

  font-size: 27px;
  line-height: 1.18;
}

.worship-detail-close {
  flex: 0 0 36px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  padding: 0;

  border: 1px solid rgba(14,59,46,.08);
  border-radius: 50%;

  background: #f1ede4;
  color: #0e3b2e;

  font-size: 22px;
  line-height: 1;

  cursor: pointer;

  transition:
    background .16s ease,
    color .16s ease,
    border-color .16s ease;
}

.worship-detail-close:hover {
  background: #0e3b2e;
  color: #fff;
  border-color: #0e3b2e;
}

.worship-detail-close:focus-visible {
  outline:
    2px solid rgba(201,169,106,.72);

  outline-offset: 2px;
}


/* ============================================================
   BODY
   ============================================================ */

.worship-detail-body {
  padding: 22px 24px 26px;
}


/* ============================================================
   META
   ============================================================ */

.worship-detail-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;

  margin-bottom: 12px;
}

.worship-detail-badge,
.worship-detail-provenance {
  display: inline-flex;
  align-items: center;

  min-height: 25px;

  padding: 5px 9px;

  border-radius: 999px;

  font-size: 8px;
  line-height: 1;
  font-weight: 700;

  letter-spacing: .04em;
}

.worship-detail-badge {
  background: rgba(201,169,106,.14);
  color: #8c6828;
}

.worship-detail-provenance {
  background: #eef3ed;
  color: #4c6b5b;
}


/* ============================================================
   INTRO
   ============================================================ */

.worship-detail-subtitle {
  margin:
    0 0 16px;

  color: #66706c;

  font-size: 11px;
  line-height: 1.55;
}


/* ============================================================
   RECITATION CARD
   ============================================================ */

.worship-detail-recitation {
  padding: 20px;

  border:
    1px solid rgba(14,59,46,.09);

  border-radius: 16px;

  background: #fbf8f0;
}

.worship-detail-arabic {
  margin: 0 0 15px;

  color: #0e3b2e;

  font-family: serif;
  font-size: 27px;
  line-height: 1.85;

  text-align: right;
}

.worship-detail-translit {
  margin: 0 0 9px;

  color: #28483d;

  font-size: 11px;
  line-height: 1.65;
  font-weight: 600;
}

.worship-detail-english {
  margin: 0;

  color: #707871;

  font-size: 10px;
  line-height: 1.65;
}

.worship-detail-english-only {
  color: #40534b;

  font-size: 12px;
  line-height: 1.7;
}


/* ============================================================
   COUNT
   ============================================================ */

.worship-detail-count {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin: 14px 0 0;
  padding: 11px 14px;

  border-radius: 12px;

  background: #eef3ed;

  color: #0e3b2e;
}

.worship-detail-count span {
  font-size: 9px;
  font-weight: 600;
}

.worship-detail-count strong {
  font-family:
    'Libre Baskerville',
    serif;

  font-size: 22px;
}


/* ============================================================
   SOURCE
   ============================================================ */

.worship-detail-source {
  margin-top: 16px;
  padding: 13px 14px;

  border-left:
    3px solid rgba(201,169,106,.72);

  border-radius:
    0 10px 10px 0;

  background:
    rgba(201,169,106,.07);
}

.worship-detail-source small {
  display: block;

  margin-bottom: 4px;

  color: #a27d3e;

  font-size: 7px;
  line-height: 1;

  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: .12em;
}

.worship-detail-source strong {
  display: block;

  color: #0e3b2e;

  font-size: 10px;
  line-height: 1.45;
}

.worship-detail-source p {
  margin: 5px 0 0;

  color: #727a74;

  font-size: 9px;
  line-height: 1.5;
}


/* ============================================================
   7 × 7 / COLLECTION
   ============================================================ */

.worship-detail-collection {
  display: grid;
  gap: 9px;
}

.worship-detail-member {
  display: grid;

  grid-template-columns:
    48px minmax(0,1fr);

  gap: 12px;
  align-items: center;

  padding: 12px 14px;

  border:
    1px solid rgba(14,59,46,.08);

  border-radius: 13px;

  background: #fbf8f0;
}

.worship-detail-member-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 52px;

  border-radius: 10px;

  background: #eef3ed;

  color: #0e3b2e;
}

.worship-detail-member-count small {
  font-size: 7px;
  opacity: .6;
}

.worship-detail-member-count strong {
  margin-top: 2px;

  font-family:
    'Libre Baskerville',
    serif;

  font-size: 16px;
}

.worship-detail-member-copy {
  min-width: 0;
}

.worship-detail-member-arabic {
  margin: 0 0 5px;

  color: #0e3b2e;

  font-family: serif;
  font-size: 19px;
  line-height: 1.55;

  text-align: right;
}

.worship-detail-member-translit {
  display: block;

  color: #29493e;

  font-size: 10px;
  line-height: 1.45;
}

.worship-detail-member-english {
  display: block;

  margin-top: 3px;

  color: #777e79;

  font-size: 8px;
  line-height: 1.4;
}

.worship-detail-personal-note {
  margin-top: 14px;
  padding: 11px 13px;

  border-radius: 11px;

  background:
    rgba(201,169,106,.08);

  color: #756d5f;

  font-size: 9px;
  line-height: 1.5;
}


/* ============================================================
   PRACTICE
   ============================================================ */

.worship-detail-practice {
  padding: 20px;

  border:
    1px solid rgba(14,59,46,.08);

  border-radius: 16px;

  background: #eef3ed;

  text-align: center;
}

.worship-detail-practice span {
  display: block;

  color: #758179;

  font-size: 8px;
  line-height: 1;

  text-transform: uppercase;
  letter-spacing: .11em;
}

.worship-detail-practice strong {
  display: block;

  margin-top: 7px;

  color: #0e3b2e;

  font-family:
    'Libre Baskerville',
    serif;

  font-size: 27px;
}

.worship-detail-practice p {
  max-width: 390px;

  margin:
    9px auto 0;

  color: #68736d;

  font-size: 9px;
  line-height: 1.55;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 620px) {
  .worship-detail-overlay {
    align-items: flex-end;

    padding: 0;
  }

  .worship-detail-card {
    width: 100%;
    max-height: 88vh;

    border-radius:
      20px 20px 0 0;

    border-bottom: 0;

    transform:
      translateY(24px);
  }

  .worship-detail-overlay.open
  .worship-detail-card {
    transform:
      translateY(0);
  }

  .worship-detail-head {
    padding:
      18px 18px 15px;
  }

  .worship-detail-head h2 {
    font-size: 23px;
  }

  .worship-detail-body {
    padding:
      18px 18px 24px;
  }

  .worship-detail-arabic {
    font-size: 24px;
  }

  .worship-detail-member {
    grid-template-columns:
      44px minmax(0,1fr);

    gap: 10px;

    padding: 11px;
  }
}
/* ============================================================
   PRACTICE → QURʾĀN HANDOFF
   ============================================================ */

.worship-detail-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin-top: 17px;
  padding: 10px 16px;

  border: 1px solid #0e3b2e;
  border-radius: 999px;

  background: #0e3b2e;
  color: #fff;

  font-family:
    'DM Sans',
    system-ui,
    sans-serif;

  font-size: 10px;
  line-height: 1;
  font-weight: 700;

  cursor: pointer;

  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease;
}

.worship-detail-primary-action:hover {
  background: #155442;
  border-color: #155442;
  transform: translateY(-1px);
}

.worship-detail-primary-action:active {
  transform: translateY(0);
}

.worship-detail-primary-action:focus-visible {
  outline: 2px solid rgba(201,169,106,.75);
  outline-offset: 3px;
}

.worship-detail-action-note {
  display: block;

  max-width: 390px;
  margin: 10px auto 0;

  color: #7c847f;

  font-size: 8px;
  line-height: 1.5;
}
/* ============================================================
   QURʾĀN READING SESSION TIMER
   ============================================================ */

.worship-reading-timer {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin: 4px 0 18px;
  padding: 22px 18px 18px;

  border: 1px solid rgba(14, 59, 46, .12);
  border-radius: 18px;

  background:
    linear-gradient(
      180deg,
      rgba(238, 244, 238, .82),
      rgba(255, 255, 255, .92)
    );

  text-align: center;
}

.worship-reading-timer-label {
  color: #6f7c75;

  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.worship-reading-timer-time {
  display: block;

  margin: 7px 0 4px;

  color: #0e3b2e;

  font-size: clamp(42px, 9vw, 62px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.worship-reading-timer-status {
  color: #6f7c75;
  font-size: 10px;
  line-height: 1.4;
}

.worship-reading-timer-complete {
  margin: 10px 0 0;

  color: #496358;

  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  line-height: 1.45;
}

.worship-reading-timer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;

  margin-top: 16px;
}

/*
 * Deliberately specific selectors here so generic site button
 * rules cannot turn these back into browser-default rectangles.
 */

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button {
  appearance: none;
  -webkit-appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: auto;
  min-width: 0;
  min-height: 34px;

  margin: 0;
  padding: 8px 14px;

  border: 1px solid rgba(14, 59, 46, .18);
  border-radius: 999px;

  background: rgba(255, 255, 255, .82);
  color: #315247;

  box-shadow: none;

  font-family:
    'DM Sans',
    system-ui,
    sans-serif;

  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;

  cursor: pointer;

  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button:hover {
  border-color: rgba(14, 59, 46, .3);
  background: #fff;

  box-shadow:
    0 3px 10px rgba(14, 59, 46, .07);

  transform: translateY(-1px);
}

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button:active {
  transform: translateY(0);
}

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button:focus-visible {
  outline: 2px solid rgba(201, 169, 106, .75);
  outline-offset: 2px;
}


/* Main Start / Pause / Resume action */

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button.worship-reading-timer-main {
  min-width: 102px;

  border-color: #0e3b2e;

  background: #0e3b2e;
  color: #fff;

  box-shadow:
    0 4px 12px rgba(14, 59, 46, .12);
}

.worship-detail-card
.worship-reading-timer
.worship-reading-timer-actions
button.worship-reading-timer-main:hover {
  border-color: #155442;
  background: #155442;

  box-shadow:
    0 5px 14px rgba(14, 59, 46, .16);
}


/* Reset is deliberately quiet */

.worship-detail-card
.worship-reading-timer
button[data-reading-timer-reset] {
  color: #65756d;
}


/* +5 is a small secondary accent */

.worship-detail-card
.worship-reading-timer
button[data-reading-timer-add] {
  border-color: rgba(201, 169, 106, .38);

  background: rgba(201, 169, 106, .09);
  color: #735f37;
}

.worship-detail-card
.worship-reading-timer
button[data-reading-timer-add]:hover {
  border-color: rgba(201, 169, 106, .58);
  background: rgba(201, 169, 106, .15);
}


/* Mobile */

@media (max-width: 560px) {
  .worship-reading-timer {
    padding:
      20px 14px
      17px;
  }

  .worship-reading-timer-actions {
    gap: 6px;
  }

  .worship-detail-card
  .worship-reading-timer
  .worship-reading-timer-actions
  button {
    padding: 8px 12px;
  }
}
