/**
 * shadcn theme: page styles for "groups" (loaded after css/core/shadcn.php).
 * Scope every rule to this page's own wrapper so it cannot affect other pages.
 */

/* ---------------------------------------------------------------- group header card */
/* the top row is already the card: the inner header drew a second 1px border inside it */
body.sc .ossn-group-profile .ossn-group-top-row .profile-header {
	border: 0 !important;
	border-radius: calc(var(--sc-container-radius) - 1px) !important;
}
/* base CSS left 10px corners on the inner strips */
body.sc .ossn-group-profile .profile-header .header-bottom {
	height: auto !important; min-height: 0 !important;
	border-radius: 0 0 calc(var(--sc-container-radius) - 1px) calc(var(--sc-container-radius) - 1px) !important;
}
/* the header clipped the phone tab menu (it flipped up over the group name): the cover clips its own corners instead */
body.sc .ossn-group-profile .ossn-group-top-row .profile-header { overflow: visible !important; }
body.sc .ossn-group-profile .ossn-group-cover {
	overflow: hidden;
	border-radius: calc(var(--sc-container-radius) - 1px) calc(var(--sc-container-radius) - 1px) 0 0 !important;
}
/* shared "#group-header-menu ul" transparent rule also hit the phone dropdown */
body.sc .ossn-group-profile #group-header-menu .dropdown-menu {
	background: var(--popover) !important; color: var(--popover-foreground); border-color: var(--border) !important;
}

/* name row: token spacing */
body.sc .ossn-group-profile .group-header-sep {
	display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sc-field-gap);
	padding: var(--sc-card-pad) var(--sc-card-pad) 0;
}
body.sc .ossn-group-profile .group-name { padding: 0 !important; min-width: 0; float: none; text-align: left !important; }
body.sc .ossn-group-profile #group-header-menu .dropdown-toggle i { display: inline-flex; font-size: 1rem; line-height: 1; margin: 0 !important; }
body.sc .ossn-group-profile .group-name a { color: var(--card-foreground) !important; overflow-wrap: anywhere; }
/* group name: 20px, semibold (owner decision groups-6) */
body.sc .ossn-group-profile .group-name, body.sc .ossn-group-profile .group-name a { font-size: 1.25rem; font-weight: 600 !important; }
body.sc .ossn-group-profile .group-name a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* member count is meta text */
body.sc .ossn-group-profile .group-total-members {
	display: flex; align-items: center; gap: 0.375rem; margin: 0.25rem 0 0;
	font-size: 0.75rem; line-height: 1rem; font-weight: 400; color: var(--muted-foreground) !important;
}
body.sc .ossn-group-profile .group-total-members svg { width: 0.875rem; height: 0.875rem; }
body.sc .ossn-group-profile .groups-buttons { padding: 0 !important; float: none; flex: none; display: flex; gap: 0.5rem; }
/* phones: the buttons squeezed the name to one word per line. Stack them: name + member count on top,
   then the buttons on their own row, sharing the full width (and wrapping if there are more of them). */
@media (max-width: 767.98px) {
	body.sc .ossn-group-profile .group-header-sep { flex-direction: column; align-items: stretch; gap: 0.75rem; }
	body.sc .ossn-group-profile .group-name { width: 100%; }
	body.sc .ossn-group-profile .group-name a { overflow-wrap: break-word; word-break: normal; line-height: 1.3; }
	body.sc .ossn-group-profile .groups-buttons { flex-wrap: wrap; width: 100%; }
	body.sc .ossn-group-profile .groups-buttons:empty { display: none; }
	body.sc .ossn-group-profile .groups-buttons > a:not([style*="display: none"]):not(.group-c-position) {
		flex: 1 1 0; min-width: max-content; justify-content: center; text-align: center; margin: 0 !important;
	}
}

/* header tabs: 32px controls, token padding */
body.sc .ossn-group-profile #group-header-menu { padding: 0 var(--sc-card-pad) !important; margin-top: var(--sc-card-pad); }
body.sc .ossn-group-profile #group-header-menu > ul { padding: 0.5rem 0 !important; margin: 0 !important; font-weight: 500; }
body.sc .ossn-group-profile #group-header-menu > ul > li > a {
	display: inline-flex; align-items: center; height: var(--sc-control-h); line-height: 1.25rem !important;
	padding: 0 var(--sc-control-px) !important; margin: 0 !important;
}
body.sc .ossn-group-profile #group-header-menu .dropdown-toggle svg { width: 1rem; height: 1rem; }

/* ---------------------------------------------------------------- body: cards and spacing */
body.sc .ossn-group-profile .ossn-group-bottom-row { margin-top: var(--sc-card-pad) !important; }
body.sc .ossn-group-profile .ossn-widget { margin-bottom: var(--sc-card-pad); }
body.sc .ossn-group-profile .ossn-widget .widget-contents { border-radius: 0 !important; }
body.sc .ossn-group-profile .ossn-layout-module { margin: 0 !important; }
/* about / members module titles: kit card title (16px medium), no leftover top line */
body.sc .ossn-group-profile .ossn-layout-module .module-title { border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; }
body.sc .ossn-group-profile .ossn-layout-module .module-title .title { font-weight: 500 !important; font-size: 1rem; line-height: 1.375rem; }

