@import url('reset.css');

/* ============================================================================
   the hole — 2011 skeuomorphic look. One fixed gray palette (no per-user theme).
   Sections: tokens · layout · chrome (nav/search/badges) · compose · tweet ·
   modal · media · forms/auth/lists.
   ============================================================================ */

/* --- Design tokens ------------------------------------------------------- */
:root {
	--bg: rgb(207, 234, 250);
	--bg-dark: rgb(176, 209, 228);
	--card: #ffffff;
	--border: #cfcfcf;
	--text: #333333;
	--muted: #7b7a7a; /* ~5:1 on white — passes WCAG AA for the metadata/username/timestamp text */
	--link: #2a6496; /* muted 2011 blue */
	--link-hover: #1d4d78;
	--danger: #c8102e; /* notification pill + liked heart */
	--radius: 6px;
	--shadow-card: 0 2px 3px rgba(0, 0, 0, 0.09);
	--btn-top: #fdfdfd;
	--btn-bottom: #dcdcdc;
	--btn-border: #b5b5b5;
}

/* --- Base ----------------------------------------------------------------- */
body {
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	margin: 0;
	color: var(--text);
	background: var(--bg);
	font-size: 13px;
	line-height: 1.4;
}

a {
	color: var(--link);
	text-decoration: none;
}
a:hover {
	color: var(--link-hover);
	text-decoration: underline;
}
b,
strong {
	font-weight: 700;
}

/* Twemoji renders inline <img class="emoji"> SVGs; without this they render at natural size. Twitter's
   recommended sizing: scale to the text (1em) and nudge the baseline. */
img.emoji {
	height: 1em;
	width: 1em;
	margin: 0 0.05em 0 0.1em;
	vertical-align: -0.1em;
	display: inline;
}

h1 {
	font-size: 18px;
	margin: 0 0 12px;
}
h2 {
	font-size: 15px;
	margin: 16px 0 8px;
	font-weight: 900;
	color: rgba(0, 0, 0, 0.7);
	text-shadow: 0px 1px 0px white;
	position: relative;
	z-index: 1;
}
h2 > p {
	padding-right: 10px;
	display: inline;
	background-color: var(--bg);
}
.card h2 > p {
	background-color: white;
}
h2::before {
	content: " ";
	border-top: 1px solid #c6cad5;
	width: 100%;
	height: 1px;
	display: block;
	margin-top: 10px;
	border-bottom: 1px solid white;
	position: absolute;
	z-index: -1;
}

/* --- Two-column layout ---------------------------------------------------- */
#container {
	display: grid;
	grid-template-columns: 1fr 250px;
	gap: 20px;
	max-width: 840px;
	margin: 20px auto;
	padding: 0 12px;
	align-items: start;
}
.content {
	grid-column: 1;
	grid-row: 1; /* nav is first in source; pin both to row 1 so content doesn't drop to row 2 */
	min-width: 0; /* let the column shrink instead of overflowing */
}
#main-nav {
	grid-column: 2;
	grid-row: 1;
}
main {
	min-width: 0;
}

/* Mobile nav is a pure-CSS checkbox disclosure (no JS — CSP forbids inline script). The checkbox is
   off-screen (not display:none, so it stays keyboard-focusable); its <label> in .nav-top is the
   hamburger. Desktop: hide the top bar, show the body inline. */
.nav-toggle-cb {
	position: absolute;
	left: -9999px;
}
.nav-top {
	display: none; /* desktop: no mobile top bar */
}
.nav-body-inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

