/*
Theme Name: OCC Community
Template: buddyboss-theme
Description: One Community Church's community site on the BuddyBoss Theme (style 2.0). brand/ is copied from occ-design-system/apps/kit by setup.sh; don't edit it here.
Version: 0.2.0
*/

/* The OCC apps kit (occ-design-system/apps/kit) laid over BuddyBoss: its type scale, corners, focus ring and the
   thread. Colors come from theme-options.php. Tokens (--fs-*, --radius-*, --line, ...) are in brand/tokens.css. */

/* ---- Corners and focus: the theme's own variables, set to the kit's ---- */
body.buddyboss-theme {
	--bb-block-radius: var(--radius-card);        /* cards, panels: 14px */
	--bb-block-radius-inner: var(--radius-item);  /* rows inside them: 10px */
	--bb-option-radius: var(--radius-item);
	--bb-input-radius: var(--radius-field);       /* fields: 4px */
	--bb-checkbox-radius: var(--radius-field);
	--bb-label-type-radius: var(--radius-pill);
	--bb-primary-button-focus-shadow: none;       /* the kit's focus is a ring, below */
	--bb-secondary-button-focus-shadow: none;
	--bb-outline-button-focus-shadow: none;
	--bb-input-focus-shadow: none;
	--bb-input-focus-border-color: var(--fg);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--fg);
}
.buddyboss-theme :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: none; }

/* ---- Type: Urbanist headings, Montserrat body, Poppins buttons. .buddyboss-theme matches the theme's own
   .bb-custom-typo rules (assets/fonts/fonts.css), and this file loads after them. ---- */
body.buddyboss-theme { font-family: var(--font-body); }
.buddyboss-theme :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) { font-family: var(--font-heading); color: var(--fg); letter-spacing: var(--tracking-heading); }
.buddyboss-theme .entry-header .entry-title,
.buddyboss-theme :is(.bbcs-course, .bbcs-lesson, .bbcs-quiz) h1,
.buddyboss-theme #item-header-content .bb-group-name,
.buddyboss-theme h1 { font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-tight); }
.buddyboss-theme h2, .buddyboss-theme .h2 { font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-tight); }
.buddyboss-theme h3, .buddyboss-theme .h3 { font-size: var(--fs-h3); font-weight: 700; line-height: var(--lh-snug); }
.buddyboss-theme :is(.list-title, .groups-title, .bb-card-heading, .item-title) { font-family: var(--font-heading); font-weight: 700; letter-spacing: var(--tracking-heading); }
.buddyboss-theme :is(.activity-header, .item-meta, .card-meta-item, .bb-card-meta, .activity-date, .time-since) { font-size: var(--fs-small); }

/* Buttons that say something: Poppins 600 in uppercase, pills (the kit writes "Join group" and CSS uppercases it). */
.buddyboss-theme :is(.button, input[type="submit"], .bbcs-btn, .generic-button > a, .generic-button > button, .bb-button, .bp-generic-button .button, .groups-meta .button, #whats-new-submit button) {
	font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-button); letter-spacing: var(--tracking-button); text-transform: uppercase;
}

