/*
	Shared widgets (Client/Components). Global and not in a .razor.css because most of them
	style Radzen child components, which scoped CSS does not reach.
*/

/* FashionImage, FashionImageMulti: size comes from the parameters (ImageSize), never wider than the screen */
.fm-image {
	max-width: 100%;
	object-fit: contain;
	cursor: pointer;
}

/* Number input with its unit (ModelEdit, NumericFeetInch) */
.input-number {
	width: 6.5rem;
}

.input-with-unit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-2);
}

/* GrinCheckBox: the box and its label never wrap apart */
.check-item {
	display: inline-flex;
	align-items: center;
}

.check-label {
	margin: 0 var(--space-3) 0 var(--space-1);
	vertical-align: middle;
	cursor: pointer;
}

/* Strong separator between blocks of a page */
.section-divider {
	height: 4px;
	border: 0;
	border-radius: var(--radius-pill);
	background-color: var(--area-border);
	opacity: 1;
}

/* Workflow of a fashion show (Flows, FlowItem): fits a 360px screen */
.flow {
	display: flex;
	align-items: stretch;
	gap: 2px;
	padding: var(--space-3) 0;
}

.flow-step {
	flex: 1 1 0;
	min-width: 0;
	max-width: 9rem;
	padding: var(--space-2);
	font-size: var(--font-size-sm);
}

.flow-step-label {
	display: block;
	font-size: var(--font-size-xs);
	line-height: 1.4;
}

.flow-more {
	flex: none;
	border-radius: 0;
}

.flow-menu {
	font-size: var(--font-size-sm);
}

/* A line of a list inside a card: title, details, actions wrapping under on mobile */
.list-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1) var(--space-2);
}

	.list-line + .list-line {
		margin-top: var(--space-2);
		padding-top: var(--space-2);
		border-top: var(--border);
	}

.list-line-actions {
	margin-left: auto;
}

/* FashionImageMulti: wraps on desktop, 3 equal columns on a phone */
.fm-gallery {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

@media (max-width: 767.98px) {
	.fm-gallery {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: var(--space-1);
	}

		.fm-gallery .fm-image {
			width: 100%;
			max-width: 100% !important; /* overrides the desktop size from ImageSize */
			height: auto;
			margin: 0 !important;
		}
}

/* Text typed by users with line breaks (grids, messages) */
.text-pre-wrap {
	white-space: pre-wrap;
}

/* Multiple choice list with a fixed height (BrandEditor styles), without Radzen's unlabeled "select all" row */
.listbox-tall {
	width: 100%;
	height: 200px;
}

	.listbox-tall .rz-listbox-header {
		display: none;
	}

/* RadzenSelectBar with many items (letters): wraps instead of overflowing */
.selectbar-wrap {
	flex-wrap: wrap;
}

.clickable {
	cursor: pointer;
}

/* Small number input in a grid cell (order, quantity) */
.input-number-sm {
	width: 4.5rem;
}

/* Model assignation grid (EventModels): blue by brand preference, green when complete, red when too many */
.assign-grid {
	border-collapse: collapse;
}

.assign-cell {
	border-width: 0;
}

.assign-favorite {
	outline: 2px solid var(--success);
	outline-offset: -2px;
}

.assign-rank-1 { background-color: var(--event-600); }
.assign-rank-2 { background-color: var(--event-500); }
.assign-rank-3 { background-color: var(--event-400); }
.assign-rank-4 { background-color: var(--event-300); }
.assign-rank-5 { background-color: var(--event-200); }
.assign-rank-6 { background-color: var(--event-100); }
.assign-rank-7, .assign-rank-8 { background-color: var(--event-50); }
.assign-rank-none { background-color: var(--gray-0); }

.assign-done {
	background-color: var(--success-soft);
}

.assign-over {
	background-color: var(--danger-soft);
}

/* Icon: small status square (check, cross) */
.status-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: var(--space-1);
	padding: var(--space-1);
}

/* DlgImage: the picture fits the dialog */
.dlg-image {
	max-width: 100%;
	max-height: 100%;
}
