/* Audio page: podcasts + Rabbi Grossman's shiur library */
.gw-audio .block { padding-bottom: 16px; }
.gw-audio .decorated-title { padding-top: 16px; padding-bottom: 6px; }
.gw-audio .gw-lead { margin: 0 auto 12px; }
#podcasts .gw-section-title, #library .gw-section-title, #past-podcasts .gw-section-title { margin-bottom: 10px; font-size: 27px; }
#podcasts, #library, #past-podcasts { scroll-margin-top: 80px; }

/* the two big choices at the top */
.gw-audio__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; max-width: 860px; margin: 4px auto 6px; text-align: left; }
.gw-audio__tile { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #d5e4df; border-radius: 12px; padding: 11px 16px; color: var(--gw-text) !important; text-decoration: none !important; box-shadow: 0 2px 10px rgba(0,0,0,.05); transition: box-shadow .15s, transform .15s; }
.gw-audio__tile:hover, .gw-audio__tile:focus { box-shadow: 0 6px 18px rgba(0,0,0,.1); transform: translateY(-1px); }
.gw-audio__tileicon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--gw-green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.gw-audio__tilebody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gw-audio__tilename { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 21px; line-height: 1.2; }
.gw-audio__tiledesc { font-size: 14px; color: var(--gw-muted); line-height: 1.4; }

/* ---- podcasts (compact cards, 3 across on a wide screen) ---- */
.gw-pods { background: var(--gw-green-tint); padding: 20px 0 24px; clear: both; float: left; width: 100%; }
.gw-pods__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; text-align: left; align-items: start; }
.gw-pod { background: #fff; border-radius: 10px; box-shadow: 0 1px 8px rgba(0,0,0,.07); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gw-pod__head { display: flex; gap: 12px; align-items: flex-start; }
.gw-pod__headtext { min-width: 0; }
.gw-pod__art { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.gw-pod__title { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 19px; line-height: 1.2; margin: 0; }
.gw-pod__by { font-size: 13.5px; font-weight: 700; color: var(--gw-green); margin-top: 1px; }
.gw-pod__desc { margin: 2px 0 0; color: var(--gw-muted); font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gw-pod__player { width: 100%; height: 180px; border: 0; border-radius: 8px; display: block; }
.gw-pod__audio { width: 100%; height: 40px; display: block; }
.gw-pod__eps { list-style: none; margin: 0; padding: 0; display: flow-root; }
.gw-pod__eps li { float: none; width: auto; margin: 0; padding: 0; border-top: 1px solid var(--gw-line); }
.gw-pod__ep { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 5px 2px; text-align: left; color: var(--gw-text); font-size: 14px; line-height: 1.35; cursor: pointer; }
.gw-pod__ep .fa { color: var(--gw-green); font-size: 17px; flex: none; }
.gw-pod__ep:hover .gw-pod__eptext { color: var(--gw-green-dark); text-decoration: underline; }
.gw-pod__ep.is-playing { font-weight: 700; }
.gw-pod__ep.is-playing .fa:before { content: "\f028"; }
.gw-pod__eptext { flex: 1; min-width: 0; }
.gw-pod__epdate { color: var(--gw-muted); font-size: 12.5px; white-space: nowrap; font-weight: normal; }
.gw-pod__more { font-size: 13.5px; font-weight: 700; align-self: flex-start; }

/* podcast without a feed, and the library card */
.gw-pod__icon { width: 64px; height: 64px; border-radius: 8px; background: var(--gw-green-tint); color: var(--gw-green); display: flex; align-items: center; justify-content: center; font-size: 26px; flex: none; }
.gw-pod--lib .gw-pod__icon { background: var(--gw-green); color: #fff; }
.gw-pod--lib { border-top: 4px solid var(--gw-green); grid-column: 1 / -1; }
.gw-pod__libcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px 28px; align-items: start; }
.gw-pod__libmain { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 760px) { .gw-pod__libcols { grid-template-columns: 1fr; } }
.gw-pod__listen { align-self: flex-start; }
a.gw-pod__ep { text-decoration: none !important; }
.gw-pod__series { display: flex; flex-wrap: wrap; gap: 4px; }
.gw-pod__series .gw-chip { margin: 0; font-size: 13px; padding: 4px 11px; text-decoration: none !important; }
.gw-pod__series .gw-chip:hover { background: var(--gw-green); color: #fff; }

/* past podcasts: links only */
.gw-pastpods { max-width: 1170px; margin: 0 auto; text-align: left; }
.gw-pods__grid[hidden] + .gw-pastpods, div[hidden] + .gw-pastpods { margin-top: 0; }
.gw-pastpods__h { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 21px; margin: 0 0 10px; }
.gw-pastpods__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
.gw-pastpods__list > li { float: none; width: auto; margin: 0; padding: 0; }
.gw-pastpod { display: flex; gap: 12px; align-items: flex-start; height: 100%; background: #fff; border: 1px solid #d5e4df; border-radius: 8px; padding: 9px 12px; color: var(--gw-text) !important; text-decoration: none !important; }
.gw-pastpod:hover, .gw-pastpod:focus { box-shadow: 0 3px 12px rgba(0,0,0,.08); }
.gw-pastpod img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; }
.gw-pastpod__icon { width: 40px; height: 40px; border-radius: 6px; background: var(--gw-green-tint); color: var(--gw-green); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.gw-pastpod__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gw-pastpod__by { font-size: 12.5px; font-weight: 700; color: var(--gw-green); }
.gw-pastpod__title { font-weight: 700; color: var(--gw-brown); font-size: 15px; line-height: 1.3; }
.gw-pastpod__title .fa { font-size: 12px; color: var(--gw-muted); margin-left: 3px; }
.gw-pastpod__note { font-size: 13.5px; line-height: 1.45; color: var(--gw-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- library ---- */
.gw-lib { padding: 20px 0 26px; clear: both; float: left; width: 100%; background: #fff; }
.gw-lib .gw-section-title { margin-bottom: 4px; }
.gw-lib .gw-lead { margin: 0 auto 12px; }
.gw-lib__app { text-align: left; max-width: 980px; margin: 0 auto; }
.gw-lib__msg { text-align: center; color: var(--gw-muted); font-size: 16px; padding: 18px 0; }
.gw-lib__bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 12px; }
.gw-lib__search { flex: 1 1 320px; position: relative; margin: 0; font-weight: normal; }
.gw-lib__search .fa { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gw-muted); }
.gw-lib__search input { width: 100%; height: 46px; border: 1px solid #c8d6d1; border-radius: 999px; padding: 0 16px 0 40px; font-size: 16px; background: #fff; box-shadow: none; }
.gw-lib__search input:focus { outline: none; border-color: var(--gw-green); box-shadow: 0 0 0 3px rgba(45,105,92,.15); }
.gw-lib__sort { margin: 0; font-weight: normal; color: var(--gw-muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.gw-lib__sort select { height: 40px; border: 1px solid #c8d6d1; border-radius: 8px; padding: 0 8px; background: #fff; color: var(--gw-text); font-size: 15px; }
.gw-lib__series { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.gw-lib__series .gw-chip { margin: 0; }
.gw-lib__count { font-size: 12px; opacity: .75; font-weight: normal; margin-left: 2px; }
.gw-lib__h { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 21px; margin: 14px 0 6px; }
.gw-lib__h .gw-lib__count { font-family: 'Noto Sans', sans-serif; font-size: 14px; color: var(--gw-muted); }
.gw-lib__serieshead p { color: var(--gw-muted); margin: 0 0 12px; font-size: 15.5px; }
.gw-lib__link { background: none; border: 0; padding: 0; color: var(--gw-green); text-decoration: underline; font-size: 15px; font-family: 'Noto Sans', sans-serif; cursor: pointer; }

.gw-lib__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.gw-lib__card { display: flex; flex-direction: column; gap: 3px; background: var(--gw-green-tint); border: 1px solid #d5e4df; border-radius: 10px; padding: 10px 13px; color: var(--gw-text); text-decoration: none !important; transition: box-shadow .15s, transform .15s; }
.gw-lib__card:hover, .gw-lib__card:focus { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
.gw-lib__cardname { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-green-dark); font-size: 17.5px; font-weight: 700; }
.gw-lib__carddesc { font-size: 13px; line-height: 1.4; color: var(--gw-muted); flex: 1; }
.gw-lib__cardmeta { font-size: 13px; font-weight: 700; color: var(--gw-green); }

.gw-shiurim { list-style: none; margin: 0; padding: 0; display: flow-root; }
.gw-shiurim > li { float: none; width: auto; margin: 0; padding: 0; }
.gw-shiur { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--gw-line); }
.gw-shiur.is-extra { display: none; }
.gw-shiur.is-playing { background: #f3faf7; }
.gw-shiur__play { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--gw-green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; padding: 0 0 0 2px; }
.gw-shiur__play:hover { background: var(--gw-green-dark); }
.gw-shiur.is-playing .gw-shiur__play { background: var(--gw-amber); padding: 0; }
.gw-shiur.is-playing .gw-shiur__play .fa:before { content: "\f028"; }
.gw-shiur__body { min-width: 0; flex: 1; }
.gw-shiur__title { color: var(--gw-text); font-size: 15.5px; line-height: 1.4; display: block; overflow-wrap: anywhere; }
.gw-shiur__title:hover { color: var(--gw-green-dark); }
.gw-shiur__meta { font-size: 12.5px; color: var(--gw-muted); margin-top: 0; }
.gw-shiur__meta a { color: var(--gw-green); }
.gw-lib__more { display: block; margin: 10px auto 0; background: #fff; border: 1px solid #c8d6d1; color: var(--gw-green-dark); border-radius: 999px; padding: 7px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }

.gw-lib__section { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gw-green); margin: 18px 0 6px; }
.gw-lib__group { border: 1px solid var(--gw-line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.gw-lib__group > summary { cursor: pointer; padding: 11px 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; list-style: none; }
.gw-lib__group > summary::-webkit-details-marker { display: none; }
.gw-lib__group > summary:before { content: "\f105"; font-family: FontAwesome; color: var(--gw-green); width: 10px; transition: transform .15s; }
.gw-lib__group[open] > summary:before { transform: rotate(90deg); }
.gw-lib__group[open] > summary { border-bottom: 1px solid var(--gw-line); }
.gw-lib__gname { font-weight: 700; color: var(--gw-brown); font-size: 16px; }
.gw-lib__gmeta { font-size: 13px; color: var(--gw-muted); margin-left: auto; }
.gw-lib__group .gw-shiurim { padding: 0 10px 8px; }
.gw-lib__group .gw-shiur:first-child { border-top: 0; }

/* ---- "now playing" bar ---- */
.gw-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: #fff; border-top: 3px solid var(--gw-green); box-shadow: 0 -4px 18px rgba(0,0,0,.15); }
.gw-player[hidden] { display: none; }
.gw-player__inner { padding-top: 8px; padding-bottom: 8px; }
.gw-player__top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; text-align: left; }
.gw-player__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gw-green); white-space: nowrap; }
.gw-player__title { flex: 1; min-width: 0; font-weight: 700; color: var(--gw-brown); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.gw-player__link { font-size: 13px; white-space: nowrap; }
.gw-player__close { background: none; border: 0; font-size: 20px; color: var(--gw-muted); cursor: pointer; padding: 0 4px; line-height: 1; }
.gw-player__frame { width: 100%; height: 124px; border: 0; display: block; }
.gw-player__frame[hidden], .gw-player__audio[hidden], .gw-player__versions[hidden] { display: none; }
.gw-player__audio { width: 100%; display: block; height: 44px; }
.gw-player__versions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; color: var(--gw-muted); text-align: left; }
.gw-player__versions button { border: 1px solid #c8d6d1; background: #fff; color: var(--gw-green-dark); border-radius: 999px; padding: 3px 11px; font-size: 13px; cursor: pointer; }
.gw-player__versions button.is-on { background: var(--gw-green); border-color: var(--gw-green); color: #fff; }
body.has-gw-player { padding-bottom: 150px; }

@media (max-width: 600px) {
    .gw-pods { padding: 16px 0 20px; }
    .gw-pod__art, .gw-pod__icon { width: 56px; height: 56px; }
    .gw-lib { padding: 16px 0 22px; }
    .gw-lib__sort { width: 100%; }
    .gw-lib__sort select { flex: 1; }
    .gw-lib__series { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; margin-left: -4px; margin-right: -4px; }
    .gw-lib__series .gw-chip { flex: none; }
    .gw-lib__gmeta { margin-left: 0; flex-basis: 100%; padding-left: 22px; }
    .gw-player__label, .gw-player__link span { display: none; }
}

/* past podcasts section (below the library) and the link to it */
.gw-pods__pastlink { text-align: center; margin: -4px 0 12px; font-size: 14px; }
.gw-pods__pastlink a { font-weight: 700; }
.gw-pods--past .gw-pastpods { margin-top: 0; }
.gw-pastpods__list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gw-pastpod__body > span { line-height: 1.35; }
.gw-pastpod__note { margin-top: 2px; }
