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

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

.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 .hidden {
	display: none;
}

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

.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;
}

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

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

.searchBoxElement li {
	border-bottom: solid lightgray 1px;
	padding: 5px;
}

.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;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 0;
	position: absolute;
	scrollbar-width: none;
	z-index: 1;
}

#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;
}

/* Aside charts: Chart.js is responsive, so the box must bound the height. */
.harvest-stats-box .harvest-stats-chart {
	height: 220px;
	position: relative;
}

.harvest-statistics .wrapper {
	background: #fff;
	border-radius: 4px;
	display: block;
	overflow: hidden;
	padding: auto;
	width: 100%;
}

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

#sidebar.menu-min .fa-harvest {
	height: 18px !important;
	width: 18px !important;
}


/* Team Roadmap: orange Harvest track icon on a card (SVG used as a mask). */
/* Team Roadmap card: Harvest play/stop control (replaces the old icon).
   Idle → play glyph; running → the familiar pulsing dot + live time (click stops). */
.harvest-track-ctl {
	align-items: center;
	color: var(--harvest-color);
	cursor: pointer;
	display: inline-flex;
	font-weight: bold;
	gap: 4px;
	vertical-align: middle;
}

.harvest-track-ctl:hover {
	color: #c94a00;
}

.harvest-track-ctl.loading {
	cursor: wait;
	opacity: 0.4;
	pointer-events: none;
}

.harvest-ctl-icon {
	display: inline-block;
	line-height: 1;
}

.harvest-ctl-icon::before {
	content: '\25B6';
	/* ▶ play */
	font-size: 11px;
}

/* Running: the icon becomes a static stop glyph — the pulse now lives on the
   tracked-value in the iService time chip (see custom.css). */
.harvest-track-ctl.harvest-tracking {
	color: #d24e00;
}

.harvest-track-ctl.harvest-tracking .harvest-ctl-icon::before {
	content: '\23F9';
	/* ⏹ stop */
}

.harvest-tracking-dot {
	animation: harvest-pulse 1s ease-in-out infinite;
	background-color: var(--harvest-color);
	border-radius: 50%;
	display: inline-block;
	height: 9px;
	width: 9px;
}

.harvest-tracking-time {
	font-size: 0.95em;
	line-height: 1;
}

@keyframes harvest-pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}

	50% {
		opacity: 0.25;
		transform: scale(0.6);
	}
}

/* Read-only roadmap (iService marks a past week by dropping .interactive): no
   tracking there — neither on the cards nor via the meeting shortcuts. */
.iservice-roadmap-page:not(.interactive) .harvest-track-ctl,
.iservice-roadmap-page:not(.interactive) .harvest-meetings {
	display: none;
}

/* Roadmap card with an active tracking → orange. Same tint whether it is the
   current user (harvest-card-tracking, with live counter) or a colleague
   (harvest-card-other-tracking, just the tint — no counter). */
.iservice-card.harvest-card-tracking,
.iservice-card.harvest-card-other-tracking {
	background-color: #ffe2c2;
	border-left-color: var(--harvest-color);
}

/* 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;
}

/* --- Team Roadmap CARDS only: keep the chip subtle. The tracked badge is grey
   (like the estimate) with a BLACK Harvest logo; the orange highlight appears
   only while a timer is actually running. Lists, the issue-list column and the
   ticket view keep the orange badge as before. --- */
.iservice-card .iservice-tracked {
	background-color: #e7e7e7;
	color: #333;
}

.iservice-card .iservice-harvest-icon {
	filter: brightness(0);
	/* black logo on the grey badge */
}

/* Over the estimate stays subtle on the card too (grey, not red) unless running. */
.iservice-card .iservice-time-est.iservice-time-overrun .iservice-tracked {
	background-color: #e7e7e7;
}

/* Active tracking → the orange highlight (running dot already pulses white). */
.iservice-card .iservice-time-est.iservice-time-running .iservice-tracked {
	background-color: var(--harvest-color);
	color: #fff;
}

