/* Shared section styles (tables/headers).
   Consolidates legacy RadioTableSection.css and shared section header action styling. */

.radioTableSectionContainer {
	background: var(--color-background-3);
	padding: 15px;
}

.radioTableSection {
	border-spacing: 4px;
	border-collapse: separate;
	width: 100%;
}

.radioTableSection td {
	padding: 15px;
	border-radius: 3px;
	min-width: 30px;
	font-size: 1.1em;
	line-height: 140%;
	color: var(--text-color);
}

.radioTableSection tr:nth-child(even) td {
	background: var(--color-background-4);
}

.radioTableSection tr:nth-child(odd) td {
	background: var(--color-background-3);
}

.radioTableSection th {
	font-weight: normal;
	background: var(--color-background-3);
	color: var(--text-color);
}

.radioTableSectionTitle {
	color: var(--text-color);
	font-size: 1.3em;
	padding-top: 20px;
	font-weight: bold;
}

.radioTableSectionTitle:first-child {
	padding-top: 0 !important;
}

.radioTableSectionRadio {
	height: 1rem;
	width: 1rem;
	margin-right: 0.375rem;
	accent-color: var(--color-primary-3);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	border: 0.15rem solid var(--color-background-light);
	background-color: var(--color-background-light);
	border-radius: 50%;
	outline: 1px solid var(--color-neutral-2);
	border-width: 0.15rem;
	box-shadow: var(--box-shadow);
}

.radioTableSectionRadio:hover {
	outline-color: var(--color-primary-4);
	box-shadow: var(--box-shadow-fade1);
}

.radioTableSectionRadio:checked {
	background-color: var(--color-primary-4);
	outline-color: var(--color-primary-4);
	box-shadow: var(--box-shadow-fade1);
}

