/* The community layer (community/community.php): phone tabs, the group sidebar widgets, member faces on group
   cards, the My Groups menu, and dark. Kit tokens only. */

/* ---- Phone tabs for signed-in members ---- */
.occ-tabbar { display: none; }
@media (max-width: 800px) {
	body.occ-has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	.occ-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--header-bg); border-top: 1px solid var(--header-line); }
	.occ-tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 52px; padding: 6px 0 4px; color: var(--muted); font: 600 11.5px/1.2 var(--font-body); text-decoration: none; }
	.occ-tabbar a .occ-ph { font-size: 24px; }
	.occ-tabbar a[aria-current="page"] { color: var(--select-fg); }
	.occ-tabbar a:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: -3px; border-radius: var(--radius-item); }
	.occ-tabbar__count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--attn-mark); color: var(--attn-fg); font: 700 11px/18px var(--font-ui); text-align: center; }
}

/* ---- Sidebar widgets as kit cards ---- */
.buddyboss-theme :is(#secondary, .widget-area) .widget { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: none; }
.buddyboss-theme :is(#secondary, .widget-area) .widget :is(.widget-title, h2.widget-title, h3.widget-title) { margin: 0 0 14px; color: var(--fg); font: 700 var(--fs-h4)/1.3 var(--font-heading); letter-spacing: 0; text-transform: none; }
.occ-facts, .occ-people { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.occ-facts li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; }
.occ-facts .occ-ph { margin-top: 1px; color: var(--muted); font-size: 20px; }
.occ-facts b, .occ-people b { display: block; color: var(--fg); font-size: var(--fs-small); font-weight: 600; }
.occ-facts small, .occ-people small { display: block; color: var(--muted); font-size: var(--fs-micro); line-height: 1.4; }
.occ-faces { display: flex; margin-top: 6px; }
.occ-faces a + a { margin-left: -6px; }
.occ-faces img, .occ-people img { display: block; border-radius: 50%; }
.occ-faces img { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--surface); }
.occ-people li { margin: 0; }
.occ-people a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg); text-decoration: none; }
.occ-people img { flex: none; width: 36px; height: 36px; }
.occ-widget-more { margin: 14px 0 0; font-size: var(--fs-small); }

/* ---- Member faces on group cards (BuddyBoss's own bb_groups_loop_members, which the card footer squeezed to 4px) ---- */
.buddyboss-theme .group-footer-wrap .group-members-wrap { flex: none; min-width: 0; }
.buddyboss-theme .bs-group-members { display: flex; align-items: center; }
html body.buddyboss-theme .group-members-wrap, html body.buddyboss-theme .group-members-wrap .bs-group-members { display: flex; align-items: center; width: auto !important; max-width: none !important; }
html body.buddyboss-theme .group-members-wrap .bs-group-member { flex: none; width: 30px !important; max-width: none !important; margin: 0; }
html body.buddyboss-theme .group-members-wrap .bs-group-member + .bs-group-member { margin-left: -8px; }
html body.buddyboss-theme .group-members-wrap .bs-group-member img { display: block; width: 30px !important; max-width: none !important; height: 30px !important; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }  /* outranks BuddyBoss's 20px !important */

/* ---- My Groups under Groups in the signed-in top menu ---- */
/* Groups menu: group types, then a line, then the member's own groups. */
.buddyboss-theme :is(.sub-menu, .bb-sub-menu) .occ-group-type + .occ-my-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }

/* ---- Dark. BuddyBoss's colors point at the kit's dark tokens; light keeps the Theme Options values (theme-options.php
   writes Stillwater there). html:root[...] outranks the :root block BuddyBoss prints, wherever it lands. ---- */