@media (max-width: 700px) {
	#container {
		grid-template-columns: 1fr;
		gap: 10px; /* tighter than the 20px desktop column gap — no wide dead space under the menu bar */
	}
	#main-nav {
		gap: 0; /* the collapsed body is 0-height; a flex gap here would leave empty space below the bar */
	}
	#main-nav,
	.content {
		grid-column: 1;
		grid-row: auto; /* one column now: let them stack in source order instead of overlapping in row 1 */
	}
	.content #main-logo-link {
		display: none; /* the logo lives in the nav's top bar on mobile */
	}
	/* Top bar: logo on the left, hamburger on the right. */
	.nav-top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
	}
	.nav-logo img {
		display: block;
		height: 24px;
	}
	.nav-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 9px 14px;
		background: var(--card);
		border: 1px solid var(--border);
		border-radius: var(--radius);
		box-shadow: var(--shadow-card);
		font-weight: 700;
		color: var(--link);
		cursor: pointer;
		transition:
			background 0.15s ease,
			box-shadow 0.15s ease;
	}
	/* Pressed-in look while the menu is open. */
	#nav-toggle-cb:checked ~ .nav-top .nav-toggle {
		background: #e2e2e2;
		box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
		color: var(--link-hover);
	}
	/* Animated collapse: grid 0fr→1fr slides the body to its natural height, no magic numbers. */
	.nav-body {
		display: grid;
		grid-template-rows: 0fr;
		transition: grid-template-rows 0.3s ease;
	}
	.nav-body-inner {
		min-height: 0;
		overflow: hidden;
	}
	#nav-toggle-cb:checked ~ .nav-body {
		grid-template-rows: 1fr;
		margin-top: 10px; /* gap between the bar and the menu only while open */
	}
	/* When open, the individual Home/Notifications badges are visible, so drop the roll-up. */
	#nav-toggle-cb:checked ~ .nav-top #nav-menu-badge {
		display: none;
	}
}

/* --- Card + button primitives -------------------------------------------- */
.card,
article.post,
.compose {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	margin-bottom: 12px;
}

.button,
button.button,
a.button {
	display: inline-block;
	padding: 5px 14px;
	font: inherit;
	font-weight: 700;
	color: #444;
	background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
	border: 1px solid var(--btn-border);
	border-radius: 4px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
	cursor: pointer;
}
.button:hover {
	text-decoration: none;
	color: #222;
	background: linear-gradient(to bottom, #ffffff, #d2d2d2);
	border-color: #a0a0a0;
}
.button:active {
	background: linear-gradient(to bottom, #dcdcdc, #ececec);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.button:disabled:hover,
.button[disabled]:hover {
	background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
	border-color: var(--btn-border);
}
.button:disabled,
.button[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/* Generic form controls (refined per-surface later) */
input,
textarea,
select {
	font: inherit;
}

/* --- Chrome: logo, sidebar, search, nav, badges -------------------------- */
#main-logo {
	height: 25px;
	display: block;
	margin: 3px 0 12px;
	margin-bottom: 15px;
}
#main-logo-link:hover {
	opacity: 0.7;
}

#main-nav {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.search {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 5px 12px;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.search i {
	color: var(--muted);
}
.search input {
	border: 0;
	outline: 0;
	width: 100%;
	background: transparent;
}
.search:focus-within {
	border-color: var(--link);
	box-shadow:
		inset 0 1px 2px rgba(0, 0, 0, 0.08),
		0 0 0 2px rgba(42, 100, 150, 0.3);
}
#sidebar-search {
	box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.28);
	background-color: rgba(16, 29, 93, 0.07);
	border: 0;
}

.nav-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.6);
}
.nav-card a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 14px;
	color: var(--link);
	font-weight: 500;
	border-top: 1px solid #eee;
}
.nav-card a:first-child {
	border-top: 0;
}
.nav-card a:hover {
	text-decoration: none;
	background: #f6f6f6;
}
.nav-card a.selected {
	background: #edf8ff;
	color: black;
	font-weight: 700;
}
.nav-card a i {
	width: 1.4em;
	text-align: center;
	color: var(--link);
}
.nav-card a .nav-label {
	flex: 1; /* pushes the badge to the right edge */
}
.nav-card a.selected i {
	color: black;
}

.badge {
	background: var(--danger);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 9px;
}
.badge[hidden] {
	display: none;
}

