/* Page styles: post */

#maker[hidden] {
  display:none;
}
.mat {
  position:relative;
}
.mat>a {
  display:block;
  max-width:100%;
  cursor:zoom-in;
}
.zoom {
  position:absolute;
  inset:1.3rem auto auto 1.3rem;
  display:grid;
  place-items:center;
  width:2.4rem;
  height:2.4rem;
  border-radius:50%;
  background:rgba(15,23,42,.72);
  color:#fff;
  pointer-events:none;
  transition:background-color .2s;
}
.mat:hover .zoom {
  background:var(--primary);
}
.zoom svg {
  width:1.2rem;
  height:1.2rem;
}
.progw {
  display:flex;
  align-items:center;
  gap:.7rem;
  max-width:20rem;
  margin:.5rem 0 .3rem;
}
.progw small {
  color:var(--muted);
  font-size:.8rem;
  white-space:nowrap;
}
.prog {
  flex:1;
  height:.35rem;
  background:var(--line);
  border-radius:9px;
}
.prog i {
  display:block;
  width:8.2%;
  height:100%;
  background:var(--primary);
  border-radius:inherit;
}
#maker {
  padding:1.5rem 0 2.5rem;
  background:var(--band);
}
.post {
  display:grid;
  gap:2rem 3.5rem;
  padding:1.25rem 0 3rem;
}

@media(min-width:960px) {
  .post {
    grid-template-columns:minmax(0,30rem) minmax(0,1fr);
    gap:2rem 3rem;
    align-items:start;
  }
}

@media(min-width:1200px) {
  .post {
    grid-template-columns:minmax(0,34rem) minmax(0,1fr);
  }
}

.art {
  margin:0;
  min-width:0;
}

@media(max-width:959px) {
  .art {
    max-width:32rem;
    margin-inline:auto;
  }
}

.mat {
  display:grid;
  place-items:center;
  padding:clamp(.6rem,1.6vw,1rem);
  background:#fff;
  border:1px solid var(--line);
  box-shadow:0 36px 70px -28px rgba(15,23,42,.45),0 6px 16px rgba(15,23,42,.08);
}
.mat img {
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
}
.dl {
  position:sticky;
  bottom:.8rem;
  z-index:20;
  /* Flex, not three fixed columns: the row has to look right with three buttons, with two (a poster with no PNG),
     with one, and with the studio button alone when the downloads are switched off in the settings. Each button
     takes an equal share of the line it lands on. */
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-top:1rem;
  padding:.55rem;
  background:rgba(244,241,234,.94);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
  border:1px solid var(--line);
  border-radius:.9rem;
  box-shadow:var(--shadow-md);
}
.dl .qhd-btn {
  flex:1 1 7.5rem;
  justify-content:center;
  min-height:2.8rem;
  padding-inline:.4rem;
  font-size:.9rem;
  gap:.35rem;
}
.ref {
  font-family:var(--font-display);
  font-size:1.6rem;
  font-weight:700;
  color:var(--primary);
  margin:1rem 0 0;
}
.ref a:hover {
  text-decoration:underline;
}
.info {
  min-width:0;
}
.info h1 {
  font-family:var(--font-quran,'Amiri',serif);
  font-size:clamp(1.9rem,3.4vw,2.8rem);
  line-height:1.9;
  margin:.1rem 0 .8rem;
}
.listen {
  display:grid;
  gap:.35rem;
  margin-top:.8rem;
  padding:.65rem .8rem .8rem;
  background:var(--card);
  border:1px solid var(--line);
}
.listen span {
  font-size:.85rem;
  font-weight:500;
  color:var(--slate-800);
}
.facts {
  display:flex;
  flex-wrap:wrap;
  gap:.4rem 1.5rem;
  margin:0 0 1.1rem;
  padding:0;
  list-style:none;
  color:var(--muted);
  font-size:.9rem;
}
.info .chips {
  flex-wrap:wrap;
  overflow:visible;
  margin-bottom:1.25rem;
}
.tafsir {
  max-width:40rem;
  margin:0 0 1.5rem;
  padding:1.25rem 1.4rem;
  background:var(--band);
  border-radius:.75rem;
}
.tafsir h2 {
  font-size:1.5rem;
  margin:0 0 .4rem;
}
/* Its own size: the tafsir is set in an Arabic face (Fonts tab), which reads smaller than the body font at the
   same size. --tafsir-size comes from inc/fonts.php. */