/* ---- Surfaces: Linen cards on the Limestone canvas, joined by hairlines ---- */
.buddyboss-theme :is(.activity-list > li .activity-inner-wrap, #whats-new-form, .bp-list .list-wrap, .bb-card, .widget, .bbcs-section) { border-color: var(--line); }
.buddyboss-theme .activity-list > li { border-radius: var(--radius-card); }

/* The post box is a card like the rest: Linen, not the theme's alternate tan. */
.buddyboss-theme :is(#whats-new-form, .activity-update-form) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }

/* The kit's notice: a flat tint and words, no colored side panel. */
.buddyboss-theme .bp-feedback:not(.error) { border: 0; background: var(--surface); border-radius: var(--radius-item); color: var(--fg); }
.buddyboss-theme .bp-feedback:not(.error) > .bp-icon { background: none; color: var(--primary); }

/* ---- The thread: the N's line, quiet, only where nothing is written on it (kit rule): empty states above the
   words, the sign-in page, and a cover that has no photo. Mask copied from kit.css (--occ-mask-thread). ---- */
body.buddyboss-theme { --occ-mask-thread: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 203 220'%3E%3Cpath d='M-203 55V21.24L-103 96.04V55H0V21.24L100 96.04V55H203V21.24L303 96.04V55H406M-101.5 165V131.24L-1.5 206.04V165H101.5V131.24L201.5 206.04V165H304.5V131.24L404.5 206.04V165H507.5' fill='none' stroke='%23EFE7E0' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.buddyboss-theme :is(.bs-group-cover, #header-cover-image.has-default, .bs-group-cover a) { position: relative; background-color: var(--canvas); }
.buddyboss-theme .bs-group-cover:not(:has(img))::after,
.buddyboss-theme #header-cover-image.has-default::after { content: ""; position: absolute; inset: 0; background: var(--line); -webkit-mask: var(--occ-mask-thread) 0 0 / 203px auto repeat; mask: var(--occ-mask-thread) 0 0 / 203px auto repeat; pointer-events: none; }
/* An empty page ("Sorry, no photos were found."): the thread across the top, the icon in a circle on it, the words
   centered. BuddyBoss draws the same notice for a note inside a form; there it's one line, its icon beside the words. */
.buddyboss-theme .bp-feedback.info:not(.error) { display: grid; justify-items: center; gap: 12px; padding: 0 24px 28px; overflow: hidden; border: 1px solid var(--line); text-align: center; }
.buddyboss-theme .bp-feedback.info:not(.error)::before { content: ""; justify-self: stretch; height: 72px; margin: 0 -24px; background: var(--line); -webkit-mask: var(--occ-mask-thread) -40px -30px / 203px auto repeat-x; mask: var(--occ-mask-thread) -40px -30px / 203px auto repeat-x; }
.buddyboss-theme .bp-feedback.info:not(.error) > .bp-icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; margin: -36px 0 0; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transform: none; }
.buddyboss-theme .bp-feedback.info:not(.error) > .bp-icon::before { position: static; margin: 0; transform: none; }
.buddyboss-theme .bp-feedback.info:not(.error) > p { max-width: 52ch; margin: 0; color: var(--muted); }
.buddyboss-theme #page form .bp-feedback.info:not(.error) { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 0; background: var(--sunk); text-align: left; }
.buddyboss-theme #page form .bp-feedback.info:not(.error)::before { content: none; }
.buddyboss-theme #page form .bp-feedback.info:not(.error) > .bp-icon { display: grid; place-items: center; align-self: center; width: 20px; height: 20px; margin: 0 2px 0 0; background: none; box-shadow: none; }
.buddyboss-theme #page form .bp-feedback.info:not(.error) > p { color: var(--fg); }

/* One filled button per view: where BuddyBoss shows Add and Create side by side, Create is the quiet one. */
.buddyboss-theme :is(#bb-create-album, #bb-create-video-album, #bb-create-folder).button { background: var(--surface); border: 1.5px solid var(--field); color: var(--fg); }
.buddyboss-theme :is(#bb-create-album, #bb-create-video-album, #bb-create-folder).button:hover { background: var(--sunk); border-color: var(--fg); color: var(--fg); }

/* ---- The side panel: the kit's rail. Current item is Mist with Stillwater words (theme-options.php), weight shows it too. ---- */
.buddyboss-theme .buddypanel .side-panel-menu a { font-weight: 500; }
.buddyboss-theme .buddypanel .side-panel-menu .current-menu-item > a { font-weight: 700; }

/* ---- The welcome at the top of the News Feed (functions.php, occ_feed_welcome) ---- */
.occ-welcome { margin: 0 0 var(--space-6); }
.buddyboss-theme .occ-welcome__title { margin: 0; font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-tight); }
/* The greeting, then room before the cards, so it's clear the row is something else. The arrows sit just above it. */
.occ-welcome__lead { margin: var(--space-3) 0 var(--space-6); max-width: 70ch; font-size: 1.125rem; color: var(--muted); }
.occ-welcome__nav { display: flex; justify-content: flex-end; gap: var(--space-2); margin-bottom: var(--space-3); }
.occ-welcome__nav[hidden] { display: none; }
.buddyboss-theme .occ-welcome__nav button { display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--fg); font-size: 20px; line-height: 1; box-shadow: none; }
.buddyboss-theme .occ-welcome__nav button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.buddyboss-theme .occ-welcome__nav button:disabled { border-color: var(--line); background: var(--surface); color: var(--fg); opacity: .4; cursor: default; }
.occ-welcome__lead strong { color: var(--fg); font-weight: 700; }
/* One row that scrolls sideways: three cards and a bit of the next show on a computer, so it's clear there's more. */
.occ-welcome__grid { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--space-4)) / 3.15); gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.occ-welcome__grid:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.occ-welcome__card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.occ-welcome__label { margin: 0; color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.buddyboss-theme .occ-welcome__name { margin: 0; font-size: var(--fs-h4); font-weight: 700; line-height: var(--lh-snug); }
.occ-welcome__name a { color: var(--fg); text-decoration: none; }
.occ-welcome__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.occ-welcome__meta { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.occ-welcome__more { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-top: auto; padding-top: var(--space-2); font-size: var(--fs-small); font-weight: 600; }
.occ-welcome__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.occ-welcome__bar i { display: block; height: 100%; background: var(--primary); }
.occ-welcome__faces { display: flex; }
.occ-welcome__faces a + a { margin-left: -6px; }
.occ-welcome__faces img { display: block; width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.buddyboss-theme .occ-welcome__more a { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) { .occ-welcome__grid { grid-auto-columns: calc((100% - var(--space-4)) / 2.15); } }
@media (hover: none) { .occ-welcome__nav { display: none !important; } }  /* touch screens swipe */

/* ---- BuddyBoss Courses: pages sit flush against the side panel; give them the gutter. Lessons read like the kit. ---- */
:is(.single-bbcs-course, .single-bbcs-lesson, .single-bbcs-quiz) #primary { padding-inline: clamp(16px, 3vw, 40px); }
.buddyboss-theme .bbcs-btn { border-radius: var(--radius-pill); padding-inline: 18px; }

/* The course outline: the whole row is the tap target, so its "Start" is a quiet label, not a filled button (the kit
   allows one filled primary per view: the page's own Start next lesson, Complete and continue, or Submit). The row
   you're on is marked the kit's way, Mist with Stillwater. */
.buddyboss-theme .bbcs-section .bbcs-lessons .bbcs-lesson-button .bbcs-button > span {
	display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; background: transparent; border: 1px solid var(--field); border-radius: var(--radius-pill);
	color: var(--fg); font: 600 0.72rem/1 var(--font-ui); letter-spacing: var(--tracking-button); text-transform: uppercase;
}
.buddyboss-theme .bbcs-section .bbcs-lessons .bbcs-lesson-button .bbcs-button > span.is-purple { background: var(--select-bg); border-color: var(--select-line); color: var(--select-fg); }
.buddyboss-theme .bbcs-section .bbcs-lessons .bbcs-lesson:hover .bbcs-lesson-button .bbcs-button > span:not(.is-purple) { background: var(--sunk); }

/* Quiz: questions at a size that reads on a phone, and Submit as the one primary. */
.buddyboss-theme .bbcs-quiz-question-label { font: 700 var(--fs-h4)/var(--lh-snug) var(--font-heading); letter-spacing: var(--tracking-heading); color: var(--fg); }
.buddyboss-theme #bbcs-quiz-submit-bottom { min-height: 48px; padding: 0 28px; background: var(--primary); border: 0; border-radius: var(--radius-pill); color: #fff; font: 600 var(--fs-button)/1 var(--font-ui); letter-spacing: var(--tracking-button); text-transform: uppercase; }
.buddyboss-theme #bbcs-quiz-submit-bottom:hover { background: var(--primary-hover); }

/* Phones: the lesson or quiz first, then the outline as "what's next" without the course photo. */
@media (max-width: 840px) {
	:is(.single-bbcs-lesson, .single-bbcs-quiz) #bbcs-main { order: -1; }
	:is(.single-bbcs-lesson, .single-bbcs-quiz) #bbcs-sidebar { margin-top: var(--space-6); }
	:is(.single-bbcs-lesson, .single-bbcs-quiz) #bbcs-sidebar-header .figure { display: none; }
	.buddyboss-theme #bbcs-quiz-submit-bottom { width: 100%; }
	.single-bbcs-lesson .bbcs-main-content { font-size: 1rem; }
	.single-bbcs-lesson .bbcs-main-content :is(blockquote, .occ-try) { padding: var(--space-4) var(--space-5); }
	.single-bbcs-lesson .bbcs-main-content blockquote p { font-size: 1.125rem; }
}
.single-bbcs-lesson .bbcs-main-content { font-size: 1.0625rem; line-height: 1.65; }
.single-bbcs-lesson .bbcs-main-content > :is(p, h2, h3, ul, ol) { max-width: 70ch; }  /* a readable line; the video and boxes run full width */
.single-bbcs-lesson .bbcs-main-content :is(h2, h3) { margin: 1.6em 0 .4em; }
.single-bbcs-lesson .bbcs-main-content :is(.wp-block-embed, .bbcs-video) { margin: 0 0 var(--space-6); border-radius: var(--radius-card); overflow: hidden; }
.single-bbcs-lesson .bbcs-main-content blockquote { margin: var(--space-6) 0; padding: var(--space-5) var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); }
.single-bbcs-lesson .bbcs-main-content blockquote p { margin: 0; font: 700 1.3rem/var(--lh-snug) var(--font-heading); font-style: normal; letter-spacing: var(--tracking-heading); color: var(--fg); }
.single-bbcs-lesson .bbcs-main-content blockquote cite { display: block; margin-top: var(--space-3); font: 600 var(--fs-small) var(--font-body); font-style: normal; color: var(--muted); }
/* Walkthroughs: numbered steps in circles, like the public pages' "How it works". */
.single-bbcs-lesson .bbcs-main-content ol.occ-steps { margin: var(--space-4) 0 var(--space-5); padding: 0; list-style: none; counter-reset: step; max-width: 70ch; }
.single-bbcs-lesson .bbcs-main-content ol.occ-steps > li { position: relative; margin: 0; padding: 4px 0 14px 46px; counter-increment: step; }
.single-bbcs-lesson .bbcs-main-content ol.occ-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--primary); border-radius: 50%; color: var(--primary); font: 600 0.8rem/1 var(--font-ui); }
.single-bbcs-lesson .bbcs-main-content ul.wp-block-list { padding-left: 1.2em; }
.single-bbcs-lesson .bbcs-main-content ul.wp-block-list > li { margin-bottom: 8px; }
/* "Try this": the kit's note (Sunk), not Mist, which means "selected" everywhere in OCC apps. */
.single-bbcs-lesson .bbcs-main-content .occ-try { margin: var(--space-6) 0; padding: var(--space-5) var(--space-6); background: var(--sunk); border-radius: var(--radius-card); }
.single-bbcs-lesson .bbcs-main-content .occ-try h3 { margin: 0 0 var(--space-2); font-size: var(--fs-h4); }
.single-bbcs-lesson .bbcs-main-content .occ-try p { margin: 0; }

