/* ==========================================================================
   weblists.css - ONE look for every language list in /webparts/  (shared by the hub and every page that shows a list)
   --------------------------------------------------------------------------
   * Each list file starts with <link rel="stylesheet" href="/webparts/weblists.css">, so any page that includes a list gets this file.
   * Every rule is namespaced .wl-*  (web list); nothing here touches the rest of a page.
   * Each language keeps ITS OWN colours (the owner chose them): the list sets two colours inline, e.g.
        <div class="wl" style="--wl-c:#D2E1FF;--wl-b:#000080">     --wl-c  the fill colour      --wl-b  the border and thin lines
   * The pictures of a list sit together in one row at the top (.wl-head). Every picture has a mouse-over text (title).
     Pictures that fit into the empty cells of the last text row sit there instead (li.wl-pics).
     A two-language list has one .wl-sec per language (its own colour: --wl-s).
   * One or two text links: no table, they follow the pictures as small text tiles (span.wl-txt).
   * More text links: the text table <ul class="wl-items wl-c3"> (1-4 columns). A short last row shares the row out evenly.
   * Download formats (MP4, DOC, LOW, #2 PDF ...) are small badges: <a class="wl-f">. A native title can carry its English
     label under it: <span class="wl-en">.
   * Plain (non-bold) text everywhere; gentle movement on mouse-over (none for people who ask their system for less motion).
   * To add a resource: copy one <li dir="auto"><span>...</span></li> inside the <ul class="wl-items"> of that list.
   * Lists that are just a language banner + an MP3 Bible picture: <div class="wl-bar"> (wl-bar-side: the tall picture beside it).
   ========================================================================== */