html:root[data-theme="dark"] {
	color-scheme: dark;
	/* The site's night grounds. The kit's Hearth browns sat a shade apart and read as one heavy brown across a whole
	   site, so here the page is a near-neutral charcoal and the places people read and act (cards, the header, the
	   side panel, fields) are clearly lighter steps. Text keeps its contrast: muted 5.8:1 and links 6:1 on the
	   lightest step, field borders 4:1 on cards. */
	--canvas: #1C1A19; --surface: #2E2B29; --sunk: #3A3734; --line: #4B4743; --field: #8F8882;
	--muted: #BCB4AD; --header-bg: #2E2B29; --header-muted: #BCB4AD; --header-line: #4B4743;
	--disabled-bg: #3A3734; --disabled-fg: #8A837D;
	--bb-body-background-color: var(--canvas); --bb-body-background-color-rgb: 28, 26, 25;
	--bb-content-background-color: var(--surface); --bb-content-alternate-background-color: var(--sunk);
	--bb-content-border-color: var(--line); --bb-content-border-color-rgb: 75, 71, 67;
	--bb-cover-image-background-color: var(--sunk);
	--bb-body-text-color: var(--fg); --bb-body-text-color-rgb: 246, 241, 236;
	--bb-headings-color: var(--fg); --bb-headings-color-rgb: 246, 241, 236;
	--bb-alternate-text-color: var(--muted); --bb-alternate-text-color-rgb: 188, 180, 173;
	--bb-primary-color: var(--primary); --bb-primary-color-rgb: 151, 190, 209;
	--bb-primary-button-background-regular: var(--primary); --bb-primary-button-background-hover: var(--primary-hover);
	--bb-primary-button-border-regular: var(--primary); --bb-primary-button-border-hover: var(--primary-hover);
	--bb-primary-button-text-regular: var(--primary-fg); --bb-primary-button-text-hover: var(--primary-fg);
	--bb-primary-button-text-regular-rgb: 35, 27, 23; --bb-primary-button-text-hover-rgb: 35, 27, 23;
	--bb-secondary-button-background-regular: var(--surface); --bb-secondary-button-background-hover: var(--sunk);
	--bb-secondary-button-border-regular: var(--field); --bb-secondary-button-border-hover: var(--fg);
	--bb-secondary-button-text-regular: var(--fg); --bb-secondary-button-text-hover: var(--fg);
	--bb-header-background: var(--header-bg); --bb-header-alternate-background: var(--sunk);
	--bb-header-links: var(--fg); --bb-header-links-hover: var(--primary);
	--bb-sidenav-background: var(--surface);
	--bb-sidenav-menu-background-color-regular: var(--surface); --bb-sidenav-menu-background-color-hover: var(--sunk); --bb-sidenav-menu-background-color-active: var(--select-bg);
	--bb-sidenav-text-regular: var(--fg); --bb-sidenav-text-hover: var(--fg); --bb-sidenav-text-active: var(--select-fg);
	--bb-sidenav-count-background-color-regular: var(--sunk); --bb-sidenav-count-background-color-hover: var(--line); --bb-sidenav-count-background-color-active: var(--surface);
	--bb-sidenav-count-text-color-regular: var(--fg); --bb-sidenav-count-text-color-hover: var(--fg); --bb-sidenav-count-text-color-active: var(--select-fg);
	--bb-footer-background: var(--canvas); --bb-footer-widget-background: var(--canvas); --bb-footer-text-color: var(--muted);
	--bb-footer-menu-link-color-regular: var(--muted); --bb-footer-menu-link-color-hover: var(--primary); --bb-footer-menu-link-color-active: var(--fg);
	--bb-label-background-color: var(--select-bg); --bb-label-text-color: var(--select-fg);
	--bb-danger-color: var(--error); --bb-danger-color-rgb: 240, 119, 122;
	--bb-warning-color: var(--error); --bb-warning-color-rgb: 240, 119, 122;
	--bb-success-color: var(--primary); --bb-success-color-rgb: 151, 190, 209;
	--bb-default-notice-color: var(--primary); --bb-default-notice-color-rgb: 151, 190, 209;
	--bb-tooltip-background: #231B17; --bb-tooltip-background-rgb: 35, 27, 23; --bb-tooltip-color: var(--fg);  /* BuddyBoss prints the bubble Hearth (Theme Options); its words light */
	--bb-login-register-button-background-color-regular: var(--primary); --bb-login-register-button-background-color-hover: var(--primary-hover);
	--bb-login-register-button-border-color-regular: var(--primary); --bb-login-register-button-border-color-hover: var(--primary-hover);
	--bb-login-register-button-text-color-regular: var(--primary-fg); --bb-login-register-button-text-color-hover: var(--primary-fg);
	--bb-login-register-link-color-regular: var(--link); --bb-login-register-link-color-hover: var(--link-hover);
}
html[data-theme="dark"] img.bb-logo { content: var(--occ-logo-dark); }  /* the white logo, never a recolored one */
/* Where BuddyBoss hard-codes light colors (a white search bar and dropdowns, near-white menu hovers, a #222 icon), the
   night grounds instead. Its rules carry ids, so these need !important to win. */
