/* Animations */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* End: Animations */

/* Loading button */
.button.button-loading::before {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	margin-bottom: -4px;

	/* Background image: icons/reload.svg, white */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23ffffff' fill='none' viewBox='0 0 24 24' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99' /%3E%3C/svg%3E");
	background-size: 20px 20px;
	background-repeat: no-repeat;

	transform: translateX(0);
	animation: spin 2s linear infinite;
}

.button[disabled].button-loading::before,
.button.disabled.button-loading::before {
	/* Background image: icons/reload.svg, black */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke='%23000000' fill='none' viewBox='0 0 24 24' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99' /%3E%3C/svg%3E");
}

/* End: Loading button */

/* Icon svg size */
.bbearg-crm-icon svg {
	width: 1em;
	height: 1em;
}

/* END: Icon svg size */

/* CRM Fields list */
.crm-field {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5em;
	align-items: start;
}

.crm-field.line_breaker {
	margin-bottom: 45px;
	border-bottom: 1px solid #dadacf;
}

.crm-field .crm-field-actions {
	display: flex;
	flex-direction: row;
	gap: 0.25em;
	align-items: center;
	min-width: 60px;
}

.crm-field a.crm-action {
	display: block;
	padding: 10px 6px;
	box-sizing: content-box;
	text-decoration: none;
}

.crm-field a.crm-action:hover,
.crm-field a.crm-action:focus-visible {
	background-color: #ecece3;
}

.bb-section--post-relationships .crm-field {
	width: 100%;
}

.bb-section--post-relationships .crm-field--type-field_relationship .bb-post-search-input-wrapper .bb-post-search-input-add {
	display: none;
}

.bb-section--post-relationships .button {
	margin-bottom: auto;
}

.bb-section--post-relationships .crm-field a.crm-action:hover,
.bb-section--post-relationships .crm-field a.crm-action:focus-visible {
	/* Post Relationship fields already have that background, so use a lighter version */
	background-color: #f5f5f0;
}

.crm-field a.crm-action.crm-field-cancel-link:hover,
.crm-field a.crm-action.crm-field-cancel-link:focus-visible {
	fill: #8e1515;
	color: #8e1515;
	background-color: #eed4d4;
}

.crm-field a.crm-action svg {
	display: block;
	width: 1em;
	height: 1em;
}

.crm-field-wrapper.crm-field--type-textarea.editing .crm-field-label {
	max-width: 150px !important;
}

.crm-field-wrapper.crm-field--type-textarea.editing {
	grid-template-columns: unset !important;
	position: relative !important;

}

.crm-field-wrapper.crm-field--type-textarea.editing .crm-field-actions {
	position: absolute;
	top: 10px;
	right: 18px;
}

/* End: CRM Fields List */

/* Saving a field */
.crm-field-wrapper:not(.saving) .show-if-saving {
	display: none !important;
}

.crm-field-wrapper:not(.saving) .hide-if-saving {
	display: block;
}

.crm-field-wrapper.saving .show-if-saving {
	display: block;
}

.crm-field-wrapper.saving .hide-if-saving {
	display: none !important;
}

.crm-field-wrapper.saving .crm-field-value--edit,
.crm-field-wrapper.saving .crm-field-value--edit :where(input, select, textarea) {
	background: #ecece3;
	cursor: not-allowed;
}

.bb-section--post-relationships .crm-field-wrapper.saving .crm-field-value--edit :where(input, select, textarea) {
	background: #e6e6de; /* slightly darker in post relationship fields */
}

.crm-field-wrapper.saving a.crm-action.crm-field-save-link svg.icon-update {
	animation: spin 1s linear infinite;
}

.crm-field-wrapper .crm-saving-status {
	white-space: nowrap;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 1ch;
	height: 16px;
}

.crm-action-saving-text {
	font-size: 12px;
}

/* End: Saving a field */

/* Refreshing the audit log after editing a field */
.audit-log-wrapper.loading {
	opacity: 0.5;
	cursor: not-allowed;
}

/* End: Refreshing the audit log after editing a field */

/* Checkbox list & radio field */
.crm-field-checkbox-hidden-count,
.crm-field-radio-hidden-count {
	font-style: italic;
	opacity: 0.5;
}

