/* Feed area (W4a): home, pagination, new-posts pill, pull to refresh, scheduled posts. */

/* Home: the post box sits under the tabs; the pill slot must not be a box of its own, or the sticky
   pill could not stick to the page. */
@scope ([data-c="home"]) to ([data-c]) {
	.compose {
		border-bottom: 1px solid var(--line);
	}

	.pill-slot {
		display: contents;
	}
}

/* A list of posts: every item has a rule under it, and the sentinel is a quiet row. */
@scope ([data-c="post-list"]) to ([data-c]) {
	:scope > [role='listitem'] {
		border-bottom: 1px solid var(--line);
	}

	:scope > .more {
		padding: var(--s4);
		text-align: center;
		color: var(--ink-dim);
		font-size: var(--t-sm);
		border-bottom: 0;
	}

	:scope > .more a {
		color: inherit;
		text-decoration: none;
	}

	:scope > .more a[aria-busy='true'] {
		opacity: 0.6;
	}
}

@scope ([data-c="new-posts-pill"]) to ([data-c]) {
	:scope {
		position: sticky;
		top: 64px;
		z-index: 6;
		display: flex;
		justify-content: center;
		height: 0;
		overflow: visible;
	}

	.pill {
		display: inline-flex;
		align-items: center;
		gap: var(--s2);
		height: 36px;
		margin-top: var(--s3);
		padding: 0 var(--s4);
		background: var(--ink);
		color: var(--paper-on-ink);
		border: 0;
		border-radius: var(--r-pill);
		font-weight: 600;
		box-shadow: 0 10px 24px -10px var(--shadow);
	}
}

/* Pull to refresh: `pull.js` adds this strip to the body while a finger pulls. Phones only. */
[data-pull-indicator] {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 15;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

[data-pull-indicator] .note {
	font-family: var(--font-mono);
	font-size: var(--t-xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-dim);
}

@media (min-width: 760px) {
	[data-pull-indicator] {
		display: none;
	}
}

@scope ([data-c="scheduled-card"]) to ([data-c]) {
	:scope {
		display: flex;
		flex-direction: column;
		gap: var(--s3);
		padding: var(--s4);
	}

	.head {
		display: flex;
		align-items: center;
		gap: var(--s3);
		color: var(--ink-dim);
		font-size: var(--t-sm);
	}

	p {
		margin: 0;
		overflow-wrap: anywhere;
	}

	.text {
		white-space: pre-wrap;
	}

	.cw,
	.dim {
		color: var(--ink-dim);
		font-size: var(--t-sm);
	}

	.error {
		color: var(--danger);
	}

	.actions {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: var(--s2);
	}

	.link {
		color: var(--ink);
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
}

@scope ([data-c="reschedule-form"]) to ([data-c]) {
	:scope {
		display: flex;
		flex-direction: column;
		gap: var(--s2);
	}

	label {
		font-family: var(--font-mono);
		font-size: var(--t-xs);
		letter-spacing: 0.2em;
		text-transform: uppercase;
		color: var(--ink-dim);
	}

	input {
		min-height: 44px;
		padding: 0 var(--s3);
		background: var(--surface);
		border: 1px solid var(--line);
		border-radius: var(--r-ctl);
		color: var(--ink);
		font: inherit;
	}

	p {
		margin: 0;
	}

	.dim {
		color: var(--ink-dim);
		font-size: var(--t-sm);
	}

	.error {
		color: var(--danger);
	}
}
