/**
 * Reports archive and single preview.
 */

.humera-reports-archive {
	background: var(--humera-bg);
}

.humera-reports-header {
	display: flex;
	align-items: center;
	justify-content: center;
	min-block-size: clamp(8rem, 14vw, 11rem);
	padding-block: clamp(2.5rem, 4vw, 4.5rem);
	background: var(--humera-bg-mint);
	text-align: center;
}

.humera-reports-header .humera-wrap {
	inline-size: 100%;
}

.humera-reports-header h1 {
	max-inline-size: min(100%, 36rem);
	margin: 0 auto;
	font-size: var(--humera-size-page);
	text-align: center;
	overflow-wrap: break-word;
}

.humera-reports-board {
	padding-block-start: var(--humera-space-6);
	padding-block-end: var(--humera-space-7);
}

.humera-reports-board.humera-page {
	padding-block-end: var(--humera-space-7);
}

.humera-reports-empty {
	margin: 0;
	padding: var(--humera-space-6) 0;
	color: var(--humera-muted);
	font-size: var(--humera-size-body);
}

.humera-card-report .humera-card-document {
	justify-content: flex-start;
}

.humera-card-year,
.humera-report-year {
	margin-inline-start: 0.45rem;
	font-weight: 700;
}

.humera-card-report-actions,
.humera-report-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--humera-space-3);
	inline-size: 100%;
}

/* Physical sides: preview on the right, download on the left. */
[dir="ltr"] .humera-card-report-actions,
[dir="ltr"] .humera-report-actions {
	flex-direction: row-reverse;
}

.humera-card-report .humera-card-date {
	margin: 0.35rem 0 0;
	color: var(--humera-muted);
	font-size: var(--humera-size-label);
}

.humera-report-single {
	background: var(--humera-bg);
}

.humera-report-header {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	block-size: clamp(8rem, 14vw, 11rem);
	min-block-size: clamp(8rem, 14vw, 11rem);
	padding-block: clamp(0.75rem, 1.5vw, 1.25rem);
	background: var(--humera-bg-mint);
	overflow: hidden;
}

.humera-report-heading {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr) max-content;
	align-items: center;
	gap: var(--humera-space-3);
	inline-size: 100%;
}

.humera-report-heading-copy {
	display: grid;
	justify-items: center;
	gap: 0.2rem;
	min-inline-size: 0;
	text-align: center;
}

.humera-report-back-line {
	display: flex;
	justify-self: start;
	margin: 0;
}

.humera-report-back {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--humera-link);
	font-weight: 700;
	text-decoration: none;
	transition: color var(--humera-transition), gap var(--humera-transition);
}

.humera-report-back:hover,
.humera-report-back:focus-visible {
	gap: 0.65rem;
	color: var(--humera-heading);
	text-decoration: none;
}

.humera-report-header h1 {
	max-inline-size: 100%;
	margin: 0;
	font-size: var(--humera-size-page);
	line-height: 1.15;
	text-align: center;
	overflow-wrap: normal;
	white-space: nowrap;
}

.humera-report-meta {
	display: flex;
	justify-self: end;
	margin: 0;
	color: var(--humera-muted);
	font-size: var(--humera-size-label);
	font-weight: 700;
	text-align: end;
}

.humera-report-header .humera-dek {
	max-inline-size: 100%;
	margin: 0;
	line-height: 1.35;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Physical sides: back on the right, date on the left. */
[dir="ltr"] .humera-report-heading {
	direction: rtl;
}

[dir="ltr"] .humera-report-heading > * {
	direction: ltr;
}

.humera-report-actions .humera-button {
	gap: 0.4rem;
}

.humera-report-body {
	padding-block-start: var(--humera-space-6);
	padding-block-end: var(--humera-space-7);
}

.humera-report-preview {
	display: grid;
	gap: var(--humera-space-3);
	justify-items: stretch;
	inline-size: min(100%, 40rem);
	margin-inline: auto;
}

.humera-report-frame {
	display: block;
	inline-size: 100%;
	max-inline-size: 100%;
	min-block-size: min(70vh, 48rem);
	block-size: 70vh;
	border: 1px solid var(--humera-line);
	border-radius: var(--humera-radius-image);
	background: var(--humera-white);
}

.humera-report-preview-fallback {
	margin: 0;
	color: var(--humera-muted);
	font-size: var(--humera-size-label);
}

@media (max-width: 720px) {
	.humera-report-header {
		block-size: auto;
		overflow: visible;
	}

	.humera-report-header .humera-dek {
		white-space: normal;
	}

	.humera-report-heading,
	[dir="ltr"] .humera-report-heading {
		grid-template-columns: 1fr;
		direction: inherit;
		justify-items: center;
	}

	.humera-report-back-line,
	.humera-report-meta,
	[dir="ltr"] .humera-report-heading > * {
		justify-self: center;
		direction: inherit;
		text-align: center;
	}

	.humera-report-header h1 {
		white-space: normal;
	}

	.humera-report-frame {
		min-block-size: 55vh;
		block-size: 55vh;
	}

	.humera-card-report-actions,
	.humera-report-actions,
	[dir="ltr"] .humera-card-report-actions,
	[dir="ltr"] .humera-report-actions {
		flex-direction: column;
		align-items: stretch;
	}
}
