/**
 * shadcn theme: page styles for "notifications" (loaded after css/core/shadcn.php).
 * Scope every rule to this page's own wrapper so it cannot affect other pages.
 * Covers: /notifications/all, the header notifications popover, and /search (people, groups).
 */

/* ================================================================== notifications: full page list */
/* the page's outer .content box draws a second card around the Notifications card */
body.sc .ossn-layout-media .content:has(.ossn-notification-page) {
	background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}
body.sc .ossn-widget:has(.ossn-notification-page) { margin: 0 !important; }
body.sc .ossn-widget:has(.ossn-notification-page) .widget-contents { border-radius: 0 0 var(--sc-container-radius) var(--sc-container-radius) !important; }

body.sc .ossn-notification-page { color: var(--foreground); }
body.sc .ossn-notification-page > li {
	list-style: none; margin: 0; padding: 0; position: relative;
	border-bottom: 1px solid var(--border) !important; border-radius: 0;
}
body.sc .ossn-notification-page > li:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
body.sc .ossn-notification-page > li:last-child { border-bottom: 0 !important; border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
/* unread rows: same neutral tint as the popover (owner preference), not green */
body.sc .ossn-notification-page > li.ossn-notification-unviewed { background: color-mix(in oklch, var(--muted) 60%, transparent) !important; }
body.sc .ossn-notification-page > li:hover { background: var(--accent) !important; }
/* rows match the header popover: sender avatar with the type badge on its corner, then the text,
   then the time on its own line (OSSN base CSS hides the avatar on this page) */
body.sc .ossn-notification-page .ossn-notification-item-a {
	position: relative; display: flex !important; align-items: flex-start; gap: 0.75rem;
	padding: 0.75rem 2.5rem 0.75rem 1rem !important; color: var(--foreground) !important; text-decoration: none !important;
}
/* base CSS paints the hovered link #F9F9F9 (white in dark mode): let the row's own hover colour show */
body.sc .ossn-notification-page .ossn-notification-item-a:hover { background: transparent !important; }
body.sc .ossn-notification-page .notification-image { position: relative; flex: 0 0 2rem; margin: 0 !important; }
body.sc .ossn-notification-page li .notification-image img {
	display: block !important; width: 2rem !important; height: 2rem !important; object-fit: cover; border-radius: 999px !important;
}
body.sc .ossn-notification-page .notfi-meta { position: static !important; flex: 1 1 auto; min-width: 0; }
/* type badge: same size and place as the popover */
body.sc .ossn-notification-page .notfi-meta > [class^="ossn-notification-icon"] {
	position: absolute !important; left: calc(1rem + 2rem - 0.75rem); top: calc(0.75rem + 2rem - 0.75rem);
	width: 1rem !important; height: 1rem !important; margin: 0 !important; padding: 0 !important; float: none !important;
	display: inline-flex !important; align-items: center; justify-content: center; font-size: 0.625rem !important;
	border-radius: 999px; background: var(--primary) !important; color: var(--primary-foreground) !important;
	box-shadow: 0 0 0 2px var(--card); background-image: none !important;
}
body.sc .ossn-notification-page .notfi-meta > [class^="ossn-notification-icon"]::before,
body.sc .ossn-notification-page .notfi-meta > [class^="ossn-notification-icon"] i,
body.sc .ossn-notification-page .notfi-meta > [class^="ossn-notification-icon"] svg {
	width: 0.625rem !important; height: 0.625rem !important; font-size: 0.625rem !important; margin: 0 !important; color: inherit !important;
}
body.sc .ossn-notification-page .notfi-meta .data {
	display: block !important; margin: 0 !important; font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; color: var(--muted-foreground);
}
body.sc .ossn-notification-page .notfi-meta .data strong { color: var(--foreground); font-weight: 500; }
body.sc .ossn-notification-page .time-created {
	display: block; margin: 0.125rem 0 0 !important; font-size: 0.75rem !important; line-height: 1rem; font-weight: 400 !important; font-style: normal; color: var(--muted-foreground) !important;
}
/* dismiss: quiet icon button like the popover (base CSS draws a white round floating button) */
body.sc .ossn-notification-page .ossn-notif-delete-item {
	position: absolute !important; top: 50%; right: 0.5rem; margin-top: -0.75rem; width: 1.5rem; height: 1.5rem;
	display: inline-flex !important; align-items: center; justify-content: center;
	background: transparent; border: 0; box-shadow: none; border-radius: var(--sc-control-radius);
	color: var(--muted-foreground) !important; transform: none;
}
body.sc .ossn-notification-page > li:hover .ossn-notif-delete-item { opacity: 1; pointer-events: auto; }
body.sc .ossn-notification-page .ossn-notif-delete-item:hover { background: var(--background); color: var(--foreground) !important; }
body.sc .ossn-notification-page .ossn-notif-delete-item svg { width: 1rem !important; height: 1rem !important; margin: 0 !important; }

/* ================================================================== notifications: header popover */
/* base CSS fixes the title row at 25px, which clips its 12px padding */
body.sc .sc-header .ossn-notifications-box .type-name { height: auto !important; border-bottom: 1px solid var(--border) !important; }
body.sc .sc-header .ossn-notifications-box .ossn-notifications-all > li { color: var(--foreground); }
body.sc .sc-header .ossn-notifications-box .ossn-notifications-all > li.ossn-notification-unviewed { background: color-mix(in oklch, var(--muted) 60%, transparent) !important; }
body.sc .sc-header .ossn-notifications-box .ossn-notifications-all > li:hover { background: var(--accent) !important; }
body.sc .sc-header .ossn-notifications-box .notfi-meta .data { font-weight: 400; }
body.sc .sc-header .ossn-notifications-box .notfi-meta .time-created { margin-left: 0 !important; font-weight: 400 !important; }
body.sc .sc-header .ossn-notifications-box .ossn-notif-delete-item {
	background: transparent; border: 0; box-shadow: none; transform: none;
}
body.sc .sc-header .ossn-notifications-box .ossn-notifications-all > li:hover .ossn-notif-delete-item { pointer-events: auto; }
body.sc .sc-header .ossn-notifications-box .ossn-notif-delete-item:hover { background: var(--background); }
body.sc .sc-header .ossn-notifications-box .ossn-notif-delete-item svg { width: 1rem !important; height: 1rem !important; }
body.sc .sc-header .ossn-notifications-box .bottom-all { color: var(--foreground); }

/* ================================================================== search: result type menu */
body.sc .coloum-left:has(> .ossn-menu-search) { padding: 0.5rem !important; }
/* stacked on small screens: keep the menu card and results card apart */
@media (max-width: 991.98px) {
	body.sc .coloum-left:has(> .ossn-menu-search) { margin-bottom: var(--sc-card-pad) !important; }
}
body.sc .ossn-menu-search .title {
	padding: 0 0.5rem; height: 2rem; display: flex; align-items: center;
	font-size: 0.75rem; line-height: 1rem; font-weight: 500; color: var(--muted-foreground);
}
body.sc .ossn-menu-search li { list-style: none; display: block; margin: 0; border-radius: var(--sc-control-radius); background: transparent; }
body.sc .ossn-menu-search li + li { margin-top: 0.125rem; }
body.sc .ossn-menu-search li:hover { background: var(--accent); }
body.sc .ossn-menu-search li.ossn-search-active-item { background: var(--accent); }
body.sc .ossn-menu-search li.ossn-search-active-item a { font-weight: 500; }
body.sc .ossn-menu-search li a {
	display: flex; align-items: center; height: var(--sc-control-h); padding: 0 0.5rem;
	font-size: 0.875rem; line-height: 1.25rem; color: var(--foreground) !important; text-decoration: none; border-radius: var(--sc-control-radius);
}
body.sc .ossn-menu-search li a .text { display: inline-flex; align-items: center; gap: 0.5rem; }
body.sc .ossn-menu-search li a .text::before {
	float: none !important; padding: 0 !important; margin: 0 !important; width: 1rem !important; height: 1rem !important; flex: 0 0 1rem;
}

/* ================================================================== search: results column */
body.sc .newsfeed-middle:has(> .ossn-search-page) { padding: var(--sc-card-pad) !important; }

/* people and groups: plain rows with 1px dividers inside the one results card (kit Item list), 40px media */
body.sc .ossn-search-page .ossn-output-users-list .user-item-card,
body.sc .ossn-search-page .group-search-items .row {
	margin: 0 !important; padding: 0.75rem 0 !important; border: 0 !important; border-bottom: 1px solid var(--border) !important;
	border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
body.sc .ossn-search-page .ossn-output-users-list .user-item-card:first-child,
body.sc .ossn-search-page .group-search-items .row:first-child { padding-top: 0 !important; }
body.sc .ossn-search-page .ossn-output-users-list .user-item-card:last-child,
body.sc .ossn-search-page .group-search-items .row:last-child { padding-bottom: 0 !important; border-bottom: 0 !important; }

/* people row: round avatar, name, username, friend button on the right (also on phones) */
body.sc .ossn-search-page .user-item-inner {
	display: flex; flex-wrap: nowrap !important; align-items: center; justify-content: space-between !important; gap: 0.75rem !important;
	padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
	text-align: left !important;
}
body.sc .ossn-search-page .user-info-box { display: flex; flex-direction: row !important; align-items: center; gap: 0.75rem !important; min-width: 0; width: auto !important; }
body.sc .ossn-search-page .user-avatar-container { flex: 0 0 2.5rem; }
body.sc .ossn-search-page .user-avatar-container img {
	display: block; width: 2.5rem !important; height: 2.5rem !important; object-fit: cover; border: 0 !important; border-radius: 999px !important;
}
body.sc .ossn-search-page .user-details { min-width: 0; }
body.sc .ossn-search-page .user-name-text { font-size: 0.875rem !important; line-height: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.sc .ossn-search-page .user-name-text a { font-weight: 500 !important; color: var(--foreground) !important; }
body.sc .ossn-search-page .user-username-sub {
	margin: 0 !important; color: var(--muted-foreground) !important; font-size: 0.75rem; line-height: 1rem;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.sc .ossn-search-page .user-controls-box { flex: 0 0 auto; width: auto !important; }
body.sc .ossn-search-page .user-controls-box .ossn-action-btn { width: auto !important; }

/* group row (theme view groups/search/view.php): cover or "users" icon in a 40px box, name, owner */
body.sc .ossn-search-page .group-search-items .row { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.75rem; }
body.sc .ossn-search-page .group-search-items .row > [class*="col"] { flex: 0 1 auto; width: auto; max-width: none; padding: 0; margin: 0; }
body.sc .ossn-search-page .group-search-items .row > [class*="col"]:first-child { flex: 0 0 auto; }
body.sc .ossn-search-page .group-search-items .row > [class*="col"]:last-child { flex: 1 1 auto; min-width: 0; }
body.sc .ossn-search-page .sc-group-search-media {
	display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; overflow: hidden;
	border-radius: var(--sc-container-radius); background: var(--muted); color: var(--muted-foreground) !important;
}
body.sc .ossn-search-page .sc-group-search-media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
body.sc .ossn-search-page .group-search-details { padding: 0 !important; }
body.sc .ossn-search-page .group-search-details .group-name {
	display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; color: var(--foreground) !important; text-decoration: none;
}
body.sc .ossn-search-page .group-search-details .ossn-group-search-by {
	margin: 0 !important; font-size: 0.75rem; line-height: 1rem; color: var(--muted-foreground);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.sc .ossn-search-page .group-search-details .ossn-group-search-by a { margin-left: 0.25rem; color: var(--foreground) !important; font-weight: 500; }

/* header popovers size to their content; only the list scrolls, so the title and "See All" footer always fit
   (fixes the clipped footer after the title row grew) */
body.sc .sc-header .ossn-notifications-box { height: auto !important; max-height: none !important; display: flex; flex-direction: column; }
body.sc .sc-header .ossn-notifications-box[style*="display: none"] { display: none !important; }
body.sc .sc-header .ossn-notifications-box .metadata { height: auto !important; max-height: min(26rem, 60vh) !important; overflow: hidden !important; display: flex !important; flex-direction: column; }
body.sc .sc-header .ossn-notifications-box .metadata .messages-inner { flex: 1 1 auto; min-height: 0; height: auto !important; max-height: none !important; overflow-y: auto !important; }
/* "See All" sits inside .metadata after the list: keep it pinned under the scrolling list */
body.sc .sc-header .ossn-notifications-box .metadata .bottom-all { flex: 0 0 auto; }
 