/*!
 * Jetpack CRM
 * https://jetpackcrm.com
 */

// this is extended throughout
%zbs-tasks-field {

	line-height: 1;
	border: 1px solid #ccc;
	border-radius: 0.2em;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);

}

.jpcrm-task-editor-wrap {
	margin-top: -1em;
}

.zbs-task-clear {
	margin-bottom: 1em;
}


#calendar {
	max-width: 100%;
	margin: 0 auto;
}

.jpcrm-task-owner {

	@extend %zbs-tasks-field;

	display: flex;
	gap: 8px;
	align-items: center;
	padding: 5px 10px;

	i,
	img {
		width: 30px;
		flex: 0 0 0;
		border-radius: 50%;
	}

	#zerobscrm-owner {
		color: #000;
		border: 0;
		box-shadow: none;
	}
}

.jpcrm-task-time td {
	padding: 6px 10px;
	color: #000;

	label {
		font-size: 14px;
		color: #000;
		font-weight: 400;
	}
}

img.jpcrm-avatar {
	border-radius: 50%;
}

#zbs-add-task-ui {
	width: 39%;
	float: right;
	margin-right: 1%;
	display: none;
}

.zbs-adding-task {
	width: 60%;
	float: left;
}

.close-add-task {
	color: #767676;
	float: right;
	cursor: pointer;
}

.clear {
	clear: both;
}

#zbs-task-title-row {
	display: flex;
	gap: 8px;

	#zbs-task-title {
		// take general rounding etc. from this
		@extend %zbs-tasks-field;

		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
		font-size: 14px;
		font-weight: 400;
		min-height: 0;
		padding: 0.2em 0.5em;
		line-height: 1.4;
		flex: 1 1 auto;
	}

	#mark-complete-task {
		min-width: 200px;
		flex: 0 1 auto;

		button {
			width: 100%;

			&.hidden {
				display: none;
			}
		}
	}
}

.zbs-show {
	border: 1px solid #ddd;
	background: #fff;
}


.no-owner,
.no-task-date,
.task-reminders,
.no-contact,
.show-on-calendar,
.remind_task {

	// take general rounding etc. from this
	@extend %zbs-tasks-field;

	width: 100%;
	font-size: 14px;
	color: #ccc;
	border: 1px solid #ccc;
	margin: 0;
	padding: 4px;
}

.show-on-calendar,
.remind_task {
	color: #000;

	div input {
		margin: 0.2em 0.5em !important;
	}

	label {
		font-size: 14px;
		line-height: 1.4;
		font-weight: 400 !important;
	}
}

.remind_task {
	padding: 10px 4px;
	position: relative;
}

.remind_task a {
	font-size: 14px;
	position: absolute;
	top: 5px;
	right: 5px;
}

.no-owner,
.no-task-date {
	width: 48%;
}

#zbse_desc {
	font-size: 14px;
	padding: 0.5em;
}

.show-on-calendar input[type="checkbox"],
.remind_task input[type="checkbox"] {
	margin: -2px 0 0;
	line-height: normal;
}

.show-on-calendar span,
.remind_task span {
	margin-left: 5px;
}

.no-owner {
	float: left;
	position: relative;
	border: 1px solid #ccc;
	border-radius: 0.2em;
	z-index: 0;
}

.no-task-date {
	float: right;
}

.zbs-task-desc textarea {

	// take general rounding etc. from this
	@extend %zbs-tasks-field;

	width: 100%;
	height: 200px;
}

::placeholder {
	color: #ccc;
}

#titlewrap,
#post-body-content {
	display: none;
}

.ui.segment {
	margin-top: 0;
}

.no-owner .dn {
	color: #000;
	line-height: 30px;
	vertical-align: middle;
	width: 80%;
	float: left;

}

.no-owner .avatar {
	border-radius: 50%;
	margin-right: 10px;
	float: left;
}

.zbs-unassigned {
	font-size: 25px !important;
	margin-top: 9px !important;
}

.zbs-cal-complete {
	box-sizing: border-box;

	.icon {
		margin: 0 !important;
	}
}

.zbs-comp-1 {
	display: none !important;
}

.zbs-task-for-help {
	line-height: 31px;
	float: left;
	margin-right: 5px;
	width: 18%;
	min-width: 134px;
	color: #000;
	padding-left: 0.3em;
}

.zbs-task-for,
.zbs-task-for-company {
	width: 80%;
	float: left;
	padding: 0;
	margin-top: -11px;
	position: relative;

	// right floated contact button when assigned
	.zbs-view-contact {

		position: absolute !important;
		right: 2px !important;
		top: 14px !important;

	}

	// right floated contact button when assigned
	.zbs-view-company {

		position: absolute !important;
		right: 2px !important;
		top: 14px !important;

	}
}

.zbstypeaheadwrap {
	position: relative;
	clear: both;
	padding-top: 10px;
	padding-bottom: 0;
}

.zbs-task-for-who {
	color: #000;
}

.outlook-event {
	border: 1px solid #ccc;
	width: 100%;
	padding: 10px;
	border-radius: 4px;
}

// FullCalendar style overrides
#calendar.fc {
	--fc-event-bg-color: var(--jp-green);
	--fc-event-border-color: var(--jp-green);
	--fc-button-text-color: var(--jp-black);
	--fc-button-bg-color: var(--jp-white);
	--fc-button-hover-bg-color: var(--jp-gray-0);
	--fc-button-active-bg-color: var(--jp-black);

	a {
		color: #000;
		text-decoration: none;
	}

	.fc-button-primary:not(:disabled):active {
		color: inherit;
		background-color: inherit;
	}

	.fc-button-primary:not(:disabled).fc-button-active,
	.fc-button-primary:not(:disabled).fc-button-active:active {
		color: var(--jp-white);
		background-color: var(--jp-black);
	}

	.fc-button-primary:disabled {
		background-color: var(--jp-gray);
		border-color: var(--jp-gray);
	}

	// Handle toolbar wrapping on small screens
	.fc-toolbar-chunk {
		display: flex;
		gap: 8px;
		flex-wrap: wrap;

		&:nth-child(1) {
			justify-content: flex-start;
		}

		&:nth-child(2) {
			justify-content: space-around;
			text-align: center;
		}

		&:nth-child(3) {
			justify-content: flex-end;
		}

		> * {
			margin: 0;
		}
	}

	.fc-daygrid-event-harness,
	.fc-timegrid-event-harness {
		overflow: hidden;
		white-space: nowrap;
	}

	.event_html {
		display: flex;
		align-items: center;
		gap: 4px;
	}
}