/* Team Roadmap own column: team-project quick-track (meeting) buttons. */
.harvest-teamprojects {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

/* Caret in the self-column head that shows/hides the whole meetings block. */
.iservice-col-self .iservice-col-head {
	position: relative;
}

.harvest-meetings-toggle {
	color: #666;
	cursor: pointer;
	padding: 2px 6px;
	position: absolute;
	right: 6px;
	top: 6px;
}

.harvest-meetings-toggle:hover {
	color: #222;
}

.harvest-tp-btn {
	align-items: center;
	background-color: var(--harvest-color);
	border: 1px solid #bdbdbd;
	border-radius: 3px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 12px;
	font-weight: bold;
	gap: 5px;
	padding: 5px 9px;
}

.harvest-tp-btn:hover,
.harvest-tp-btn.running {
	background-color: var(--harvest-color);
}

/* Running meeting timer shown inside the button (white pulsing dot + live time). */
.harvest-tp-timer {
	align-items: center;
	display: inline-flex;
	gap: 4px;
}

.harvest-tp-btn .harvest-tracking-dot {
	background-color: #fff;
}

/* Team Roadmap aside: weekly Harvest trackings — orange theme. */

/* Header orange (override the grey widget-color-blue2 header). */
/* Harvest aside boxes: dark orange header, very light orange body — so they
   read as one family next to the calendar boxes. */
/* Every Harvest aside box additionally carries .harvest-aside-box — that alone
   gives it the Harvest look. A new box just adds the class; no CSS change here. */
.harvest-aside-box.widget-color-blue2>.widget-header {
	background-color: var(--harvest-color) !important;
}

.harvest-aside-box>.widget-body {
	background-color: #fff5ef;
}

/* Module background: even lighter orange. */
#harvest-week {
	background-color: #fff5ef;
	font-size: 12px;
}

.harvest-week-total {
	background-color: #ffe7d9;
	color: #7a3d1a;
	display: flex;
	font-weight: bold;
	justify-content: space-between;
	padding: 5px 8px;
}

/* Task-colour legend above the week list. */
.harvest-week-legend {
	background-color: #fff5ef;
	border-bottom: 1px solid #ffe0cf;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 5px 8px;
}

.harvest-week-legend-chip {
	border: 1px solid #bdbdbd;
	border-radius: 2px;
	font-size: 11px;
	line-height: 1.3;
	padding: 1px 6px;
	white-space: nowrap;
}

.harvest-week-day {
	border-top: 1px solid #ffd9c2;
}

/* Weekday rows: lighter orange. */
.harvest-week-day-head {
	background-color: #ffe7d9;
	color: #7a3d1a;
	display: flex;
	font-weight: bold;
	justify-content: space-between;
	padding: 3px 8px;
}

/* Foldable days (past + today) — future days stay static. */
.harvest-week-day.is-toggleable>.harvest-week-day-head {
	cursor: pointer;
	user-select: none;
}

.harvest-week-day.is-toggleable>.harvest-week-day-head:hover {
	background-color: #ffdcc8;
}

.harvest-week-caret {
	font-size: 0.85em;
	margin-right: 4px;
}

.harvest-week-day:not(.is-open)>.harvest-week-day-body {
	display: none;
}

.harvest-week-empty {
	color: #aaa;
	padding: 2px 8px;
}

.harvest-week-entry {
	align-items: flex-start;
	border-bottom: 1px solid #ffe0cc;
	/* Transparent placeholder — entries with a task colour get their bar via
	   an inline border-left; keeps the row indent consistent either way. */
	border-left: 6px solid transparent;
	cursor: pointer;
	display: flex;
	gap: 6px;
	justify-content: space-between;
	padding: 4px 8px;
}

.harvest-week-entry:hover {
	background-color: #ffeede;
}

.harvest-week-entry.loading {
	opacity: 0.4;
}

.harvest-week-entry .hw-track:disabled {
	cursor: not-allowed;
	opacity: 0.4;
}

