/* Student invoice list and detail views */

.lh-student-invoices__filters {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 0.75rem;
	margin-bottom: 1rem;
}

.lh-student-invoices__filter-label {
	color: #444;
	font-size: 0.9rem;
	font-weight: 600;
	margin: 0;
}

.lh-student-invoices__filter {
	background: #fff;
	border: 1px solid #d4ccc2;
	border-radius: 999px;
	color: #222;
	font: inherit;
	font-size: 0.9rem;
	max-width: 100%;
	min-height: 2.5rem;
	padding: 0.45rem 0.95rem;
}

.lh-student-invoices__filter:focus-visible {
	border-color: #7a3e48;
	outline: 2px solid #7a3e48;
	outline-offset: 2px;
}

.lh-student-invoices__filter-empty {
	color: #6b625c;
	font-size: 0.92rem;
	margin: 0 0 0.85rem;
}

.lh-student-invoices__row[hidden] {
	display: none !important;
}

.lh-student-invoices__summary {
	color: #444;
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 0.85rem;
}

.lh-student-invoices__list {
	border: 1px solid #e8e2da;
	border-radius: 12px;
	display: grid;
	list-style: none;
	margin: 0;
	overflow: hidden;
	padding: 0;
}

.lh-student-invoices__row {
	border-top: 1px solid #e8e2da;
}

.lh-student-invoices__row:first-child {
	border-top: 0;
}

.lh-student-invoices__row-link {
	align-items: center;
	color: inherit;
	display: flex;
	gap: 0.75rem;
	padding: 0.9rem 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.lh-student-invoices__row-link:hover,
.lh-student-invoices__row-link:focus-visible {
	background: #faf8f5;
}

.lh-student-invoices__row-link:focus-visible {
	outline: 2px solid #6b2f2f;
	outline-offset: -2px;
}

.lh-student-invoices__row-main {
	display: grid;
	flex: 1 1 12rem;
	gap: 0.15rem;
	min-width: 0;
}

.lh-student-invoices__row-title {
	display: block;
	font-size: 0.98rem;
}

.lh-student-invoices__row-ref {
	color: #6b625c;
	display: block;
	font-size: 0.82rem;
}

.lh-student-invoices__row-lessons {
	color: #6b625c;
	display: block;
	font-size: 0.82rem;
	line-height: 1.35;
}

.lh-student-invoices__row-meta {
	align-items: center;
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: 0.45rem 0.65rem;
	justify-content: flex-end;
}

.lh-student-invoices__row-date {
	color: #6b625c;
	font-size: 0.84rem;
	white-space: nowrap;
}

.lh-student-invoices__row-amount {
	font-size: 0.98rem;
	font-weight: 700;
	white-space: nowrap;
}

.lh-student-invoices__row-chevron {
	color: #9a9088;
	flex-shrink: 0;
}

.lh-student-invoices__row--paid {
	opacity: 0.92;
}

.lh-student-invoices__row--issued {
	background: #fffbfb;
	border-left: 3px solid #8b2020;
}

.lh-student-invoices__row--issued .lh-student-invoices__row-link:hover,
.lh-student-invoices__row--issued .lh-student-invoices__row-link:focus-visible {
	background: #fff5f5;
}

.lh-student-invoices__status {
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.25rem 0.65rem;
	white-space: nowrap;
}

.lh-student-invoices__status--issued {
	background: #fce8e8;
	color: #8b2020;
}

.lh-student-invoices__status--paid {
	background: #eef6ef;
	color: #234029;
}

/* Detail view */

.lh-student-invoices__back {
	margin: 0 0 0.85rem;
}

.lh-student-invoices__back a {
	color: #6b2f2f;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
}

.lh-student-invoices__back a:hover,
.lh-student-invoices__back a:focus-visible {
	text-decoration: underline;
}

.lh-student-invoices__document {
	background: #fff;
	border: 1px solid #e8e2da;
	border-radius: 14px;
	overflow: hidden;
	padding: 2.75rem 1.35rem 1.35rem;
	position: relative;
}

.lh-student-invoices__document--issued {
	background: #fffbfb;
	border: 2px solid #d4a0a8;
	box-shadow: 0 8px 28px rgb(139 32 32 / 0.08);
}

.lh-student-invoices__ribbon {
	background: #eef6ef;
	border-radius: 0 0 0 10px;
	color: #234029;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.45rem 0.9rem;
	position: absolute;
	right: 0;
	text-align: center;
	top: 0;
}

.lh-student-invoices__ribbon--issued {
	background: #fce8e8;
	color: #8b2020;
}

.lh-student-invoices__document-head {
	border-bottom: 1px solid #ece6de;
	display: grid;
	gap: 0.85rem 1.5rem;
	margin-bottom: 0.85rem;
	padding-bottom: 0.75rem;
}

.lh-student-invoices__document-label {
	color: #6b625c;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 0 0 0.2rem;
	text-transform: uppercase;
}

.lh-student-invoices__document-name {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 0;
}

.lh-student-invoices__document-subtitle {
	color: #6b625c;
	font-size: 0.88rem;
	margin: 0.15rem 0 0;
}

.lh-student-invoices__document-meta {
	text-align: left;
}

.lh-student-invoices__document-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
}