html[data-theme="dark"] :is(.bs-dropdown, .dropdown:not(.v-select), .select2-dropdown, .site-header .ab-submenu, .site-header .ab-submenu .bb-sub-menu) { background: var(--surface) !important; color: var(--fg); }
html[data-theme="dark"] .site-header :is(.sub-menu, .bb-sub-menu, .ab-submenu) a:hover,
html[data-theme="dark"] :is(.bs-dropdown, .dropdown:not(.v-select)) :is(a, li, button):hover { background: var(--sunk) !important; color: var(--fg) !important; }
html[data-theme="dark"] .layout-view { color: var(--muted) !important; }
html[data-theme="dark"] :is(.layout-view.active, .layout-view:hover) { background: var(--sunk) !important; color: var(--fg) !important; }
html[data-theme="dark"] :is([data-balloon], [data-bp-tooltip])::after { box-shadow: 0 0 0 1px var(--line); }
/* A group or profile without a cover photo: Theme Options prints its light cover color with ids; match them. */
html[data-theme="dark"] #buddypress #header-cover-image.has-default,
html[data-theme="dark"] #buddypress #header-cover-image.has-default .guillotine-window img,
html[data-theme="dark"] .bs-group-cover.has-default a { background-color: var(--sunk); }

/* A group type's page says the type in its title (community.php), so BuddyBoss's "Viewing all groups that are ..." goes. */
.buddyboss-theme #buddypress .bp-feedback.info:has(> .current-group-type) { display: none; }

/* Profile types: a badge only where it says something. Member is everyone's default, so it isn't shown. */
.buddyboss-theme .bb-current-member-member,
.buddyboss-theme .member-type:has(> .bb-current-member-member) { display: none; }

/* ---- The phone menu ("Community phone", community-setup.php): the tab bar's icons, "you are here" in Mist like the
   rest of the kit (not a solid fill), and its sections, You, Help and Sign out, set apart. ---- */