/* Placeholder that keeps the column width identical when the play button is hidden. */
.harvest-week-entry .hw-track-placeholder {
	display: inline-block;
	flex: 0 0 auto;
	width: 18px;
}

/* Per-entry play/stop button: play resumes/continues this entry, stop stops it. */
.harvest-week-entry .hw-track {
	background: none;
	border: none;
	color: var(--harvest-color);
	cursor: pointer;
	flex: 0 0 auto;
	font-size: 11px;
	line-height: 1.4;
	padding: 0 2px;
}

.harvest-week-entry .hw-track::before {
	content: '\25B6';
	/* ▶ play */
}

.harvest-week-entry.running .hw-track {
	color: #d24e00;
}

.harvest-week-entry.running .hw-track::before {
	/* ⏹ stop */
	animation: harvest-pulse 1s ease-in-out infinite;
	content: '\23F9';
	display: inline-block;
}

.harvest-week-entry .hw-main {
	flex: 1 1 auto;
	min-width: 0;
}

.harvest-week-entry .hw-ticket {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Project · Task on one line: project gets the flexible space and ellipses
   when long; the task name is kept whole and pushed to the right of the dot. */
.harvest-week-entry .hw-label {
	align-items: baseline;
	display: flex;
	gap: 4px;
	min-width: 0;
	overflow: hidden;
}

/* Client first, in bold, followed by an en dash. Shrinks + ellipsises like the
   project so a long client name can never push the row out of the box. */
.harvest-week-entry .hw-client {
	flex: 0 1 auto;
	font-weight: bold;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.harvest-week-entry .hw-client::after {
	content: '–';
	font-weight: normal;
	margin-left: 4px;
}

.harvest-week-entry .hw-project {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Task trails the project, in parentheses. */
.harvest-week-entry .hw-task {
	color: #888;
	flex: 0 0 auto;
	white-space: nowrap;
}

.harvest-week-entry .hw-task::before {
	content: '(';
}

.harvest-week-entry .hw-task::after {
	content: ')';
}

/* Mantis project · category badge under the note (ticket-linked entries only).
   Mirrors the look of .iservice-card-meta in the iService plugin. */
.harvest-week-entry .hw-bug-meta {
	color: #555;
	font-size: 0.85em;
	margin-top: 2px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.harvest-week-entry .hw-bug-project {
	background-color: #e7e7e7;
	border-radius: 2px;
	font-weight: bold;
	padding: 0 4px;
	white-space: nowrap;
}

.harvest-week-entry .hw-bug-category {
	background-color: #e7e7e7;
	border-radius: 2px;
	padding: 0 4px;
	white-space: nowrap;
}

.harvest-week-entry .hw-bug-category::before {
	content: '·';
	margin-right: 4px;
}

/* Plain Harvest entry: project name + muted note line. */
.harvest-week-entry .hw-note {
	color: #888;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Bug tracking: ticket name + grey project·category field. */
.harvest-week-entry .hw-ticket {
	font-weight: bold;
}

.harvest-week-entry .hw-meta {
	background-color: #e7e7e7;
	border-radius: 2px;
	color: #555;
	display: inline-block;
	margin-top: 2px;
	max-width: 100%;
	overflow: hidden;
	padding: 0 5px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Meeting (team project): orange like on the card. */
.harvest-week-entry .hw-meeting {
	background-color: var(--harvest-color);
	border-radius: 2px;
	color: #fff;
	display: inline-block;
	font-weight: bold;
	padding: 1px 6px;
}

.harvest-week-entry .hw-hours {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.harvest-week-entry.running {
	color: #d24e00;
	font-weight: bold;
}

/* Tracking widget opened from a roadmap card. */
.harvest-track-popup {
	background: #fff;
	border: 1px solid #c4c4c4;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	max-height: 70vh;
	max-width: 95vw;
	overflow: auto;
	padding: 8px 12px 12px;
	position: absolute;
	width: 700px;
	z-index: 9999;
}

.harvest-track-popup .refineText,
.harvest-track-popup .searchBoxElement {
	width: 500px !important;
}

.harvest-loading {
	color: #666;
	font-style: italic;
	padding: 8px 4px;
}

.harvest-track-close {
	background: none;
	border: none;
	color: #888;
	cursor: pointer;
	float: right;
	font-size: 20px;
	line-height: 1;
	padding: 0 2px;
}

.harvest-track-popup .harvest {
	margin: 0;
}

/* [+] "free tracking" button: kept in the same row as the meeting shortcuts
   but neutral-looking so it doesn't compete visually. */
.harvest-tp-btn.harvest-free-add {
	background-color: #e2e2e2;
	color: #333;
	font-size: 16px;
	line-height: 1;
	padding: 3px 9px;
}

.harvest-tp-btn.harvest-free-add:hover {
	background-color: #d0d0d0;
}

.widget-title .fa-harvest {
	height: 16px;
	width: 30px;
}

.harvest-statistics .graphs {
	display: grid;
	grid-template-columns: 30% 70%;
}

@media (max-width: 980px) {
	.harvest-statistics .graphs {
		grid-template-columns: 100%;
	}
}

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

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

/* Stacked bar + legend — one vocabulary, shared by the Billable and the
   Projects/Tasks breakdown boxes. */
.harvest-aside-box .hb-bar {
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	display: flex;
	height: 14px;
	overflow: hidden;
}

.harvest-aside-box .hb-seg {
	display: block;
	height: 100%;
}

.harvest-aside-box .hb-legend {
	margin-top: 10px;
}

.harvest-aside-box .hb-legend-row {
	align-items: flex-start;
	display: flex;
	gap: 6px;
	padding: 3px 0;
}

.harvest-aside-box .hb-dot {
	border: 1px solid #d5d5d5;
	border-radius: 2px;
	flex: 0 0 auto;
	height: 15px;
	margin-top: 2px;
	width: 15px;
}

.harvest-aside-box .hb-legend-label {
	flex: 1 1 auto;
	word-break: break-word;
}

.harvest-aside-box .hb-legend-value {
	flex: 0 0 auto;
	font-weight: bold;
}

/* Aside module: hours per day of the selected week. */
.harvest-weekoverview .hw-days {
	display: flex;
	gap: 4px;
	justify-content: space-between;
}

.harvest-weekoverview .hw-day {
	flex: 1 1 0;
	text-align: center;
}

.harvest-weekoverview .hw-day-label {
	color: #777;
	display: block;
	font-size: 12px;
}

.harvest-weekoverview .hw-day-value {
	display: block;
	font-weight: bold;
}

/* Aside module: billable vs non-billable against the weekly capacity. */
/* Total hours left, Capacity flushed right. */
.harvest-billable .hb-figures {
	display: flex;
	gap: 28px;
	justify-content: space-between;
	margin-bottom: 10px;
}

.harvest-billable .hb-figures>.hb-figure:last-child {
	text-align: right;
}

.harvest-billable .hb-label {
	color: #777;
	display: block;
	font-size: 12px;
}

.harvest-billable .hb-value {
	font-size: 20px;
	font-weight: bold;
}

.harvest-billable .hb-seg-billable,
.harvest-billable .hb-dot-billable {
	background: #1a73e8;
}

.harvest-billable .hb-seg-non,
.harvest-billable .hb-dot-non {
	background: #8ab4f8;
}

/* Right-click quick-action menu for week entries. */
.harvest-week-menu {
	background: #fff;
	border: 1px solid #bdbdbd;
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	font-size: 13px;
	min-width: 150px;
	padding: 4px 0;
	position: absolute;
	z-index: 9999;
}

.harvest-week-menu a {
	color: #333;
	cursor: pointer;
	display: block;
	padding: 5px 14px;
	text-decoration: none;
	white-space: nowrap;
}

.harvest-week-menu a:hover {
	background: var(--harvest-color);
	color: #fff;
}

.harvest-week-menu-sep {
	border-top: 1px solid #eee;
	margin: 4px 0;
}