/* --- Sidebar widgets: mini-profile, Trends, People ----------------------- */
.mini-profile {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}
.mini-profile:hover {
	text-decoration: none;
	background: #f9fbfd;
}
.mini-profile .avatar {
	width: 44px;
	height: 44px;
	border-radius: 5px;
	object-fit: cover;
	flex-shrink: 0;
}
.mini-profile-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}
.mini-profile .display-name {
	color: #222;
}
.mini-profile .username {
	color: var(--muted);
	font-size: 12px;
}
.mini-stats {
	color: var(--muted);
	font-size: 12px;
	margin-top: 2px;
}
.mini-stats strong {
	color: #222;
}

.side-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	overflow: hidden;
}
.side-card h3 {
	margin: 0;
	padding: 9px 14px;
	font-size: 13px;
	background: #f6f6f6;
	border-bottom: 1px solid #eee;
}
.side-card ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.side-card li {
	border-top: 1px solid #f0f0f0;
}
.side-card li:first-child {
	border-top: 0;
}

.trend-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 8px 14px;
}
.trend-list a {
	font-weight: 700;
}
.trend-count {
	color: var(--muted);
	font-size: 11px;
}

.clock-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	padding: 8px 14px;
}
.clock-city {
	font-weight: 700;
}
.clock-time {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.people-list li a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	color: var(--text);
}
.people-list li a:hover {
	text-decoration: none;
	background: #f6f6f6;
}
.people-list .avatar {
	width: 26px;
	height: 26px;
	border-radius: 4px;
	object-fit: cover;
	flex-shrink: 0;
}
.person-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
	flex: 1;
}
.person-name {
	color: #222;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.person-time {
	color: var(--muted);
	font-size: 11px;
}
.people-list li.unseen a {
	background: #eef5fb;
}
.people-list li.unseen .person-name::after {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	margin-left: 6px;
	border-radius: 50%;
	background: var(--link);
	vertical-align: middle;
}

/* --- Delikçiler (member directory page) ---------------------------------- */
.people-directory {
	list-style: none;
	margin: 0;
	padding: 0;
}
.person-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	margin-bottom: 10px;
}
.person-card.unseen {
	border-left: 3px solid var(--link);
	background: #f5faff;
}
.person-card .avatar {
	width: 48px;
	height: 48px;
	border-radius: 5px;
	object-fit: cover;
	flex-shrink: 0;
}
.person-card-body {
	min-width: 0;
	flex: 1;
}
.person-card-name {
	color: #222;
}
.person-card-name .username {
	color: var(--muted);
	font-weight: 400;
}
.person-card-name:hover {
	text-decoration: none;
}
.person-card-bio {
	margin: 3px 0 0;
	color: #444;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
.person-card-meta {
	margin: 5px 0 0;
	color: var(--muted);
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.person-card-meta .muted {
	font-style: italic;
}
.new-flag {
	background: var(--link);
	color: #fff;
	font-weight: 700;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	text-transform: uppercase;
}

/* --- Flash banner --------------------------------------------------------- */
.flash {
	padding: 8px 12px;
	border-radius: 4px;
	margin-bottom: 12px;
	font-weight: 700;
}
.flash.success {
	background: #e3f3d9;
	color: #3c6a26;
}
.flash.error {
	background: #fbe3e4;
	color: #a33;
}
.flash.warning {
	background: #fcf4dd;
	color: #8a6d3b;
}

/* --- Tweet card ----------------------------------------------------------- */
article.post {
	overflow: hidden;
}
article.post > header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 12px 0;
}
article.post .avatar {
	width: 44px;
	height: 44px;
	border-radius: 5px;
	box-shadow: 0px 1px 0px white;
	background-color: rgb(87, 87, 87);
	object-fit: cover;
	flex-shrink: 0;
}
/* Wraps any avatar (tweet, embed, notification) in a link to the author's profile. */
.avatar-link {
	display: block;
	flex-shrink: 0;
	line-height: 0;
}
.avatar-link:hover {
	opacity: 0.85;
}
article.post .profile-link {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}
article.post .profile-link:hover {
	text-decoration: none;
}
article.post .display-name {
	color: #222;
}
article.post .username {
	color: var(--muted);
	font-weight: 400;
}
article.post .context {
	padding: 10px 12px 5px;
	color: var(--muted);
	font-size: 12px;
}
article.post .body {
	padding: 8px 12px;
	font-size: 16px;
	color: #222;
	word-wrap: break-word;
	overflow-wrap: break-word;
	margin-top: 5px;
}
article.post .context + .body {
	margin-top: 0;
	padding-top: 5px;
}
article.post .photo {
	display: block;
	max-width: calc(100% - 24px);
	border-radius: 4px;
	margin: 4px 12px 10px;
	cursor: pointer;
}
article.post .tweet-embed {
	margin: 4px 12px 10px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: #fafafa;
}
article.post .tweet-embed .photo {
	margin: 6px 0 0;
	max-width: 100%;
}
/* Repost/quote embed styled like a small tweet (avatar + name over handle + body). */
.tweet-embed .embed-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}
.tweet-embed .embed-avatar {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	object-fit: cover;
	box-shadow: 0px 1px 0px white;
	background-color: rgb(87, 87, 87);
	flex-shrink: 0;
}
.tweet-embed .embed-author {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.tweet-embed .embed-author strong {
	color: #222;
}
.tweet-embed .embed-author .username {
	color: var(--muted);
	font-weight: 400;
	font-size: 12px;
}
.tweet-embed .embed-body {
	color: #222;
	word-wrap: break-word;
	overflow-wrap: break-word;
	font-size: 14px;
}
.tweet-embed .embed-permalink {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--link);
}
article.post .posted {
	padding: 0px 12px;
	color: var(--muted);
	font-size: 11px;
	margin-bottom: 10px;
}
article.post .posted a {
	color: var(--muted);
}