/* A lesson that opens after the one before it: a calm note with a working button, not an error (pink means
   "needs you" or an error in OCC apps). */
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked { opacity: 1; padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); color: var(--fg); }
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked .bbcs-lesson-locked-header { margin: 0 0 var(--space-2); font: 700 var(--fs-h3)/var(--lh-snug) var(--font-heading); color: var(--fg); }
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked .bbcs-lesson-locked-message { color: var(--muted); }
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked * { opacity: 1; }
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked .bbcs-lesson-locked-buttons a.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; background: var(--primary); color: #fff; border-radius: var(--radius-pill); opacity: 1; font: 600 var(--fs-button)/1 var(--font-ui); letter-spacing: var(--tracking-button); text-transform: uppercase; text-decoration: none; }
.buddyboss-theme #bbcs-main > .bbcs-lesson-locked .bbcs-lesson-locked-buttons a.btn:hover { background: var(--primary-hover); }

/* The welcome is the feed's headline, so the page's own "News Feed" title goes. */
.directory.activity:has(.occ-welcome) .entry-header, .directory.members:has(.occ-banner) .entry-header { display: none; }

/* ---- Fields: the kit's field border, not the hairline. Fields need 3:1 against the page to be seen (the hairline is 1.3:1). ---- */
.buddyboss-theme :is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], input[type="tel"], textarea, select) { border-color: var(--field); }
/* BuddyBoss's account forms draw field borders from this variable with stronger selectors; set it at the source. */
.buddyboss-theme :is(#signup-form, #settings-form, #profile-edit-form, .standard-form) { --bb-content-border-color: var(--field); }

/* ---- Sign-up (BuddyBoss's own page, not the WordPress login screen): the sign-in screen's look, login.css.
   The card is the page's content area (#primary.bs-bp-container-reg); the theme paints the page Linen over the canvas. ---- */
html body.register.registration.buddyboss-theme { background: var(--canvas); isolation: isolate; }
body.register.buddyboss-theme #page { background: transparent; }
body.register.buddyboss-theme::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--line); -webkit-mask: var(--occ-mask-thread) 0 0 / 360px auto repeat; mask: var(--occ-mask-thread) 0 0 / 360px auto repeat; }
body.register.buddyboss-theme #primary.bs-bp-container-reg { max-width: 480px; margin: 6vh auto; padding: 32px 36px; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sheet); box-shadow: var(--shadow-3); }
body.register.buddyboss-theme #primary .signup-form input:is([type="text"], [type="email"], [type="password"]) { min-height: 48px; border-color: var(--field); border-radius: var(--radius-field); }
body.register.buddyboss-theme #primary .signup-form :is(input[type="submit"], button[type="submit"]) { width: 100%; min-height: 52px; border-radius: var(--radius-pill); }

