/* Client portal - staff side (client-portal.js): the stop viewer's Client Portal section and
   the Client Portal page. Cards follow the stops map / route picker look. */

/* stop viewer top row: Client Portal button (portal staff) across from Share */
.stopViewerTopActions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.stopViewerTopActions .shareStopBtn {
	margin-left: auto;
}

.stopClientPortalBtn i {
	margin-right: 4px;
}

.stopClientPortalCount:not(:empty) {
	display: inline-block;
	min-width: 18px;
	margin-left: 6px;
	padding: 0 5px;
	border-radius: 100px;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	color: #fff;
	background: rgb(34, 136, 224);
}

.stopClientPortalCount.alert {
	background: rgb(245, 140, 30); /* open client requests on this stop */
}

/* the stopClientPortal popover */
.cpPopoverTitle {
	margin-bottom: 2px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .55;
}

.stopClientPortal .cpStopName {
	margin-bottom: 16px;
}

.stopClientPortal .stopClientPreviewBtn {
	display: block;
	cursor: pointer;
	margin-bottom: 24px;
	text-align: center;
}

.stopClientPortal .stopClientPreviewBtn i {
	margin-right: 6px;
}

.stopClientPortalNote,
.cpEmpty {
	padding: 10px 0;
	font-size: 14px;
	opacity: .65;
	font-style: italic;
}

.cpRow {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cpRowMain {
	flex: 1;
	min-width: 200px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}

.cpRowMain .cpMuted {
	flex-basis: 100%;
}

.cpMuted {
	font-size: 13px;
	opacity: .65;
}

.cpPill {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 600;
	color: rgb(34, 136, 224);
	background: rgba(34, 136, 224, 0.12);
}

.cpPill.active,
.cpPill.resolved,
.cpPill.closed {
	color: rgb(29, 140, 90);
	background: rgba(29, 140, 90, 0.12);
}

.cpPill.disabled {
	color: rgb(198, 46, 46);
	background: rgba(198, 46, 46, 0.1);
}

.cpPill.unverified,
.cpPill.pending,
.cpPill.new {
	color: rgb(205, 110, 10);
	background: rgba(245, 140, 30, 0.14);
}

.cpInvite {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 12px 0 6px;
}

.cpInvite input {
	flex: 1;
	margin: 0 !important;
}

.cpInvite .btn {
	flex: none;
	width: auto;
	margin: 0;
	padding-left: 18px;
	padding-right: 18px;
}

.cpNoteLabel {
	margin-top: 14px;
}

.cpNote {
	min-height: 70px;
}

.cpOpenRequests {
	display: block;
	margin-top: 10px;
	font-weight: 600;
}

/* Client Portal page */

.cpLocked {
	margin-bottom: 14px;
	padding: 12px 14px;
	border-radius: 5px;
	font-size: 14px;
	color: rgb(160, 90, 10);
	background: rgba(245, 140, 30, 0.12);
}

.cpIntro {
	margin-bottom: 18px;
	font-size: 14px;
	opacity: .8;
}

.cpTabs {
	display: flex;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cpTab {
	padding: 10px 14px;
	font-weight: 600;
	cursor: pointer;
	opacity: .6;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.cpTab.active {
	opacity: 1;
	color: rgb(34, 136, 224);
	border-bottom-color: rgb(34, 136, 224);
}

.cpCount:not(:empty) {
	display: inline-block;
	min-width: 20px;
	padding: 0 6px;
	margin-left: 4px;
	border-radius: 100px;
	font-size: 12px;
	text-align: center;
	color: #fff;
	background: rgb(34, 136, 224);
}

.cpPanelHead {
	margin-bottom: 14px;
	max-width: 260px;
}

.cpCard {
	margin-bottom: 16px;
	padding: 15px;
	background: white;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	box-shadow: 0px 0px 20px rgba(0, 0, 0, .06);
}

.cpCard.cpRow {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cpCardTop {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin-bottom: 4px;
	font-size: 16px;
}

.cpRight {
	margin-left: auto;
}

.cpMessage {
	margin: 10px 0;
	white-space: pre-wrap;
}

.cpRequestEdit {
	display: grid;
	grid-template-columns: 200px 1fr auto;
	gap: 10px;
	align-items: start;
	margin-top: 12px;
}

.cpRequestEdit textarea {
	min-height: 44px;
	margin: 0 !important;
}

.cpRequestEdit .btn {
	margin: 0;
	width: auto;
}

@media (max-width: 700px) {
	.cpRequestEdit {
		grid-template-columns: 1fr;
	}
}

.cpStopLink {
	color: rgb(34, 136, 224);
	cursor: pointer;
}

.cpStops {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0;
}

.cpStopChip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border-radius: 100px;
	font-size: 13px;
	background: rgba(34, 136, 224, 0.08);
}

.cpStopChip i {
	cursor: pointer;
	opacity: .5;
}

.cpConnect {
	position: relative;
	max-width: 420px;
	margin-bottom: 8px;
}

.cpConnect input {
	margin: 0 !important;
}

.cpStopResult {
	padding: 8px 10px;
	cursor: pointer;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cpStopResult:hover {
	background: rgba(34, 136, 224, 0.07);
}

@media (prefers-color-scheme: dark) {
	.cpRow {
		border-bottom-color: rgba(134, 134, 134, 0.2);
	}

	.cpCard {
		background: rgb(24, 25, 29);
		border: 1px solid rgba(134, 134, 134, 0.2);
		box-shadow: 0px 0px 20px rgba(0, 0, 0, .4);
		color: #fff;
	}

	.cpTabs {
		border-bottom-color: rgba(134, 134, 134, 0.2);
	}

	.cpStopResult {
		border-bottom-color: rgba(134, 134, 134, 0.2);
	}
}

/* Client Portal > Preview client view popover: the client page fills it, edge to edge */
.stopClientPreview .cpPreviewScroll {
	padding: 0;
	overflow: hidden;
}

.cpPreviewFrame {
	display: block;
	width: 100%;
	height: calc(100vh - 70px);
	height: calc(100dvh - 70px);
	border: 0;
	background: #f3f5f8;
}

/* Client Portal popover: the address shown to clients */
.cpSectionTitle {
	margin: 0 0 6px;
}

.cpAddressSection {
	margin-bottom: 28px;
}

.cpAddressActions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-top: 10px;
}

.cpAddressActions .btn {
	width: auto;
	margin: 0;
	padding-left: 20px;
	padding-right: 20px;
}

/* Client Portal popover: share link */
.cpShareSection {
	margin-bottom: 28px;
}

.cpShareRow {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 6px;
}

.cpShareRow input {
	flex: 1;
	margin: 0 !important;
	font-size: 13px;
}

.cpShareRow .btn,
.cpShareSection .cpCreateShareBtn.btn {
	flex: none;
	width: auto;
	margin: 0;
	padding-left: 18px;
	padding-right: 18px;
}

.cpShareSection .cpCreateShareBtn i {
	margin-right: 6px;
}
