/*
 * Applicant account screens: sign in, register, reset, My Requests.
 *
 * Loaded after form.css and scoped under .superc-account, which always sits
 * on a .superc-form-wrap — so the tokens, the Open Sans face and the field and
 * button styling all come from there and are not repeated here.
 */

/* ------------------------------------------------------------------ */
/* Card layout for the narrow auth screens                             */
/* ------------------------------------------------------------------ */

/*
 * The account screens are short — a sign-in card is barely 400px tall — and
 * a short page lets the theme's footer ride up under it, which reads as the
 * page having failed to load the rest of itself.
 *
 * min-height on the wrapper gives the content area something to fill, so the
 * footer lands near the bottom of the window instead of halfway up it. vh
 * rather than a fixed height so it adapts to the window; the padding keeps
 * the card off the header on tall screens.
 *
 * 58vh, not 100vh: the theme's own header and footer take up the rest, and
 * reserving a full screen here would push the footer off the bottom and
 * invent a scrollbar on a page that has nothing more to show.
 */
.superc-form-wrap.superc-account {
	max-width: 480px;
	min-height: 58vh;
	padding: 2.5rem 0 3.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.superc-form-wrap.superc-account--list {
	max-width: 780px;
	/* The list grows with content, so it only needs the floor, not centring
	   — a long list centred in a tall box drifts away from the heading. */
	justify-content: flex-start;
}

.superc-account__card {
	background: #fff;
	border: 1px solid var(--superc-line);
	border-radius: var(--superc-radius);
	padding: 1.75rem;
}

.superc-account__title {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--superc-ink);
}

.superc-account__intro {
	margin: 0 0 1.25rem;
	color: var(--superc-muted);
	font-size: 0.925rem;
	line-height: 1.5;
}

.superc-account__form .superc-field {
	margin-bottom: 1rem;
}

.superc-account__submit {
	width: 100%;
	margin-top: 0.25rem;
}

.superc-account__alt {
	margin: 1rem 0 0;
	font-size: 0.9rem;
	color: var(--superc-muted);
	text-align: center;
}

.superc-account__alt a {
	color: var(--superc-accent);
	font-weight: 550;
}

.superc-account__note {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--superc-line-soft);
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--superc-muted);
}

.superc-account__note a {
	color: var(--superc-accent);
}

/* "or" rule between sign in and sign up */
.superc-account__divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 1.25rem 0 0.25rem;
	color: var(--superc-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.superc-account__divider::before,
.superc-account__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--superc-line-soft);
}

.superc-account__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 1.25rem 0 0;
}

/* ------------------------------------------------------------------ */
/* My Requests                                                          */
/* ------------------------------------------------------------------ */

.superc-account__bar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--superc-line-soft);
}

.superc-account__who {
	margin: 0.2rem 0 0;
	color: var(--superc-muted);
	font-size: 0.9rem;
}

.superc-account__out {
	margin: 0;
}

.superc-account__empty {
	border: 1px dashed var(--superc-line);
	border-radius: var(--superc-radius);
	padding: 2rem 1.5rem;
	text-align: center;
	color: var(--superc-muted);
	font-size: 0.925rem;
	line-height: 1.55;
}

.superc-account__empty-title {
	margin: 0 0 0.4rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--superc-ink);
}

.superc-account__empty .superc-account__note {
	text-align: left;
}

.superc-account__empty .superc-button {
	margin-top: 1rem;
}

.superc-reqlist {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--superc-line);
	border-radius: var(--superc-radius);
	overflow: hidden;
}

.superc-reqlist__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.25rem;
	margin: 0;
	padding: 1.1rem 1.25rem;
	background: #fff;
}

.superc-reqlist__item + .superc-reqlist__item {
	border-top: 1px solid var(--superc-line-soft);
}

.superc-reqlist__main {
	min-width: 0;
}

.superc-reqlist__title {
	margin: 0 0 0.3rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--superc-ink);
	overflow-wrap: anywhere;
}

.superc-reqlist__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.85rem;
	color: var(--superc-muted);
}

.superc-reqlist__ref {
	font-family: var(--superc-font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.01em;
}

.superc-reqlist__amount {
	margin: 0.45rem 0 0;
	font-size: 0.875rem;
	color: var(--superc-ink);
}

.superc-reqlist__approved {
	margin-left: 0.5rem;
	font-weight: 600;
	color: #047857;
}

.superc-reqlist__state {
	flex: 0 0 auto;
	width: 190px;
	text-align: right;
}

.superc-reqlist__note {
	margin: 0.4rem 0 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--superc-muted);
}

/*
 * Status pill. The colour arrives as --superc-badge from the template, so
 * one rule covers every status and nothing has to be kept in sync with the
 * status list in PHP.
 */
.superc-badge {
	display: inline-block;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	/* Fallbacks first: color-mix needs Chrome 111 / Safari 16.2 / Firefox 113,
	   and a community group on an old machine should still see a readable
	   pill rather than a transparent one. */
	background: #f3f4f6;
	border: 1px solid #d8dde4;
	color: var(--superc-badge);
	background: color-mix(in srgb, var(--superc-badge) 12%, #fff);
	border-color: color-mix(in srgb, var(--superc-badge) 30%, #fff);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Narrow screens                                                       */
/* ------------------------------------------------------------------ */

@media (max-width: 560px) {
	.superc-form-wrap.superc-account {
		/* On a phone the viewport is mostly content already, and a tall
		   minimum just adds dead space above the fold. */
		min-height: 0;
		padding: 1.5rem 0 2.5rem;
	}

	.superc-account__card {
		padding: 1.25rem;
	}

	.superc-reqlist__item {
		flex-direction: column;
		gap: 0.75rem;
	}

	.superc-reqlist__state {
		width: auto;
		text-align: left;
	}
}

/* ------------------------------------------------------------------ */
/* Claim screens                                                        */
/* ------------------------------------------------------------------ */

/*
 * The request being claimed, shown so somebody can tell at a glance that
 * the link is for the thing they think it is before they attach it.
 */
.superc-claimcard {
	margin: 0 0 1.25rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--superc-line);
	border-left: 3px solid var(--superc-accent);
	border-radius: var(--superc-radius);
	background: var(--superc-bg-soft);
}

.superc-claimcard__title {
	margin: 0 0 0.3rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--superc-ink);
	overflow-wrap: anywhere;
}

.superc-claimcard__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.85rem;
	color: var(--superc-muted);
}