/* ---- Phones ---- */
@media (max-width: 560px) {
	body.register.buddyboss-theme #primary.bs-bp-container-reg { width: auto; margin: 8px 0; padding: 24px 20px; }
	/* Two people per row, not one card per screen. The "Organizers" and "Members" headings are list items too: full width. */
	body.buddyboss-theme #members-list.members-list.grid { display: flex; flex-wrap: wrap; margin-inline: -6px; }
	body.buddyboss-theme #members-list.members-list.grid > li { flex: 0 0 50%; width: 50%; min-width: 0; max-width: 50%; padding: 0 6px; box-sizing: border-box; }  /* BuddyBoss sets a 275px minimum */
	body.buddyboss-theme #members-list.members-list.grid > li.item-entry-header { flex-basis: 100%; width: 100%; max-width: 100%; }
	body.buddyboss-theme #members-list.members-list.grid > li .item-avatar img { width: 72px; height: 72px; }
}
@media (max-width: 640px) {
	/* The feed's welcome: a swipeable row, so the posts aren't a screen away. */
	.occ-welcome__grid { grid-auto-columns: 84%; margin-inline: -16px; padding: 0 16px 8px; scroll-padding-inline: 16px; }
	.buddyboss-theme .occ-welcome__title { font-size: 2rem; }
	.occ-welcome__lead { font-size: 1rem; }
}

