:root {
	--harvest-color: var(--harvest-color);
}

.harvest {
	background-color: #ffe7d9;
	border: solid var(--harvest-color) 1px;
	border-radius: 8px;
	margin: 10px 0;
	padding: 10px;
}

.fa-harvest {
	background-image: url('/plugin_file.php?file=Harvest/images/harvest.svg');
	background-position: center;
	background-repeat: no-repeat;
	height: 14px;
	width: 14px;
}

ul.nav.nav-list .fa-harvest {
	width: auto;
}

#sidebar.menu-min .fa-harvest {
	height: 14px;
	width: 14px;
}

.harvest button {
	display: none;
	padding: 0 3px;
}

.harvest.can_track button {
	display: inline-block;
}

.harvest.can_track button.add {
	display: block;
	margin-bottom: 12px;
}

.harvest .formTextbox,
.harvest .harvest_task_id,
.harvest #harvest_task_id,
.harvest select,
select#harvest_project_id,
select#harvest_task_id {
	border: solid var(--harvest-color) 1px;
}

.harvest h2 {
	margin-top: 0;
}

.harvest-trackings-head {
	align-items: center;
	display: flex;
	gap: 10px;
	min-height: 31px;
	padding: 0;
}

.harvest-trackings-head h4 {
	margin: 0;
}

.harvest-trackings-head.is-collapsible {
	cursor: pointer;
}

.harvest-trackings-title {
	font-weight: bold;
}

.harvest-trackings-meta {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-left: auto;
	margin-right: -8px;
}

.harvest-sum {
	color: var(--harvest-color);
	font-weight: bold;
}

.harvest .hidden {
	display: none;
}

.harvest-body {
	padding: 2px 8px;
}

.harvest .trackings {
	font-size: 1.3em;
	list-style: none;
	margin: 0;
}

.harvest .trackings li:nth-child(even) {
	background: rgba(0, 0, 0, 0.03);
}

.harvest .trackings li {
	border-bottom: solid gray 1px;
	display: grid;
	grid-template-columns: auto 120px 60px 275px;
}

.harvest .track.loading button,
.harvest .trackings li.loading button {
	display: none;
}

.harvest .trackings li .name div {
	display: inline-block;
}

.harvest .trackings li .name div.project {
	font-weight: bold;
}

.harvest .trackings li .name div.client {
	margin-left: 5px;
}

.harvest .trackings li .name div.client::before {
	content: '('
}

.harvest .trackings li .name div.client::after {
	content: ')'
}

.harvest .trackings li .notes {
	color: gray;
	font-size: 1em;
}

.harvest .trackings li .stop {
	background-color: black;
	color: white;
}

.harvest .tracking .plus {
	cursor: pointer;
	display: inline;
	margin: 0 5px;
}

#report_bug_form .harvest-id .parent,
#update_bug_form .harvest-id .parent,
#report_bug_form .task-id .parent,
#update_bug_form .task-id .parent {
	display: inline;
}

#report_bug_form .harvest-id>*,
#update_bug_form .harvest-id>*,
#report_bug_form .task-id>*,
#update_bug_form .task-id>* {
	display: inline-block;
	vertical-align: top;
}

#report_bug_form .harvest-id>*:first-child,
#update_bug_form .harvest-id>*:first-child,
#report_bug_form .task-id>*:first-child,
#update_bug_form .task-id>*:first-child {
	width: 400px;
}

#report_bug_form .harvest-id>*:last-child,
#update_bug_form .harvest-id>*:last-child,
#report_bug_form .task-id>*:last-child,
#update_bug_form .task-id>*:last-child {
	margin-left: 10px;
}

#report_bug_form .harvest-id .desc,
#update_bug_form .harvest-id .desc,
#report_bug_form .task-id .desc,
#update_bug_form .task-id .desc {
	margin-left: 5px;
}

#report_bug_form .harvest-id .desc::before,
#update_bug_form .harvest-id .desc::before,
#report_bug_form .task-id .desc::before,
#update_bug_form .task-id .desc::before {
	content: '('
}

#report_bug_form .harvest-id .desc::after,
#update_bug_form .harvest-id .desc::after,
#report_bug_form .task-id .desc::after,
#update_bug_form .task-id .desc::after {
	content: ')'
}

