/**
 * shadcn theme: page styles for "profile" (loaded after css/core/shadcn.php).
 * Scope every rule to this page's own wrapper so it cannot affect other pages.
 */

/* ---------------------------------------------------------------- header card */
/* cover buttons sit on the card padding (base: 20px top, 10px right) */
body.sc .ossn-profile .profile-cover-controls { margin-top: var(--sc-card-pad) !important; }
body.sc .ossn-profile .profile-cover-controls a { margin-right: var(--sc-card-pad) !important; }
/* phones: the cover is only ~80px tall (4:1) and the round photo rises into its middle, so the
 * top-right "Change Cover" button sat on the photo. Move it to the top-left corner, 8px in, as the
 * kit small button (28px), so it ends above the photo (photo starts ~39px down the cover). */
@media (max-width: 575.98px) {
	body.sc .ossn-profile .profile-cover-controls {
		display: flex; justify-content: flex-start; gap: 0.5rem; margin-top: 0 !important; padding: 0.5rem; pointer-events: none;
	}
	body.sc .ossn-profile .profile-cover-controls a {
		float: none !important; margin: 0 !important; pointer-events: auto;
		height: var(--sc-control-h-sm); gap: 0.25rem; border-radius: var(--sc-control-radius-sm) !important;
	}
}

/* name row: 16px card padding on every side (base: 20px left/right, 10px bottom) */
body.sc .ossn-profile .ossn-profile-usermetadata { padding: 0 var(--sc-card-pad) var(--sc-card-pad) !important; }
body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo { margin-left: 0 !important; }
/* one ring only: the photo fills its round frame exactly, so it sits centred in the ring (OSSN's 5px padding pushed it 4px right and down) */
body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo { width: auto !important; height: auto !important; padding: 0 !important; line-height: 0; }
body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo > img { display: block; border-width: 0 !important; box-shadow: none !important; object-fit: cover; }
body.sc .ossn-profile .ossn-profile-usermetadata #profile-menu { margin-right: 0 !important; }

/* name + handle: leftover GoBlue #333 text, handle at 15px */
body.sc .ossn-profile .ossn-profile-page-usermeta-area .user-fullname { color: var(--foreground) !important; }
/* name: was 28px bold (Bootstrap fs-3); 20px semibold */
body.sc .ossn-profile .ossn-profile-page-usermeta-area .user-fullname:not(.user-username) { font-size: 1.25rem !important; font-weight: 600 !important; line-height: 1.75rem; }
body.sc .ossn-profile .ossn-profile-page-usermeta-area .user-username { color: var(--muted-foreground) !important; font-size: 0.875rem !important; line-height: 1.25rem; }

/* change-photo button: GoBlue #eee disc with a #000 icon (black on black in dark mode) -> outline control colours.
   Size stays (40px disc, 20px overlay icon from core: photo overlays use the large icon). */
body.sc .ossn-profile .profile-photo .upload-photo {
	display: flex; align-items: center; justify-content: center;
	background: var(--background) !important; border: 1px solid var(--input) !important; border-radius: 999px !important;
	color: var(--foreground) !important; box-shadow: var(--sc-shadow-xs);
}
body.sc .ossn-profile .profile-photo .upload-photo:hover { background: var(--accent) !important; }
body.sc .ossn-profile .profile-photo .upload-photo span { margin: 0 !important; display: flex; align-items: center; justify-content: center; color: inherit !important; }
body.sc .ossn-profile .profile-photo .upload-photo i { color: inherit !important; display: inline-flex; }

/* header buttons: even 8px gap, 16px icons, square icon-only chevron button */
body.sc .ossn-profile #profile-menu { display: flex !important; align-items: center; gap: 0.5rem; }
body.sc .ossn-profile #profile-menu .btn svg { width: 16px !important; height: 16px !important; }
body.sc .ossn-profile #profile-menu .ossn-profile-extra-menu > div > .btn { width: var(--sc-control-h); padding: 0 !important; justify-content: center; }
body.sc .ossn-profile #profile-menu .ossn-profile-extra-menu .dropdown-item svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- tab bar */
/* the core tab rule targets .profile-hr-menu > li, but the markup is .profile-hr-menu > ul > li: base 15px padding, bold, 51px rows */
/* overflow visible: the phone tab menu (dropdown) was clipped inside the bar */
body.sc .ossn-profile .profile-menu-hr-container { margin: var(--sc-card-pad) 0 !important; overflow: visible !important; }
/* kit Tabs: the list is a muted segmented strip (3px inner padding, 6px corners), triggers 28px,
 * the current tab (sc-tab-active, set in menus/user_timeline.php) gets the page background + foreground text */
