/* Billing Tasks - manager roles and above only.
   Rows appear on the Billing Tasks page, in the stopViewer, and in the reportViewer. */

.billingTasksContainer label {
	display: flex;
	align-items: center;
}

/* task rows (mirrors .stopReportBtn styling; accent color comes inline from the task type) */

.billingTaskRow {
	display: flex;
	align-items: flex-start;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	padding: 10px 15px;
	margin-bottom: 7px;
	box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
	background: white;
	border-left: 5px solid rgb(150, 150, 150);
}

.billingTaskRow.completed {
	opacity: .75;
}

.billingTaskCheckbox {
	flex: none;
	font-size: 22px;
	padding: 2px 12px 2px 0;
	cursor: pointer;
}

.billingTaskRow.completed .billingTaskCheckbox {
	color: rgb(29, 174, 107);
}

.billingTaskInfo {
	flex-grow: 1;
	min-width: 0;
}

.billingTaskHeader {
	display: flex;
	align-items: center;
	border-bottom: 1px solid rgba(0, 0, 0, 0.2);
	padding-bottom: 5px;
	margin-bottom: 5px;
}

.billingTaskType {
	flex-grow: 1;
	font-weight: 600;
}

.billingTaskRow.completed .billingTaskType {
	text-decoration: line-through;
}

.deleteBillingTaskBtn {
	flex: none;
	cursor: pointer;
	opacity: .5;
	padding: 3px;
}

.deleteBillingTaskBtn:hover {
	opacity: 1;
	color: rgba(254, 75, 76, 1);
}

/* compact cards (work-order-list style): the whole card taps open the viewer */

.billingTaskRow.popOverBtn {
	cursor: pointer;
}

.billingTaskPhotoCount {
	margin-left: auto;
	font-size: 12px;
	opacity: .55;
	flex: none;
}

.billingTaskThumb {
	flex: none;
	width: 54px;
	height: 54px;
	border-radius: 8px;
	overflow: hidden;
	margin-left: 12px;
	align-self: center;
}

.billingTaskThumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* the billingTaskViewer popover */

.viewerTypeRow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 15px;
}

.viewerTypeRow .viewerTaskType {
	font-weight: 700;
	font-size: 18px;
}

.viewerStopID {
	margin-bottom: 0;
}

.billingTaskViewer .viewerStopName {
	margin-top: 0;
}

.viewerBtnRow {
	display: flex;
	gap: 10px;
	margin: 15px 0 20px;
}

.viewerBtnRow .btn {
	margin: 0;
	width: auto;
	flex: none;
}

.billingTaskViewer .viewerNotesInput {
	min-height: 80px;
}

/* Save + Check Off sit under the photo grid like the work order log buttons
   (.logActionButtons layout comes from reports.css) */

/* the WO button sits in the stop card's button stack - a real button, not a link */

.billingTaskViewer .stopButtons .viewerWOBtn {
	text-decoration: none;
	color: rgb(34, 136, 224); /* the app's link blue, matching other outline actions */
}

/* the nav bar ... opens the options notify (work-order-viewer pattern) */

.billingTaskViewer .viewerMoreBtn {
	cursor: pointer;
}

.billingTaskViewer .viewerHistory .billingTaskHistory {
	display: block;
}

.billingTaskStop,
.billingTaskReport {
	font-size: 14px;
	margin-top: 3px;
}

.billingTaskReport {
	margin-top: 10px;
}

.billingTaskWOLink {
	color: rgb(34, 136, 224);
	cursor: pointer;
	text-decoration: underline;
}

.billingTaskNotesLabel {
	margin-top: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
	opacity: .55;
}

.billingTaskNotes {
	margin-top: 3px;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 6px;
	padding: 8px 10px;
}

.billingTaskMeta {
	opacity: .65;
	margin-top: 5px;
	font-size: 13px;
}

/* permanent history trail */

.billingTaskHistoryToggle {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	opacity: .65;
	cursor: pointer;
}

.billingTaskHistoryToggle:hover {
	opacity: 1;
}

.billingTaskHistoryToggle i {
	font-size: 11px;
	margin-left: 3px;
	transition: transform .15s ease;
}

.billingTaskHistoryToggle.open i {
	transform: rotate(180deg);
}

.billingTaskHistory {
	margin-top: 5px;
	border-left: 2px solid rgba(0, 0, 0, 0.15);
	padding-left: 10px;
}

.billingTaskHistoryEntry {
	font-size: 13px;
	padding: 3px 0;
}

.billingTaskHistoryEntry .historyAction {
	font-weight: 600;
	margin-right: 6px;
}

.billingTaskHistoryEntry.completed .historyAction {
	color: rgb(29, 174, 107);
}

.billingTaskHistoryEntry.reopened .historyAction {
	color: rgb(242, 151, 0);
}

.billingTaskHistoryEntry.deleted .historyAction {
	color: rgba(254, 75, 76, 1);
}

.billingTaskHistoryEntry .historyMeta {
	opacity: .65;
}

/* create form (reportViewer only) */

.billingTaskForm {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 15px;
	background: rgba(0, 0, 0, 0.03);
}

.billingTaskForm textarea {
	min-height: 80px;
}

.billingTaskFormButtons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.billingTaskFormButtons .btn {
	margin-top: 0;
}

/* Billing Tasks page */

/* the top bar / search label spacing rules in reports.css are scoped to
   .reportsViewPage - these pages need the same breathing room below the nav */
.billingTasksPage .reportsPageTopBar,
.billingTaskTypesPage .reportsPageTopBar {
	display: flex;
	align-items: center;
	margin-top: 25px;
}

.billingTasksPage .reportTypesLink {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	color: inherit;
	text-decoration: none;
	font-weight: 500;
	opacity: .7;
	cursor: pointer;
}

.billingTasksPage .reportTypesLink i {
	margin-right: 8px;
}

.billingTasksPage .reportSearchLabel {
	margin-top: 25px;
}

.billingTasksPage .reportSearchHolder {
	margin-bottom: 0;
}

.billingTasksPage .completedBillingTasks .sectionTitle {
	opacity: .75;
}

/* dashboard summary card variant - teal accent (stacks under the other summary cards) */

.reportsSummaryBtn.billingTasksSummaryBtn {
	border-left-color: rgb(70, 195, 200);
	margin-top: -25px;
}

/* Billing Task Types manage page (rows reuse the .reportTypeRow styles) */

.billingTaskTypesPage {
	margin-bottom: 100px;
}

/* dark mode */

@media (prefers-color-scheme: dark) {

	.billingTaskRow {
		background: rgb(28, 28, 28);
		border-color: rgba(151, 151, 151, 0.15);
		box-shadow: none;
		color: white;
	}

	.billingTaskHeader {
		border-bottom-color: rgba(177, 177, 177, 0.2);
	}

	.billingTaskNotes {
		background: rgba(255, 255, 255, 0.05);
	}

	.billingTaskHistory {
		border-left-color: rgba(255, 255, 255, 0.2);
	}

	.billingTaskForm {
		background: rgba(255, 255, 255, 0.03);
		border-color: rgba(151, 151, 151, 0.15);
	}

}