#report_bug_form .harvest-id .img,
#update_bug_form .harvest-id .img,
#report_bug_form .task-id .img,
#update_bug_form .task-id .img {
	background-image: url('/plugin_file.php?file=Harvest/images/use.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 16px;
	cursor: pointer;
	display: inline-block;
	height: 16px !important;
	margin-left: 5px;
	margin-right: 5px;
	width: 16px;
}

#manage-proj-update-form .formTextbox,
#report_bug_form select,
#update_bug_form select,
#report_bug_form select,
#update_bug_form select,
.cat_tracking select {
	width: 400px !important;
}

#manage-proj-update-form input.formTextbox,
.harvest-id input.formTextbox,
.cat_tracking input.formTextbox {
	font-size: unset !important;
	height: 30px;
	margin-top: 0 !important;
	padding: 3px 5px !important;
	width: 400px !important;
}

/* One wrapper per searchable select (added by jquery-searchbox.js). inline-block
   keeps sibling selects (project + task) on the same row; position:relative makes
   it the anchor for the absolute .searchBoxElement dropdown, and it isolates each
   instance's parent.find() scope so the lists never cross-wire. */
.searchBoxContainer {
	display: inline-block;
	position: relative;
}

.searchBoxElement {
	max-height: 400px !important;
}

.searchBoxElement li:hover {
	background-color: var(--primary-color) !important;
	color: black;
}

.searchBoxElement li {
	border-bottom: solid lightgray 1px;
	overflow-wrap: anywhere;
	padding: 5px;
	white-space: normal;
}

.searchBoxElement li:nth-child(even) {
	background-color: #fcfcfc;
}

.searchBoxElement {
	background-color: white;
	border: 1px solid #aaa;
	line-height: 23px;
	list-style: none;
	margin: 0;
	max-height: 114px;
	/* The lib sets the dropdown's width INLINE to the <select>'s rendered width. A
	   select with very long option text (Harvest project names) makes that enormous,
	   which forced a page-wide horizontal scrollbar; max-width caps it (matching the
	   refineText inputs) and the wrapping on the li's keeps the text readable. */
	max-width: 500px;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 0;
	/* Pin the dropdown as an overlay directly under the input (anchored to
	   .searchBoxContainer, which is position:relative) instead of taking up flow and
	   pushing the rest of the form down / adding a scrollbar. !important + top/left so
	   no page CSS can drag it back into the flow. */
	position: absolute !important;
	top: 100%;
	left: 0;
	right: auto;
	scrollbar-width: none;
	z-index: 1000;
}

#categories td:last-child {
	display: grid;
	grid-template-columns: 170px auto;
	text-align: left !important;
}

#categories .cat_tracking {
	display: inline-block;
}

.cat_tracking .success {
	background-image: url('/plugin_file.php?file=Harvest/images/toggle_on.png');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 16px;
	display: inline-block;
	height: 16px !important;
	margin-left: 5px;
	width: 16px;
}

/* Tracked-hours badge in the iService time chip (Team Roadmap card + ticket
   view). The value is Harvest-sourced, so its look lives here: orange badge
   with the Harvest logo (whitened to read on orange). */
.iservice-tracked {
	background-color: var(--harvest-color);
	border-radius: 2px;
	color: #fff;
	padding: 0 4px;
}

.iservice-harvest-icon {
	background-image: url('/plugin_file.php?file=Harvest/images/harvest.svg');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	display: inline-block;
	filter: brightness(0) invert(1);
	height: 14px;
	vertical-align: -3px;
	width: 14px;
}

/* Tracked hours reached / passed the estimate — the badge goes red. */
.iservice-time-est.iservice-time-overrun .iservice-tracked {
	background-color: #c9302c;
}

/* Running tracker → hide the Harvest logo and show the classic pulsing dot in
   its place; the number ticks up normally (no pulse on the value itself). */
.iservice-time-est.iservice-time-running .iservice-harvest-icon {
	display: none;
}

.iservice-time-est.iservice-time-running .iservice-tracked::before {
	animation: harvest-pulse 1s ease-in-out infinite;
	background-color: #fff;
	border-radius: 50%;
	content: '';
	display: inline-block;
	height: 9px;
	margin-right: 5px;
	vertical-align: 0;
	width: 9px;
}

/* admin settings page */
#harvest-config-form input.refineText {
	max-width: 500px;
}

/* user settings page (account tab) */
#harvest-account-form input.refineText {
	max-width: 500px;
}

/* project edit page (Harvest project field) */
#manage-proj-update-form input.refineText {
	max-width: 500px;
}