/* Groups parity with Adrian's live pages (includes/pages/groups-parity.php, 15 Oct): link tabs for his group pages, his share row, and the directory's browse list with his filters. */

/* ---- link tabs beside ours: the same flat underline tab as the v3 strip (community-v3.css .ld-tabs label) ---- */
.ld-comm .ld-tabs a.ldgx-tab { flex: none; align-self: stretch; box-sizing: border-box; min-height: 48px; /* the label tabs measure 48px (15 Oct) */ display: flex; align-items: center; justify-content: center; padding: 13px 15px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--ld-muted); font: 600 15px var(--ld-text); text-decoration: none; white-space: nowrap; }
.ld-comm .ld-tabs a.ldgx-tab:hover { color: var(--ld-ink); }
.ld-comm .ld-tabs a.ldgx-tab:focus-visible { outline: 2px solid var(--ld-electric); outline-offset: -4px; }

/* ---- Adrian's share row, in our pills ---- */
.ldgx-share { margin: 14px 0 0; min-width: 0; }
.ldgx-share .idu-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; }
.ldgx-share .idu-share__label { font: 600 13px/1 var(--ld-text); color: inherit; opacity: .75; margin-right: 2px; }
.ldgx-share .idu-share__btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); cursor: pointer; text-decoration: none; transition: background .15s, transform .15s; }
.ldgx-share .idu-share__btn:hover { background: rgba(255,255,255,.26); }
.ldgx-share .idu-share__btn:active { transform: scale(.95); }
.ldgx-share .idu-share__btn svg { width: 16px; height: 16px; }
.ldgx-share .idu-share__btn[hidden] { display: none; }
/* on a light header (the group page body) the pills go ink on white */
.ld-comm .gh .ldgx-share { color: var(--ld-ink); }
.ld-comm .gh .ldgx-share .idu-share__btn { background: var(--ld-white); box-shadow: inset 0 0 0 1px var(--ld-line); color: var(--ld-midnight); }
.ld-comm .gh .ldgx-share .idu-share__btn:hover { box-shadow: inset 0 0 0 1.5px var(--ld-electric); }
.ld-comm .ldgx-share .idu-share__label { white-space: nowrap; }
.ld-comm .gh .ldgx-share { margin: 0 0 0 12px; align-self: center; }
.ld-comm .gh .ldgx-share .idu-share__label { display: none; }
/* phone: the row drops under the cover's own line, full width, so it never squeezes the name or the join button */
@media (max-width: 900px) {
	.ld-comm .ld-ch-g, .ld-comm .gh-b { flex-wrap: wrap; }
	.ld-comm .ldgx-share, .ld-comm .gh .ldgx-share { flex: 0 0 100%; order: 99; width: 100%; margin: 10px 0 0; }
	.ldgx-share .idu-share__btn { width: 34px; height: 34px; }
}