/* End: Checkbox list & radio field */

/* Select field */
.crm-field ::placeholder,
.crm-field input:not([type="submit"]),
.crm-field textarea,
.crm-field select {
	font-size: inherit;
	line-height: 1.25;
}

.crm-field textarea {
	padding: 8px 0.75em;
}

select {
	appearance: none !important;
	-webkit-appearance: none !important;

	background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --%3E%3Csvg fill='%23000000' height='800px' width='800px' version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 407.437 407.437' xml:space='preserve'%3E%3Cpolygon points='386.258,91.567 203.718,273.512 21.179,91.567 0,112.815 203.718,315.87 407.437,112.815 '/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 10px;
	background-position: calc(100% - 0.75em);
}

.crm-field select {
	min-width: 130px;
	padding-left: 0.75em;
	padding-right: 1.5em;
}

/* End: Select field */

/* Make display field bigger
 -- Especially if empty, to make it easier to click which enters edit mode */
.crm-field-value--display {
	min-width: 150px;
	min-height: 2.2em;
}

.crm-field-value--display:where(:hover, :focus-visible) {
	background: rgba(0, 0, 0, 0.025);
}

/* End: Make display field bigger */

/* Match input line height on labels */
.crm-field-value--display,
.crm-field-label {
	line-height: 1.25;
	padding: calc(.5em + 1px) 1em;
}

.crm-field-label {
	padding-right: 0;
	padding-left: 5px;
}

/* End: Match input line height on labels */

/* File inputs */
.crm-field.crm-field--type-file .crm-action.crm-field-cancel-link {
	display: none !important;
}

.bb-file-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
}

.bb-file-list .bb-file-item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	align-items: start;
}

