/*
 * The people of a house (issue #981): the users page, the profile page, the house settings, and
 * how a page looks to a person who may only look.
 */

.users-who { display: flex; align-items: center; gap: 10px; }

.users-avatar {
	width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
}
.users-avatar-lg { width: 88px; height: 88px; font-size: 32px; }
.users-initial { background: #20307A; color: #fff; font-weight: 600; }

.users-tag { display: inline-block; border-radius: 4px; padding: 0 7px; font-size: 12px; line-height: 20px; font-weight: 500; }
.users-tag-admin { background: #e6effc; color: #1e6fd9; }
.users-tag-user { background: #e5f5ec; color: #1f9d4c; }
.users-tag-external { background: #fdf3d8; color: #946500; }
.users-tag-locked { background: #fbe5e8; color: #c22c3c; }

.users-chip {
	display: inline-block; border: 1px solid #1e6fd9; color: #1e6fd9; background: #e6effc;
	border-radius: 999px; padding: 0 9px; margin: 1px 2px 1px 0; font-size: 12px; line-height: 20px;
}

.users-locked td { opacity: .6; }

.users-issued { border-left: 4px solid #c98a00; }
.users-password { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.users-password code { font-size: 1.25em; letter-spacing: .06em; padding: 4px 8px; }

/* pinned under the header and scrolling inside, as the trip dialog is (travel-plan.css) - the
   list of sections makes it taller than a phone */
.users-dialog {
	position: fixed !important;
	top: 84px !important;
	left: 50% !important;
	transform: translateX(-50%);
	max-width: 94vw;
	max-height: calc(100vh - 104px);
	/* above the mask, which travel-plan.css lifts over the header to 1190 */
	z-index: 1200 !important;
}
.users-dialog .ui-dialog-content {
	max-height: calc(100vh - 104px - 3rem);
	overflow-y: auto;
}
@media (max-width: 640px) {
	.users-dialog { top: 64px !important; max-height: calc(100vh - 80px); }
	.users-dialog .ui-dialog-content { max-height: calc(100vh - 80px - 3rem); }
}

.users-dialog-body { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; }
.users-dialog-photo { text-align: center; }
.users-dialog-footer { display: flex; justify-content: flex-end; margin-top: 8px; }
.users-switch { display: flex; gap: 10px; align-items: flex-start; }
.users-switch label { margin: 0; }
.users-sections td { padding: 3px 12px 3px 0; }

@media (max-width: 640px) {
	.users-dialog-body { grid-template-columns: 1fr; }
}

.house-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.house-tile {
	padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
	color: inherit; text-decoration: none; background: #fff; border-radius: var(--card-radius);
	box-shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 14px rgba(20, 30, 60, .06);
}
.house-tile strong { display: block; }
.house-tile .f12 { display: block; }
.house-tile:hover, .house-tile:focus-visible { text-decoration: none; box-shadow: 0 0 0 2px #1e6fd9; }
.house-tile-icon { font-size: 22px; }

/*
 * A person who may only look (issue #981): every switch and slider is drawn, greyed out and does
 * not react. BackendRequestActionSqsService refuses the command anyway - this is the courtesy of
 * not offering it. The class sits on <html>, set by commonHead.xhtml.
 */
html.read-only .ui-toggleswitch,
html.read-only .ui-selectonebutton,
html.read-only .ui-slider,
html.read-only .ui-spinner,
html.read-only .operate {
	pointer-events: none;
	opacity: .5;
	filter: grayscale(1);
}