.lh-student-invoices__document-ref,
.lh-student-invoices__document-date {
	color: #6b625c;
	font-size: 0.88rem;
	margin: 0.15rem 0 0;
}

.lh-student-invoices__document-total {
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.1;
	margin: 0.55rem 0 0;
}

.lh-student-invoices__table-wrap {
	margin-bottom: 1rem;
	overflow-x: auto;
}

.lh-student-invoices__table {
	border-collapse: collapse;
	min-width: 100%;
	width: 100%;
}

.lh-student-invoices__table th,
.lh-student-invoices__table td {
	padding: 0.45rem 0.35rem;
	text-align: left;
	vertical-align: top;
}

.lh-student-invoices__table th {
	border-bottom: 2px solid #e8e2da;
	color: #6b625c;
	font-size: 0.76rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding-bottom: 0.4rem;
	padding-top: 0;
	text-transform: uppercase;
}

.lh-student-invoices__table td {
	border-bottom: 0;
}

.lh-student-invoices__table tbody tr + tr td {
	border-top: 1px solid #f3efe9;
}

.lh-student-invoices__table td:nth-child(3),
.lh-student-invoices__table th:nth-child(3),
.lh-student-invoices__table td:last-child,
.lh-student-invoices__table th:last-child {
	text-align: right;
	white-space: nowrap;
}

.lh-student-invoices__table td:nth-child(2),
.lh-student-invoices__table th:nth-child(2) {
	white-space: nowrap;
}

.lh-student-invoices__totals {
	border-top: 1px solid #ece6de;
	margin-top: 0.25rem;
	padding-top: 0.85rem;
}

.lh-student-invoices__totals dl {
	display: grid;
	gap: 0.35rem;
	justify-items: end;
	margin: 0;
}

.lh-student-invoices__totals div {
	align-items: baseline;
	display: grid;
	gap: 1rem;
	grid-template-columns: 7rem 6rem;
}

.lh-student-invoices__totals dt {
	color: #6b625c;
	font-size: 0.88rem;
	font-weight: 600;
	text-align: right;
}

.lh-student-invoices__totals dd {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0;
	text-align: right;
}

.lh-student-invoices__totals-due dt,
.lh-student-invoices__totals-due dd {
	font-size: 1rem;
	font-weight: 700;
}

.lh-student-invoices__paid-note {
	align-items: center;
	background: #eef6ef;
	border: 1px solid #b9d4be;
	border-radius: 8px;
	color: #234029;
	display: inline-flex;
	font-size: 0.92rem;
	font-weight: 600;
	gap: 0.45rem;
	line-height: 1.4;
	margin: 1rem 0 0;
	padding: 0.65rem 0.95rem;
	text-align: left;
	width: fit-content;
}

.lh-student-invoices__paid-note::before {
	align-items: center;
	background: #234029;
	border-radius: 999px;
	color: #fff;
	content: "✓";
	display: inline-flex;
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 700;
	height: 1.25rem;
	justify-content: center;
	line-height: 1;
	width: 1.25rem;
}

.lh-student-invoices__amount--credit {
	color: #2c6c42;
	font-weight: 600;
}

.lh-student-invoices__document--issued .lh-student-invoices__document-total,
.lh-student-invoices__document--issued .lh-student-invoices__totals-due dd {
	color: #8b2020;
}

.lh-student-invoices__payment {
	border-top: 1px solid #ece6de;
	margin-top: 1rem;
	padding-top: 1rem;
}

.lh-student-invoices__payment h4 {
	font-size: 1rem;
	margin: 0 0 0.35rem;
}

.lh-student-invoices__payment-lede {
	color: #6b625c;
	font-size: 0.9rem;
	margin: 0 0 0.85rem;
}

.lh-student-invoices__reference-inline {
	color: #6b625c;
	font-size: 0.86rem;
	margin: 0 0 0.75rem;
}

.lh-student-invoices__bank {
	background: #faf8f5;
	border: 1px solid #e8e2da;
	border-radius: 10px;
	padding: 0.75rem 0.85rem;
}

.lh-student-invoices__bank strong {
	display: block;
	margin-bottom: 0.45rem;
}

.lh-student-invoices__bank dl {
	display: grid;
	gap: 0.35rem;
	margin: 0;
}

.lh-student-invoices__bank div {
	display: grid;
	gap: 0.1rem;
	grid-template-columns: 7rem 1fr;
}

.lh-student-invoices__bank dt {
	color: #6b625c;
	font-size: 0.82rem;
	font-weight: 600;
}

.lh-student-invoices__bank dd {
	color: #222;
	font-size: 0.9rem;
	margin: 0;
}

.lh-student-invoices__bank-note {
	color: #6b625c;
	font-size: 0.85rem;
	margin: 0.55rem 0 0;
}

@media (min-width: 640px) {
	.lh-student-invoices__document-head {
		grid-template-columns: 1fr 1fr;
	}

	.lh-student-invoices__document-meta {
		text-align: right;
	}
}

@media (max-width: 639px) {
	.lh-student-invoices__row-link {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.lh-student-invoices__row-meta {
		justify-content: flex-start;
		padding-left: 0;
		width: 100%;
	}

	.lh-student-invoices__row-chevron {
		display: none;
	}

	.lh-student-invoices__totals div {
		grid-template-columns: 1fr 1fr;
		width: 100%;
	}
}