/* TableSection header actions (e.g., embedded table Add button) */
.boxLabel.sectionHeader {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* TableSection layout: allow embedded DataTables to fill the section height */
.boxForm.tableSection {
	display: flex;
	flex-direction: column;
	padding-bottom: 0;
}

.boxForm.tableSection .tableSectionBody {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.boxForm.tableSection .dataTables_wrapper,
.boxForm.tableSection .dt-container {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.boxForm.tableSection .dataTables_length,
.boxForm.tableSection .dataTables_filter,
.boxForm.tableSection .dataTables_info,
.boxForm.tableSection .dataTables_paginate,
.boxForm.tableSection .dt-length,
.boxForm.tableSection .dt-search,
.boxForm.tableSection .dt-info,
.boxForm.tableSection .dt-paging {
	flex: 0 0 auto;
	margin-bottom: 0;
}

.boxForm.tableSection .dataTables_scroll,
.boxForm.tableSection .dt-scroll {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.boxForm.tableSection .dataTables_scrollBody,
.boxForm.tableSection .dt-scroll-body {
	flex: 1 1 auto;
	min-height: 0;
	background: var(--color-background-4);
}

.boxLabel.sectionHeader .sectionHeaderActions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.boxLabel.sectionHeader .sectionHeaderButton {
	display: inline-block;
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 3px;
	color: var(--text-color-light);
	font-size: 0.85em;
	line-height: 1.2;
}

.boxLabel.sectionHeader .sectionHeaderButton i {
	margin-right: 5px;
}

.boxLabel.sectionHeader .sectionHeaderButton:hover,
.boxLabel.sectionHeader .sectionHeaderButton:focus {
	background: var(--color-primary-4);
}

/* Sub-label displayed under boxLabel for additional context */
.boxSubLabel {
	padding:15px 20px 0 20px;
	font-size: 1.2em;
}

/* Read-only view value container used by Control::renderView() */
.boxView {
	padding:10px 10px 0;
}

.boxView h1:first-child,
.boxView h2:first-child,
.boxView p:first-child,
.boxView ul:first-child,
.boxView ol:first-child {
	padding-top:15px;
}
.boxView .boxLabel {
	margin-bottom:15px;
}
.boxView h1 {
	font-size: 2.5em;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	line-height: 110%;
	margin: 0 0 .5em;
}
.boxView h2 {
	font-size: 1.5em;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	line-height: 110%;
	margin: 1em 0 .5em;
}
.boxView p {
	margin-bottom:1em;
	line-height: 150%;
	color:var(--text-color);
}
.boxView p:last-child {
	margin-bottom:0 !important;
}
.boxView ul, 
.boxView ol {
	margin-top: .25em;
	margin-left: 1em;
	padding-left:2px;
}
.boxView li {
	margin-bottom: .5em;
	line-height: 150%;
}
.boxView a {
	color:var(--color-primary-3);
	text-decoration: none;
}
.boxView a:hover {
	color:var(--color-primary-2);
}
.boxViewLabel {
	color:var(--text-color-faded);
}
/* Form message container and message styles */
.formMessageCont {
	display: flex;
 	flex-direction: column;
 	gap: 8px;
 	margin: 12px 0;
}

/* Default form message uses the neutral palette */
.formMessage {
 	background: var(--color-neutral-3);
 	color: var(--color-on-neutral);
 	padding: 10px 12px;
 	border-radius: var(--border-radius-small);
 	box-shadow: var(--box-shadow-fade1);
}

/* Specific message types */
.formMessageError {
 	background: var(--color-error-3);
 	color: var(--color-on-error);
 	padding: 10px 12px;
 	border-radius: var(--border-radius-small);
 	box-shadow: var(--box-shadow-fade1);
}

.formMessageCaution {
 	background: var(--color-caution-3);
 	color: var(--color-on-caution);
 	padding: 10px 12px;
 	border-radius: var(--border-radius-small);
 	box-shadow: var(--box-shadow-fade1);
}

.formMessageSuccess {
 	background: var(--color-success-3);
 	color: var(--color-on-success);
 	padding: 10px 12px;
 	border-radius: var(--border-radius-small);
 	box-shadow: var(--box-shadow-fade1);
}

/* Icon spacing inside form messages */
.formMessageCont .formMessageSuccess i,
.formMessageCont .formMessageError i,
.formMessageCont .formMessageCaution i,
.formMessageCont .formMessage i {
 	margin-right: 8px;
 	vertical-align: middle;
}

.matrixInvoice {
	max-width: 1000px;
	margin: 15px auto 10px;
	padding: 12px;
	background: var(--color-background-1);
	box-shadow: var(--box-shadow);
}

.matrixInvoice .invoiceHeader {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1em;
}

.matrixInvoice .invoiceHeading {
	font-size: 2em;
	font-weight: 700;
	text-transform: uppercase;
}

.matrixInvoice .invoiceMeta {
	text-align: right;
	font-size: 0.9em;
	line-height: 1.6;
}

.matrixInvoice .invoiceMetaTable {
	border-collapse: collapse;
	min-width: 160px;
	margin-left: auto;
}

.matrixInvoice .invoiceMetaTable td {
	border: none;
	padding: 0 6px;
}

.matrixInvoice .invoiceMetaTable .metaLabel {
	text-align: left;
	padding-right: 10px;
	color: var(--text-color-faded);
}

.matrixInvoice .invoiceMetaTable .metaValue {
	text-align: right;
}

.matrixInvoice .invoiceAddressBox {
	display: flex;
	gap: 24px;
	margin: 1em 0 6em;
	line-height:150%;
}

.matrixInvoice .invoiceAddress {
	flex: 1 1 50%;
}

.matrixInvoice .invoiceAddress .invoiceTitle {
	font-weight: 700;
	margin-bottom: 6px;
	color: var(--text-color-faded);
}

.matrixInvoice .invoiceTable {
	margin-top: 8px;
}

.matrixInvoice .invoice-table {
	width: 100%;
	border-collapse: collapse;
}

.matrixInvoice .invoice-table thead th {
	text-align: left;
	padding: 8px 6px;
	border-bottom: 2px solid var(--text-color-faded);
	font-weight: 600;
}

.matrixInvoice .invoice-table tbody td {
	padding: 8px 6px;
	border-bottom: none;
	vertical-align: top;
}

.matrixInvoice .invoice-table tfoot td {
	padding-top: 12px;
	border-top: 2px solid var(--text-color-faded);
}

.matrixInvoice .invoice-table .fee {
	text-align: right;
}

.matrixInvoice .bottomSpacer {
	height: 18px;
}

.checkoutPrimary {
	display: block;
	background: var(--color-secondary-3);
	border-radius: var(--border-radius);
	box-shadow: var(--box-shdow);
	text-decoration: none;
	padding: 8px 15px 4px;
	margin: 20px auto 10px;
	width:260px;
}
.checkoutPrimary div {
	float:left;
	line-height:30px;
	height:30px;
	color: var(--color-on-secondary);
	font-weight: 600;
	font-size: 1.6em;
	margin-right:20px;
}
.checkoutPrimary i {
	color: var(--color-on-secondary-faded);
}
.checkoutPrimary:hover {
	background: var(--color-secondary-4);
}

.paidBadge {
	font-size: 1.6em;
	color: var(--color-success-3);
	text-align:center;
	margin:20px 0 10px;
}


/* Print styles */
@media print {

	/* Hide site chrome */
	.siteHeader,
	.siteFooter,
	.modNav,
	.checkoutPrimary {
		display: none !important;
	}

	.matrixInvoice {
		width: 100%;
	}

	.matrixInvoice .content {
		padding: 0;
	}

	.matrixInvoice .invoice-table thead th {
		border-bottom: 3px solid var(--color-background-5);
	}

	.matrixInvoice .invoice-table tbody td {
		border-bottom: none;
	}

	a[href]:after {
		content: "";
	}

	/* Ensure page breaks between invoices if multiple */
	.matrixInvoice {
		page-break-inside: avoid;
	}

	.invoiceDate {
		font-size: 0.7em;
	}
	.matrixInvoice {
		margin: 0 auto;
		box-shadow: none;
	}
	.matrixInvoice .invoiceAddressBox {
		margin-top:4em;
	}
	.matrixInvoice .invoice-table tfoot {
		display: table-row-group !important;
	}
}

/* Remove the border above specific footer rows (e.g., Amount Paid / Amount Due) */
.matrixInvoice .invoice-table tfoot tr.no-border-top td {
	border-top: none !important;
	padding-top: 0 !important;
}