/* Footer action bar — icon-first, gray, with a skeuo inset gradient. */
article.post footer {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 8px 12px;
	margin-top: 8px;
	background: linear-gradient(to bottom, #f7f7f7, #f4f4f4);
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
	border-top: 1px solid var(--border);
}
article.post footer form {
	margin: 0;
}
article.post footer .button {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0;
	color: #666666; /* ~4.5:1 on the light footer gradient */
	font-weight: 400;
}
article.post footer .button:hover {
	color: #333;
}
article.post footer .like.liked {
	color: var(--danger);
}

/* Heart: outline by default, solid red when liked. interactions.js toggles .liked → pure-CSS swap. */
article.post footer .like .icon-heart {
	display: none;
}
article.post footer .like.liked .icon-heart-empty {
	display: none;
}
article.post footer .like.liked .icon-heart {
	display: inline;
	color: var(--danger);
}

/* Action labels stay in the DOM (a11y + interactions.js Like/Unlike toggle) but are hidden. */
article.post footer .label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.empty {
	color: var(--text);
	padding: 12px 2px;
	background-color: var(--bg-dark);
	box-shadow: 0px 1px 0px white;
	text-align: center;
	border-radius: 6px;
}

/* --- Compose card --------------------------------------------------------- */
.compose {
	padding: 12px;
}
.compose textarea {
	width: 100%;
	min-height: 56px;
	resize: vertical;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 8px;
	font-size: 15px;
	box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.10), inset 0 1px 4px rgba(0, 0, 0, 0.1);
	outline: none;
}
.compose-bar {
	position: relative; /* anchors the .photo-menu popup (appended here by media.js) */
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}
.compose-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}
.char-counter {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
	min-width: 22px;
	text-align: right;
}
.char-counter-low {
	color: var(--danger);
}