body.sc .ossn-profile .profile-hr-menu { padding: 0.5rem !important; }
body.sc .ossn-profile .profile-hr-menu > ul {
	display: inline-flex; align-items: center; gap: 0; margin: 0 !important; padding: 3px !important; list-style: none;
	background: var(--muted) !important; border-radius: var(--radius) !important;
}
body.sc .ossn-profile .profile-hr-menu > ul > li { margin: 0 !important; padding: 0 !important; }
body.sc .ossn-profile .profile-hr-menu > ul > li > a {
	display: inline-flex; align-items: center; justify-content: center; height: var(--sc-control-h-sm); padding: 0 0.5rem !important; margin: 0 !important;
	font-size: 0.875rem !important; font-weight: 500 !important; line-height: 1.25rem; white-space: nowrap;
	color: var(--muted-foreground) !important; background: transparent !important; border: 1px solid transparent !important;
	border-radius: calc(var(--radius) - 2px) !important; box-shadow: none !important;
}
body.sc .ossn-profile .profile-hr-menu > ul > li > a:hover { color: var(--foreground) !important; background: transparent !important; }
body.sc .ossn-profile .profile-hr-menu > ul > li > a.sc-tab-active { color: var(--foreground) !important; background: var(--background) !important; }
/* dark: the page background is darker than muted, so use the kit's dark active fill (input at 30%) with an input edge */
html.dark body.sc .ossn-profile .profile-hr-menu > ul > li > a.sc-tab-active {
	background: color-mix(in oklch, var(--input) 30%, transparent) !important; border-color: var(--input) !important;
}
/* phones: menus/user_timeline.php now prints every tab (no hamburger). If they do not fit,
 * the strip scrolls sideways inside itself instead of widening the page. */
@media (max-width: 575.98px) {
	body.sc .ossn-profile .profile-hr-menu > ul {
		display: flex; max-width: 100%; width: max-content; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
	}
	body.sc .ossn-profile .profile-hr-menu > ul::-webkit-scrollbar { display: none; }
	body.sc .ossn-profile .profile-hr-menu > ul > li { flex: none; }
}
/* phone menu: the hamburger stays a plain icon button; the open list marks the current page with the accent fill */
body.sc .ossn-profile .profile-hr-menu > ul:has(li.dropdown:only-child) { background: transparent !important; padding: 0 !important; }
body.sc .ossn-profile .profile-hr-menu .dropdown-menu a { height: auto; }
body.sc .ossn-profile .profile-hr-menu .dropdown-menu a.sc-tab-active { background: var(--accent) !important; color: var(--accent-foreground) !important; }

/* ---------------------------------------------------------------- body spacing */
body.sc .ossn-profile .ossn-profile-bottom { margin-top: 0 !important; }
body.sc .ossn-profile .ossn-profile-bottom > .ossn-layout-module { margin-top: 0 !important; }