.bb-file-list .bb-file-item a {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.bb-file-list:has(.bb-file-item) + .bb-file-input {
	margin-top: 20px;
}

.bb-file-input input[type="file"] {
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 0;
}

.bb-file-input .button {
	margin-top: 10px;
}

.bb-file-remove svg {
	width: 1em;
	height: 1em;
}

/* End: File inputs */

/* File list numbering */
.bb-file-list {
	counter-reset: file-index;
}

.bb-file-list .bb-file-item {
	counter-increment: file-index;
	position: relative;
}

.bb-file-list .bb-file-item::before:not(:first-child:last-child) {
	content: counter(file-index) ".";
	position: absolute;
	top: 0;
	left: -30px;
	width: 30px;
	text-align: center;
}

/* End: File list numbering */

/* Post Relationship Button */
.bb-section--post-relationships .button {
	background: #f5f5f0;
}

.bb-section--post-relationships .button:hover,
.bb-section--post-relationships .button:focus-visible {
	background: #fff;
}

/* End: Post Relationship Button */

/* Post lists */
ul.bb-post-list,
ul.bb-post-list li {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.bb-post-list li {
	display: flex;
	flex-direction: row;
	gap: 8px;
	padding: 5px 0;
	line-height: 1.2;
}

.crm-field-value--display ul.bb-post-list {
	padding-left: 2ch;
}

.crm-field-value--display ul.bb-post-list > li {
	display: list-item;
	list-style: disc;
}

/* End: Post lists */

/* Post Search Add Button */
.bb-post-search-input-wrapper {
	position: relative;
}

.bb-post-search-input-wrapper .bb-post-search-input-add {
	position: absolute;
	right: 10px;
	top: 7.5px;
}

/* Post Search Add Button */
.bb-post-search-input-wrapper {
	position: relative;
}

.bb-post-search-input-wrapper .bb-post-search-input-add {
	position: absolute;
	right: 10px;
	top: 7.5px;
}

/* Post Search Results */
ul.bb-post-search-selected-posts {
	margin: 5px 0 10px;
}

.bb-post-search-results {
	margin: 0 3px 0;
	padding: 5px 12px;
	background: #78735f12;
	border: 1px solid #cacac3;
	border-top: none;
}

.bb-post-search-results .bb-post-search-result {
	display: flex;
	flex-direction: row;
	align-items: center;
}

ul.bb-post-search-selected-posts:has(li:hover) > li:not(:hover),
ul.bb-post-search-results-list:has(li:hover) > li:not(:hover) {
	opacity: 0.6;
}

/* End: Post Search Results */

/* Post Search Pagination */
.bb-post-search-page-buttons {
	margin: 10px 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.bb-post-search-page-buttons .bb-prev-page {
	grid-column: 1;
	justify-self: start;
}

.bb-post-search-page-buttons .bb-next-page {
	grid-column: 2;
	justify-self: end;
}

/* End: Post Search Pagination */

/* Add Post Button */
.crm-add-post-button.bb-hidden {
	display: none;
}

a.crm-add-post-button-link {
	display: grid;
	grid-template-columns: 1em auto;
	gap: 0.25em;
	align-items: center;
}

a.crm-add-post-button-link svg {
	fill: currentColor;
}

.crm-field-wrapper.crm-field--add-post .add-post-button {
	grid-column: 2 / 3;
	justify-self: start;
}

/* End: Add Post Button */

/* Add post button in post relationship fields */
.crm-field.saving .crm-field-add-post-link,
.crm-field.editing .crm-field-add-post-link {
	display: none;
}

/* End: Add post button in post relationship fields */

/* Object ID in titles */
.bb-crm-object-id {
	display: block;
	padding: 2px 10px;
	font-size: 0.75em;
	border-radius: 50px;
}

.bb-crm-object-id::before {
	content: '#';
	margin-right: 2px;
}

/* End: Object ID in titles */


/* Modal Window */
body.bb-modal-open {
	overflow: hidden;
}

.bb-modal-background {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.3);
	display: grid;
	place-content: center;
	overflow: auto;
}

.bb-modal-container {
	padding: 1vw;
	background: #f5f5f0;
	max-height: 100%;
	overflow: auto;
}

.bb-modal-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;

	margin-bottom: 10px;
	border-bottom: 1px solid #dadacf;
	padding-bottom: 10px;
}

h2.bb-modal-title {
	font-size: 1em;
	margin: 0;
}

.bb-modal-content {
}

.bb-modal-close {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	align-items: center;
	padding: 5px;
	font-size: 0.6em;
	line-height: 1;

	border: none;
	background: none;
	box-shadow: none;

	cursor: pointer;
}

.bb-modal-close:hover,
.bb-modal-close:active {
	background: #ecece3;
}

.bb-modal-close svg {
	display: block;
	width: 1.5em;
	height: 1.5em;
	fill: currentColor;
}

/* End: Modal Window */

/* Start: Favorite List */

.crm-favorite-list ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	padding-left: 0;
	gap: 40px;
}

.crm-favorite-list ul .bb-tile-single {
	margin-left: 0;
	margin-top: 0;
}

/* End: Favorite List */
/* Start: Favorite Post Button */
.crm-favorite-button .crm-favorite-post-link {
	display: inline-block;
	height: 1em;
	padding: 0.25em 0;
	box-sizing: content-box;
}

/* End: Favorite Post Button */

/* Start: Add Touchpoint Button and Form */
@media ( min-width: 768px ) {
	.add-touchpoint-form {
		min-width: 600px;
	}
}

.add-touchpoint-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.add-touchpoint-form .form-group:not(.touchpoint-date, .touchpoint-time) {
	grid-column: span 2;
}

.add-touchpoint-form .form-group label {
	font-size: 0.75em;
	font-weight: 500;
}

.add-touchpoint-form > .button {
	grid-column: span 2;
	width: fit-content;
	margin: 0 auto;

}

/* End: Add Touchpoint Button and Form */


/* To-do Form */
.add-todo-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

.add-todo-form > * {
	grid-column: span 2;
}

.add-todo-form > .button {
	grid-column: span 2;
	width: fit-content;
	margin: 10px auto 0;
}

@media screen and (min-width: 768px) {
	.add-todo-form {
		min-width: 600px;
	}
}


.select2-dropdown {
	z-index: 999999;
}

.bbearg-crm--popup--overlay {
	display: none;
}

.bbearg-crm--popup--overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.2);
	width: 100%;
	height: 100%;
	display: none;
}

.bbearg-crm--popup--overlay.active {
	display: flex;
}