.bb-mobile-panel-wrapper i._mi.occ-ph, .bb-mobile-panel-wrapper i._mi.occ-ph::before { font-family: "occ-phosphor" !important; }
.bb-mobile-panel-wrapper .side-panel-menu i._mi.occ-ph { width: 24px; font-size: 22px; text-align: center; }
.bb-mobile-panel-wrapper .side-panel-menu .sub-menu i._mi.occ-ph { font-size: 18px; }
html body.buddyboss-theme .bb-mobile-panel-wrapper .side-panel-menu .current-menu-item > a { background: var(--select-bg); color: var(--select-fg); font-weight: 700; }
html body.buddyboss-theme .bb-mobile-panel-wrapper .side-panel-menu .current-menu-item > a i { color: var(--select-fg); }
html body.buddyboss-theme .bb-mobile-panel-wrapper .side-panel-menu > :is(.occ-menu-you, .occ-menu-help, .occ-menu-signout) { height: auto; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
/* BuddyBoss lays each row's link over the row (absolute); in these rows it follows its label instead. */
html body.buddyboss-theme .bb-mobile-panel-wrapper .side-panel-menu > :is(.occ-menu-you, .occ-menu-help, .occ-menu-signout) > a { position: relative; inset: auto; }
.bb-mobile-panel-wrapper .side-panel-menu > :is(.occ-menu-you, .occ-menu-help)::before { display: block; padding: 0 16px 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.bb-mobile-panel-wrapper .side-panel-menu > .occ-menu-you::before { content: "You"; }
.bb-mobile-panel-wrapper .side-panel-menu > .occ-menu-help::before { content: "Help"; }
body.bb-mobile-panel-open .occ-tabbar { display: none; }  /* the open menu has every place; the tabs would cover its foot */
/* ---- A group's Resources tab (Planning Center Groups for BuddyBoss): a row each, File or Link, Leaders only when
   it is. They open in a new tab through the site's check. ---- */
.pcogb-resources__note { margin: 4px 0 0; color: var(--muted); }
.pcogb-resources__list { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.pcogb-resources__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); }
.buddyboss-theme .pcogb-resources__list a { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); font-weight: 600; text-decoration: none; }
.buddyboss-theme .pcogb-resources__list a:hover .pcogb-resources__name { text-decoration: underline; text-underline-offset: 3px; }
.pcogb-resources__kind, .pcogb-resources__who { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pcogb-resources__kind { background: var(--sunk); color: var(--muted); }
.pcogb-resources__who { background: var(--select-bg); color: var(--select-fg); }
.pcogb-resources__list p { flex: 1 1 100%; margin: 0; color: var(--muted); font-size: var(--fs-small); }

/* The header's search bar drops over the header, so it takes the header's ground (BuddyBoss hard-codes white). */
.site-header .header-search-wrap { background: var(--header-bg); }

/* Hide or show the side panels (community.php): the button beside Search, and the panels gone with the content taking
   the room. Wide screens only; on phones the panels sit below the content and the button isn't shown. */
.occ-panels-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: 4px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 22px; cursor: pointer; }
.occ-panels-toggle:hover { background: var(--canvas, rgba(0, 0, 0, .05)); }
.occ-panels-toggle:focus-visible { outline: 2px solid var(--focus, #195A73); outline-offset: 2px; }
.occ-panels-toggle[aria-pressed="true"] { color: var(--accent, #195A73); }
@media (min-width: 1024px) {
	.occ-panels-toggle { display: inline-flex; }
	html.occ-wide :is(#secondary, #secondary-right, #group-activity).widget-area { display: none !important; }
	html.occ-wide :is(#primary, #item-body, .bb-profile-grid > #item-body) { flex: 1 1 auto; max-width: none; width: 100%; }
}

/* A group's Progress tab, for its leaders (lms/groups.php) */
.occ-progress__course + .occ-progress__course { margin-top: 32px; }
.occ-progress__sum, .occ-progress__note { color: var(--muted); font-size: var(--fs-small); }
.occ-progress__wrap { overflow-x: auto; }
.occ-progress__table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.occ-progress__table :is(th, td) { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.occ-progress__table thead th { color: var(--muted); font-weight: 600; }
.occ-progress__table tbody th { font-weight: 600; }
.occ-progress__meter { display: inline-block; width: 80px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--line); vertical-align: middle; }
.occ-progress__meter i { display: block; height: 100%; background: var(--primary); }
.occ-progress__n, .occ-progress__none { color: var(--muted); }

/* The top of every signed-in community page (Terrance's pick, Nov 10, 2026: "fade, no line"): the header's colour carries on past it and fades
   into the page over 360px, and the hard line under the header becomes a soft shadow, so the header still stands apart as the page scrolls.
   Public pages keep their photo heroes. */
html body.buddyboss-theme.logged-in #content { background: linear-gradient(var(--header-bg) 0, var(--header-bg) 24px, var(--canvas) 360px) no-repeat, var(--canvas); }
html body.buddyboss-theme.logged-in .site-header { border-bottom: 0 !important; box-shadow: 0 10px 24px -18px rgba(35, 27, 23, .35) !important; }
html[data-theme="dark"] body.buddyboss-theme.logged-in .site-header { box-shadow: 0 10px 24px -16px rgba(0, 0, 0, .6) !important; }
