/**
 * Software Is Good - Course Registration, the desk on the front end.
 *
 * The shared interface kit does the work; this file only adapts it to living
 * inside a theme's page instead of inside wp-admin, and adds the few pieces the
 * desk has that no other screen of ours has.
 */

.sigcr-desk.sig-ui-app {
	min-height: 0;
	margin: 0;
	border: 1px solid var(--sig-ui-line);
	border-radius: var(--sig-ui-radius);
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	text-align: left;
}

/* There is no admin bar out here, so the kit's offset for it has to go. */
.sigcr-desk .sig-ui-topbar {
	position: static;
	top: auto;
}

body.admin-bar .sigcr-desk .sig-ui-topbar {
	top: auto;
}

.sigcr-desk .sig-ui-page {
	padding: 24px;
}

/* Themes love to style headings and links inside page content. */
.sigcr-desk h1,
.sigcr-desk h2,
.sigcr-desk h3 {
	font-family: inherit;
	text-transform: none;
	letter-spacing: -0.01em;
}

.sigcr-desk a {
	box-shadow: none;
}

.sigcr-desk .sig-ui-table a {
	color: var(--sig-ui-accent-ink);
}

/* --- sign in --- */
.sigcr-desk--login {
	background: var(--sig-ui-bg);
}

.sigcr-desk__narrow {
	max-width: 460px;
	padding: 32px 24px;
}

.sigcr-desk__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.sigcr-desk__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: var(--sig-ui-radius-sm);
	background: var(--sig-ui-accent);
	color: #fff;
}

.sigcr-desk__name {
	font-size: 16px;
	font-weight: 600;
}

/* --- who is signed in --- */
.sigcr-desk__who {
	color: var(--sig-ui-muted);
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

/* --- list --- */
.sigcr-desk__filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.sigcr-desk__sub {
	margin-top: 2px;
	color: var(--sig-ui-muted);
	font-size: 12px;
}

.sigcr-desk__ref {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* --- detail --- */
.sigcr-desk__back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 6px;
	color: var(--sig-ui-muted);
	text-decoration: none;
	font-size: 13px;
}

.sigcr-desk__back:hover {
	color: var(--sig-ui-ink);
}

.sigcr-desk__signature {
	margin: 16px 0 0;
	padding: 12px;
	border: 1px solid var(--sig-ui-line);
	border-radius: var(--sig-ui-radius-sm);
	background: var(--sig-ui-surface);
	max-width: 380px;
}

.sigcr-desk__signature img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 120px;
	object-fit: contain;
}

.sigcr-desk__signature figcaption {
	margin-top: 8px;
	color: var(--sig-ui-muted);
	font-size: 12px;
}

/* --- validation, same shape as the public form --- */
.sigcr-desk .sig-ui-field.is-invalid .sig-ui-input,
.sigcr-desk .sig-ui-field.is-invalid .sig-ui-select {
	border-color: #e19aa4;
}

.sigcr-desk .sig-ui-field.is-invalid .sig-ui-help--alert {
	margin-top: 6px;
}

/* --- danger zone --- */
.sigcr-desk__danger summary {
	display: inline-flex;
	list-style: none;
	cursor: pointer;
}

.sigcr-desk__danger summary::-webkit-details-marker {
	display: none;
}

.sigcr-desk__confirm {
	margin: 16px 0 12px;
	font-weight: 600;
}

@media ( max-width: 782px ) {
	.sigcr-desk .sig-ui-page {
		padding: 16px;
	}

	.sigcr-desk__filters .sig-ui-input,
	.sigcr-desk__filters .sig-ui-select {
		flex: 1 1 140px;
	}
}
