/* Ellen G. White's books on the Libros category page (includes/egw-books.php). The panel and the viewer are the
   Sabbath School ones (sabbath-school.css); this adds the search box, the groups and the book cards. */
.egw-panel { padding-bottom: 1.5rem; }
.egw-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 2rem; align-items: start; }
.egw-intro > * { margin-block: 0 .8rem; }
.egw-credit { font-size: .88rem; color: var(--wp--preset--color--muted, #5b6b7a); }
.egw-search { margin: 0; }
.egw-search label { display: block; }
.egw-search input { width: 100%; padding: .7rem 1rem; font: inherit; font-size: 1rem; color: inherit; background: var(--wp--preset--color--surface, #fff); border: 1.5px solid var(--wp--preset--color--line, #d9e3ee); border-radius: 999px; }
.egw-search input:focus { outline: none; border-color: var(--wp--preset--color--blue, #245d94); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--blue, #245d94) 22%, transparent); }
.egw-empty { margin: 2rem 0 0; text-align: center; color: var(--wp--preset--color--muted, #5b6b7a); }

/* The groups */
.egw-group { margin-top: 2.25rem; }
.egw-group-title { margin: 0 0 .25rem; font-size: 1.25rem; }
.egw-group-count { display: inline-block; margin-left: .35rem; padding: .05rem .55rem; font-size: .8rem; font-weight: 700; vertical-align: middle; color: var(--wp--preset--color--blue-dark, #14344f); background: var(--wp--preset--color--surface, #fff); border-radius: 999px; }
.egw-group-lead { margin: 0 0 1rem; font-size: .92rem; color: var(--wp--preset--color--muted, #5b6b7a); }

/* The cards */
.egw-books { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.1rem; }
.egw-book { display: flex; flex-direction: column; gap: .6rem; }
.egw-book[hidden] { display: none; }
.egw-cover { display: block; width: 100%; aspect-ratio: 320 / 469; padding: 0; border: 0; cursor: pointer; background: var(--wp--preset--color--surface, #fff); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 22px rgba(20, 52, 79, .18); transition: transform .15s ease, box-shadow .15s ease; }
.egw-cover:hover, .egw-cover[aria-pressed="true"] { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(20, 52, 79, .26); }
.egw-cover:focus-visible { outline: 3px solid var(--wp--preset--color--blue, #245d94); outline-offset: 2px; }
.egw-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.egw-no-cover { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--wp--preset--font-family--serif, Georgia, serif); font-size: 3rem; color: var(--wp--preset--color--blue, #245d94); background: var(--wp--preset--color--sky, #eaf2fb); }
.egw-what { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.egw-name { margin: 0; font-size: .95rem; line-height: 1.25; }
.egw-meta { margin: 0; font-size: .8rem; color: var(--wp--preset--color--muted, #5b6b7a); font-variant-numeric: tabular-nums; }
.egw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .2rem 0 0 !important; }
.egw-older { font: inherit; font-size: .74rem; padding: .2rem .55rem; cursor: pointer; color: var(--wp--preset--color--muted, #5b6b7a); background: transparent; border: 1px solid var(--wp--preset--color--line, #d9e3ee); border-radius: 999px; }
.egw-older:hover, .egw-older[aria-pressed="true"] { color: #fff; background: var(--wp--preset--color--blue-dark, #14344f); border-color: var(--wp--preset--color--blue-dark, #14344f); }

@media (max-width: 760px) {
  .egw-head { grid-template-columns: 1fr; gap: 1rem; }
  .egw-books { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem; }
  .egw-cover { box-shadow: 0 4px 12px rgba(20, 52, 79, .18); }
}