/* "N new posts — click to load" banner above the home timeline (main.js). */
.new-posts-banner {
	display: block;
	width: 100%;
	padding: 10px 14px;
	margin-bottom: 12px;
	border: 1px solid var(--btn-border);
	border-radius: var(--radius);
	background: linear-gradient(to bottom, #eaf2fb, #d6e6f7);
	color: var(--link);
	font: inherit;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	box-shadow: var(--shadow-card);
}
.new-posts-banner:hover {
	background: linear-gradient(to bottom, #e0edfa, #c9def4);
}
.photo-trigger {
	position: relative;
	border: 0;
	background: none;
	color: var(--muted);
	font-size: 18px;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
}
.photo-trigger:hover {
	color: var(--link);
}
/* Pressed-in look while the source chooser is open (media.js sets aria-expanded). */
.photo-trigger[aria-expanded='true'] {
	color: var(--link);
	background: #e2e2e2;
	border-radius: 4px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.28);
}
.photo-preview {
	position: relative;
	display: inline-block;
	margin-top: 8px;
}
.photo-preview[hidden] {
	display: none;
}
.photo-preview img {
	max-width: 140px;
	max-height: 140px;
	border-radius: 4px;
	border: 1px solid var(--border);
	display: block;
}
.photo-remove {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid var(--btn-border);
	background: #fff;
	cursor: pointer;
	line-height: 1;
	font-size: 13px;
}

/* Photo source chooser menu (media.js) */
.photo-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 6px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 5px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	z-index: 50;
	min-width: 160px;
}
.photo-menu button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 9px 14px;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}
.photo-menu button:hover {
	background: #f2f2f2;
}

/* --- Modal (shared Bootstrap-1-style popup) ------------------------------ */
.modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	z-index: 1000;
	padding: 44px 20px;
	overflow-y: auto;
}
.modal-backdrop[hidden] {
	display: none;
}
.modal {
	position: relative;
	width: 460px;
	max-width: 100%;
	background: var(--card);
	border: 1px solid rgba(0, 0, 0, 0.3);
	border-radius: 6px;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
	background-clip: padding-box;
}
.modal-header {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	border-bottom: 1px solid #e5e5e5;
}
.modal-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #333;
}
.modal-close {
	border: 0;
	background: none;
	padding: 0 0 0 12px;
	margin: 0;
	font-size: 22px;
	line-height: 1;
	color: #999;
	cursor: pointer;
}
.modal-close:hover {
	color: #333;
}
.modal-body {
	padding: 16px;
}
.modal-footer {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: #f5f5f5;
	border-top: 1px solid #e5e5e5;
	border-radius: 0 0 6px 6px;
}
.modal-footer form {
	margin: 0;
}