/* A policy page still waiting for the church's approval says so at the top: a quiet tint, no colored edge. */
.occ-draft-note { padding: 12px 16px; border-radius: var(--radius-md, 8px); background: var(--sunk); color: var(--fg); }

/* ---- A member's main pages (Groups, Courses, Events, Guides, Members, an event) open with the page's photo across the
   full width, like the public pages' header: darkened toward the foot, the title in white (parts/member-banner.php).
   Its words line up with the page below (BuddyBoss's .container). ---- */
.occ-banner { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(260px, 36vh, 380px); background: #121212 var(--photo) var(--pos, center) / cover no-repeat; color: #fff; }
.occ-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(18, 18, 18, .12) 0, rgba(18, 18, 18, .3) 45%, rgba(18, 18, 18, .85) 100%); }
.occ-banner__inner { box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; width: 100%; padding-top: 48px; padding-bottom: clamp(28px, 5vh, 48px); }
.occ-banner__text { min-width: 0; }
.buddyboss-theme .occ-banner__title { margin: 0; color: #fff; font: 700 clamp(2.5rem, 5vw, 4.2rem)/1.02 var(--font-ui); letter-spacing: -.02em; text-wrap: balance; }
.buddyboss-theme .occ-banner__lead { max-width: 54ch; margin: 12px 0 0; color: #F2EEEA; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.5; }
.buddyboss-theme .occ-banner__action { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 2px solid rgba(255, 255, 255, .85); border-radius: 999px; color: #fff; font: 600 13px/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.buddyboss-theme .occ-banner__action:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.occ-banner :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) { .occ-banner { min-height: 220px; } .occ-banner__inner { padding-top: 32px; padding-bottom: 24px; } }