/* ---------------------------------------------------------------- sidebar friends: kit Item rows */
/* markup from the theme override profile/modules/friends.php: 32px round avatar + name, divider between rows */
body.sc .ossn-profile .ossn-profile-module-friends.sc-item-list { display: flex; flex-direction: column; text-align: left; }
body.sc .ossn-profile .sc-item-list .sc-item {
	display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: var(--foreground) !important; text-decoration: none !important;
	border-bottom: 1px solid var(--sc-card-border);
}
body.sc .ossn-profile .sc-item-list .sc-item:first-child { padding-top: 0; }
body.sc .ossn-profile .sc-item-list .sc-item:last-child { padding-bottom: 0; border-bottom: 0; }
body.sc .ossn-profile .sc-item-list .sc-item-avatar {
	flex: none; width: 32px !important; height: 32px !important; border-radius: 999px !important; object-fit: cover; padding: 0 !important; margin: 0 !important;
}
body.sc .ossn-profile .sc-item-list .sc-item-title {
	min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 500; line-height: 1.25rem;
}
body.sc .ossn-profile .sc-item-list .sc-item:hover .sc-item-title { text-decoration: underline; }
body.sc .ossn-profile .sc-item-list .sc-item-empty { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- friends tab list */
body.sc .ossn-profile .ossn-profile-bottom .module-title { border-bottom: 1px solid var(--sc-card-border) !important; }
body.sc .ossn-profile .ossn-profile-bottom .module-title .title { font-size: 1rem !important; font-weight: 500 !important; line-height: 1.375rem; }
body.sc .ossn-profile .ossn-output-users-list .user-item-card { margin: 0 0 var(--sc-field-gap) !important; border-radius: var(--radius) !important; }
body.sc .ossn-profile .ossn-output-users-list .user-item-card:last-child { margin-bottom: 0 !important; }
body.sc .ossn-profile .ossn-output-users-list .user-item-inner { padding: var(--sc-field-gap) var(--sc-card-pad) !important; border-color: var(--sc-card-border) !important; }
body.sc .ossn-profile .ossn-output-users-list .user-details a { font-size: 0.875rem !important; font-weight: 500 !important; line-height: 1.25rem; color: var(--foreground) !important; }
body.sc .ossn-profile .ossn-output-users-list .user-username-sub { color: var(--muted-foreground) !important; }
/* avatars were 65px; kit Avatar default is 32px round */
body.sc .ossn-profile .ossn-output-users-list .user-avatar-container { flex: none; width: 32px !important; height: 32px !important; min-width: 0 !important; }
body.sc .ossn-profile .ossn-output-users-list .user-avatar-container img { width: 32px !important; height: 32px !important; border-radius: 999px !important; object-fit: cover; }

/* ---------------------------------------------------------------- about / edit */
/* base: no outer border, only the title had one (5px top corners), GoBlue blue 3px active tab edge */
body.sc .ossn-profile .ossn-profile-edit-layout {
	border: 1px solid var(--sc-card-border) !important; border-radius: var(--sc-container-radius) !important; overflow: hidden; box-shadow: none !important;
}
body.sc .ossn-profile .ossn-profile-edit-layout > .row { margin: 0 !important; }
body.sc .ossn-profile .ossn-profile-edit-layout > .row > [class*="col-"] { padding: 0 !important; }
body.sc .ossn-profile .profile-edit-layout-title {
	border: 0 !important; border-bottom: 1px solid var(--sc-card-border) !important; border-radius: 0 !important;
	padding: var(--sc-card-pad) !important; font-size: 1rem !important; font-weight: 500 !important; line-height: 1.375rem;
}
body.sc .ossn-profile .profile-edit-tabs { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem !important; }
body.sc .ossn-profile .profile-edit-tabs a.profile-edit-tab-item {
	display: flex; align-items: center; height: var(--sc-control-h); padding: 0 var(--sc-control-px) !important; margin: 0 !important;
	border: 0 !important; border-radius: var(--sc-control-radius) !important; font-size: 0.875rem; font-weight: 500 !important; line-height: 1.25rem;
}
/* core sets the tab links transparent with a stronger selector than its active rule, so the active tab never showed */
body.sc .ossn-profile .profile-edit-tabs a.profile-edit-tab-item-active,
body.sc .ossn-profile .profile-edit-tabs a.profile-edit-tab-item:hover { background: var(--accent) !important; color: var(--foreground) !important; }
body.sc .ossn-profile .profile-edit-layout-right { padding: var(--sc-card-pad) !important; border-left: 1px solid var(--sc-card-border) !important; min-height: 100%; }
body.sc .ossn-profile .ossn-edit-form label { margin-bottom: var(--sc-field-gap) !important; }
body.sc .ossn-profile .ossn-edit-form input[type="text"],
body.sc .ossn-profile .ossn-edit-form input[type="email"],
body.sc .ossn-profile .ossn-edit-form input[type="password"],
body.sc .ossn-profile .ossn-edit-form textarea,
body.sc .ossn-profile .ossn-edit-form .sc-yearselect-wrap,
body.sc .ossn-profile .ossn-edit-form select:not(.sc-yearselect-native) { margin-bottom: var(--sc-field-stack) !important; }
body.sc .ossn-profile .ossn-edit-form .radio-block-container { margin: 0 0 var(--sc-field-stack) !important; }
/* Gender: label on its own line above, radios in one row below it (same as the signup form) */
body.sc .ossn-profile .ossn-edit-form .radio-block-container { flex-wrap: wrap; align-items: center; column-gap: 1.25rem; row-gap: 0; }
body.sc .ossn-profile .ossn-edit-form .radio-block-container > label { flex-basis: 100%; margin-bottom: var(--sc-field-gap) !important; }
body.sc .ossn-profile .ossn-edit-form input.btn { margin: 0 !important; }
/* Save was the small 28px button; use the 32px control height like the inputs above it */
body.sc .ossn-profile .ossn-edit-form input.btn { height: var(--sc-control-h) !important; min-height: var(--sc-control-h) !important; }

/* ---------------------------------------------------------------- wall composer on phones */
/* same fix as the feed composer (css/pages/feed.php only covers .newsfeed-middle): the toolbar
 * does not fit one row, so Post wrapped alone onto a short grey band. Icons on the first row,
 * Privacy + Post on the second, right aligned. */
@media (max-width: 575.98px) {
	body.sc .ossn-profile .ossn-profile-wall .ossn-wall-container-data > .controls {
		flex: 1 1 100%; margin-right: calc(var(--sc-card-pad) * -1) !important; padding-bottom: 0.5rem !important; border-bottom-left-radius: 0 !important;
	}
	body.sc .ossn-profile .ossn-profile-wall .ossn-wall-container-data > .ossn-wall-privacy {
		flex: 1 1 auto; justify-content: flex-end; margin: 0 0 0 calc(var(--sc-card-pad) * -1) !important;
		padding: 0 0.5rem 0.75rem var(--sc-card-pad) !important; border-top: 0 !important;
		border-bottom-left-radius: calc(var(--sc-container-radius) - 1px) !important;
	}
	body.sc .ossn-profile .ossn-profile-wall .ossn-wall-container-data > .ossn-wall-post-button-container {
		margin-top: 0 !important; padding-top: 0 !important; border-top: 0 !important;
	}
}

/* ---------------------------------------------------------------- phone profile photo */
/* the 160px photo covered most of the ~80px tall phone cover; show it at 80px and keep the overlap
 * (half of it sits on the cover), with the change-photo button on its lower right edge */
@media (max-width: 575.98px) {
	body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo {
		width: auto !important; height: auto !important; padding: 0 !important; line-height: 0; margin-top: -44px !important;
	}
	body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo > img { width: 80px !important; height: 80px !important; border-width: 0 !important; box-shadow: none !important; }
	body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo .upload-photo { top: auto !important; left: auto !important; right: -8px !important; bottom: -4px !important; }
	body.sc .ossn-profile .ossn-profile-usermetadata { min-height: 0 !important; }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 991.98px) {
	body.sc .ossn-profile .ossn-profile-usermetadata .profile-photo { margin-left: 0 !important; margin-right: 0 !important; }
	body.sc .ossn-profile .ossn-profile-usermetadata #profile-menu { justify-content: center; flex-wrap: wrap; }
	body.sc .ossn-profile .profile-edit-layout-right { border-left: 0 !important; border-top: 1px solid var(--sc-card-border) !important; }
}

/* cover buttons: the icon's old OSSN margin and padding doubled the space before the text; the button's own gap now sets it (kit button) */
body.sc .ossn-profile .profile-cover-controls a::before,
body.sc .ossn-profile .profile-cover-controls a > svg { margin-right: 0 !important; padding-right: 0 !important; }
 