/* HSDC front-end styles. */

/* ---- Countdown timer ---- */
.hsdc-countdown__timer {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

.hsdc-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 64px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var( --hsdc-countdown-bg, #1f2d3d );
	color: var( --hsdc-countdown-fg, #fff );
}

.hsdc-countdown__num {
	font-size: 2em;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.hsdc-countdown__label {
	margin-top: 4px;
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.85;
}

/* ---- Discount price comparison ---- */
.hsdc-price--old {
	text-decoration: line-through;
	opacity: 0.7;
	margin-right: 0.35em;
}

.hsdc-price--new {
	font-weight: 700;
}

/* ---- Roster / directory tables ---- */
.hsdc-roster-wrap {
	overflow-x: auto;
}

.hsdc-roster-title {
	margin: 0 0 0.5em;
}

.hsdc-roster {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1em;
}

.hsdc-roster th,
.hsdc-roster td {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );
	vertical-align: top;
}

.hsdc-roster thead th {
	border-bottom-width: 2px;
	font-weight: 700;
}

.hsdc-roster tbody tr:nth-child(even) {
	background: rgba( 0, 0, 0, 0.03 );
}

.hsdc-roster-leader {
	margin: 0 0 0.35em;
	font-weight: 700;
}

/* Toolbar + search */
.hsdc-roster-toolbar {
	margin: 0 0 0.6em;
}

.hsdc-roster-search {
	width: 100%;
	max-width: 320px;
	padding: 7px 10px;
	border: 1px solid rgba( 0, 0, 0, 0.25 );
	border-radius: 4px;
	font-size: 1em;
}

/* Sortable headers */
.hsdc-roster th.hsdc-sortable {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.hsdc-roster th.hsdc-sortable::after {
	content: "\2195"; /* up-down arrow */
	margin-left: 6px;
	opacity: 0.35;
	font-size: 0.85em;
}

.hsdc-roster th.is-sorted-asc::after {
	content: "\2191";
	opacity: 0.9;
}

.hsdc-roster th.is-sorted-desc::after {
	content: "\2193";
	opacity: 0.9;
}

/* Per-column filter dropdowns */
.hsdc-roster-filters th {
	border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );
	padding: 4px 8px 8px;
}

.hsdc-roster-filters select {
	width: 100%;
	max-width: 100%;
	font-size: 0.9em;
	padding: 3px 4px;
}

.hsdc-roster-noresults td {
	text-align: center;
	font-style: italic;
	opacity: 0.8;
	padding: 14px;
}

.hsdc-roster-notice {
	font-style: italic;
	opacity: 0.85;
}

/* ---- Parent portal: applications list + detail ---- */
.hsdc-orders {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1em;
}

.hsdc-orders th,
.hsdc-orders td {
	padding: 10px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );
	text-align: left;
	vertical-align: middle;
}

.hsdc-orders thead th {
	border-bottom-width: 2px;
	font-weight: 700;
}

.hsdc-orders .hsdc-orders-actions {
	white-space: nowrap;
}

.hsdc-orders .button {
	display: inline-block;
	padding: 5px 10px;
	margin: 0 2px 2px 0;
}

.hsdc-app-fields {
	width: 100%;
	max-width: 640px;
	border-collapse: collapse;
	margin: 0 0 1.5em;
}

.hsdc-app-fields th,
.hsdc-app-fields td {
	padding: 7px 10px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	text-align: left;
	vertical-align: top;
}

.hsdc-app-fields th {
	width: 40%;
	font-weight: 600;
}

.hsdc-app-pay {
	margin-top: 1em;
}

.hsdc-orders-locked {
	font-style: italic;
	opacity: 0.6;
}

/* Responsive: stack order rows on small screens (label via data-label). */
@media ( max-width: 768px ) {
	.hsdc-orders thead {
		display: none;
	}
	.hsdc-orders,
	.hsdc-orders tbody,
	.hsdc-orders tr,
	.hsdc-orders td {
		display: block;
		width: 100%;
	}
	.hsdc-orders tr {
		margin-bottom: 15px;
	}
	.hsdc-orders td {
		text-align: right;
		padding-left: 50%;
		position: relative;
	}
	.hsdc-orders td::before {
		content: attr( data-label );
		position: absolute;
		left: 0;
		width: 50%;
		padding-left: 12px;
		font-weight: 700;
		text-align: left;
	}
}

/* ---- Front-end payment error banner ---- */
.hsdc-payment-error {
	background: #fcf0f1;
	border-left: 4px solid #b32d2e;
	padding: 12px 16px;
	margin: 0 0 16px;
	color: #8a1f1f;
}