.bbearg-crm--popup--overlay .bbearg-crm--popup {
	margin: auto;
	text-align: center;
	padding: 20px;
	background: #f3f3f3;
	border-radius: 5px;
}

.bbearg-crm--popup--overlay .bbearg-crm--popup .bbearg-crm--popup-actions {
	margin-top: 30px;
}

.bbearg-crm--popup--overlay .bbearg-crm--popup .bbearg-crm--popup-actions .button {
	min-width: 140px;
}

.bbearg-crm--popup--overlay .bbearg-crm--popup .bbearg-crm--popup-actions .button:not(:last-child) {
	margin-right: 20px;
}

.bbearg-crm-import label,
.bbearg-crm-export label {
	margin-bottom: 5px;
}

.bbearg-crm-import input,
.bbearg-crm-import select,
.bbearg-crm-export input,
.bbearg-crm-export select {
	margin-bottom: 20px;
}

/* End: Add To-do Form 8/

/* Start: Add Base Event Calendar Styling */
:root {
	--fc-event-bg-color: #ecece3;
	--fc-event-border-color: #ecece3;
	--fc-event-text-color: black;
	--fc-small-font-size: 14px;
	--fc-button-bg-color: black;
	--fc-button-border-color: black;
	--fc-button-text-color: white;
	--fc-button-active-bg-color: #454545;
	--fc-button-active-border-color: #454545;
	--fc-button-hover-bg-color: #454545;
	--fc-button-hover-border-color: #454545;
}


.fc .fc-button {
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: bold !important;
	border-radius: 50px;
	padding: 5px 15px !important;
	min-height: 42px;
}

.crm-event-calendar-wrapper {
	width: 100%;
	display: block;
}

.fc-col-header-cell-cushion {
	font-size: 20px;
}

.fc .fc-daygrid-day-number,
.fc-col-header-cell-cushion {
	text-decoration: none;
}

.fc-event-main .fc-event-title {
	text-wrap: wrap;
	font-weight: bold;
}

.fc-daygrid-event {
	padding: 3px;
	border-radius: 5px;
	max-width: 95%;
	margin-left: auto !important;
	margin-right: auto;
	margin-bottom: 8px !important;
}

.fc-h-event .fc-event-main {
	text-wrap: wrap;
}

.fc-event-date, .fc-event-location, .fc-event-type, .fc-event-org {
	display: flex;
}

.fc-event-date svg, .fc-event-location svg, .fc-event-type svg, .fc-event-org svg {
	width: 12px;
	margin-right: 5px;
}

.fc-event-location {
	position: relative;
}

.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {
	min-height: 180px !important;
}

.fc-daygrid-event .fc-event-title {
	line-height: 22px;
}

.fc .fc-toolbar-title {
	font-size: 24px !important;
}

.fc .fc-scrollgrid table {
	min-width: 100%;
}

.fc .fc-daygrid-event-harness-abs {
	max-width: 100%;
	margin-bottom: 10px;
}


/* End: Add Base Event Calendar Styling */

body.home .bb-title-row {
	display: none;
}

/* Start: Breadcrumbs */
body.home .wp-block-rs-utility-blocks-breadcrumbs {
	display: none;
}

body .is-layout-flex .wp-block-rs-utility-blocks-breadcrumbs {
	gap: 8px !important;
}

/* End: Breadcrumbs */


/* Hide Preview Elements from the popup */
.bb-modal-content .crm-field--type-hidden-summary {
	display: none !important;
}

.crm-field-label a[data-tooltip] svg {
	width: 25px;
	height: 25px;
	position: absolute;
	margin-left: -10px;
}

.vs__dropdown-menu {
	z-index: 99999 !important;
}

/* Global Icon settings */

/* make export icon a little bit smaller */
.crm-action .bbearg-crm-icon.icon-export {
	width: .9em;
	height: .9em;
}

/* Hidden Fields Update */
.crm-field-group--hidden,
.crm-field-condtional--hidden {
	display: none !important;
}

.collapse-group {
	width: 100%;
	padding-top: 20px;
	display: block;
	border-top: 1px solid #e3e3e3;
}

/* Crm Export Icon */
.crm-export-icon {
	font-size: 14px;
	margin-left: 5px;
	font-weight: 500;
}