/* members tab: the card fits its content (base CSS gives every module card a 400px minimum height) */
body.sc .ossn-group-profile .ossn-layout-module:has(.ossn-group-members) { min-height: 0 !important; }
/* about tab: same, the card fits its content (marker class from groups/pages/about.php) */
body.sc .ossn-group-profile .ossn-layout-module:has(.sc-group-about) { min-height: 0 !important; }

/* ---------------------------------------------------------------- kit Empty state
   Used by groups/pages/profile.php and about.php: no description, the empty wall for non-members,
   and OSSN's "Closed group" notice for non-members of a private group.
   Centred icon in a 40px muted box, 16px medium title, 14px muted description, optional button. */
body.sc .ossn-group-profile .sc-group-empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	text-align: center; gap: 0.5rem;
}
body.sc .ossn-group-profile .sc-group-empty .sc-empty-media {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 2.5rem; height: 2.5rem; margin-bottom: 0.5rem;
	border-radius: var(--radius); background: var(--muted); color: var(--foreground);
}
body.sc .ossn-group-profile .sc-group-empty .sc-empty-media i { display: inline-flex; line-height: 1; }
/* empty state icon is 20px (the core i[data-icon] 16px rule wins over core .sc-empty otherwise) */
body.sc .ossn-group-profile .sc-group-empty .sc-empty-media i[data-icon] .sc-icon { width: var(--sc-icon-lg) !important; height: var(--sc-icon-lg) !important; }
body.sc .ossn-group-profile .sc-group-empty .sc-empty-title {
	margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 500; color: var(--foreground);
}
body.sc .ossn-group-profile .sc-group-empty .sc-empty-description {
	margin: 0; max-width: 24rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--muted-foreground);
}
body.sc .ossn-group-profile .sc-group-empty .button-grey { margin-top: 0.5rem; }
/* closed group box: OSSN pads ".group-closed-container p" 3px 6px; the Empty state spacing comes from the gap */
body.sc .ossn-group-profile .group-closed-container.sc-group-empty p { padding: 0; }
/* the wall one stands alone in the column, so it is a card */
body.sc .ossn-group-profile .sc-group-empty-wall {
	padding: 2rem var(--sc-card-pad); background: var(--card);
	border: 1px solid var(--sc-card-border); border-radius: var(--sc-container-radius); box-shadow: none;
}

/* member avatars in the sidebar widget are round */
body.sc .ossn-group-profile .group-widget-members .user-icon-small { border-radius: 999px !important; }

/* members tab list items */
body.sc .ossn-group-members .user-item-card { margin: 0 0 var(--sc-field-gap) !important; border-radius: var(--sc-container-radius) !important; }
body.sc .ossn-group-members .user-item-card:last-child { margin-bottom: 0 !important; }
body.sc .ossn-group-members .user-item-inner { padding: var(--sc-card-pad) !important; gap: var(--sc-card-pad); align-items: center; }
body.sc .ossn-group-members .user-info-box { gap: var(--sc-card-pad); align-items: center; min-width: 0; }
body.sc .ossn-group-members .user-name-text,
body.sc .ossn-group-members .user-name-text a { font-size: 0.875rem !important; font-weight: 500 !important; line-height: 1.25rem !important; color: var(--card-foreground) !important; }
body.sc .ossn-group-members .user-username-sub { font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground) !important; }
body.sc .ossn-group-members .ossn-action-btn i.sc-lucide,
body.sc .ossn-group-members .ossn-action-btn svg { width: 1rem !important; height: 1rem !important; margin: 0 !important; font-size: 1rem; }

/* ---------------------------------------------------------------- group search results */
body.sc .group-search-items .row {
	display: flex; flex-wrap: nowrap; align-items: center; gap: var(--sc-card-pad);
	margin: 0 0 var(--sc-field-gap) !important; padding: var(--sc-card-pad);
	border: 1px solid var(--border) !important; border-radius: var(--sc-container-radius) !important; box-shadow: none !important;
}
body.sc .group-search-items .row > [class*="col-"] { width: auto; max-width: none; padding: 0; flex: 0 0 auto; }
body.sc .group-search-items .row > [class*="col-"]:last-child { flex: 1 1 auto; min-width: 0; }
body.sc .group-search-items .row img { display: block; border-radius: var(--sc-container-radius); }
body.sc .group-search-items .group-search-details { padding: 0 !important; }
body.sc .group-search-items .group-name {
	display: block; font-size: 0.875rem !important; font-weight: 500 !important; line-height: 1.25rem; color: var(--card-foreground) !important; overflow-wrap: anywhere;
}
body.sc .group-search-items .ossn-group-search-by {
	margin: 0.25rem 0 0 !important; font-size: 0.75rem !important; line-height: 1rem; color: var(--muted-foreground) !important;
}
body.sc .group-search-items .ossn-group-search-by a { margin-left: 0.25rem !important; font-size: inherit !important; color: var(--foreground) !important; }
 