/* ---- Communities directory: browse every group with Adrian's facets, sort and views (ldgx_dir_section) ---- */
.ld-comm .ldgx { margin-top: 48px; min-width: 0; }
.ld-comm #results > .ldgx { margin-top: 0; }
.ld-comm .ldgx .ld-fh { align-items: center; }
.ld-comm .ldgx-tools { display: flex; align-items: center; gap: 10px; }
.ld-comm .ldgx-ft { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--ld-line); font: 600 14px var(--ld-text); color: var(--ld-midnight); cursor: pointer; }
.ld-comm .ldgx-ft svg { width: 18px; height: 18px; }
.ld-comm .ldgx-ft b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--ld-electric); color: #fff; font: 700 11.5px/1 var(--ld-text); }
.ld-comm .ldgx-view { display: inline-flex; gap: 2px; height: 40px; padding: 4px; box-sizing: border-box; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--ld-line); }
.ld-comm .ldgx-view .idu-view-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ld-faint); box-shadow: none; cursor: pointer; }
.ld-comm .ldgx-view .idu-view-btn.is-active { background: var(--ld-midnight); color: #fff; }
.ld-comm .ldgx-view .idu-view-btn svg { width: 18px; height: 18px; }
.ld-comm .ldgx-view .idu-view-btn svg path { fill: currentColor; }
.ld-comm .ldgx-ft-cb { position: absolute; opacity: 0; pointer-events: none; }

.ld-comm .ldgx-f { margin: 0 0 22px; padding: 18px 20px; border-radius: var(--ld-r-card); background: #fff; box-shadow: var(--ld-shadow-row); }
.ld-comm .ldgx-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ld-comm .ldgx-sel { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.ld-comm .ldgx-sel > span, .ld-comm .ldgx-cats legend { font: 600 12px/1 var(--ld-text); letter-spacing: .04em; text-transform: uppercase; color: var(--ld-faint); }
.ld-comm .ldgx-sel select { width: 100%; min-width: 0; height: 42px; margin: 0; padding: 0 34px 0 14px; border: 0; border-radius: 12px; background-color: var(--ld-surface, #f4f6fb); box-shadow: inset 0 0 0 1px var(--ld-line); font: 600 14px var(--ld-text); color: var(--ld-midnight); text-overflow: ellipsis; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a90a6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.ld-comm .ldgx-sel select:focus-visible { outline: 2px solid var(--ld-electric); outline-offset: 1px; }
.ld-comm .ldgx-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.ld-comm .ldgx-cats legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; }
.ld-comm .ldgx-chip { position: relative; margin: 0; cursor: pointer; }
.ld-comm .ldgx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ld-comm .ldgx-chip span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--ld-line); font: 600 13.5px var(--ld-text); color: var(--ld-midnight); white-space: nowrap; transition: background .15s, color .15s; }
.ld-comm .ldgx-chip small { font-weight: 500; color: var(--ld-faint); }
.ld-comm .ldgx-chip input:checked + span { background: var(--ld-midnight); color: #fff; box-shadow: none; }
.ld-comm .ldgx-chip input:checked + span small { color: rgba(255,255,255,.7); }
.ld-comm .ldgx-chip input:focus-visible + span { outline: 2px solid var(--ld-electric); outline-offset: 2px; }
.ld-comm .ldgx-acts { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.ld-comm .ldgx-f.is-js .ldgx-go { display: none; }
.ld-comm .ldgx-f.is-js .ldgx-acts:not(:has(a)) { display: none; }

.ld-comm .idu-results.ldgx-res { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; } /* Adrian's .idu-results panel look stays off: our cards carry it */
/* cards: grid = two columns of the result card; list = one column of compact rows */
.ld-comm .ldgx-card .ld-cc-top { display: flex; align-items: center; gap: 12px; }
.ld-comm .ldgx-card .ld-cc-top h3 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ld-comm .ldgx-av { flex: none; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.ld-comm .ldgx-res.idu-view-list .ldgx-grid { grid-template-columns: minmax(0, 1fr); gap: 0; border-radius: var(--ld-r-card); overflow: hidden; box-shadow: var(--ld-shadow-row); }
.ld-comm .ldgx-res.idu-view-list .ldgx-card { border-radius: 0; box-shadow: none; padding: 14px 18px; border-bottom: 1px solid var(--ld-line); }
.ld-comm .ldgx-res.idu-view-list .ldgx-card:last-child { border-bottom: 0; }
.ld-comm .ldgx-res.idu-view-list .ldgx-card .ld-res-d { display: none; }
.ld-comm .ldgx-res.idu-view-list .ldgx-card h3 { font-size: 17px; }
.ld-comm .ldgx-res.idu-view-list .ldgx-card:hover { transform: none; }
.ld-comm .ldgx-pages { margin: 28px 0 0; }
.ld-comm .ldgx-pages .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; margin: 0 4px 6px 0; padding: 0 14px; box-sizing: border-box; border-radius: 999px; background: #fff; color: var(--ld-midnight); box-shadow: inset 0 0 0 1px var(--ld-line); font: 600 14px/1 var(--ld-text); }
.ld-comm .ldgx-pages .page-numbers.current { background: var(--ld-midnight); color: #fff; box-shadow: none; }

/* phone: the Filter pill opens the panel (open by itself when a filter is on) */
@media (max-width: 900px) {
	.ld-comm .ldgx { margin-top: 36px; }
	.ld-comm .ldgx .ld-fh { flex-direction: row; align-items: center; flex-wrap: wrap; }
	.ld-comm .ldgx-ft { display: inline-flex; }
	.ld-comm .ldgx-f { display: none; padding: 16px; }
	.ld-comm .ldgx-ft-cb:checked + .ldgx-f { display: block; }
	.ld-comm .ldgx-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
	.ld-comm .ldgx-res.idu-view-grid .ldgx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) and (min-width: 901px) { .ld-comm .ldgx-res.idu-view-grid .ldgx-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* lane 1 (28 Oct), task 4: "Browse all groups" sits in the narrow side column at desktop widths, and its grid view drew two card columns
   in it, so every group name stacked one letter per line (Kyle: grid view "changes the sidebar on the groups page and distorts it").
   Wherever the section is narrow it is one column of compact rows, whatever the view switch says, and the switch hides there. */
.ld-comm .ldgx { container-type: inline-size; container-name: ldgx; }
@container ldgx (max-width: 560px) {
	.ld-comm .ldgx-view { display: none; }
	.ld-comm .ldgx-res .ldgx-grid, .ld-comm .ldgx-res.idu-view-grid .ldgx-grid { grid-template-columns: minmax(0, 1fr); gap: 0; border-radius: var(--ld-r-card); overflow: hidden; box-shadow: var(--ld-shadow-row); }
	.ld-comm .ldgx-res .ldgx-card { border-radius: 0; box-shadow: none; padding: 14px 16px; border-bottom: 1px solid var(--ld-line); }
	.ld-comm .ldgx-res .ldgx-card:last-child { border-bottom: 0; }
	.ld-comm .ldgx-res .ldgx-card .ld-res-d { display: none; }
	.ld-comm .ldgx-res .ldgx-card h3 { font-size: 16px; overflow-wrap: normal; word-break: normal; }
	.ld-comm .ldgx-res .ldgx-card:hover { transform: none; }
}
/* lane 1: the "Try" search suggestions wrap instead of running off the edge at 390 (no sideways pill rows) */
.ld-comm .ld-qs { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding: 0; row-gap: 8px; }
/* ---- filters2 (28 Oct, Kyle note 9): the Search button sits inside its pill at every width, and the Try suggestions are small quiet chips
   on one or two lines (the 44px wrapped chips read as a wall of buttons). ---- */
body .ld-comm .ld-head form.ld-search { align-items: center; box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; padding: 6px; }
body .ld-comm .ld-head form.ld-search label { min-width: 0; }
body .ld-comm .ld-head form.ld-search input { width: 100%; min-width: 0; height: 40px; padding: 0; margin: 0; border: 0; box-shadow: none; }
body .ld-comm .ld-head form.ld-search button.ld-btn[type=submit] { flex: none; height: 40px; min-height: 0; margin: 0; padding: 0 18px; line-height: 1; border-radius: 999px; }
body .ld-comm .ld-head .ld-qs { align-items: center; gap: 6px; margin-top: 12px; }
body .ld-comm .ld-head .ld-qs span { font: 500 13px/30px var(--ld-text); margin-right: 2px; }
body .ld-comm .ld-head .ld-qs .ld-chip { height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(10,14,36,.08); font: 500 13px/1 var(--ld-text); color: var(--ld-ink, #0a0e24); }
body .ld-comm .ld-head .ld-qs .ld-chip:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--ld-electric); }
body .ld-comm .ld-head .ld-qs .ld-chip[aria-pressed=true] { background: var(--ld-midnight); color: #fff; box-shadow: none; }
/* ---- filters3 (28 Oct): the groups browse page uses the same grid or list switch as every other directory (round 2's pill: 40px, 3px inset,
   navy when on), shown at phone width too, and remembered under ldView:groups by the head script in filters.php (phones open in rows until grid is picked).
   Phone grid is two columns of compact group cards (avatar, name, one meta line, Join), as rooms and jobs; list stays the rows. The desktop side column
   (no browse filter on) keeps its rows and hides the switch, as lane 1 set. ---- */
.ld-comm .ldgx .ldgx-view:not(#ld-none) { height: 40px; padding: 3px; gap: 2px; box-shadow: inset 0 0 0 1px #e4e7ef; }
.ld-comm .ldgx .ldgx-view .idu-view-btn:not(#ld-none) { width: 38px; height: 34px; color: #667089; transition: background .15s, color .15s; }
.ld-comm .ldgx .ldgx-view .idu-view-btn.is-active:not(#ld-none) { background: #0a0e24; color: #fff; }
.ld-comm .ldgx .ldgx-view .idu-view-btn:active { transform: scale(.94); }
@media (max-width: 900px) {
	.ld-comm .ldgx .ldgx-view:not(#ld-none) { display: inline-flex; height: 36px; padding: 2px; }
	.ld-comm .ldgx .ldgx-view .idu-view-btn:not(#ld-none) { width: 34px; height: 32px; }
	.ld-comm .ldgx .ldgx-tools { margin-left: auto; gap: 8px; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-radius: 0; overflow: visible; box-shadow: none; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 12px 12px; border: 1px solid #e4e7ef; border-radius: 14px; box-shadow: none; background: #fff; min-width: 0; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card:last-child { border-bottom: 1px solid #e4e7ef; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top { display: contents; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ldgx-av { order: 1; width: 48px; height: 48px; margin-bottom: 2px; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card h3 { order: 2; width: 100%; margin: 0; font-size: 15px; line-height: 1.25; overflow-wrap: normal; word-break: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-meta { order: 3; margin: 0; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-res-d { display: none; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :not(img):not(h3) { order: 4; margin-top: auto; align-self: stretch; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :not(img):not(h3) :is(a, button), .ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :is(a, button):not(h3) { width: 100%; justify-content: center; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card:hover { transform: none; }
}
/* filters3, critic pixel pass: twenty full-width blue Join bars read as a form; Join is a compact pill at the foot of each phone grid tile. */
@media (max-width: 900px) {
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :not(img):not(h3) { align-self: flex-start; }
	.ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :not(img):not(h3) :is(a, button), .ld-comm .ldgx .ldgx-res.idu-view-grid .ldgx-card .ld-cc-top > :is(a, button):not(h3) { width: auto; min-height: 32px; height: 32px; padding: 0 16px; font-size: 13px; }
}

/* 20 Nov audit at 390 (coordinator's decision): under "Communities 40" the Filter and view switch floated right on a row of their own, which read as overflow.
   On a phone they are one full-width toolbar: Filter on the left, the view switch on the right. */
@media (max-width: 600px) {
	.ld-comm .ldgx .ld-fh .ldgx-tools { align-self: stretch; width: 100%; justify-content: space-between; margin-left: 0; }
}