.wl {
  --wl-fill: var(--wl-c, #d2e1ff);
  --wl-line: var(--wl-b, #000080);
  --wl-ink: #1c1c1c;
  --wl-link: #0b3a9e;
  --wl-ease: .18s ease;
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 14px auto;
  background: var(--wl-fill);
  color: var(--wl-ink);
  border: 2px solid var(--wl-line);
  border-radius: 12px;
  overflow: hidden;
  font: 400 16px/1.4 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  letter-spacing: normal;
  text-align: center;
  text-indent: 0;
}
.wl *, .wl *::before, .wl *::after { box-sizing: border-box; }

.wl a {
  color: var(--wl-link); font-weight: 400;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color var(--wl-ease), text-decoration-thickness var(--wl-ease);
}
.wl a:hover, .wl a:focus-visible { color: #062a78; text-decoration-thickness: 2px; }
.wl a:focus-visible { outline: 3px solid var(--wl-link); outline-offset: 2px; border-radius: 3px; }
.wl b, .wl strong { font-weight: 700; }          /* the lists use none; kept for a word the owner wants bold on purpose */
.wl img { max-width: 100%; border: 0; vertical-align: middle; object-fit: contain; }   /* no height:auto - it would override the height="67" the pictures were given */

/* ---- the picture row: language banner first, then every other picture, at the sizes the owner chose ---- */
.wl-logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 14px;
  padding: 10px 12px;
}
.wl-head { border-bottom: 1px solid var(--wl-line); }
.wl-head:last-child { border-bottom: 0; }
.wl-logos a, .wl-pics a, .wl-pic a { display: inline-block; line-height: 0; }
.wl-logos a img, .wl-pics a img, .wl-pic a img, .wl-bar > a img {
  transition: transform var(--wl-ease), filter var(--wl-ease), box-shadow var(--wl-ease);
}
.wl-logos a:hover img, .wl-logos a:focus-visible img,
.wl-pics a:hover img, .wl-pics a:focus-visible img,
.wl-pic a:hover img, .wl-pic a:focus-visible img {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.06) drop-shadow(0 4px 6px rgba(0, 0, 0, .25));
}

/* a picture with its download formats under it (the Jesus Film: MP4 LOW) */
.wl-fig { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.wl-cap { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; line-height: 1.2; white-space: nowrap; }
.wl-cap a { display: inline-block; line-height: 1.2; }

/* one or two text links after the pictures (no table for them) */
.wl-txt {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px;
  max-width: min(100%, 300px); min-height: 44px; padding: 6px 12px;
  border: 1px solid var(--wl-line); border-radius: 10px;
  line-height: 1.3; overflow-wrap: anywhere;
  transition: transform var(--wl-ease), box-shadow var(--wl-ease);
}
.wl-txt:hover, .wl-txt:focus-within { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.wl-logos .wl-txt a:not(.wl-f) { display: inline; line-height: inherit; }    /* not the picture rule above (line-height 0) */

/* a download format: a small badge */
.wl a.wl-f {
  display: inline-block; margin: 1px 1px; padding: 0 6px;
  font-size: .76em; line-height: 1.55; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; vertical-align: 1px;
  border: 1px solid var(--wl-line); border-radius: 5px;
  transition: transform var(--wl-ease), box-shadow var(--wl-ease);
}
.wl a.wl-f:hover, .wl a.wl-f:focus-visible { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0, 0, 0, .2); }

/* a title in the list's own language, with the owner's English label under it */
.wl-en, .wl-nat { display: block; margin-top: 1px; font-size: .82em; opacity: .85; }

/* ---- two-language lists (Serbo-Croatian): one band per language, in that language's colour ---- */
.wl-sec { background: var(--wl-s, transparent); border-bottom: 1px solid var(--wl-line); }
.wl-sec-h { margin: 0; padding: 10px 14px 0; font: 700 1.15rem/1.25 Georgia, "Times New Roman", serif; color: var(--wl-ink); }
.wl-sec .wl-logos { padding-top: 8px; }

/* ---- the text table: one cell per resource, thin lines between, a chosen number of columns ----
   Flex rows: every cell of a full row has the same width; a short last row shares the row out (no empty cells). */
.wl-items {
  --wl-cols: 4;
  list-style: none; margin: 0 -1px -1px 0; padding: 0;          /* the -1px hides the last right/bottom line behind the outer border */
  display: flex; flex-wrap: wrap;
  container: wl-table / inline-size;
  min-width: min(100%, 280px);
}
.wl-c1 { --wl-cols: 1; }
.wl-c2 { --wl-cols: 2; }
.wl-c3 { --wl-cols: 3; }
.wl-c4 { --wl-cols: 4; }
.wl-items > li {
  flex: 1 0 calc(100% / var(--wl-cols) - 1px);
  min-width: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; margin: 0; padding: 0;
  list-style: none;
  border: solid var(--wl-line); border-width: 0 1px 1px 0;
  transition: box-shadow var(--wl-ease);
}
.wl-items > li:hover, .wl-items > li:focus-within { box-shadow: inset 0 0 0 2px var(--wl-line); }   /* a frame, the colour stays the owner's */
.wl-items > li > span { display: block; min-width: 0; padding: 7px 10px; overflow-wrap: anywhere; }
.wl-items > li:not(.wl-pic):not(.wl-pics):not(.wl-zip) img { height: 22px; width: auto; vertical-align: middle; }   /* small icons beside a link (PDF icon ...) */
.wl-items > li.wl-zip a { display: inline-flex; align-items: center; gap: 8px; }        /* "All Japanese PDFs .ZIP" with the ZIP picture */
.wl-items > li.wl-zip img { height: 40px; width: auto; flex: none; }

/* a title that is a picture (Hindi), and a cell that holds the pictures that fitted into the last row */
.wl-pic > span { padding: 8px 10px; line-height: 0; }
.wl-pics > span { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; padding: 8px 10px; }

/* fewer columns where the list is narrow (a phone, a side column of another page) */
@container wl-table (max-width: 820px) {
  .wl-c4 > li { flex-basis: calc(100% / 3 - 1px); }
}
@container wl-table (max-width: 560px) {
  .wl-c3 > li, .wl-c4 > li { flex-basis: calc(50% - 1px); }
  .wl-items > li > span { padding: 6px 7px; font-size: .96rem; }
}
@container wl-table (max-width: 300px) {
  .wl-items > li { flex-basis: 100%; }
}

/* ---- the flag grid (all_languages.htm) and the DBS language list (dbs_languages.htm): name tiles ---- */
.wl-flags .wl-items, .wl-names .wl-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); container-type: normal; }
.wl-flags .wl-items > li { justify-content: flex-start; min-height: 44px; }
.wl-flags .wl-items > li > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 7px 10px; text-align: left; }
.wl-flags .wl-items > li:not(.wl-pic):not(.wl-pics) img {
  height: 20px; width: auto; max-width: 36px; object-fit: contain;
  transition: transform var(--wl-ease);
}
.wl-flags .wl-items > li:hover img { transform: scale(1.15); }
.wl-flags .wl-items > li:not(:has(img)) > span::before { content: "\1F310"; line-height: 1; }   /* no flag picture: a small globe, so every tile looks alike */
.wl-names .wl-items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
.wl-names .wl-items > li { min-height: 44px; }
.wl-names .wl-items > li > span { padding: 6px 8px; line-height: 1.25; }
.wl-names .wl-head { gap: 6px 16px; }
.wl-names .wl-title { margin: 0; font: 700 1.25rem/1.25 Georgia, "Times New Roman", serif; color: var(--wl-ink); }