/* Primary action button (Bootstrap-1 blue). `.button.button-primary` so it outweighs `button.button`. */
.button.button-primary {
	color: #fff;
	background: linear-gradient(to bottom, #2f6db5, #245688); /* dark enough for white text ≥4.5:1 across */
	border-color: #21507f;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.button.button-primary:hover {
	color: #fff;
	background: linear-gradient(to bottom, #2a6199, #1f4c78);
	border-color: #1c4670;
}

/* Lightbox: image-only modal with a slim header (just the close). */
.modal.modal-lightbox {
	width: auto;
}
.modal-lightbox .modal-body {
	padding: 0;
	line-height: 0;
}
.lightbox-image {
	display: block;
	max-width: 86vw;
	max-height: 80vh;
}

/* --- Webcam capture (one-tap) -------------------------------------------- */
.webcam {
	display: block;
	line-height: 0;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
}
.webcam video {
	display: block;
	width: 100%;
	max-width: 78vw;
	max-height: 60vh;
}

/* --- Modal body content (dialogs) ---------------------------------------- */
.modal-static {
	margin: 12px 0;
}
.modal-body .tweet-embed {
	margin: 0 0 10px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 4px;
	background: #fafafa;
}
.modal-body .tweet-embed:last-child {
	margin-bottom: 0;
}
.modal-body form {
	margin: 0;
}
.modal-body textarea {
	width: 100%;
	min-height: 60px;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 7px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
	resize: vertical;
}
.modal-message {
	margin: 0;
	font-size: 14px;
}

/* --- Auth / error pages (standalone, centered card) ---------------------- */
body.auth {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 60px 16px;
}
.auth-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	padding: 28px;
	width: 300px;
	max-width: 100%;
}
.auth-logo {
	height: 20px;
	display: block;
	margin: 0 auto 30px;
}
.auth-card form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.auth-card label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 700;
}
.auth-card input {
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 7px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.auth-card .button {
	text-align: center;
}
.error-card {
	text-align: center;
}
.error-card h1 {
	font-size: 40px;
	color: var(--muted);
}
.error-card .button {
	display: inline-block;
	margin-top: 8px;
}

/* --- Pagination (numbered, connected box) -------------------------------- */
nav.pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	margin: 6px 0 20px;
}
.page-numbers {
	display: contents; /* let the number cells join the nav's flex row for shared borders */
}
.pagination .page-link,
.pagination .page-gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	padding: 7px 12px;
	border: 1px solid var(--border);
	border-left-width: 0;
	background: #fff;
	color: var(--link);
	font-weight: 700;
	line-height: 1.2;
}
.pagination > :first-child {
	border-left-width: 1px;
	border-radius: 4px 0 0 4px;
}
.pagination > :last-child {
	border-radius: 0 4px 4px 0;
}
.pagination a.page-link:hover {
	background: #f2f6fb;
	text-decoration: none;
}
.pagination .page-link.current {
	background: #dbeafe; /* light blue highlight for the current page */
	color: #1d4d78;
	cursor: default;
}
.pagination .page-link.disabled {
	color: var(--muted);
	cursor: default;
	background: #fafafa;
}
.pagination .page-gap {
	color: var(--muted);
	font-weight: 400;
}

/* --- Reply composer heading ---------------------------------------------- */
.reply-compose {
	margin-top: 4px;
}

/* --- Notifications -------------------------------------------------------- */
ul.notifications {
	list-style: none;
	padding: 0;
	margin: 0;
}
ul.notifications li {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 10px 12px;
	margin-bottom: 6px;
	box-shadow: var(--shadow-card);
}
ul.notifications li.notif {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
ul.notifications li.unread {
	border-left: 3px solid var(--link);
}
ul.notifications time {
	color: var(--muted);
	font-size: 11px;
	margin-left: 6px;
}
ul.notifications .notif-actor {
	font-weight: 700;
}
.notif-figure {
	position: relative;
	flex-shrink: 0;
}
.notif-avatar {
	width: 40px;
	height: 40px;
	border-radius: 5px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	object-fit: cover;
	display: block;
}
/* Small action-type badge on the avatar corner (Twitter-style). */
.notif-badge-icon {
	position: absolute;
	right: -5px;
	bottom: -5px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #888;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--card);
}
.notif-like .notif-badge-icon {
	background: var(--danger);
}
.notif-repost .notif-badge-icon {
	background: #17a34a;
}
.notif-reply .notif-badge-icon {
	background: var(--link);
}
.notif-mention .notif-badge-icon {
	background: #6f8f4f;
}
.notif-content {
	flex: 1;
	min-width: 0;
	align-self: center;
}
/* The reply text / quote comment, shown under the notification line. */
.notif-body {
	margin: 6px 0 0;
	padding: 6px 10px;
	border-left: 3px solid var(--border);
	background: #fafafa;
	border-radius: 0 4px 4px 0;
	color: #444;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

/* --- Profile header ------------------------------------------------------- */
.profile-header {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	margin-bottom: 12px;
}
.profile-header.no-bio {
	padding-bottom: 10px;
}
.profile-header .cover {
	width: 100%;
	max-height: 160px;
	object-fit: cover;
	display: block;
}
.profile-header .avatar {
	width: 72px;
	height: 72px;
	border-radius: 6px;
	border: 2px solid #fff;
	margin: -28px 0 0 12px;
	position: relative;
	object-fit: cover;
}
.profile-header h1 {
	padding: 4px 12px 0;
	margin: 0;
}
.profile-header h1 small {
	color: var(--muted);
	font-weight: 400;
	font-size: 13px;
}
.profile-header .bio {
	padding: 6px 12px 12px;
	margin: 0;
}
/* Post / like counts under the bio */
.profile-stats {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0;
	padding: 4px 12px 12px;
}
.profile-stats strong {
	color: #222;
}
.profile-stats li,
.profile-stats a {
	color: var(--muted);
}
.profile-stats a:hover {
	text-decoration: none;
	color: var(--link);
}
/* Profile tab bar: Posts · Posts & replies · Likes */
.profile-tabs {
	display: flex;
	margin-bottom: 12px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-card);
}
.profile-tabs a {
	flex: 1;
	text-align: center;
	padding: 10px 12px;
	color: var(--muted);
	font-weight: 700;
	border-left: 1px solid #eee;
}
.profile-tabs a:first-child {
	border-left: 0;
}
.profile-tabs a:hover {
	background: #f6f6f6;
	text-decoration: none;
}
.profile-tabs a.active {
	color: var(--link);
	background: #eef5fb;
	box-shadow: inset 0 -3px 0 var(--link);
}

/* --- Settings ------------------------------------------------------------- */
.settings-section {
	padding: 12px 14px;
}
.settings-section h2 {
	margin-top: 0;
}
.settings-section form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: flex-start;
}
.settings-section label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 700;
	width: 100%;
}
.settings-section input[type='text'],
.settings-section input:not([type]),
.settings-section input[name='display_name'],
.settings-section textarea {
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 7px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
	width: 100%;
}