.tafsir p {
  margin:0;
  font-size:var(--tafsir-size,1.12rem);
  line-height:2;
}
/* .ico is components/icon-button.css; this page used to repeat it word for word. */
.ico[hidden] {
  display:none;
}
.ayah-nav {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.75rem;
  margin-top:1.5rem;
  max-width:40rem;
}
.ayah-nav a {
  display:grid;
  gap:.1rem;
  padding:.8rem 1rem;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:.6rem;
  transition:border-color .2s;
}
.ayah-nav a:hover {
  border-color:var(--primary);
}
.ayah-nav small {
  color:var(--muted);
}
.ayah-nav a[rel=next] {
  text-align:end;
}
.studio {
  padding:2rem 0;
  background:var(--band);
  border-block:1px solid var(--line);
}
.studio .qhd-wrap {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:1rem 2rem;
}
.studio h2 {
  font-size:2rem;
  margin:0;
}
.studio p {
  margin:.2rem 0 0;
  color:var(--muted);
}
.tr {
  padding:2.5rem 0 1rem;
}
.tr .chips {
  margin-bottom:.8rem;
}
.tr ul.list {
  display:grid;
  gap:0 3rem;
  grid-template-columns:minmax(0,1fr); /* two columns on a wide screen is a setting; see inc/fonts.php */
  list-style:none;
  margin:0;
  padding:0;
}

@media(min-width:800px) {
  .tr ul.list {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

.tr li {
  padding:1rem 0;
  border-top:1px solid var(--line);
  overflow-wrap:anywhere;
}
.tr li[hidden] {
  display:none;
}
.tr .lang {
  display:block;
  font-size:.8rem;
  color:var(--muted);
  margin-bottom:.2rem;
}
/* Size and line height are settings (Fonts tab) and arrive as custom properties from inc/fonts.php, which also
   gives each script its own face. The fallbacks here are what the theme ships with. */
.tr p {
  margin:0;
  font-size:var(--tr-size,1rem);
  line-height:var(--tr-line,1.85);
}

.rel:last-of-type {
  padding-bottom:3.5rem;
}

.tr h2 {
  font-size:2.2rem;
  margin:0 0 1rem;
}

/* Free text of the post (old content), shown under the tafsir only when the post has any */
.entry {
  max-width: 40rem;
  margin: 0 0 1.5rem;
  line-height: 1.9;
}

/* Phones.
   The poster is the page, so it comes first and full-bleed-ish; the download buttons go full width because they are
   the main action; the previous/next verse links stack instead of sitting in two cramped columns. */
@media (max-width:45rem) {
  .dl {
    gap:.45rem;
    padding:.45rem;
  }
  .dl .qhd-btn {
    justify-content:center;
    min-height:2.9rem;
    padding-inline:.6rem;
  }
  /* The studio is the secondary action, so it takes the full width under the downloads rather than squeezing them. */
  .dl .qhd-btn.wide {
    flex-basis:100%;
  }
  .facts {
    gap:.35rem .9rem;
  }
  .ayah-nav {
    grid-template-columns:minmax(0,1fr);
  }
  .ayah-nav a {
    min-height:3.4rem;
  }
  .ref a {
    display:inline-flex;
    align-items:center;
    min-height:2.5rem;
  }
  .tr h2,
  .tafsir h2 {
    font-size:1.6rem;
  }
  .listen {
    gap:.4rem;
  }
}