/* ---- the Bible downloads block (bible_downloads.htm): groups of links ---- */
.wl-dl { --wl-ink: #800000; --wl-link: #800000; text-align: left; }
.wl-g { padding: 12px 14px; border-bottom: 1px solid var(--wl-line); }
.wl-g:last-child { border-bottom: 0; }
.wl-g p { margin: 6px 0; }
.wl-g-intro { text-align: center; font: 700 1.25rem/1.3 Georgia, "Times New Roman", serif; }
.wl-g-intro p { margin: 0; }
.wl-g-intro img { height: 26px; width: auto; }
.wl-gh { margin: 0 0 8px; font: 700 1.15rem/1.25 Georgia, "Times New Roman", serif; color: var(--wl-ink); }
.wl-cta { text-align: center; margin: 0 !important; }
.wl-cta a {
  display: block; padding: 12px 14px; border: 2px solid var(--wl-line); border-radius: 10px;
  font: 400 1.3rem/1.3 Georgia, "Times New Roman", serif; text-decoration: none;
  transition: transform var(--wl-ease), box-shadow var(--wl-ease);
}
.wl-cta a:hover, .wl-cta a:focus-visible { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, .18); }
.wl-cols { list-style: none; margin: 10px 0 0; padding: 0; columns: 3 190px; column-gap: 0; border: solid var(--wl-line); border-width: 1px 0 0 1px; }
.wl-cols > li { break-inside: avoid; margin: 0; padding: 6px 10px; border: solid var(--wl-line); border-width: 0 1px 1px 0; }
.wl-cols img { height: 56px; width: auto; vertical-align: middle; }

/* ---- a language that is just its banner + an MP3 Bible picture ----
   wl-bar: the banner on its own line, the MP3 picture under it.  wl-bar-side: the tall MP3 picture to the RIGHT of the banner. */
.wl-bar {
  box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 16px; width: 100%; max-width: 980px; margin: 14px auto; text-align: center;
}
.wl-bar > a { display: inline-block; line-height: 0; }
.wl-bar img { max-width: 100%; border: 0; border-radius: 8px; vertical-align: middle; }
.wl-bar img.wl-fluid { height: auto; }                       /* the owner made these banners shrink with the page */
.wl-bar > a:first-child { flex: 0 0 100%; }
.wl-bar-side > a:first-child { flex: 1 1 0; min-width: min(100%, 420px); }
.wl-bar-side > a:first-child img { width: 100%; }
.wl-bar-side > a + a { flex: none; }
.wl-bar > a:hover img, .wl-bar > a:focus-visible img { filter: brightness(1.05) drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
.wl-bar > a + a:hover img, .wl-bar > a + a:focus-visible img { transform: translateY(-3px) scale(1.03); }

/* ---- phones and browsers without container queries ---- */
@media (max-width: 600px) {
  .wl { margin: 10px auto; border-radius: 10px; }
  .wl-c3 > li, .wl-c4 > li { flex-basis: calc(50% - 1px); }
  .wl-items > li { min-height: 42px; }
  .wl-logos { gap: 8px 12px; padding: 10px 8px; }
  .wl-g { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wl *, .wl-bar * { transition: none !important; }
  .wl a:hover img, .wl a:focus-visible img, .wl-txt:hover, .wl a.wl-f:hover, .wl-cta a:hover, .wl-bar > a:hover img { transform: none !important; }
}

@media print {
  .wl { break-inside: avoid; box-shadow: none; }
}