/* Avatar/cover: current image + styled file picker + live preview (media.js). */
/* Merged profile-images editor: a cover banner with the avatar overlapping (profile preview) + the
   two upload forms side by side. Both previews update live (media.js data-preview). */
.settings-preview {
	position: relative;
	margin-bottom: 16px;
	min-height: 100px;
	background: #e4e4e4;
	border: 1px solid var(--border);
	border-radius: 6px;
	overflow: hidden;
}
.settings-cover-preview {
	display: block;
	width: 100%;
	height: 120px;
	object-fit: cover;
}
.settings-cover-preview[hidden] {
	display: none;
}
.settings-avatar-preview {
	position: absolute;
	left: 14px;
	bottom: 12px;
	width: 68px;
	height: 68px;
	border-radius: 6px;
	border: 2px solid #fff;
	object-fit: cover;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
	background: #fafafa;
}
.settings-image-forms {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}
.settings-image-form {
	flex: 1;
	min-width: 190px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
	border: 1px solid var(--border);
	padding: 10px;
	border-radius: var(--radius);
}
.settings-image-label {
	font-weight: 700;
}
.settings-image-buttons {
	display: flex;
	align-items: center;
	gap: 12px;
}
.button-link {
	border: 0;
	background: none;
	padding: 0;
	color: var(--muted);
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
}
.button-link:hover {
	color: var(--danger);
}
.file-picker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.file-picker input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0; /* activatable via the <label>, works without JS; visually replaced by the button */
}
.file-picker:focus-within .button {
	outline: 2px solid var(--link); /* the hidden input's focus ring is invisible — show it on the button */
	outline-offset: 1px;
}
.file-name {
	color: var(--muted);
	font-size: 12px;
}

/* --- Search --------------------------------------------------------------- */
.search-page {
	margin-bottom: 12px;
	padding-right: 5px;
}
.search-page .button {
	flex-shrink: 0;
	border-radius: 13px;
}
ul.people {
	list-style: none;
	padding: 0;
	margin: 0 0 12px;
}
ul.people li a {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 8px 12px;
	margin-bottom: 6px;
	color: var(--text);
}
ul.people li a:hover {
	text-decoration: none;
	background: #f6f6f6;
}
ul.people .avatar {
	width: 32px;
	height: 32px;
	border-radius: 4px;
	object-fit: cover;
}
ul.people .username {
	color: var(--muted);
	font-weight: 400;
}
